Skip to content
ComPDF
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Import or Export Forms

If you want to import or export forms with XFDF, you can use exportPDF and importAnnotations.

Import Forms

After the document is loaded, you can import the forms of XFDF with importFormAnnotations, and the type of XFDF can be String or File

javascript
await docViewer.importAnnotations(xfdf)

Export Forms

After the document is loaded, you can export forms with exportFomrXfdf as XFDF string.

javascript
const xfdfString = await docViewer.exportXfdf()