Convert XFA PDF to non-XFA PDF

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Moderator: Alex

Post Reply
IntegraMike
Posts: 51
Joined: Mon Dec 02, 2019 11:19 pm

Convert XFA PDF to non-XFA PDF

Post by IntegraMike »

Hello, I'm looking for a way to convert XFA PDFs into standard PDFs, especially dynamic XFA forms (some of which have JavaScript). I've looked at the PdfDocumentConverter and while it seems to convert between PDF standards, is there a good way to take the stuff from the XFA document and turn that into a standard PDF document?

Unfortunately XFA doesn't play well with other parts of our application and previously we have been able to convert them so we're looking for a solution to keep this behavior while fully converting to the VintaSoft toolkit.

Thanks!
Alex
Site Admin
Posts: 1942
Joined: Thu Jul 10, 2008 2:21 pm

Re: Convert XFA PDF to non-XFA PDF

Post by Alex »

Hello Mike,

VintaSoft Imaging .NET SDK does not support PDF XFA because PDF XFA is deprecated in PDF 2.0.

Best regads, Alexander
IntegraMike
Posts: 51
Joined: Mon Dec 02, 2019 11:19 pm

Re: Convert XFA PDF to non-XFA PDF

Post by IntegraMike »

Thanks for the update on this. I'm finally back to getting to look into doing this conversion (which is a business requirement for us). I see that the data at least appears in XFA properties of the document so I'm hoping I can render that and solve the issue. That being said, one of they types of XFA forms pulls data from another location before the load. Is there any way to do that currently? I'm guessing the answer is no since you guys don't support it, but I figured it doesn't hurt to ask just in case that functionality is there and I'm either missing it or didn't wire it up correctly.

Thanks!
Alex
Site Admin
Posts: 1942
Joined: Thu Jul 10, 2008 2:21 pm

Re: Convert XFA PDF to non-XFA PDF

Post by Alex »

Hello Mike,

PDF document can store the interactive form in 3 ways.

WAY 1. PDF document contains AcroForm. AcroForm is described in PDF syntax.

WAY 2. PDF document contains XFA form. XFA form is described using XFA specification ("XML Forms Architecture (XFA) Specification Version 3.3" is document with 1584 pages). In this case the PDF document is just a wrapper for XFA form.

WAY 3. PDF document contains XFA form and AcroForm. In this case the PDF document contains the same form in 2 formats. In most cases initially the interactive form was created as XFA form and later XFA form was converted to the AcroForm.


As I said earlier we do not support XFA specification because specification is deprecated in PDF 2.0.


If you still need to parse XFA form, please check type of your PDF document. If your PDF document contains XFA form and AcroForm, try to remove XFA form and see the result. If your PDF document contains only XFA form, try to parse XFA form (for custom solution you do not need to implement all XFA specification) and create AcroForm that is equivalent to the XFA form.

You can get PDF resource that stores XFA form data using the PdfDocument.InteractiveForm.XFAResource property.

Best regards, Alexander
Post Reply