8.1 Add a Watermark or Logo

The -stamp-on and -stamp-under operations stamp the first page of a source PDF onto or under each page in the given range of the input file. For example,

cpdf -stamp-on logo.pdf in.pdf odd -o out.pdf

stamps the file logo.pdf onto the odd pages of in.pdf, writing to out.pdf. A watermark should go underneath each page:

cpdf -stamp-under topsecret.pdf in.pdf -o out.pdf

The -combine-pages operation takes two PDF files and stamps each page of one over each page of the other. The length of the output is the same as the length of the “under” file. For instance:

cpdf -combine-pages over.pdf under.pdf -o out.pdf

Page attributes (such as the display rotation) are taken from the “under” file. For best results, remove any rotation differences in the two files using -upright first.