2

I need to fill out several PDF forms that contain XFA files, and then print them. I can only print them from a Linux machine. It has Acroread installed, but it's not working properly, besides it being outdated.

What I can do is fill them out in my Macbook. So my question is: once I fill them, can I somehow export them to "regular" pdf files that a viewer in Linux (like Okular, Evince, etc.) can open and print? That would be great since I would just e-mail them to myself and print them from the Linux computer.

Thanks!

dbluesk
  • 265
  • 3
  • 10

2 Answers2

3

The problem you describe was the subject of a talk with title "Who's afraid of XFA?" video/slide deck.

The solution posted by Max Wyss (fill out and print the form using Acrobat Reader DC) is certainly possible if you have only a limited number of documents that can be processed semi-automatically. If you want a fully automated process, this typically isn't a viable solution. For instance, if the form needs to be filled out in the context of a web application and people need to get the PDF in their browser as a response to a request to your Linux server, you won't use your Macbook as a server, will you?

In that case, you need a library that injects the XML into the PDF (see How to fill out a pdf file programmatically?) and then "flatten" it to an ordinary PDF (How to flatten a XFA PDF Form using iTextSharp?). The problem with this approach is that you need a software library or tool to achieve this, and other than Adobe LiveCycle and iText's XFA Worker, I don't know of any tool that can flatten XFA to ordinary PDF.

Using a PostScript driver to print a dynamic XFA form won't work because other than Adobe and iText software, there is very little support for XFA in the software world (and XFA is being deprecated in PDF 2.0).

Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165
0

Can the Macbook and the Linux machine be networked? If so, try to share the printer, and fill out and print the form using Acrobat Reader DC on the Macbook (or Adobe Reader XI).

An other possibility would be setting up a PostScript printer (driver) and use its help to create a PostScript file which you then could transfer to the Linux machine and send to the printer (maybe with Ghostscript as an intermediary).

The crucial point is that you will need Acrobat/Reader to fill out the form, particularly if it is a dynamic XFA.

Max Wyss
  • 3,549
  • 2
  • 20
  • 26