var rCrop = this.getPageBox("Crop",this.pageNum);
rCrop += 56.69290161; // Adjust Left Side
rCrop -= 56.69290161; // Adjust Top Side
rCrop -= 56.69290161; // Adjust Right Side
rCrop += 56.69290161; // Adjust Bottom Side
By changing “Crop” in the last row to “Trim” or “Bleed” and re-execute the code I thought I should be able to set those boxes as well?
Eventually I’m going to set all these 3 boxes to different values but for now I’m just trying to set the bleed and trim!
Any ideas of what I’m doing wrong would be much appreciated.
I don't know, but I wonder if you might be, in testing, accidentally setting illegal values.
For instance, it is a rule that the bleed box must be no smaller than the trim box. No other box can be larger than the media box. There are other defined relationships.
It seems that Acrobat doesn't "recognize" the page boxes immediately after they been set by the script.
I used to check if they were set by going into the "Set Page Boxes" dialog but looking on the different boxes showed no changes!
But if you do a preflight and check the Overview -> Page... Page information you will see that the different page boxes are in fact changed!
So save your PDF and reopen it to be able to check the page boxes through the dialog!
Hope this information might be of use for someone else.