How can I apply a watermark on every page of a PDF file?
I have a PDF file and want to apply a watermark like the following on all pages and at 45 degrees:
watermark watermark watermark watermark watermark watermark watermark
watermark watermark watermark watermark watermark watermark watermark
watermark watermark watermark watermark watermark watermark watermark
watermark watermark watermark watermark watermark watermark watermark
watermark watermark watermark watermark watermark watermark watermark
watermark watermark watermark watermark watermark watermark watermark
........................
How can I do this?
You can use pdftk as described in this answer. Sample command line:
pdftk original.pdf stamp watermark.pdf output final.pdf
It is especially convenient if you are on Linux as pdftk is included in many popular distributions.
For Windows users there is also free GUI version available.
More Options
Instead of stamping watermark over original document you can add it as background using background
command (original pdf must be transparent). There is also a possibility to apply multi-page watermarks. Here is the documentation for the relevant commands:
background <background PDF filename | - | PROMPT>
Applies a PDF watermark to the background of a single input
PDF. Pass the background PDF's filename after background
like so:
pdftk in.pdf background back.pdf output out.pdf
Pdftk uses only the first page from the background PDF and
applies it to every page of the input PDF. This page is
scaled and rotated as needed to fit the input page. You can
use - to pass a background PDF into pdftk via stdin.
If the input PDF does not have a transparent background (such
as a PDF created from page scans) then the resulting back-
ground won't be visible -- use the stamp operation instead.
multibackground <background PDF filename | - | PROMPT>
Same as the background operation, but applies each page of
the background PDF to the corresponding page of the input
PDF. If the input PDF has more pages than the stamp PDF,
then the final stamp page is repeated across these remaining
pages in the input PDF.
stamp <stamp PDF filename | - | PROMPT>
This behaves just like the background operation except it
overlays the stamp PDF page on top of the input PDF docu-
ment's pages. This works best if the stamp PDF page has a
transparent background.
multistamp <stamp PDF filename | - | PROMPT>
Same as the stamp operation, but applies each page of the
background PDF to the corresponding page of the input PDF.
If the input PDF has more pages than the stamp PDF, then the
final stamp page is repeated across these remaining pages in
the input PDF.
Using qpdf:
qpdf --overlay overlay.pdf --repeat=1 -- input.pdf output.pdf
Alternatively
qpdf --underlay underlay.pdf --repeat=1 -- input.pdf output.pdf
See documentation.
Many ways:
- Use a commercial program (random example)
- Use whatever tool was used to create the PDF (e.g. Acrobat)
- Convert the PDF to a more tractable form.
- e.g. pdftops or pdf2ps - then edit the PostScript to add the watermark and convert back to PDF