【发布时间】:2014-12-14 12:58:27
【问题描述】:
我正在尝试使用 itextsharp 合并两个 PDF 文件(版本 7),它们都有表单域。 当我运行代码时,我收到以下错误消息: “无法处理 iref 流。PDFsharp 的当前实现无法处理 Acrobat 6 引入的此 PDF 功能。” 我尝试了不同的方法,但最后我得到了 PDF,但不是原始文件内容,而是包含以下信息的文件:
Please wait... If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to
display this type of document. You can upgrade to the latest version
of Adobe Reader for Windows®, Mac, or Linux® by visiting
http://www.adobe.com/go/reader_download. For more assistance with
Adobe Reader visit http://www.adobe.com/go/acrreader. Windows is
either a registered trademark or a trademark of Microsoft Corporation
in the United States and/or other countries. Mac is a trademark of
Apple Inc., registered in the United States and other countries. Linux
is the registered trademark of Linus Torvalds in the U.S. and other
countries.
任何人都可以帮助我并发布一些工作代码方法来连接两个此类 Pdf。 提前谢谢你。
【问题讨论】:
-
您使用了标签 iTextSharp,但实际上您使用的是 PdfSharp。您可能想要更新您的标签以解决知识渊博的人。
-
嗨 mkl。我知道..我只是在寻求 PdfSharp 的替代品,在包含表单的 PDF 之间的合并过程中使用 itextSharp(在这种情况下,版本是 v.7)。你能帮帮我吗?
-
“请稍候...”消息似乎表明至少有一个表单是 XFA 表单。我怀疑用于 PDF 合并的 iTextSharp 类是否支持 XFA 表单。
-
嗨,mkl。正如我对 Bruno Lowagie 的回复,我有两种类型的表格——纯 XFA 和混合表格。那么,在这种情况下,你能提供一些方法来处理这两种表格吗?你知道是否有办法将每一种此类 PDF 转换为普通且不可编辑的文件,然后合并它们?
-
正如 Bruno 所指出的,如果您有多个具有相同架构的纯 XFA,那么这是一些 XML 改组,对于具有不同架构的纯 XFA 来说是非常困难的。在您的情况下,模式是否不同?
标签: c# pdf merge itextsharp