This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.
Moderators:TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
My question is: should I explicitly set the value of the CropBox before I retrieve it with the PXCp_PageGetBox method for the first time? If I've loaded a pdf document with the viewer and retrieve its CropBox with the JS via getPageBox() - it functions. If I've set the value with the PXCp_PageSetBox method one time, it is no problem to retrieve it any time later. But if I use PXCp_PageGetBox for the first time it returns the value -2112936170 ("Required property is not set.")
Hi.
No, you may not set CropBox if it is not needed. Page can have several different boxes - MediaBox, CropBox, BleedBox, TrimBox, ArtBox, and only MediaBox is required. If any Box is not set for page JS will reurn default value (for CropBox it will be value of MediaBox, and for all others - value of CropBox). But xcpro will return box only if it was set for page. So it is safe to ignore this error (or if you really need CropBox - replace it with MediaBox if not present).
HTH.
Victor
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.