Skip to content

Instantly share code, notes, and snippets.

@gsharp
Created December 18, 2009 01:48
Show Gist options
  • Save gsharp/259208 to your computer and use it in GitHub Desktop.
Save gsharp/259208 to your computer and use it in GitHub Desktop.
/* Extract Pages to Folder */
// regular expression acquire the base name of file
var re = /.*\/|\.pdf$/ig;
// filename is the base name of the file Acrobat is working on
var filename = this.path.replace(re,"");
try {
for ( var i = 0; i < 1; i++) {
this.extractPages ({
nStart: i,
cPath: "/F/temp/"+filename+"_" + i +".pdf"
});
}
} catch (e) {
console.println("Aborted: " + e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment