Skip to content

Instantly share code, notes, and snippets.

@konn
Created August 5, 2015 10:57
Show Gist options
  • Save konn/d099aa9a895e339b4071 to your computer and use it in GitHub Desktop.
Save konn/d099aa9a895e339b4071 to your computer and use it in GitHub Desktop.
Duplicate each pages thru JXS + Acrobat Pro
var app = Application("Adobe Acrobat Pro")
doc = app.documents[0];
app.includeStandardAdditions = true;
app.pdfWindows[0].pages().reverse().forEach(function(page){
var n = page.pageNumber();
doc.insertPages({after: n,
from: doc,
startingWith: n,
numberOfPages: 1});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment