PDFPageElement: watermark property

Works in all major browsers
Since July 2026

WebPDF works in Chrome and Edge 125, Firefox 153 and Safari 18, on desktop and mobile, and in every later version: the oldest versions its PDF.js build supports, which already have every platform feature WebPDF needs. Since July 2026, that is every major browser.

The watermark property of the PDFPageElement interface sets or returns whether a <pdf-page> on a licensed domain previews the evaluation watermark. It reflects the watermark HTML attribute.

Value

A string or null:

null

No preview. This is the default.

""

Previews the watermark with this domain's name.

"host"

Previews the watermark with the name host, for example "your-site.com".

Setting true writes an empty attribute; false and null remove it.

Note: This only matters on licensed domains. On a domain without a license, every page carries the watermark with the real domain's name, whatever this property says. Exports and copies never include it. See Evaluation and licensing.

Examples

Previewing the watermark for a domain

HTML

html
<pdf-file id=f src=//pdf.ist/web.pdf></pdf-file>
<pdf-page of=f watermark=your-site.com scale=0.4></pdf-page>

Result

Specifications

Not part of any specification. <pdf-file> and <pdf-page> are autonomous custom elements defined by WebPDF.pro.

Browser compatibility

desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
watermark
1251251531111812515383182712518

Legend

Full support

See also