Opening and saving
What the engine opens, and the ways it saves.
Opening
- PDF, including damaged files (the structure is rebuilt) and encrypted files (RC4 40–128, AES-128, AES-256) with the user or owner password.
- Word (.docx), Excel (.xlsx, .xlsm, .xlsb).
- From bytes everywhere; the viewer also takes URLs, Blobs and Files.
Saving a PDF
const full = doc.save(); // rewritten and compressedconst quick = doc.save({ incremental: true }); // the original bytes plus an updateAn incremental save appends only the changes, which is fast and keeps the original bytes intact. Encrypted or repaired files are always saved in full, without encryption.
Saving Office files
WordDocument.save() returns a .docx and ExcelDocument.save() an .xlsx. In the viewer, saveWord() and saveExcel() include the annotations made on the pages (see Annotations in Office files).
Undo
Every change to a PDF document can be undone with undo() and redo(); Word and Excel documents have their own undo and redo commands.