English

Documents · PDF Toolkit

How a Watermark Is Added to Every Page of a PDF in Your Browser

· How it works

pdf watermarks browser-processing

A diagonal visible stamp repeated across document pages
Original ToolAcre vector illustration

A watermark is extra drawing appended to each page's content, positioned against the page box and usually drawn with partial transparency. This post explains how a browser tool does that for every page without sending the file anywhere.

The drawing that must say DRAFT — why a reviewable copy needs a visible mark on every page, not just the cover

A drawing set marked only on its cover can lose that warning when pages are printed, extracted, or forwarded separately. A per-page DRAFT stamp keeps status visible wherever an individual sheet travels. ToolAcre can draw short Latin text or place a PNG or JPEG on selected pages without uploading either file.

The PDF input is capped at 50 MB, and an image watermark at 30 MB. The result is a new `-watermarked.pdf`, so the untouched source remains available for approved release. A visible mark communicates review state or provenance; it does not impose access controls on the recipient.

Where the mark goes in the file — appending drawing instructions to each page's content and registering the resources it uses

Text watermarks are drawn with pdf-lib using the standard Helvetica-Bold face. The implementation tests whether the text can be WinAnsi-encoded before touching pages, then draws it with the chosen font size, grey color, opacity, angle, and position. Unsupported scripts are refused instead of silently losing characters.

An image watermark is prepared as PNG or JPEG, embedded once, and drawn repeatedly. Its width is a selected fraction of each page width, so a logo scales with mixed page sizes. Both paths append visible drawing content to a fresh PDF; neither encrypts, redacts, or changes who can open it.

Positioning against pages of different sizes — how the mark is placed relative to each page's box so it lands in the same spot on A4 and Letter

Positions are computed separately for each page using its width and height. Center and corner choices therefore adapt to A4, Letter, and mixed dimensions. Text uses its measured width and selected font size, while image placement uses the prepared image proportions and the page-relative width selected in the interface.

Tiling starts beyond the visible edge and walks a spaced grid across the page, subject to a 400-stamp safety guard. A long phrase is not automatically shrunk to fit and may be clipped. Test the narrowest page rather than assuming a setting that fits one sheet fits the entire document.

Transparency and layering — how partial opacity is expressed in a PDF and why a mark drawn over text can still leave it readable

Opacity is represented in the drawing operation, allowing underlying figures and words to remain visible. At very low opacity a mark can disappear in grayscale printing; at high opacity it can obscure the document. A practical review includes the actual reading size and, when printing matters, a paper or print-preview check.

The watermark is layered as ordinary page content. Underlying text remains selectable and searchable, which is useful for readability but proves the mark is not redaction. Another capable editor can alter or remove ordinary content. Use access decisions and properly redacted source material for secrets rather than relying on visual overlap.

Rotated marks use page-space anchors; the tool does not compensate for page /Rotate

The outline says a diagonal stamp accounts for the page rotation flag, but the source states positions use the unrotated mark size and rotation occurs about its anchor. The implementation does not advertise compensating for an existing page `/Rotate`; angled marks can sit offset from where a zero-degree mark would land.

Mixed orientations therefore require visual inspection. The same angle and anchor can look different when viewers apply page rotation. If placement is critical, test representative portrait, landscape, and already-rotated pages. A tiled mark is generally harder to crop away, but even tiling remains communication rather than security.

Worked example — stamping a thirty-page drawing set with a diagonal DRAFT mark and checking the result page by page

For a thirty-page drawing set, enter `DRAFT`, choose a diagonal angle and moderate opacity, then leave the page field blank to include every sheet. The worker embeds the standard font once, calculates placement per page, draws the mark, reports progress, and serializes a single result after all pages are processed.

Open the result and inspect title blocks, dense dimensions, blank sheets, and mixed-size pages. Search for the watermark text to remember that it is real PDF text. If the phrase is clipped, shorten it or reduce font size; if it disappears against drawing detail, adjust opacity rather than assuming the job failed.

What this does not cover — removing existing watermarks, and protecting a document from copying, which a visible mark cannot do

This feature does not remove existing marks, redact content, apply passwords, or prevent copying and printing. Text is limited to the built-in Latin encoding; non-Latin phrases should be rendered into a PNG and used through the image operation. Encrypted PDFs are refused, and any existing digital signature is invalidated.

An image stamp accepts PNG or JPEG only after preparation, with a hard 30 MB input limit. Long text is not fitted, text color is fixed, and tiling is capped. These boundaries make the result predictable while avoiding claims that a watermark can provide document security it fundamentally does not supply.

Takeaway — watermarking is a per-page content rewrite, and the PDF Toolkit performs it in the tab so the unmarked original never leaves your device

Watermarking is a per-page drawing rewrite. The tool embeds a supported text font or image, determines page-relative placement, applies opacity and angle, and writes a fresh PDF. That mechanism is why every selected page can carry the mark and why the underlying content remains present and usable.

The work runs through pdf-lib in a Web Worker on the device, and the tool code sends no document bytes away. Consented analytics on the production host is separate and excludes file data. Keep the unmarked original, review the marked copy page by page, and describe the stamp as a signal rather than protection. For image marks, inspect transparency and edge quality as well as placement, since the embedded logo is reused consistently but cannot correct a poor source asset.