2

我需要填写几个包含 XFA 文件的 PDF 表格,然后打印它们。我只能从 Linux 机器上打印它们。它安装了 Acroread,但除了过时之外,它不能正常工作。

我能做的就是将它们填写在我的 Macbook 中。所以我的问题是:一旦我填写了它们,我能否以某种方式将它们导出为 Linux 中的查看器(如 Okular、Evince 等)可以打开和打印的“常规”pdf 文件?那太好了,因为我只需将它们通过电子邮件发送给自己,然后从 Linux 计算机上打印出来。

谢谢!

4

2 回答 2

2

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).

于 2016-03-07T13:58:23.907 回答
0

Macbook和Linux机器可以联网吗?如果是这样,请尝试共享打印机,然后使用 Macbook(或 Adob​​e Reader XI)上的 Acrobat Reader DC 填写并打印表格。

另一种可能性是设置 PostScript 打印机(驱动程序)并使用它的帮助来创建 PostScript 文件,然后您可以将其传输到 Linux 机器并发送到打印机(可能使用 Ghostscript 作为中介)。

关键点是您将需要 Acrobat/Reader 来填写表格,尤其是当它是动态 XFA 时。

于 2016-03-07T13:14:19.803 回答