PDFFileElement: saveCopy() method

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 saveCopy() method of the PDFFileElement interface saves a copy of the PDF of a <pdf-file>, with its form edits.

It always asks where to save, and keeps working on the original file. Without the File System Access API, it downloads the file.

Syntax

js
saveCopy()
saveCopy(options)

Parameters

options Optional

An object with these properties:

name Optional

The file name to save as. The default is name.

noEdit Optional

A boolean value: true saves the bytes the file had when it loaded, without form edits. The default is false.

startIn Optional

A well-known folder such as "documents" for the save picker to open in; see showSaveFilePicker(). Other picker options are passed on too.

Return value

A Promise that resolves to the saved File, or to undefined after a download.

Exceptions

The promise rejects when you cancel the picker. A failed write is retried as a copy.

Usage notes

Examples

Calling saveCopy()

js
await document.querySelector("pdf-file").saveCopy({ name: "copy.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
saveCopy()
1251251531111812515383182712518
  • saveCopy() · Firefox, Safari, Chrome Android, Firefox for Android, Opera Android, Safari on iOS, Samsung Internet, WebView Android, WebView on iOS: Without the File System Access API (Chrome Android 132, Opera Android 87, Samsung Internet 29 and WebView Android 132 have it), opening falls back to <input type=file> and saving to a download.

Legend

Full support
See implementation notes.

See also