Ejemplo n.º 1
0
 protected function init()
 {
     parent::init();
     $this->_logoPrinted = false;
     $this->_IS_PURCHASE_INVOICE = $this->_template['show_unit_cost'] == 1;
     $this->getAliasNbPages();
     $this->setJPEGQuality(100);
     $this->SetMargins($this->_template['margin_left'], $this->_template['margin_top'], $this->_template['margin_right']);
     $this->SetFillColor(241, 241, 241);
     $this->SetDrawColor(0, 0, 0);
     if (isset($this->_template['page_format']) && !empty($this->_template['page_format'])) {
         $this->setPageFormat($this->_template['page_format']);
     }
     //$this->setImageScale(4);
     $this->pageWidth = $this->getPageWidth() - $this->lMargin - $this->rMargin;
     $this->footerHeight = !empty($this->_template['footer']) ? $this->calcMultiCellHeight($this->pageWidth, 12, $this->_template['footer']) + 12 : 0;
     $this->SetAutoPageBreak(true, $this->_template['margin_bottom'] + $this->footerHeight);
     //$this->footerY = $this->h - $this->bMargin + 12;
     //go_debug($this->footerHeight);
     $this->setFooterMargin($this->_template['margin_bottom'] + $this->footerHeight);
     //$this->SetTitle($this->_order->order_id ?: 'Batchprint');
     //$this->SetSubject($this->_order->book->name . ' - ' . $this->_order->order_id);
     $this->SetAuthor(\GO::config()->title);
     $this->SetCreator('Group-Office ' . \GO::config()->version);
     //$this->SetKeywords($this->_order->order_id . ', ' . $this->_order->book->name);
 }
Ejemplo n.º 2
0
 protected function init()
 {
     parent::init();
     $this->font_size--;
     $this->setCellPaddings(1, 1, 0, 1);
     $this->days_long = \GO::t('full_days', 'base');
     $this->months_short = \GO::t('short_months', 'base');
     $this->months_long = \GO::t('months', 'base');
     $this->days_short = \GO::t('short_days', 'base');
     if (\GO::user()->first_weekday == 1) {
         // place sunday at the end
         $elm = array_shift($this->days_long);
         array_push($this->days_long, $elm);
         $elm = array_shift($this->days_short);
         array_push($this->days_short, $elm);
     }
     $this->SetMargins($this->leftMargin, 41);
     $this->SetFillColorArray($this->greyFill);
     $this->setPageUnit('mm');
     $this->SetDrawColor(0, 0, 0);
     $this->SetLineStyle($this->lineStyle);
     $this->SetAutoPageBreak(false, 10);
 }