Skip to main content
Participant
February 2, 2025
Answered

Acrobat profile check and page boxes

  • February 2, 2025
  • 2 replies
  • 263 views

I am looking for a prefile script able to list all page Boxes present in the PDF file.

How may I writ it?

 

Thank you for any help

Correct answer try67

You can use this code to do that:

 

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("Media: "+this.getPageBox("Media", p));
	console.println("BBox: "+this.getPageBox("BBox", p));
}

2 replies

AnandSri
Legend
March 6, 2025

Hello!

 

Hope you're doing well. I wanted to check if you had a chance to try the code shared by our Product experts. Let us know if you run into any issues. For future reference, you can refer to this article to learn more about scripts in Acrobat: Acrobat JavaScript Developer Guide.

 

Thanks,

Anand Sri.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
February 3, 2025

You can use this code to do that:

 

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("Media: "+this.getPageBox("Media", p));
	console.println("BBox: "+this.getPageBox("BBox", p));
}