Page 1 of 1

Compare specific properties of two pdf files (advanced)

Posted: Thu Mar 22, 2012 9:18 am
by tkittel
Hello,



another flow also processes incoming folders, which contains two pdf files (only).

Now I need to compare the trimbox sizes of both pdf files (rounded to one digit after decimal point; for example: 50.24785x100.050719 should become 50.2x100.1): if the sizes are equal, forward to connection A, else forward to connection B



Which flow elements would be able to handle this challenge and how to configure?



Thanks for your little help!

Thomas

Compare specific properties of two pdf files (advanced)

Posted: Thu Mar 22, 2012 10:38 am
by Clive Andrews
I have something that reads the trimbox size and forwards it on to hotfolders created on the fly. give me 2 minutes and I'll find it for you sir...

Compare specific properties of two pdf files (advanced)

Posted: Thu Mar 22, 2012 10:40 am
by Clive Andrews
Try:



[Metadata.Text:Path="/jdf:JDF/jdf:ResourcePool[1]/jdf:Component[1]/@ProductType",Dataset="Jdf",Model="JDF",Segment="1-5"]/[Metadata.Text:Path="/jdf:JDF/jdf:ResourcePool[1]/jdf:Component[1]/@Dimensions",Dataset="Jdf",Model="JDF",Segment="1-3"]x[Metadata.Text:Path="/jdf:JDF/jdf:ResourcePool[1]/jdf:Component[1]/@Dimensions",Dataset="Jdf",Model="JDF",Segment="18-20"]



This is reading from a JDF, but I'm sure you can extract the Trim size from your Pitstop report, a Callas...







Don't forget the JDF dimensions are in points!

Compare specific properties of two pdf files (advanced)

Posted: Thu Mar 22, 2012 12:09 pm
by tkittel
Hi Clive,



thank you for your quick answer!



If I understood your code correctly, it's only to read the dimensions from the jdf model.

That's not my problem here, because I'm able to get it very easy with the 'stats' variable (a standard feature of powerwitch):

[Stats.TrimBoxWidth]x[Stats.TrimBoxHeight]



But I've no idea, HOW TO COMPARE this value of the 1st pdf with the value of the 2nd pdf and forward both pdf files ACCORDING TO THE RESULTS of this comparison?



Thomas

Compare specific properties of two pdf files (advanced)

Posted: Thu Mar 22, 2012 5:32 pm
by dkelly
Hello,



You can't use Stats for a job folder. A job folder is required since you have 2 PDF files group in a single job. You will have to use a Javascript to perform the comparison.



Dwight Kelly

Apago, Inc.

dkelly@apago.com