• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sort PDFs by Page Dimensions

Community Beginner ,
May 02, 2023 May 02, 2023

Copy link to clipboard

Copied

Hi,

I have a few thousand engineering drawings in PDF format and I'm looking for a method of sorting these according to page dimensions. I have A4, A3 and A2 drawing sizes, and I want to process these with a selection of Actions to modify certain parts of each drawing.

 

I've got Acrobat Pro, and I've got as far as using Preflight to check an individual document - what I need is a batch process method to chew through the whole collection.

 

Any help would be much appreciated!

 

Thanks,

Paul

TOPICS
Edit and convert PDFs , Print and prepress

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 03, 2023 May 03, 2023

It is easy to do this with a Preflight profile used in an Action.
The advantage is that preflight profiles allow you to define a tolerance, as page dimensions are never exact.

That's how I usually sort between 6 sizes: A4, A3 and US Letter, in portrait and landscape.

 

Capture_2305030902.png

 

Capture_2305030911.png

Votes

Translate

Translate
Community Expert ,
May 02, 2023 May 02, 2023

Copy link to clipboard

Copied

This is not as trivial as it might seem. Some of the issues involved with this:

- A PDF file can contain pages of multiple sizes.

- A page in a PDF file has multiple boxes in it (Crop, Trim, Bleed, Art, Media and BBox), and each one could have different dimensions (slightly or not) from the others.

- A script in Acrobat can't move files, only save a copy under a new folder.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 02, 2023 May 02, 2023

Copy link to clipboard

Copied

Hi,

 

Each PDF drawing has one or more sheets, but they will all be the same size, there's no mixing of page sizes in any file.

Saving a new copy to folder depending on page size would be fine.

 

Thanks,

Paul

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 02, 2023 May 02, 2023

Copy link to clipboard

Copied

Then you can use something like this, as a part of an Action, and run it on your files.

Adjust the folder paths as needed, of course, but keep the same syntax I used:

 

var pageBox = this.getPageBox("Crop", 0);
var pageWidth = ((pageBox[2]-pageBox[0])/72).toFixed(2);
var pageHeight = ((pageBox[1]-pageBox[3])/72).toFixed(2);

if (pageWidth==8.3 && pageHeight==11.7) {
	this.saveAs("/C/SortedPDFs/A4/" + this.documentFileName);
} else if (pageWidth==11.7 && pageHeight==16.5) {
	this.saveAs("/C/SortedPDFs/A3/" + this.documentFileName);
} else if (pageWidth==16.5 && pageHeight==23.4) {
	this.saveAs("/C/SortedPDFs/A2/" + this.documentFileName);
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 03, 2023 May 03, 2023

Copy link to clipboard

Copied

It is easy to do this with a Preflight profile used in an Action.
The advantage is that preflight profiles allow you to define a tolerance, as page dimensions are never exact.

That's how I usually sort between 6 sizes: A4, A3 and US Letter, in portrait and landscape.

 

Capture_2305030902.png

 

Capture_2305030911.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 09, 2023 May 09, 2023

Copy link to clipboard

Copied

JR, try67 - apologies for not replaying sooner, got distracted by another thing.

 

Many thanks for your help, I know have a working solution.

 

Cheers,

Paul

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

Hi!

Could you tell what solution do you have fot sort PDF drawings. I  have the same problem

 

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

LATEST

What are "PDF drawings" and how are they different from regular pages in a PDF file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines