PDFPageImageLayer

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 PDFPageImageLayer interface is the image layer of a <pdf-page>: what its engine draws. Get it from PDFPageElement.image.

PDFPageImageLayer

Instance properties

PDFPageImageLayer.metrics Read only

An object with the drawn image's width, height, aspectRatio and orientation.

Instance methods

PDFPageImageLayer.export()

Resolves to the image as a Blob, a data: URL or a ClipboardItem.

Examples

Downloading a page as PNG

js
const page = document.querySelector("pdf-page");
const url = URL.createObjectURL(await page.image.export());
Object.assign(document.createElement("a"), { href: url, download: "page.png" }).click();

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
PDFPageImageLayer
1251251531111812515383182712518
export()
1251251531111812515383182712518
metrics
1251251531111812515383182712518

Legend

Full support

See also