I've a flow that is working but looking to speed things up.
At the moment an existing PDF is split to single pages and then using a Python script I add in the a new library PDF page to every split PDF. The resulting 2pp PDF then goes further into the flow where it is the merged back together with all the other 2pp PDFs.
My question is can a python script insert a library PDF file into every other page of the PDF eg a 50pp becomes a 100pp with the library file being placed as every other page.
Hope that makes sense.
inserting same PDF multiple times to another PDF
Re: inserting same PDF multiple times to another PDF
I do not know if it would work with a Python script, but I can suggest two alternatives.
With PitStop Server you can execute an Action that adds a page every n pages (in this case 2). This works well if the page to be added is fixed, eg a purchase condition page, or if the number of pages in the library from which to choose is limited.
Or, after running your current Python script that seems to do what is needed to add the second page, you do an "Assemble job" with "Scheme - Ungrouped job" and "Number of pages" set to [Job.PrivateData:Key="Ungroup.NumFiles"]*2. Continue with "Merge PDF".
With PitStop Server you can execute an Action that adds a page every n pages (in this case 2). This works well if the page to be added is fixed, eg a purchase condition page, or if the number of pages in the library from which to choose is limited.
Or, after running your current Python script that seems to do what is needed to add the second page, you do an "Assemble job" with "Scheme - Ungrouped job" and "Number of pages" set to [Job.PrivateData:Key="Ungroup.NumFiles"]*2. Continue with "Merge PDF".
Re: inserting same PDF multiple times to another PDF
Thanks for the advice.
The insert page, whilst common throughout the document, changes depending on the input xml so it's not a fixed file. This will rule out a Pitstop action?
I am currently doing the second option of assembling the pages but I was just trying to speed things up.
The insert page, whilst common throughout the document, changes depending on the input xml so it's not a fixed file. This will rule out a Pitstop action?
I am currently doing the second option of assembling the pages but I was just trying to speed things up.
Re: inserting same PDF multiple times to another PDF
Yes, it rules out a PitStop Action because it is not possible to use Smart Preflight variables for file paths.
Re: inserting same PDF multiple times to another PDF
You could use PDFToolkit to do that, if the insert PDF has it's name specified in the XML you can do it.
Jan
Jan