I'm looking for the best library for manipulating a PDF with an XFA form in it. I would need to be able to extract specific pages from the PDF, fill the form in such a way that it would still support additional editing, and fill the form and then "flatten" it so that it's no longer a fillable form.

I am aware of CutePdf, but I don't believe it works with XFA forms. I've heard of but never used ASPOSE.PDF, as well as Telerik PDF.

Any other's or a recommendation as to which would be best (I've seen problems with Telerik's handling of Acro-forms).

1 Answer 1


The LEADTOOLS PDF SDK Libraries contain extensive form field support, including loading XML Forms Architecture (XFA) files, as detailed in this help topic. (Disclosure: I work for the SDK's vendor).

I recommend downloading the free evaluation edition and trying the .NET classes. If you need assistance or face any issues while trying the SDK, there's free technical support for both SDK owners and free evaluation users alike, through email and online chat.

  • Downloaded and installed nuget package, could create a pdfdocument from a stream/byte array, get fields, didn't see a way to turn the resulting pdfdocument into a stream/byte array for persisting. Leadtools.Pdf.PDFDocument doesn't have a method to Save (not to disk, not to a stream).
    – jmoreno
    Commented Sep 20, 2023 at 14:36
  • The PDFDocument class works in conjunction with other LEADTOOLS classes (e.g. DocumentConvertor) to save the output. You can find an example of this in the demos (e.g. PDFDocumentDemo) that come with the free evaluation of the toolkit. If you require more assistance, send full details of what you tried to our free support service through [email protected] or through the live chat. Commented Sep 21, 2023 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.