Working with PDF Files

Before you start, ensure you have the Document Authoring library installed and running. For more information, check out the getting started guides. Document Authoring supports PDF out of the box, and no additional components are necessary.

Any error handling in the examples below is left out for brevity.

Exporting PDF

Use the DocAuthDocument.exportPDF method:

// Assuming the `editor` instance exists.

const currentDoc = editor.currentDocument();

// `doc` will be an `ArrayBuffer` containing the raw binary data of the PDF.
const doc = await currentDoc.exportPDF();