PDFFileElement: controls 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 controls property of the PDFFileElement interface sets or returns whether the pages of a <pdf-file> have viewer controls. It reflects the controls HTML attribute.

Value

A boolean value: the effective one, also when the file inherits it. It is false whenever -=controls applies.

The attribute is multi-homed: when the file has none, it follows the WebPDF <script>; its pages can set their own.

A page's own controls wins. Setting false writes controls=-; null removes the attribute.

Examples

Controls for every page of a file

HTML

html
<pdf-file id=f src=//pdf.ist/web.pdf controls></pdf-file>
<pdf-page of=f scale=0.3></pdf-page>
<pdf-page of=f no=2 scale=0.3></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
controls
1251251531111812515383182712518

Legend

Full support

See also