Page 1 of 1
Compare page count and route job accordingly
Posted: Tue Feb 08, 2022 3:41 pm
by popniete
Hi
I'm failing on a problem I thaught would be simple: I want to route a jobfolder to folder A, if all contained PDFs have the same page count. If not, route job to folder B. Any hints on this? Thanks!
Re: Compare page count and route job accordingly
Posted: Tue Feb 08, 2022 7:44 pm
by laurentd
Here is a flow to solve this:
• First ungroup the job and write the number of pages of each file in a private data, "pages".
• Assemble the job
with metadata merge, the "pages" private data will be the one of one of the files in the job.
• Ungroup the job again, and check if the number of pages of each file equals the "pages" private data.
• If not, add a "pageCount" private data with value "different".
• Then assemble the job again
with metadata merge.
• Sort the jobs based on that "pageCount" private data.
.
- sort jobs with different page count.png (19.83 KiB) Viewed 2452 times
Re: Compare page count and route job accordingly
Posted: Wed Feb 09, 2022 11:57 am
by freddyp
I am interested in knowing a bit more about the use case. Why do the number of pages have to be the same? How many files can there be inside the job folder? How many pages can there be?
Re: Compare page count and route job accordingly
Posted: Wed Feb 09, 2022 12:05 pm
by popniete
Hi Laurent, thank you so much, this does exactly what I need!
Tobi