Copy link to clipboard
Copied
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 th
...Copy link to clipboard
Copied
What version of Acrobat do you have?
Do all the files have just a single page? If not, you'll need to export the sizes of all the pages, as they can vary.
Copy link to clipboard
Copied
I have Acrobat Pro DC.
Each drawing can be multiple pages, but the sheet sizes are constant within each drawing.
Thanks
Copy link to clipboard
Copied
OK. You can use an Action to extract the sizes to the console (although that has limited capacity), to a Report object or even just to a global variable, which later on can be written out to a text file.
Copy link to clipboard
Copied
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...
Copy link to clipboard
Copied
Outstanding! I really appreciate you assistance... Thanks!