Assemble Job variable number of files

Post Reply
jan_suhr
Member
Posts: 57
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Assemble Job variable number of files

Post by jan_suhr »

I working on a flow were there are a number of files in a job that needs to be assembled for a PDF-merge. The number of files varies since they are created by importing XML to InDesign. Each job has a different number of files.

How can I get the number of files?

I was thinking of some kind of counter that records the number of files that passes a point in the flow were the job.PrivateData is set from the filename of the XML that enters the flow. There is one XML entering the flow but individual PDF-files are output from InDesign. Several XML-jobs can run at the same time or after each other.

I suppose this has to be done with scripting?


Thanks


Jan
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Assemble Job variable number of files

Post by gabrielp »

I'm a little confused about the "there is one XML entering the flow" vs the several XML jobs running at the same time bit.

But... you can assemble on a key on an arbitrary time. So if you are dealing with several files coming in and you can say "they will all probably come in within 15 minutes of each other" you can assemble by the job number (lets say, in private data) after 20 minutes and be pretty confident they are all going in there. The downside, of course, is that it adds a delay to your flow.

Hope this helps...
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
loicaigon
Member
Posts: 147
Joined: Wed Jul 10, 2013 10:22 am

Re: Assemble Job variable number of files

Post by loicaigon »

Hi,

If your xml import is part of the flow (meaning using the indesign configurator), I may suggest to do all the indesign/pdf files in one command and output them in a folder. Eventually the script will move that folder into another hotfolder of your flow so it becomes a "folder" job and switch can event return the number of items in that job.
I find it easier to do it that way when I need to keep an overview of many things to be outputted from InDesign. And to have InDesign executed you can call a dummy indesign file for the opening process and close it and remove it.

HTH

Loic
http://www.ozalto.com
jan_suhr
Member
Posts: 57
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Assemble Job variable number of files

Post by jan_suhr »

Thanks Loic, that sounds like a good idea.


Gabriel, the input to the flow is one Excel-file with a number of records. Each record becomes a single XML that then is imported to InDesign to produce single PDF's. The number of single PDF's can be different from each Excel-file and they later has to be assembled to a single PDF and have backsides added to each page.

So I need the number of files that the Assemble Job element has to pick up.


Thanks


Jan
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Assemble Job variable number of files

Post by gabrielp »

jan_suhr wrote:So I need the number of files that the Assemble Job element has to pick up.
Ok. If you can't work that out, the method I described above lets you assemble these PDFs together if you cannot determine the total number of expected files to assemble if a delay is acceptable
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Post Reply