Copy link to clipboard
Copied
Hi, does anyone know how to verify the crop size of a pdf?
I've been searching this topic and can't find a solution.
Thanks,
John
Copy link to clipboard
Copied
so I might have a language issue and found that trim size and crop size are two different dimensions.
Copy link to clipboard
Copied
Each page in a PDF file can have a different Crop Box size, and also each page can have different values for its Crop, Trim, Art, Bleed and BBox boxes.
You can print out all of them using this code:
for (var p=0; p<this.numPages; p++) {
console.println("Page " + (p+1)+":");
console.println("Art: "+this.getPageBox("Art", p));
console.println("Bleed: "+this.getPageBox("Bleed", p));
console.println("Crop: "+this.getPageBox("Crop", p));
console.println("Trim: "+this.getPageBox("Trim", p));
console.println("BBox: "+this.getPageBox("BBox", p));
console.println(" ");
}
Copy link to clipboard
Copied
Thank you! I'll convert it to use in Terminal.
Copy link to clipboard
Copied
I can't think of any way you could use that in Terminal.
Copy link to clipboard
Copied
This script can only be executed from within Acrobat. If you want something similar for a command-line tool then it's possible, but not with Acrobat. You can contact me privately via [try6767 at gmail.com] to discuss me developing such a tool for you (for a fee, of course).
Copy link to clipboard
Copied
Hey sorry, I misspoke.
Your code made me consider writing a python script.
I was excited to try and figure it out!
I appreciate your help try67.