Skip to main content
gtsolid
Known Participant
February 19, 2024
Answered

SIze of every page

  • February 19, 2024
  • 2 replies
  • 1421 views

Hi everyone!

I have a PDF with several pages each, is it possible to get the weight of each page from Acrobat Pro?

Example attached

This topic has been closed for replies.
Correct answer try67

That's not possible, at least not directly. You will need to extract each page as its own file to examine that, and even then it won't mean that the sum of these files will match the size of the combined file.

2 replies

try67
Community Expert
Community Expert
February 19, 2024

Each page in a PDF file has multiple boxes that define its size, but the most common one is the Crop box. To list the width of all of these boxes in your file you can run this code:

 

for (var p=0; p<this.numPages; p++) {
	var pageBox = this.getPageBox("Crop", p);
	var pageWidth = pageBox[2]-pageBox[0];
	console.println("Page " + (p+1) + " Width:" + pageWidth);
}

 

Note that the output is in PostScript Points. You can divide it by 72 to get inches, for example.

gtsolid
gtsolidAuthor
Known Participant
February 20, 2024

Where can i run this?

try67
Community Expert
Community Expert
February 20, 2024

The JS Console, but it will not give you the information you're looking for. See above.

JR Boulay
Community Expert
Community Expert
February 19, 2024

You must use this Preference option:

 

Acrobate du PDF, InDesigner et Photoshopographe
gtsolid
gtsolidAuthor
Known Participant
February 20, 2024

The size in MB, not in mm

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
February 20, 2024

That's not possible, at least not directly. You will need to extract each page as its own file to examine that, and even then it won't mean that the sum of these files will match the size of the combined file.