If your background is also a PDF, you can use cpdf:
cpdf -stamp-under stamp.pdf input.pdf -o out.pdf
Domanda
Given a .pdf
file (produced by Inkscape
with the LaTeX
option, but I am more focused on the .pdf
), is there a way to add programmatically a background (ideally, the background would be a rounded rectangle) to it? I am thinking typically of a python
script or a C
(or objective-C
) library.
Typically:
I guess I should be easier to act directly (maybe via the command line) within Inkscape
, but I am looking for a solution on the .pdf
Soluzione
If your background is also a PDF, you can use cpdf:
cpdf -stamp-under stamp.pdf input.pdf -o out.pdf
Altri suggerimenti
Working further from the answer of johnwhitington I found, that qpdf allows for that as well with the "underlay" option:
qpdf --underlay "background.pdf" -- input.pdf output.pdf
Great advantage: qpdf is available in most distributions. And as allways you can look at qpdf --help
to find even more options to specify the page or to work inplace i.e. no need to specify an output file.
Ghostscript and Imagemagick allow for the same, but I found it quite hard to have a proper solution and the .pdf will become a rasterized image.