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)
-
- Member
- Posts: 85
- Joined: Thu Jun 23, 2011 11:41 am
Compare specific properties of two pdf files (advanced)
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...
-
- Member
- Posts: 85
- Joined: Thu Jun 23, 2011 11:41 am
Compare specific properties of two pdf files (advanced)
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!
[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)
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
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
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Compare specific properties of two pdf files (advanced)
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
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