APConnextion
asked on
Batch Sequence Page Extraction Using Javascript For Adobe Acrobat
Can someone tell me how I need to alter this javascript (which parameters to change to what, errors, etc) to allow Adobe Acrobat to execute it to extract pages from multiple-page documents? I extract them as hx-area-1.pdf, hx-area-2.pdf, etc, etc. There are several multiple-page reports (made into pdf's in Access) that need to be extracted to single pages in Acrobat. Thank you!
/* Extract Pages to Folder */
// regular expression acquire the base name of file
var re = /.*\/|\.pdf$ig;
var filename + this.path.replace(re," ") ;
try
{
for ( var i = 0; i < this.numPages; i++)
this.extractPages
({
nStart: i,
cPath: "/Paulnext/AC/Java/"+filen ame+"_" +".pdf" // (X)
});
catch (e)
{
console.println(Batch Aborted: " + e )
}
/* Extract Pages to Folder */
// regular expression acquire the base name of file
var re = /.*\/|\.pdf$ig;
var filename + this.path.replace(re," ") ;
try
{
for ( var i = 0; i < this.numPages; i++)
this.extractPages
({
nStart: i,
cPath: "/Paulnext/AC/Java/"+filen
});
catch (e)
{
console.println(Batch Aborted: " + e )
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
knightEknight - You were right. There were also a couple other (one \ and one }) things missing that I added in since posting. But that was the exact error I was on when you responded! Thanks! Now - I still have a problem. The javascript executes, but it is extracting the entire file to another file (say there are 4 pages, and I want them extracted to 4 single page .pdfs) - it is currently extracting all 4 pages to another folder as a .pdf with 4 pages). Basically, it's making a copy of the pdf in another folder. But I need each page extracted seperately. I hope I've explained this properly. Can you help? The code must be missing someething . . .
ASKER
Actually, I finally figured it out! But you got me through the debugging, knight, so you get the points. Thanks!
glad I could help in some small way :)
thanks for the points!
thanks for the points!
ASKER