I have two PDF-files. Both have the same geometry and the same amount of pages. I would like to merge them, such that one file is the background and one file is the foreground. I tried pdftk with the background option:
pdftk bg.pdf background fg.pdf output out.pdf
But pdftk just uses the first page of the bg.pdf as a watermark for all pages. I would like to do it in Java (for example with the iText library) or with a bash command. Any suggestions?