I need to compare the trim box in a pdf to the trim defined in the xml job ticket.

Post Reply
cwswitch
Member
Posts: 78
Joined: Fri Feb 24, 2017 12:25 am

I need to compare the trim box in a pdf to the trim defined in the xml job ticket.

Post by cwswitch »

I need to compare the trim box in a pdf to the trim defined in the xml job ticket.

1) Which part of Switch do I use to pull the info from the PDF? (I have Pitstop Server if required but would still need to know how if that's the way)
2) Which part of Switch do I use to pull the info from the ticket?
3) How do I perform the comparison?
4) Can I allow for orientation mismatches? e.g. 210x297 is good for 297x210

This is to form a drag and drop flow where the sales rep can drop in a job and be informed pass/fail. It's stand alone, not part of a larger flow.
abailescollins
Advanced member
Posts: 458
Joined: Wed Apr 22, 2015 4:28 pm

Re: I need to compare the trim box in a pdf to the trim defined in the xml job ticket.

Post by abailescollins »

Basically do it in the PitStop preflight profile using a variable in the page size check (set page size to be defined by the Trim Box).
Switch will get the value from the xml and pass it to the check in PitStop.
I'll leave the Switch gurus to tell you how to grab it.
Head of Product Management @ Ultimate
abc@imposition.com
sander
Advanced member
Posts: 274
Joined: Wed Oct 01, 2014 8:58 am
Location: The Netherlands

Re: I need to compare the trim box in a pdf to the trim defined in the xml job ticket.

Post by sander »

I do it this way, very simple, very effective.

Image

Left:

Code: Select all

[Switch.Calculation:Expression="[Stats.TrimBoxWidth]*0.352777778",Precision="1"]x[Switch.Calculation:Expression="[Stats.TrimBoxHeight]*0.352777778",Precision="1"]
Right, set the values from your XML over here.

Code: Select all

[Job.PrivateData:Key="HotfolderNaam",Before="x"].0x[Job.PrivateData:Key="HotfolderNaam",After="x"].0
I'm Dutch, all I do is in mm, no points or whatever ;)
John.Dean
Newbie
Posts: 1
Joined: Fri Feb 24, 2017 8:12 pm

Re: I need to compare the trim box in a pdf to the trim defined in the xml job ticket.

Post by John.Dean »

I just tried to post a lengthy reply and was punished by a timeout. Lost my wall of text. So, see attached flow.

Drop in a folder which contains the PDF and XML. The flow adds a pass_ or fail_ prefix to the file name.
CheckTrim.jpg
CheckTrim.jpg (30.04 KiB) Viewed 9512 times
Check PDF Trim.sflow.zip
(18.66 KiB) Downloaded 814 times
cwswitch
Member
Posts: 78
Joined: Fri Feb 24, 2017 12:25 am

Re: I need to compare the trim box in a pdf to the trim defined in the xml job ticket.

Post by cwswitch »

Thanks for the replies, very useful indeed!
Post Reply