Guide
Adding text and image watermarks to PDFs
By Logappradeep · ServiceNow developer
A watermark marks a document's status or ownership without hiding its content: "DRAFT" across a proposal, "CONFIDENTIAL" on an internal memo, "COPY" on a scanned certificate, or a company logo in the corner of a brochure. It discourages casual misuse and tells readers at a glance how the document should be treated.
Text or image
A text watermark is drawn with a standard font in the size and color you choose. It stays vector-based, so it is crisp at any zoom and adds almost nothing to the file size. An image watermark uses a PNG or JPG you supply, typically a logo. PNG files with transparent backgrounds give the cleanest result, because a JPG always carries a solid rectangle behind the artwork.
Controls that matter
- Opacity: between roughly 15 and 30 percent keeps the watermark visible while leaving the underlying text easy to read.
- Angle: a diagonal of about 45 degrees is the classic look and is harder to crop out than a horizontal line.
- Position or tiled: place a single mark in the center or a corner, or tile it repeatedly across the page so no region is left unmarked.
- Page range: apply the watermark to every page or only to selected pages, such as everything except the cover.
How the watermark is added
The tool appends new drawing instructions to each selected page's content, placing the text or image on top of what is already there with the transparency you set. The original page content is not re-rendered, so existing text remains selectable and the document keeps its quality. The work happens locally with pdf-lib, which means unreleased drafts and confidential files are not sent to an outside service just to stamp a word on them.
How strong is a watermark?
A watermark is a deterrent, not a security mechanism. Because it is added as page content, someone with a capable PDF editor and enough effort may be able to remove or cover it, and anyone can still take a screenshot. For sensitive material, combine watermarks with sensible distribution practices, such as sharing only with the people who need the file. Tiled watermarks across the whole page are noticeably harder to remove cleanly than a single small mark.
Tips
Choose a color that contrasts with the page but is not harsh; mid-gray or a muted red works on most documents. Preview a page with dense text and a page with images before saving, since a watermark that looks right on one may obscure details on another. Watermark the final version only: editing pages afterward can be awkward, and adding a watermark invalidates any existing digital signature.