Example #1
0
 /**
  * Initialize haru documents
  * 
  * @return void
  */
 protected function initialize()
 {
     // Sorry for this, but we need it to prevent from warnings in TCPDF:
     $GLOBALS['utf8tolatin'] = array();
     // Create the basic document, which dimensions should not matter, since
     // we specify this at each page creation separetely.
     $this->document = new TCPDF('P', 'mm', array(1000, 1000), true, 'UTF-8');
     // We do this ourselves
     $this->document->setAutoPageBreak(false);
     $this->document->setMargins(0, 0);
     $this->document->setCreator('eZ Components - Document 1.3.1');
     $this->document->setPrintHeader(false);
     $this->document->setPrintFooter(false);
     $this->document->setCompression($this->options->compress);
     if ($this->options->ownerPassword !== null) {
         $this->setPermissions($this->options);
     }
     $this->document->setFont($this->fonts[$this->currentFont['name']][self::FONT_PLAIN], '', $this->currentFont['size']);
 }