You would do the following (assuming all files are portrait):
Route the jobs based on their filename so the jobs with _foil_ are sent to one path and everything else is send to another path.
Rotate the jobs with _joil_ in the name so they are landscape
Join all the jobs (the files with _join_ will be all over the place on the joined document BUT they will all be landscape).
Split by orientation
First split branch should have all landscape pages
Second split branch should have all portrait pages
merge the branches into a join node.
Since join is done in the split sequence this will put all landscape pages (the ones with _foil_ in the name) first.
finally, rotate landscape pages to portait (if you rotated "left" above then you need to rotate "right" here)
That should do it. You can then impose and do whatever else the workflow needs to do.
Received this question in the internal FFCore forum:
I met a customer last week which is our biggest greeting card manufacturer in Finland. They use imposition which have 8 or 16 (2 sided) different cards per page. Every card is a different PDF file. Tricky part is that before the files are ready for imposition they need to be in specific order. This is because they use foiling for fininshing and as you may know foiling paper is quite expencive material so you need to create smart impositions to use it well and efficiently. Customer have information which files needs to be foiled in a pdf file name. If card needs to be foiled in finishing device you will find "_foil_" from pdf file name. We would use collect node to gather 8 or 16 pdf files depending which size of paper we would print. Tricky part is that incoming pdf files can be in what ever order so the files which have "_foil_" can be where ever in those 8 or 16 files. We should have the files which needs to be foiled first when files are joined. Then when we have imposition in next step we can be sure that first files in this 16 page or 32 page pdf file are the one's which needs to be foiled. Workflow will have collect node which will collect 8 or 16 files. Next route node or some other method to reoder the files so pdf files which have "_foil_" naming will be first one's to be joined in join node. Question is that is it possible in our coming versions to reorder the files using route node or some other method so that files going to first route will be first, files going to second route will be next and so on? After this reordering we can apply join node and then the pdf files will be in right order for the imposition. Attached you will find a picture about impositiong for 8 cards so nothing special on that. If you have any other ideas how to do this please lighten me with your ideas :)