Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created March 31, 2020 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/ea73c9558cf55c27b49d35a6f7066d52 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/ea73c9558cf55c27b49d35a6f7066d52 to your computer and use it in GitHub Desktop.
XFA to AcroForms
// Load PDF with XFA forms
Document document = new Document("XFAFormPDF.pdf");
// Set the form fields type as standard AcroForms
document.Form.Type = FormType.Standard;
// Save the resultant PDF with AcroForms
document.Save("XFA-to-AcroForms.pdf");
// Load PDF with XFA forms
Document doc = new Document("XFAFormsPDF.pdf");
// Set the form fields type as standard AcroForms
doc.getForm().setType(FormType.Standard);
// Save the resultant PDF with AcroForms
doc.save("XFA-to-AcroForms.PDF");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment