ZF-9101: Cannot open a PDF file with more than two levels of depth in bookmarks by default
Description
If you call Zend_Pdf::load('test.pdf') and 'test.pdf' opens by default with more than 2 levels of bookmarks, you get the following error:
Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Outline childs load error.' in C:\fimarkets\site\dev\php\common\Zend\Pdf\Outline\Loaded.php:341 Stack trace: #0 C:\fimarkets\site\dev\php\common\Zend\Pdf.php(549): Zend_Pdf_Outline_Loaded->__construct(Object(Zend_Pdf_Element_Reference)) #1 C:\fimarkets\site\dev\php\common\Zend\Pdf.php(317): Zend_Pdf->_loadOutlines(Object(Zend_Pdf_Element_Reference)) #2 C:\fimarkets\site\dev\php\common\Zend\Pdf.php(253): Zend_Pdf->__construct('test.pdf', NULL, true) #3 C:\fimarkets\site\dev\php\common\test_zend_pdf.php(66): Zend_Pdf::load('test.pdf') #4 {main} thrown in C:\fimarkets\site\dev\php\common\Zend\Pdf\Outline\Loaded.php on line 341
Tested with a PDF file generated by OpenOffice 3.1.1
The workaround is to generate the PDF file so that in the UI tab of the PDF options dialog box of Open Office, the "visible outline levels" are set to 2 or less.
Comments
Posted by Chris Hiestand (dimmer) on 2010-04-19T15:43:08.000+0000
I'm uploading another file which reproduces this error in Zend 1.9.x and 1.10.x, but not 1.8.5.
The only workaround for me right now is to use 1.8.5.
Posted by Roman Snitko (snowcore) on 2010-10-18T09:22:26.000+0000
The same for me. Works on older version 1.7.2, but doesn't work on 1.10.5
Posted by Alexander Veremyev (alexander) on 2010-10-21T22:50:41.000+0000
Fixed (fix is already available with ZF 1.11.0 RC1).
Posted by Roman Snitko (snowcore) on 2010-10-22T02:43:17.000+0000
Alex, thank you very much! It Works perfectly!