Page 1 of 1

merge pdf element

Posted: Fri Dec 07, 2012 11:43 am
by tz8
Hey,



how can i ensure the proper sequence when merging two PDFs? Say i get a calendar pdf but with cover and inner pages in separate PDFs, and i always want to have the Cover in the front... Am i missing something there?



Cheers,



Thorsten

merge pdf element

Posted: Fri Dec 07, 2012 12:29 pm
by mwinker
On one of my flows, I have up to 4 pages of the same job arriving into an "Assemble Job" element. I use the "Rename Job" elements on the pieces coming in to give them a -1,-2,-3 sequence number before they get to "Assemble Job". I have the luxury that they're all arriving from different paths. It works good for my application anyway.

merge pdf element

Posted: Fri Dec 07, 2012 3:17 pm
by tz8
you imply it's absolutely always using ascending sort order on the job.Name()?

merge pdf element

Posted: Fri Dec 07, 2012 3:28 pm
by dkelly
It actually sorts on job.getPath()

merge pdf element

Posted: Mon Dec 10, 2012 12:37 pm
by mwinker
tz8 wrote: you imply it's absolutely always using ascending sort order on the job.Name()?


I'm using jobname before that hyphen for the jobname and they always assemble in the right order whether there is a page coming in for each or not. ex: 1,2,4 or 2,3





dkelly wrote: It actually sorts on job.getPath()


That kinda confuses me. Is it sorting on the incoming paths and not the index number I'm putting on the files? They don't necessarily arrive in order.

merge pdf element

Posted: Mon Dec 10, 2012 3:22 pm
by dkelly
getPath() returns the entire directory and filename including Switch's prefix and the extension. I don't know why it uses getPath() instead of getName() but it does.