Hi!
I would like to set up a solution that merges (or overlays) two separate PDFs into one and was wondering if anyone has an idea what would be the best solution.
I have seen that this topic has been brought up here on the forum before, but without any real conclusions as far as I can tell.
What I want to do is this: I have a PDF with just images and one PDF with just text. I want to merge these two together to create one single PDF, with one page, with the text on top of the images.
Been searching for a way to do this with Switch and Pitstop, but it does not really seem to be possible with pitstop - or am I missing something?
Thankful for all help.
Cheers!
Merge, or overlay, PDFs
Re: Merge, or overlay, PDFs
I think I hade done that with Indesign inside Switch. Make a template there you have the to pdfs mounted in the correct way. (rename them eg pdf1, pdf2 in the Links-folder)..
Make a flow there the pdfs renames to the new name and puts in the Links-folder, and then trigger Indesign to open the job and export it as an pdf.
Make a flow there the pdfs renames to the new name and puts in the Links-folder, and then trigger Indesign to open the job and export it as an pdf.
Between jobs!
Re: Merge, or overlay, PDFs
If it's the same image-PDF you want to place into several different language-PDF's you could do this using the "Paste copied graphic" action. If it's all different image-PDFs this won't be of much help.
I have done this for a 164 page catalog in 17 languages using pdfToolbox which integrates flawlessly with Switch using the Overlay-feature.
I have asked for this feature in PitStop several times and I'm still optimistic
I have done this for a 164 page catalog in 17 languages using pdfToolbox which integrates flawlessly with Switch using the Overlay-feature.
I have asked for this feature in PitStop several times and I'm still optimistic

Re: Merge, or overlay, PDFs
That is actually pretty much exactly what I am trying to do.Terkelsen wrote:I have done this for a 164 page catalog in 17 languages using pdfToolbox which integrates flawlessly with Switch using the Overlay-feature.

May I ask how you configured Switch to use the correct language PDF for the overlay with pdftoolbox?
Thank you!
Re: Merge, or overlay, PDFs
Well, there will obviously have to be some kind of relation between the 4-color-PDF and the language_PDF. In my case a certain part of the job name was the same.
I had the language-PDF's coming into the Switch flow and pdfToolbox picking up the corresponding 4-color-PDF using "Overlay" and placing that in the background. To choose the file for overlay I used "Define single-line text with variables". In my case it was something like "/Users/myusername/Desktop/4C-iPaper-PDFs/[Job.NameProper:Segment="7-9"].pdf".
You could also use private data like job.state or something else as the variable, depending on what could be used to refer to the corresponding 4-color-PDF.
I had the language-PDF's coming into the Switch flow and pdfToolbox picking up the corresponding 4-color-PDF using "Overlay" and placing that in the background. To choose the file for overlay I used "Define single-line text with variables". In my case it was something like "/Users/myusername/Desktop/4C-iPaper-PDFs/[Job.NameProper:Segment="7-9"].pdf".
You could also use private data like job.state or something else as the variable, depending on what could be used to refer to the corresponding 4-color-PDF.
Re: Merge, or overlay, PDFs
That is great. I got it to work the way I want to here, thank you so much for your help!
Re: Merge, or overlay, PDFs
That would be a great feature in PitStop that I'm missing for a long time too.Terkelsen wrote:I have done this for a 164 page catalog in 17 languages using pdfToolbox which integrates flawlessly with Switch using the Overlay-feature.
I have asked for this feature in PitStop several times and I'm still optimistic

The solution from "lombert" via InDesign and renamed pdf's in the links-folder is an very interesting approach. But how to handle, if you don't know how many pages you have to merge? And what are your experiences with re-exporting the pdf's? Are there any errors to expect?
Best regards!
Re: Merge, or overlay, PDFs
The way I do this is by using pdftk. It is a command line tool that you can download from https://www.pdflabs.com/tools/pdftk-server/. When you are on OS X 10.11 (El Capitan) you will have to use: https://www.pdflabs.com/tools/pdftk-the ... -setup.pkg for the time being.
You can call pdftk in the "Execute command" element. Attached is a flow that shows how to do it. You will of course have to modify the flow a bit to make it work. There is the path to pdftk/pdftk.exe to think of. The flow renames the two incoming files to prefix the "bottom" one with 1_ and the "top" one with 2_ and this is based on the filename ending in 4C or not. In your case that will probably be different.
You can call pdftk in the "Execute command" element. Attached is a flow that shows how to do it. You will of course have to modify the flow a bit to make it work. There is the path to pdftk/pdftk.exe to think of. The flow renames the two incoming files to prefix the "bottom" one with 1_ and the "top" one with 2_ and this is based on the filename ending in 4C or not. In your case that will probably be different.
Re: Merge, or overlay, PDFs
Thank you for your response.
Are there any experiences about prepress-quality of the merged/overlayed pdf-files created with pdftk? Is the result only useful for office purposes or does it comply the conditions for high quality printing processes like offset?
Thank you in advance.
Are there any experiences about prepress-quality of the merged/overlayed pdf-files created with pdftk? Is the result only useful for office purposes or does it comply the conditions for high quality printing processes like offset?
Thank you in advance.
Re: Merge, or overlay, PDFs
Merging PDF's as done by pdftk is a technical operation where one stream is combined with another one. The quality depends on the quality of the individual PDF files. The objects are copied as they are (ICC tags are kept, embedded subsets are kept, ...) so I see no quality concerns.
This being said, combining two PDF's can theoretically pose some issues for properties of a PDF at the document level: what if the two documents have different output intents, what happens to XMP metadata, keywords, title, ...? One of the two files will win. I have not checked which one but I would assume the bottom file. I think, however, these issues are not really issues in real-life situations.
There is a bigger chance that you have real issues related to the quality of the input files. The black text that you put on top could be set to knockout. There could be a white knockout rectangle at the bottom of the top file which would knock out the complete background. Objects in the top file could have transparencies that create unexpected results after combination. And so on. But you would have these with any PDF merging solution and you can get these solved in the regular way by preflighting/modifying the files, either before or after merging.
This being said, combining two PDF's can theoretically pose some issues for properties of a PDF at the document level: what if the two documents have different output intents, what happens to XMP metadata, keywords, title, ...? One of the two files will win. I have not checked which one but I would assume the bottom file. I think, however, these issues are not really issues in real-life situations.
There is a bigger chance that you have real issues related to the quality of the input files. The black text that you put on top could be set to knockout. There could be a white knockout rectangle at the bottom of the top file which would knock out the complete background. Objects in the top file could have transparencies that create unexpected results after combination. And so on. But you would have these with any PDF merging solution and you can get these solved in the regular way by preflighting/modifying the files, either before or after merging.
Re: Merge, or overlay, PDFs
Thank you for sharing this information. I will give it a try.