12

I´m searching for a way to convert PDF XFA files to normal PDF files which could be than processed and / or compressed via Imagemagick or ghostscript for example. All options I found are just removing the the XFA tags resulting in an empty file.

One way would be to use Adobe acrobat reader and print the file via virtual printer. But that is not an acceptable option on an server.

IText is also out of option because it is too expensive for what we need. Anyone got an idea or have a better way?

Unomagan
  • 313
  • 1
  • 4
  • 9
  • AFAIK, there are no other options. If the XFA is "dynamic XFA" then you need something that interprets it and does all the repeating and flowing. Therefore, you need an XFA-aware application which is either Adobe or iText. – Kevin Brown Jan 31 '14 at 20:18
  • @Unomagan, did you get any solution to this? – masT Apr 09 '16 at 18:57
  • 1
    @masT : Nope, never really fixed that problem. No one wanted to spent several thousands of dollar to "fix" it. – Unomagan Apr 10 '16 at 16:49

1 Answers1

2

I have been able to convert forms created with XFA features using a free toolkit from PDFLabs called PDFtk. The interface is not quite as intuitive as I would hope but it does get the job done.

Also, Debenu has a product called the Quick PDF Library. I have not tried its function called RemoveXFAEntries but I think that will do what you want also. I am thinking about writing a utility to just encapsulate this feature to make my job easier.

jrodenhi
  • 2,237
  • 1
  • 21
  • 31
  • By the sound of it *RemoveXFAEntries* will definitely **not** do what the OP wants. – mkl Jan 20 '15 at 20:32
  • I use PDFtk with drop_xfa option chosen to convert a file with form fields I cannot modify to a file that I can modify. I have been using the Foxit viewer/editor. That process seems to work pretty well. I have not tried the QuickPDF RemoveXFAEntries function but it seems like from the function name it would do the same thing. It sounds to me like the OP wants to be able to do the same thing I am doing, but I am misunderstanding. What does he mean by processed and/or compressed. I thought processing was automatically filling the form. – jrodenhi Jan 20 '15 at 23:47
  • *RemoveXFAEntries* sounds like it merely drops the XFA form. In case of hybrid form documents it may leave the impression of having transformed XFA to regular PDF, but for pure XFA that won't help. – mkl Jan 21 '15 at 07:48
  • If I correctly understand the PDFtk documentation, the drop_xfa option also is of use only in case of hybrid forms. – mkl Jan 21 '15 at 08:27
  • RemoveXFAEntries is [documented](http://www.debenu.com/docs/pdf_library_reference/RemoveXFAEntries.php) to *Remove the XFA form field entry from the document's form.* So this is no solution in case of a pure XFA form... – mkl Jan 21 '15 at 08:35
  • Maybe the XFA forms I see are all hybrid. I'm not talking about something like the FINCEN 114 form that the US Treasury set up for foreign account reporting. It seems like a dynamic form and a pretty awful form filling experience based on my clients' reactions. I'm talking about something like the Form 941 on the IRS website. The easiest way for me to automate those forms is to delete the fields set up by the IRS and paste fields from the prior year form. To do that, I have to use the drop_xfa PDFtk function. When the OP said he wanted "normal" PDF files, that's what I thought he meant. – jrodenhi Jan 21 '15 at 22:39