PDF Watermark
Published Updated
Stamp a word or a logo on every page, the first page or a list such as 1-3, 5, in the centre, a corner or a repeating grid, with opacity from 10% to 100% and any angle.
The stamp becomes part of each page
This tool draws the watermark straight into the content of every chosen page, on top of what is already there, with the pdf-lib library. It does not use the separate watermark annotation type of ISO 32000-1, section 12.5.6.22. The mark shows and prints wherever the page does, and an editor can still select and delete it like any other object.
A text watermark is also real text. Read back with pdf.js, a stamped test page returned its own sentence and then CONFIDENTIAL, so copying the page or running it through PDF to Text picks the word up too.
The font is Helvetica Bold, one of the standard 14 fonts that the specification requires every reader to provide (section 9.6.2.2), with WinAnsiEncoding, which Annex D of the same document defines as Windows Code Page 1252 for Latin text. In a test, accented letters, ß, € and the en dash worked, while Cyrillic, Hebrew, Chinese and an emoji each failed.
Every setting and where it starts
| Setting | Range | Starts at |
|---|---|---|
| Text | Latin letters, digits and symbols | CONFIDENTIAL |
| Font size | 12 to 120 pt | 48 pt |
| Text opacity | 10% to 100% | 30% |
| Logo file | PNG, JPG or WebP | none |
| Logo width | 5% to 80% of the page width | 30% |
| Logo opacity | 10% to 100% | 50% |
| Angle, shared by both modes | -180° to 180° | -45° |
| Colour of the text | any, from a colour picker | red, #ff0000 |
| Pages | all, the first, or a list like 1-3, 5 | all |
Corners, grids and sideways pages
- Corners. The outer edge of the mark, at its angle, sits about 36 points, or 13 mm, in from the two nearest edges, and a mark too big for the page is scaled down to fit.
- Tiled Grid. Copies are spaced 1.6 times the mark's width apart, never closer than 160 points, with rows at 65% of that distance and every other row shifted by half a step. CONFIDENTIAL gives 12 copies per A4 or Letter page at 48 pt, 24 at 24 pt and 4 at 120 pt.
- Rotated pages. Positions and the angle follow the page as a viewer shows it. On a page saved sideways with a Rotate entry, a Top-Left mark lands in the top-left corner you see, and the same goes for cropped pages.
The stamp measured on six page sizes and four rotations
We stamped generated PDFs with this page's own tool in Google Chrome 156, Chromium 153 (Playwright build, not Google Chrome), Firefox 155 and Playwright's WebKit build (not the Safari app), then drew every page back with pdf.js and counted the red-tinted pixels; the shares below were the same in all four within 0.1 percentage point. Settings were the starting ones: CONFIDENTIAL, 48 pt, red, 30% opacity, -45°, Center; the logo was a 300 x 150 PNG at 30% of the page width. Centred means the middle of the stamp was within 1.3% of the middle of the page as shown.
| Page, size in points | Text mark: share of the page, centre | Logo: share of the page |
|---|---|---|
| A4, 595 x 842 | 1.2%, centred | 1.2% |
| Letter, 612 x 792 | 1.2%, centred | 1.3% |
| A5, 420 x 595 | 2.4%, centred | 1.2% |
| A4 landscape, 842 x 595 | 1.2%, centred | 2.3% |
| A3, 842 x 1191 | 0.6%, centred | 1.2% |
| 80 mm receipt, 227 x 400 | 3.8%, shrunk to fit; the card said 77% | 1.0% |
| A4 with Rotate 90, 180 or 270 | 1.2%, centred, still -45° on screen | 1.2% at 0 and 180, 2.3% at 90 and 270 (the shown page is wider), centred |
| A4 cropped to 395 x 442 | 3.4%, centred in the visible area | not run |
Text keeps its point size, so the same word covers half as much of an A3 page as of an A4 page. A logo follows the page width instead. One stamp setting for a mixed file therefore gives marks of different sizes. When any page is too small, the result card names one percentage: the smallest of all pages. At 120 pt the card said 31%, which was the receipt page, while on the A4 and Letter pages the word covered about four times the area it covered at 48 pt.
Bottom-Right places the box around the tilted word 36 points from the edges, the tool's own setting. The letters themselves ended 56 to 57 points from the right side of the page and 44 to 45 points from the bottom on A4, Letter, A5, A3 and landscape A4, because the corners of a tilted box hold no letters.
How much the file grows, and how long it takes
Generated A4 pages with 40 lines of text each, the starting text mark on every page. Sizes are from Chrome 156; the other engines' files differed by at most 3 bytes. Time runs from pressing Apply to the download link, one run per cell.
| Pages | Before | After | Added per page | Chrome 156 | Chromium 153 | Firefox 155 | WebKit build |
|---|---|---|---|---|---|---|---|
| 1 | 1,733 B | 2,251 B | 518 B | 23 ms | 21 ms | 23 ms | 23 ms |
| 10 | 11,186 B | 13,966 B | 278 B | 21 ms | 21 ms | 25 ms | 21 ms |
| 100 | 105,828 B | 131,605 B | 258 B | 64 ms | 74 ms | 89 ms | 47 ms |
| 1,000 | 1,053,526 B | 1,310,477 B | 257 B | 664 ms | 652 ms | 882 ms | 968 ms |
| 100, logo instead of text | 105,828 B | 130,645 B | 248 B | 69 ms | 67 ms | 73 ms | 47 ms |
The font is not embedded: Helvetica Bold is one of the standard fonts every reader supplies, so each page only gains a few drawing commands. A logo is stored once and every page points to that one copy. The opacity you pick is written into the page as a graphics state; reading the files back gave 0.3 for the starting 30% and 1 for 100%.
Saving also rewrites the document information. Title, Author and Creator stayed as they were, while Producer became pdf-lib (https://github.com/Hopding/pdf-lib) and the modification date became the time of the stamp.
Watermarking a PDF
Step 1
Add the PDF
Encrypted files stop here with a message pointing to Unlock PDF.
Step 2
Set up the mark
Pick Text or Image / Logo, then size, colour, opacity, angle and one of six positions. All pages, the first page or a custom range.
Step 3
Apply and save
The stamped copy downloads as -watermarked.pdf, and the card shows how many pages were marked and the new file size.
Questions about PDF watermarks
Can someone remove the watermark?
With a PDF editor, yes, since the mark is ordinary page content. A mark that cannot be lifted out needs the pages turned into images, for example with PDF to JPG and then JPG to PDF, which costs you searchable text.
Why does my Hebrew or Russian watermark give an error?
Text is set in Helvetica Bold with Windows-1252 encoding, which covers Western European letters only. Cyrillic, Hebrew, Chinese and emoji stop the run with a message that names those characters. Save the words as a transparent PNG and use Image / Logo mode instead.
Will a corner watermark fit on the page?
Yes. A corner position keeps the whole mark, at its angle, about 36 points from the two nearest edges. A mark too big for the page, such as CONFIDENTIAL at 120 pt, is scaled down, and the result card gives the percentage. Only Tiled Grid runs off the edges.
Can I mark only some pages?
Yes. First Page Only stamps page 1, and Custom Range takes a list such as 2, 4-6. A page outside the file, or a range written backwards, gives a message instead of a download.
Will the watermark hide the text underneath?
It is drawn on top of the page. At the starting 30% opacity the text below stays easy to read; at 100% the mark covers whatever it overlaps, so keep important lines clear or lower the opacity.
Does my logo keep its transparent background?
Yes. Every logo is redrawn as a PNG before it goes into the PDF, and PNG keeps transparency. The catch is size: a photo-like JPEG logo stored as PNG can take more bytes than the original.
How much bigger does a watermarked PDF get?
Very little with text. A 1,000-page test file grew from 1,053,526 to 1,310,477 bytes, about 257 bytes a page, because the font is a standard one and is not embedded. A logo is stored once for the whole file, so 100 pages with a logo grew by 24,817 bytes, about the same as with text.
Can I watermark a PDF that opens without a password but blocks editing?
Not directly. A test file with only an owner password, which viewers open without asking, stopped with the same password-protected message as a file that needs a password to open. If you own the file or have the right to change it, remove the protection with Unlock PDF first, then stamp the unlocked copy.
Why is my watermark smaller on some pages than others?
Text is set in points, so it keeps its size while pages change theirs: CONFIDENTIAL at 48 pt covered 1.2% of an A4 page and 0.6% of an A3 page. A logo is a share of each page's width, so it scales with the page. A page too small for the mark gets a shrunk copy, and the result card shows only the smallest percentage used.
Does the watermark change the PDF's properties?
The title, author and creator stay. The producer field is replaced with pdf-lib, the library that writes the file, and the modification date is set to the moment you stamp it.