ZF-7176: Zend PDF loads Zend_Memory_Container_Locked Object into Properties Array - which may cause fatal error
Description
I have at least one PDF where when loaded by Zend_PDF, Zend_Memory_Container_Locked objects are pulled into the Document Type Dictionary properties array.
Array ( ... [SaveStreams] => Array ( [Q] => Zend_Memory_Container_Locked Object ( [value] => Q )
[q] => Zend_Memory_Container_Locked Object
(
[value] => q
)
)
[Changes] => Array
(
[0] => Array
(
[Creator] => SPDF
[Producer] => SPDF
[ModDate] => D:20060401000353-05'00'
[CreationDate] => D:20060401000353-05'00'
)
[1] => Array
(
[Version] => 3.0, SPDF Build Number 1085 for Linux 7, Application Build Date: May 15 2003
[ModDate] => D:20060401050353-00'00'
[Product] => AppendPro
[Vendor] => Appligent
)
)
... )
If you then modify the properties array, saving crashes with a fatal error.
Comments
Posted by Chris Hiestand (dimmer) on 2009-07-01T16:59:29.000+0000
Code sufficient to reproduce the error
Posted by Chris Hiestand (dimmer) on 2009-07-01T17:02:07.000+0000
PDF through which this bug is reproducible. It does have an atypical properties structure.
Posted by Chris Hiestand (dimmer) on 2009-07-01T17:03:19.000+0000
metadata output from adobe acrobat - may not be useful.
Posted by Chris Hiestand (dimmer) on 2009-07-01T17:10:34.000+0000
Interestingly, Adobe Acrobat ignores the array(s). This also may not be useful.
Posted by Chris Hiestand (dimmer) on 2009-07-01T17:11:46.000+0000
A work-around for this issue is to wipe the metadata and start over from scratch.
Posted by Chris Hiestand (dimmer) on 2010-04-19T16:12:10.000+0000
This is still a problem in 1.10.3
error message: PHP Catchable fatal error: Object of class Zend_Memory_Container_Locked could not be converted to string in /www/ZendFramework/library/Zend/Pdf/Element.php on line 155