Overlay one pdf or ps file on top of another


I have two pdf or postscript files (I can work with either one). What I want to do is merge each page on top of the other so that page1 of document A will be combined with page 1 of document B to produce page 1 of the output document. This isn't something I necessarily want need to do programatically, although that would be helpful.

Any ideas?

Best Solution

You can do this with pdf files using the command line tool pdftk using the stamp or background option.


$ pdftk file1.pdf background file2.pdf output combinedfile.pdf

This will only work with a one-page background file. If you have multiple pages, you can use the multibackground command instead.

Related Question