I have a bunch (1000+) drawings in PDF that I need to extract the page sizes of.
I know how to x-fer the data to Excel, but can't figure out how to get the size from the file.
Any assistance will be appreciated.
Thanks
I know how to x-fer the data to Excel, but can't figure out how to get the size from the file.
Any assistance will be appreciated.
Thanks
This code will do the former:
var pageBox = this.getPageBox("Crop", 0);
var pageWidth = pageBox[2]-pageBox[0];
var pageHeight = pageBox[1]-pageBox[3];
console.println(this.documentFileName + "\t" + pageWidth + "\t" + pageHeight);
When the Action is done open the JS Console window (Ctrl+J) and you'll be able to copy the text over directly to an Excel spreadsheet.
Notice the values shown are in PostScript Points, though. If you want another unit let me know and I'll adjust it for you.
Also notice that those values are of the first page's Crop box only. Each page has multiple boxes and each of those can be different in size...
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.