need to get page size (mediabox) for each page in a PDF document
Reid Bogert
You can use a script like this:
var n = this.numPages; for (var i = 0; i < n; i++) { var aRect = this.getPageBox("Media", i); var width = aRect[2] - aRect[0]; var height = aRect[1] - aRect[3]; console.println("Page " + (i + 1) + " has a width of " + width + " and a height of " + height); }
For more information about the getPageBox() method take a look at: http://help.adobe.com/livedocs/acrobat_sdk/11/Acrobat11_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat11_HTMLHelp&file=JS_API_AcroJS.89.490.html
Use getPageBox("Media", pageNumber).
.
Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: try6767@gmail.com