I'm tring to write a batch javascript that will extract a page based on the the size of the page. We have very large documents with 81/2x11 and 11x17 pages intermingled throughout. I need only to extract the 11x17 pages.
Here is the code that I have but it extracts all the pages. I have been working with the getPageBox size and trying to translate that into a page number using pageNum, but have had no success. Any help could be great appreciated.
/* Extract Pages to Folder */
// A regular expression to acquire the base name of the 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: "/C/temp/"+filename+"_"+i+".pdf" // change this
});
}
catch (e)
{
console.println("Batch Aborted: " + e )
}
lee.
Traction Software
http://www.traction-software.co.uk