PDFFileElement: ium 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 ium property of the PDFFileElement interface sets or returns whether a <pdf-file> can draw its pages with PDFium. It reflects the ium HTML attribute.

Value

A boolean value: the effective one, also when the file inherits it from the WebPDF <script>. The default is false.

With its own ium, the file's pages default to canvas "ium": PDFium, the engine of Chrome, compiled to WebAssembly and run in a worker. On the script, a bare ium only makes PDFium available: pages draw with PDF.js until one asks for PDFium, and ium=+ also makes it the default of every file. PDFium (about 2.4 MB) loads with the first page that needs it, and one PDFium document serves all the file's pages. Without ium, PDFium is never used, even on a page with canvas=ium.

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

Setting false writes ium=-; null removes the attribute. Changing it loads the file again.

Examples

Drawing a file with PDFium

HTML

html
<pdf-file id=f src=//pdf.ist/web.pdf ium></pdf-file>
<pdf-page of=f 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
ium
1251251531111812515383182712518

Legend

Full support

See also