我有一个应用程序,它增加了一些数据到现有的PDF文件,并将其保存为另一个PDF文件。为了进行编辑,我使用Zend Framework的一部分Zend_Pdf,但它不适用于版本大于1.4的pdf,但我需要编辑的pdf文件有时比1.4更高。我无法找到任何可以在此PHP应用程序中直接解决此问题的解决方案。所以你知道一些解决方案可以正常工作吗?编辑PDF的更高的版本比1.4 Zend_Pdf
它显示了这个错误,当我尝试编辑高版本:
Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'PDF file syntax error. Offset - 0x1BC36D. Wrong W dictionary entry. Only type field of stream entries has default value and could be zero length.' in E:\*****Parser.php:236
Stack trace:
#0 E:\*****Parser.php(460): Zend_Pdf_Parser->_loadXRefTable('1819501')
#1 E:\*****Pdf.php(318): Zend_Pdf_Parser->__construct('./sources/978-8...', Object(Zend_Pdf_ElementFactory_Proxy), true)
#2 E:\*****Pdf.php(267): Zend_Pdf->__construct('./sources/978-8...', NULL, true)
#3 E:\*****pdf.php(21): Zend_Pdf::load('./sources/978-8...')
#4 E:\*****TestApp.php(54): pdf->pdfLoader()
#5 {main} thrown in E:\*****Parser.php on line 236
是否有任何错误显示出来?你可以在这里发布错误吗? – Ben 2012-03-19 17:42:27
我将其添加到问题中。 @Ben – 2012-03-19 17:54:14