Created
February 4, 2014 12:53
-
-
Save felixlindemann/8803061 to your computer and use it in GitHub Desktop.
create Duplicate Pages Acrobat XI OSX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function duplicatepages() { | |
try { | |
var r = this.getPageBox(); | |
var w = r[2] - r[0]; | |
var h = r[1] - r[3]; | |
var oldD = this; | |
var newD = app.newDoc({ nWidth: w, nHeight: h }); | |
for(var p=oldD.numPages-1; p>=0; p--) { | |
pageFile = "/Volumes/Daten/tmp/acrobat/"+"page.pdf"; | |
oldD.extractPages({ cPath: pageFile, nStart: p }); | |
newD.insertPages({ cPath: pageFile, nPage: -1 }); | |
newD.insertPages({ cPath: pageFile, nPage: -1 }); | |
// File.delete(pageFile); | |
} | |
return true; | |
} | |
catch(e) | |
{ | |
app.alert("Processing error: "+e) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment