PdfProperties

Post Reply
joaodaffonsojr
Member
Posts: 32
Joined: Wed Sep 08, 2021 4:36 pm

PdfProperties

Post by joaodaffonsojr »

Hello!

I was trying to use this script to get box values ​​in mm and noticed that cropbox and artbox have the same values.
But not in PDF! Here is an example of a PDF file in Pitstop Pro
pitstop_mm.png
pitstop_mm.png (31.41 KiB) Viewed 28070 times
and also the values ​​in Switch using the PdfProperties example script.
switch_pdfproperties.png
switch_pdfproperties.png (62.19 KiB) Viewed 28070 times
What could I be doing wrong?

Thanks in advance
mkayyyy
Member
Posts: 98
Joined: Mon Nov 21, 2016 6:31 pm
Location: UK

Re: PdfProperties

Post by mkayyyy »

I've just had a debug through the PdfProperties script with a blank PDF I made matching the values of the screenshot and I get the same result as you with the artBox and cropBox values being the same.

I don't think this is something you or the script is doing wrong. When I was debugging it looks like the calls getCropBoxWidth and getArtBoxWidth / getCropBoxHeight and getArtBoxHeight return the same values 637.7956999999999 and 892.9134.

Unless I'm missing something obviously wrong with the PDF I made (Blank PDF made with Enfocus Create Document through PitStop Pro) it looks like an issue with how the Switch Scripting Engine is parsing this PDF

Link to the PDF I made to test with if anybody else has any other thoughts: https://www.dropbox.com/scl/fi/t8y7z10p ... jiz7m&dl=0
freddyp
Advanced member
Posts: 1129
Joined: Thu Feb 09, 2012 3:53 pm

Re: PdfProperties

Post by freddyp »

Thanks for reporting this. It does indeed seem like it is a bug in the PdfPage class. I logged it.

Art boxes are not used very often, so I hope you do not suffer from this. If it is important to you and you have PitStop Server then I suggest to use the FastLane app: https://www0.enfocus.com/en/appstore/product/fastlane
joaodaffonsojr
Member
Posts: 32
Joined: Wed Sep 08, 2021 4:36 pm

Re: PdfProperties

Post by joaodaffonsojr »

Hi Freddy,
I can't use fastlane for this project, because I need to read the artbox variable from 2 different datasets and do a calculation to see if the values ​​are within a range.
I'll switch to bleedbox for now until this is resolved.
Thanks!

And thanks Mark for helping me too!
jan_suhr
Advanced member
Posts: 687
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: PdfProperties

Post by jan_suhr »

Do you have callas pdfToolbox?
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
joaodaffonsojr
Member
Posts: 32
Joined: Wed Sep 08, 2021 4:36 pm

Re: PdfProperties

Post by joaodaffonsojr »

jan_suhr wrote: Thu May 15, 2025 7:11 pm Do you have callas pdfToolbox?
No !
But can callas read 2 different datasets in the same pdf ?
jan_suhr
Advanced member
Posts: 687
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: PdfProperties

Post by jan_suhr »

You can script everything in pdfToolbox so it can handle it. From Switch you transfer your values from the datasets to variables that pdfToolbox can use.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
User avatar
tdeschampsBluewest
Member
Posts: 127
Joined: Tue Jun 01, 2021 11:57 am

Re: PdfProperties

Post by tdeschampsBluewest »

joaodaffonsojr wrote: Thu May 15, 2025 8:18 pm
jan_suhr wrote: Thu May 15, 2025 7:11 pm Do you have callas pdfToolbox?
No !
But can callas read 2 different datasets in the same pdf ?
I don't understand the problem here, you can pick value from two dataset and make calculation from them in switch, so what's blocking you with fastlane?
Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
joaodaffonsojr
Member
Posts: 32
Joined: Wed Sep 08, 2021 4:36 pm

Re: PdfProperties

Post by joaodaffonsojr »

tdeschampsBluewest wrote: Fri May 16, 2025 10:22 am
joaodaffonsojr wrote: Thu May 15, 2025 8:18 pm
jan_suhr wrote: Thu May 15, 2025 7:11 pm Do you have callas pdfToolbox?
No !
But can callas read 2 different datasets in the same pdf ?
I don't understand the problem here, you can pick value from two dataset and make calculation from them in switch, so what's blocking you with fastlane?
Problem is that looks like a bug in the PdfPage class, as Freddy said.
The cropbox and artbox have the same values.
So script gets the wrong info, nothing related to Pitstop or Fastlane.
Post Reply