I have an application which adds some data to an existing pdf file and saves it as another pdf file. For editing I'm using part of Zend Framework, Zend_Pdf, but it won't work with pdfs with a version greater than 1.4, but the pdf files which I need to edit are sometimes a higher version than 1.4. I can't find any solution which can solve this directly in this PHP application. So do you know some solution which will work fine?
It shows this error when I try to edit the higher version:
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