Duplicate All Pages (in-place) in Acrobat X
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:
- Right click on document, and choose "Page Display Preferences"
- Choose "JavaScript" from the left.
- Check the "Enable menu items JavaScript execution privileges".
Secondly save following snippet as duplicate.js to the %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.