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

Detecting different / odd page sizes in Adobe PDF

Explorer ,
May 06, 2024 May 06, 2024

In the past I have successfully been able to check PDFs to see if all of the page sizes are what I need them to be.  However I have set the correct parameters but when I search a test document, it checks it but doesn't return the correct answer.  Three pages should produce an error.  Any suggestions or corrections are appreciated. 

 

See the picture below that show my selections.  thanks in advance for your assistance. 

 

TILE workArtboard 23-20.jpgTILE workArtboard 24-20.jpg

 

Architecture: x86_64

Processor: Intel

Build: 24.2.20687.0

AGM: 7.1.4

CoolType: 9.1.0

JP2K: 4.0.2.54248

 

 

TOPICS
General troubleshooting , How to , PDF
1.5K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
May 20, 2024 May 20, 2024

This is not something you can fix so easily. It comes from the issues JS has with floating points, especially when dividing numbers (as it needs to do when converting PostScript points to inches).

Here are the results I get for the second file you sent:

1: 8.5 x 11
2: 8.5 x 14
3: 8.5 x 11
4: 8.5 x 11
5: 8.370000203450521 x 11.68999989827474
6: 11.47999996609158 x 8.879999796549479
7: 8.66000027126736 x 15
8: 8.91999986436632 x 11.470000372992622

 

The real solution would be to define a range, instead of checking if the page size is exactly 8.5 x 11 you should check if it's between 8.49 and 8.51 and 10.99 and 11.01, for example.

 

View solution in original post

Translate
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 07, 2024 May 07, 2024

Can you share the PDF file in question, and the Preflight profile you created?

Translate
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
Explorer ,
May 19, 2024 May 19, 2024

Sorry for the delay.  I created this doc in Illustrator and saved it as a PDF.  Opened it in Adobe and reduced the file size. 

 

When you say PreFlight 'profile', I don'g know what you mean.   Please see the pics I have shared above for how I set up the - Page is equal to a specified size - function.  

 

If there is more to do, I have not done that.  Looking forward to getting this to work.  Thanks

Translate
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 20, 2024 May 20, 2024

When you run a command in the Preflight tool it's called a Profile and it can be exported and shared with others.

My guess is it's a rounding issue.  Here are the actual sizes of the pages in your sample file, which I outputted using a script:

 

1: 8.5 x 11
2: 8.5 x 14
3: 8.5 x 11
4: 8.5 x 11
5: 8.267722235785591 x 11.692916870117188
6: 11.970000372992622 x 8.700000339084202
7: 8.399999830457899 x 15
8: 8.864000108506945 x 11.918986002604166

 

Translate
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
Explorer ,
May 20, 2024 May 20, 2024

Thank you.   I went just back into the document and eliminated the rounding issue.  For example, If a page size was 11.379823766134 I changed it to 11.38.  I corrected all of the pages in question, ran it through pre flight and still no pages were flagged.  I have attached the updated pdf. 

 

In the picture I provided, do you see any place, where my parameters are incorrect? 

Thanks for your assistance. 

Translate
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 20, 2024 May 20, 2024

This is not something you can fix so easily. It comes from the issues JS has with floating points, especially when dividing numbers (as it needs to do when converting PostScript points to inches).

Here are the results I get for the second file you sent:

1: 8.5 x 11
2: 8.5 x 14
3: 8.5 x 11
4: 8.5 x 11
5: 8.370000203450521 x 11.68999989827474
6: 11.47999996609158 x 8.879999796549479
7: 8.66000027126736 x 15
8: 8.91999986436632 x 11.470000372992622

 

The real solution would be to define a range, instead of checking if the page size is exactly 8.5 x 11 you should check if it's between 8.49 and 8.51 and 10.99 and 11.01, for example.

 

Translate
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
Explorer ,
May 20, 2024 May 20, 2024

Yes this is the answer!  I made the changes. I tested several other page size options - using points not inches, higher and wider, lower, odd page, etc.  Using - unequal to - is the setting that achieved your solution of creating the range.  Pre flight identified all pages outside and inside this range.  Thanks so much for your patience. I hope this works for others or at least gives them an idea where to troubleshoot.   May your charge cord always reach the outlet 👍 

 

Screenshot 2024-05-20 at 10.18.57 AM.png

Translate
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 20, 2024 May 20, 2024
LATEST

Nicely done, and I like your wish at the end, there! 🙂

 

Translate
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