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?
Use the free online XFA Flattener app If you choose Update XFA Data you can edit the XML directly and download the updated unflattened XFA form. To view the updated XFA data you'll need to use a PDF viewer that supports XFA-based PDF forms. Click Flatten XFA and then download the resulting static PDF file.
XFA (also known as XFA forms) stands for XML Forms Architecture, a family of proprietary XML specifications that was suggested and developed by JetForm to enhance the processing of web forms. It can be also used in PDF files starting with the PDF 1.5 specification.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With