/** * Dereference. * Take inderect object, take $value member of this object (must be Zend_Pdf_Element), * take reference to the $value member of this object and assign it to * $value member of current PDF Reference object * $obj can be null * * @throws Zend_Pdf_Exception */ private function _dereference() { $obj = $this->_context->getParser()->getObject($this->_context->getRefTable()->getOffset($this->_objNum . ' ' . $this->_genNum . ' R'), $this->_context); if ($obj === null) { $this->_ref = new Zend_Pdf_Element_Null(); return; } if ($obj->toString() != $this->_objNum . ' ' . $this->_genNum . ' R') { throw new Zend_Pdf_Exception('Incorrect reference to the object'); } $this->_ref = $obj; $this->setParentObject($obj); $this->_factory->registerObject($this); }
/** * Dereference. * Take inderect object, take $value member of this object (must be Zend_Pdf_Element), * take reference to the $value member of this object and assign it to * $value member of current PDF Reference object * $obj can be null * * @throws Zend_Pdf_Exception */ private function _dereference() { if (($obj = $this->_factory->fetchObject($this->_objNum . ' ' . $this->_genNum)) === null) { $obj = $this->_context->getParser()->getObject($this->_context->getRefTable()->getOffset($this->_objNum . ' ' . $this->_genNum . ' R'), $this->_context); } if ($obj === null) { $this->_ref = new Zend_Pdf_Element_Null(); return; } if ($obj->toString() != $this->_objNum . ' ' . $this->_genNum . ' R') { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Incorrect reference to the object'); } $this->_ref = $obj; }
/** * Get PDF String * * @return string */ public function getPDFString() { return $this->_context->getParser()->getString(); }