/** * Initialize haru documents * * @return void */ protected function initialize() { $this->document = new HaruDoc(); $this->document->setPageMode(HaruDoc::PAGE_MODE_USE_THUMBS); $this->document->setInfoAttr(HaruDoc::INFO_CREATOR, 'eZ Components - Document //autogen//'); $this->pages = array(); if ($this->options->compress) { $this->document->setCompressionMode(HaruDoc::COMP_ALL); } if ($this->options->ownerPassword !== null) { $this->document->setPassword($this->options->ownerPassword, $this->options->userPassword); $this->setPermissions($this->options->permissions); } $this->dummyDoc = new HaruDoc(); $this->dummyDoc->addPage(); }
/** * Construct driver * * Creates a new document instance maintaining all document context. * * @return void */ public function __construct() { $this->document = new HaruDoc(); $this->document->setPageMode(HaruDoc::PAGE_MODE_USE_THUMBS); $this->pages = array(); }