示例#1
0
 /**
  * Get factory
  *
  * @return Zend_Pdf_ElementFactory_Interface
  */
 public function getFactory()
 {
     return $this->_factory->getFactory();
 }
示例#2
0
 /**
  * Clone page, extract it and dependent objects from the current document,
  * so it can be used within other docs.
  *
  * @internal
  * @param Zend_Pdf_ElementFactory_Interface $factory
  * @param array $processed
  * @return Zend_Pdf_Page
  */
 public function clonePage($factory, &$processed)
 {
     // Clone dictionary object.
     // Do it explicitly to prevent sharing page attributes between different
     // results of clonePage() operation (other resources are still shared)
     $dictionary = new Zend_Pdf_Element_Dictionary();
     foreach ($this->_dictionary->getKeys() as $key) {
         $dictionary->{$key} = $this->_dictionary->{$key}->makeClone($factory->getFactory(), $processed, Zend_Pdf_Element::CLONE_MODE_SKIP_PAGES);
     }
     $clonedPage = new Zend_Pdf_Page($factory->newObject($dictionary), $factory);
     $clonedPage->_attached = false;
     return $clonedPage;
 }