Hi John,
I am already working on this problem. It came with new Zend_Pdf
resources clean-up mechanism.
It's also clear where the problem is.
Temporary workaround is to keep images "in memory" up to the PDF
generation time.
Please take a look at http://framework.zend.com/issues/browse/ZF-1559
With best regards,
Alexander Veremyev.
John Coggeshall wrote:
Hey guys…
I really would love to be able to provide a patch for this and/or report
a bug with a reproducible test case but I simply don’t have time to
track it down at the moment. But The resource management fix in commit
5376 broke my PDF Generation.. I can’t provide the code because its not
mine to give, but I can show you the error log which might be useful in
tracking it down (see below).. The PDF still gets generated but the
images using drawImage() don’t show up and I get two errors (one is
about missing element ‘%s’, the other is about missing element ‘X1’.
I wish I could provide more info at the moment but as I said I can’t
share the code and I wasn’t able to quickly come up with a new test
case. Ping me if you have other questions and I’ll gladly try patches,
etc. against my code base to help debug.
Cheers,
John
---
string(105) "[WARN] Invalid argument supplied for foreach()
(/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:262)"
[15]=>
string(105) "[WARN] Invalid argument supplied for foreach()
(/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:214)"
[16]=>
string(117) "[WARN] ksort() expects parameter 1 to be array, null
given (/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:374)"
[17]=>
string(105) "[WARN] Invalid argument supplied for foreach()
(/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:377)"
[18]=>
string(105) "[WARN] Invalid argument supplied for foreach()
(/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:390)"
[19]=>
string(117) "[WARN] ksort() expects parameter 1 to be array, null
given (/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:374)"
[20]=>
string(105) "[WARN] Invalid argument supplied for foreach()
(/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:377)"
[21]=>
string(105) "[WARN] Invalid argument supplied for foreach()
(/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:390)"
[22]=>
string(105) "[WARN] Invalid argument supplied for foreach()
(/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:214)"
[23]=>
string(105) "[WARN] Invalid argument supplied for foreach()
(/var/www/OLT/includes/zf/Zend/Pdf/ElementFactory.php:214)"