PDFFileElement: proxy 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 proxy read-only property of the PDFFileElement interface returns the map of URLs a <pdf-file> fetches instead of its src: your own proxy, or the built-in one after a failed direct fetch.

Value

A Map from a src to the URL to fetch it from instead. An entry you set before the file loads is used from the first fetch on. Otherwise, when a direct fetch of an http: or https: URL fails, the file adds an entry for the built-in CDN and CORS proxy, https://📕.pdf.ist/?t= followed by the absolute URL, and fetches once more through it.

The promise of PDFFileElement.load() and the error event wait for that retry. The XFDF of XFDF.src is retried the same way.

Examples

Using your own proxy

js
const file = document.querySelector("pdf-file");
file.proxy.set("form.pdf", new URL("https://proxy.example.com/?url=form.pdf"));
file.src = "form.pdf";

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

Legend

Full support

See also