This is just a small JavaScript extension to Acrobat X that allowes to Duplicate all pages in-place there exists another version which used extractPages and I didn't like that behavior so I wrote own.
First elevate privileges of the JavaScript programs:
Now you should be able to access the "Duplicate all pages (in-place)" under "Edit" menu item. If you can't see the item remember to restart Acrobat.
First elevate privileges of the JavaScript programs:
- Right click on document, and choose "Page Display Preferences"
- Choose "JavaScript" from the left.
- Check the "Enable menu items JavaScript execution privileges".
%appdata%\Adobe\Acrobat\10.0\JavaScripts folder:app.addMenuItem({
cExec: "duplicatePagesInPlace();",
cParent: "Edit",
cName: "Duplicate all pages (in-place)"
});
function duplicatePagesInPlace() {
var doc = this,
pages = this.numPages;
for (var i = pages - 1; i >= 0; i--) {
doc.insertPages({
cPath: doc.path,
nStart : i,
nEnd : i,
nPage : i
});
}
}
Now you should be able to access the "Duplicate all pages (in-place)" under "Edit" menu item. If you can't see the item remember to restart Acrobat.
1 comment:
Thanks very much for this! For my purposes it's better to edit the document in place than create a new file as I was before.
Rather than create a javascript file and save it in the application's scripts directory I just used the Action Wizard and created an action with the code inside your function block.
Post a Comment