How to Add a Watermark to a PDF: Text, Image, and Transparent Overlays
Adding a watermark to a PDF — whether a DRAFT stamp, a company logo, a CONFIDENTIAL overlay, or a subtle background pattern — is one of the most common document preparation tasks. This guide covers all the methods: placing an image or text watermark in any PDF viewer or editor, controlling opacity and position, and making watermarks permanent through flattening.
A watermark in a PDF is a visible mark — typically text like "CONFIDENTIAL" or "DRAFT", or a company logo — overlaid on page content to indicate the document's status, ownership, or usage restrictions. Watermarks are widely used in legal document review, publishing, financial reporting, and any workflow where you need to communicate a document's state without altering its underlying content.
PDF watermarks can be text or image-based, opaque or semi-transparent, page-covering or corner-positioned. They can be added as permanent content or as annotations — and crucially, in PDF they can be implemented in several ways with very different properties. Understanding the difference between a "true" watermark baked into page content versus a removable overlay is essential before choosing an approach.
This guide covers how to add watermarks to PDFs using various methods, the technical differences between approaches, and how to remove watermarks when needed.
Watermark vs stamp: what is the difference?
In PDF terminology, these terms are often used interchangeably but technically differ:
**Watermark** — Usually a semi-transparent mark that appears behind the main content. In the PDF content stream, this requires drawing the watermark below the existing page content in the layer order.
**Stamp** — An annotation applied on top of existing content. The PDF specification includes a dedicated Rubber Stamp annotation type. Stamps are inherently removable because they exist as a separate annotation layer.
**Overlay** — A general term for any content added on top of existing page content. An overlay watermark appears above existing content rather than behind it. Most tools that add "watermarks" to PDFs actually add overlays, not true transparent underlays.
For security purposes, an overlay stamp is easier to remove than watermark text baked directly into the page content stream. Neither prevents determined editing in a tool like Adobe Acrobat Pro — for true content protection, see PDF encryption and permissions.
Adding text watermarks programmatically
The most flexible approach for adding watermarks to many PDFs is programmatic, using PDF libraries:
**Python: pypdf or pdf-lib**
```python
# Using pypdf (Python)
from pypdf import PdfReader, PdfWriter
from pypdf.generic import RectangleObject
# More commonly, use reportlab to create the watermark page
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
# Create watermark PDF
c = canvas.Canvas("watermark.pdf", pagesize=A4)
c.setFont("Helvetica", 50)
c.setFillAlpha(0.3) # 30% opacity
c.setFillColorRGB(0.5, 0.5, 0.5)
c.translate(300, 421)
c.rotate(45)
c.drawCentredString(0, 0, "CONFIDENTIAL")
c.save()
```
**JavaScript: pdf-lib**
The pdf-lib library (the same library used by this editor) can add watermarks entirely in the browser:
```javascript
import { PDFDocument, rgb, degrees } from 'pdf-lib';
const pdfDoc = await PDFDocument.load(pdfBytes);
const pages = pdfDoc.getPages();
for (const page of pages) {
const { width, height } = page.getSize();
page.drawText('DRAFT', {
x: width / 2 - 60,
y: height / 2,
size: 60,
color: rgb(0.75, 0.75, 0.75),
opacity: 0.3,
rotate: degrees(45),
});
}
```
Image watermarks and logos
Adding an image watermark (such as a company logo) to a PDF requires embedding the image as a PDF XObject and drawing it at the desired position and opacity on each page.
Key considerations for image watermarks:
- **Format** — PNG images with alpha transparency produce the cleanest semi-transparent logos. JPEG images do not have alpha channels so cannot be made transparent directly (the entire image rectangle will be opaque or fully transparent).
- **Opacity** — PDF supports an extended graphics state that sets the opacity of drawn objects. Setting the opacity to 0.1–0.3 produces a ghosted watermark effect.
- **Position** — Centre the image on the page, or position it at a corner for a less obtrusive brand mark.
- **All pages vs cover only** — Most watermarking workflows apply the mark to all pages. For draft control, applying only to the first page may be sufficient.
Tools for image watermarks:
- PDFtk — command-line tool, uses a background PDF approach (create the watermark as a single-page PDF, then stamp it onto every page)
- QPDF — PDF transformation tool useful for manipulating page content
- Adobe Acrobat Pro — Tools > Edit PDF > Watermark provides a visual UI for both text and image watermarks
Removing watermarks from PDFs
Removing a watermark from a PDF is possible when you have the right to do so (e.g., you created the document or have explicit permission). The difficulty depends on how the watermark was added:
**Annotation stamp watermarks** — The easiest to remove. Open in Acrobat Pro, show the annotations panel, select and delete the stamp annotation. In some cases a script (`doc.removeField()` or `doc.deleteAnnot()`) is needed.
**Overlay content in page content stream** — Harder but possible with Acrobat Pro's Edit PDF tools. Select the watermark text or image element and delete it. This modifies the page content stream directly.
**Flattened watermarks** — If the watermark has been flattened (merged into the page rasterized content as pixels, or as merged content stream objects that are indistinguishable from original content), removal is impractical without redaction tools that cover the watermark area.
Note: Removing watermarks from documents you don't own may violate copyright or the document's terms of use. Always check your rights before removing marks.
Watermarks are a practical tool for communicating document status, ownership, and usage restrictions in PDF workflows. For most use cases, programmatic addition using pdf-lib, pypdf/reportlab, or PDFtk gives full control over position, opacity, and styling. For one-off documents, Adobe Acrobat Pro's built-in watermark tool is the most accessible option. Remember that no watermark approach provides true security against modification by a determined editor — for genuine access control, combine watermarking with PDF encryption.
Frequently asked questions
Does adding a watermark change the underlying content of my PDF?
It depends on the method. Adding a watermark as an annotation (stamp) does not modify the original page content — the annotation is a separate layer. Adding content directly to the page content stream does modify the document. In both cases the visual appearance changes, but only content stream modification alters the "core" page content. For archival PDFs (PDF/A), annotations are the preferred approach as they leave original content unchanged.
Can I add a watermark to just some pages of a PDF?
Yes — when using programmatic approaches (pdf-lib, pypdf) you control which pages the watermark is applied to by iterating only over the target pages. In Adobe Acrobat, the watermark dialog allows specifying a page range. You can apply different watermarks to different page ranges (e.g., "DRAFT" on odd pages, blank on even).
Why does my watermark appear behind the text on some viewers but on top in others?
PDF viewers render content layers differently when z-order is ambiguous. In PDF, content drawn earlier in the content stream appears "behind" content drawn later. If your watermarking tool appends to the content stream (draws after existing content), the watermark appears on top. If it prepends (draws before), the watermark appears behind. Some viewers may also reorder transparency layers. For consistent behaviour, use an explicit opacity value and ensure the watermark is drawn at a well-defined layer position.
What opacity value should I use for a watermark?
A common range is 15–35% opacity. At 15–20%, the watermark is clearly visible but does not significantly obscure the underlying content — suitable for working documents. At 30–40%, the watermark is more prominent and harder to ignore, suitable for strongly marking draft or confidential documents. Full opacity (100%) is generally only used for decorative overlays that should not obscure content, placed in a margin or corner.
Try it yourself
Everything in this article can be done directly in the free PDFTheGuide editor — no account required.