Zend_PDF template Zend_Pdf::load-Collection of common programming errors
I am trying to create a PDF with a template using Zend_Framework.
$pdf = Zend_Pdf::load('/..../pdf-template.pdf');
This creates the following error: Fatal error: Call to undefined method Zend_Pdf_ElementFactory::fetch() in /…/Zend/Pdf/Element/Reference.php on line 164
this is in the _dereference Method : line 164:
if (($obj = $this->_factory->fetch($this->_objNum . ' ' . $this->_genNum)) === null) {
$obj = $this->_context->getParser()->getObject(
$this->_context->getRefTable()->getOffset($this->_objNum . ' ' . $this->_genNum . ' R'),
$this->_context
);
}
-
Weird – are you sure you haven’t changed the Zend class? My
_dereference
usesfetchObject
, and I confirmed there is a method calledfetchObject
inElementFactory.php
:if (($obj = $this->_factory->fetchObject($this->_objNum . ' ' . $this->_genNum)) === null)
If you haven’t changed it, it might be worth upgrading your Zend version.
Originally posted 2013-11-09 23:22:00.