Exemplo n.º 1
0
 /**
  * Get next generation number for free object
  *
  * @param integer $objNum
  * @return unknown
  */
 public function getNewGeneration($objNum)
 {
     if (isset($this->_usedObjects[$objNum])) {
         throw new Exception\CorruptedPdfException('Object is not free');
     }
     if (isset($this->_generations[$objNum])) {
         return $this->_generations[$objNum];
     }
     if (isset($this->_parent)) {
         return $this->_parent->getNewGeneration($objNum);
     }
     throw new Exception\CorruptedPdfException('Object not found.');
 }