Stamp a mark where the page really is, anchored or tiled
Initializing in your browser…
Text, image and tiled watermarks whose padding is measured to the ink, whose rotation keeps the mark on the picture, and whose opacity is source-over: the number is the share of the way from the picture to the mark's own colour.
Running heads and page numbers, placed where the page really is
Join PDFs into one document, with a bookmark for each file
Draft contracts must go out stamped "CONFIDENTIAL" diagonally on every page, including the ones the scanner turned sideways.
Input
contract.pdf · "CONFIDENTIAL" · tiled · 45° · 30% opacity
Output
27 marks a page, each centred on what the page SHOWS, turned with the page so they read upright
Placement is measured against the visible box (the CropBox clipped to the MediaBox), from where that box actually is, and through the page's own /Rotate, so an offset box, an already cropped page and a sideways scan all come out right. The origin is solved for the mark's centre rather than its baseline, which is why a 45 degree mark stays centred instead of swinging off the point it was given. The mark is drawn on top: the text under it is still there and still copyable, so this marks a document rather than redacting one.
Stamp a text watermark onto a PDF: one mark at any of nine positions, or tiled across the whole page. You choose the words, the font, the size, the colour, the opacity and the angle, and you can name which pages get one. The preview is a render of the actual page with the mark drawn on it at the position the file will hold, so what you see is what you download. Underneath it the page says what it is about to do: how many pages will be marked, how many marks that is, and what each page actually shows in points. The placement is measured against what the page SHOWS rather than against the paper, so an offset box, a page that was already cropped and a page carrying its own rotation all come out right, and a turned mark stays centred instead of swinging off the point it was given.
Tile DRAFT across every page so an unfinished document cannot be mistaken for a final one, at an opacity that leaves it readable.
Stamp CONFIDENTIAL or INTERNAL USE ONLY on sensitive business documents. Note that this marks the document; it does not restrict who can open it.
Put SAMPLE across a proposal or a whitepaper before sending it out, or mark only the cover page by naming page 1.
Type CONFIDENTIAL, leave the angle at 45. The mark's centre lands within a point of the middle of the page at every angle from -90 to 90, measured off the produced file by rendering it and finding the ink.
On a MediaBox of [20, 30, 632, 822] the visible centre is (326, 426), and that is where the mark goes. Measuring from the origin instead puts it over 100 points out.
Anchor the mark to the top on a file whose pages carry /Rotate 0, 90, 180 and 270. All four come out with the mark across the top of the page as the reader sees it, the right way up.
A watermark is a placement problem, and there are exactly three ways to get the placement wrong. This tool is built around all three.
The first is that the page a reader sees is not the page the file describes. `page.getSize()` in pdf-lib returns the MediaBox width and height with its POSITION thrown away, and a MediaBox does not have to start at the origin: offset boxes are ordinary in print work. A page can also carry a CropBox, in which case what a viewer shows is the intersection of the two (ISO 32000-1 clause 14.11.2) and everything outside it is invisible. This tool measures against that visible box, so a mark asked for at the centre lands at the centre of what you can actually see.
The second is rotation. The /Rotate entry turns a page clockwise when it is displayed, and pdf-lib draws in raw page space and applies none of it. So a mark placed at "the top" of a page carrying /Rotate 90 lands at what the reader sees as the left edge, turned sideways relative to the content. Here the side you point at is mapped back through the page's own rotation and the mark is turned with it, so a scan whose pages are rotated differently gets the same mark in the same place on every one.
The third is the one that bites hardest, because it is invisible in code. pdf-lib rotates a run of text about its ORIGIN, which is the left end of the baseline. Computing a centred x and then asking for 45 degrees therefore produces a mark that is no longer centred: it swings away from the point it was just given. This tool solves for the origin that puts the mark's CENTRE where it was asked for, which is the only way a turned mark can be placed at all.
The box being centred is the box the INK occupies, not the box the line occupies. The fourteen standard PDF fonts carry a cap height, an x-height, an ascender and a descender and no per-glyph boxes, so the edges are chosen from the characters the mark actually contains: an all-capitals CONFIDENTIAL is measured to the cap height, and a mark with a descender is measured to the descender. Centring the line box instead puts an all-capitals mark about a tenth of the point size low.
One limitation is stated rather than hidden. The standard fonts are single byte and can draw only what WinAnsiEncoding can name, so Cyrillic, Greek and CJK cannot be drawn at all. Instead of throwing part way through, the tool checks the text against the same table the embedder consults and names every character it cannot draw before you press anything.
Not with this tool. The mark is written into the page content, so keep your original if you might need a clean copy. Anyone with a PDF editor can remove it from the output, which is why a watermark marks a document rather than protecting it.
It is drawn on top, so use a low opacity to keep the page readable. Twenty to thirty percent is usual. The preview shows exactly how it will sit, because it is a render of your page with the mark at the position the file will hold.
No. The content under the mark is still in the file and still selectable and copyable. A watermark is not a redaction, and nothing here removes anything from the page.
The fourteen standard PDF fonts are single byte and can only draw what WinAnsiEncoding names, which is Latin script plus a set of symbols. The tool checks your text against that table and tells you which characters it cannot draw, instead of failing part way through the job.
Not in this tool; it draws text only. You can choose from six standard fonts, any hex colour, any size from 8 to 144 points and any angle from -90 to 90 degrees.
Both are handled. The mark is placed against the area the page actually shows, which for a cropped page is the CropBox clipped to the MediaBox, and the side you pick is mapped through the page's own /Rotate so the top is the top you can see. The mark is turned with the page so it reads the right way up.
PDF parsing and editing happen in your browser. Documents, and everything inside them, are never uploaded or stored remotely.