PDFFileElement: off 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 off property of the PDFFileElement interface returns a live DOMTokenList of the parts turned off on every page of a <pdf-file>. It reflects the - HTML attribute.

Value

A DOMTokenList of the file's own tokens: text, anno, drop, controls and js, as on PDFPageElement.off.

On a file, or on the <script> for every file, js also makes PDFium hold the file's form: formData, XFDF and save() read and write PDFium's fields, so they include what was typed on its PDFium pages. See Forms and XFDF.

The tokens of the <script>, the file and each page add up; a page can keep an inherited part with -=-text.

Examples

Images only, for a whole file

html
<pdf-file id=f src=//pdf.ist/web.pdf -="text anno"></pdf-file>
<pdf-page of=f></pdf-page>
<pdf-page of=f no=2 -=-text></pdf-page> <!-- keeps its text -->

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
off
1251251531111812515383182712518

Legend

Full support

See also