Page 1 of 1

Assemble Job variable number of files

Posted: Sun Mar 06, 2016 5:49 pm
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

Re: Assemble Job variable number of files

Posted: Mon Mar 07, 2016 3:16 am
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...

Re: Assemble Job variable number of files

Posted: Mon Mar 07, 2016 9:59 am
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

Re: Assemble Job variable number of files

Posted: Tue Mar 08, 2016 3:34 pm
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

Re: Assemble Job variable number of files

Posted: Tue Mar 08, 2016 3:52 pm
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