/**
  * Dereference.
  * Take inderect object, take $value member of this object (must be \ZendPdf\InternalType\AbstractTypeObject),
  * 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 \ZendPdf\Exception\ExceptionInterface
  */
 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 NullObject();
         return;
     }
     if ($obj->toString() != $this->_objNum . ' ' . $this->_genNum . ' R') {
         throw new Exception\RuntimeException('Incorrect reference to the object');
     }
     $this->_ref = $obj;
 }
Example #2
0
 /**
  * Get PDF String
  *
  * @return string
  */
 public function getPDFString()
 {
     return $this->_context->getParser()->getString();
 }