示例#1
0
 /**
  * Object constructor
  *
  * @param \ZendPdf\InternalType\DictionaryObject $dict
  */
 public function __construct(InternalType\DictionaryObject $dict)
 {
     $this->_dict = $dict;
     foreach ($this->_dict->getKeys() as $dictKey) {
         $this->_checkDictKey($dictKey);
     }
 }
示例#2
0
文件: Page.php 项目: marcyniu/vendors
 /**
  * Clone page, extract it and dependent objects from the current document,
  * so it can be used within other docs.
  *
  * @internal
  * @param \ZendPdf\ObjectFactory $factory
  * @param array $processed
  * @return \ZendPdf\Page
  */
 public function clonePage(ObjectFactory $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 InternalType\DictionaryObject();
     foreach ($this->_pageDictionary->getKeys() as $key) {
         $dictionary->{$key} = $this->_pageDictionary->{$key}->makeClone($factory, $processed, InternalType\AbstractTypeObject::CLONE_MODE_SKIP_PAGES);
     }
     $clonedPage = new Page($factory->newObject($dictionary), $factory);
     $clonedPage->_attached = false;
     return $clonedPage;
 }