我有一个将pdf转换为tif的系统 . 基本上它是一个用csharp编写的程序,它使用iTextSharp获取有关pdf和pdf2tif(http://pdftotif.sourceforge.net/)的元数据以转换为该文件 . 我注意到一些pdf没有正确转换 . 在Acrobat和Foxit中,它们以多页面形式打开,但在任何其他查看器(Ghostscript ...)中,它们作为1页文档打开并显示消息
"To view the full contents of this document, you need a later version of the PDF viewer. You can upgrade to the latest version of Adobe Reader from " www.adobe.com/products/acrobat/readstep2.html“如需进一步支持,请转至http://www.adobe.com/support/products/acrreader.html”
一些傻笑告诉我这些是XFA动态PDF有什么方法我可以编程检测到所以我可以尝试处理这些pdf的不同?
2 回答
iText API是一个好的开始 .
在iTextSharp中,您可以访问对象的属性,而不是调用方法 . (如果你用iTextSharp完成了大量的工作,你可能已经知道了这一点)
无论如何,这是一个使用HTTP Handler的简单示例:
命令行方法:
如果你得到一两行,你可能正在使用XFA PDF: