Exemplo n.º 1
0
 /**
  * Dhl International Label Creation Class Pdf Page constructor
  * Create/Make a copy of pdf page
  *
  * @param Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page|string $param1
  * @param null $param2
  * @param null $param3
  */
 public function __construct($param1, $param2 = null, $param3 = null)
 {
     if ($param1 instanceof Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page && $param2 === null && $param3 === null) {
         $this->_contents = $param1->getContents();
     }
     parent::__construct($param1, $param2, $param3);
 }
Exemplo n.º 2
0
 public function __construct($param1, $param2 = null, $param3 = null)
 {
     parent::__construct($param1, $param2, $param3);
     $style = new Zend_Pdf_Style();
     $style->setLineColor(new Zend_Pdf_Color_Html("#000000"));
     $style->setFillColor(new Zend_Pdf_Color_Html("#000000"));
     $style->setLineWidth(0.5);
     $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_COURIER);
     $style->setFont($font, 10);
     $style->setLineDashingPattern(Zend_Pdf_Page::LINE_DASHING_SOLID);
     $this->_defaultStyle = $style;
     $this->setStyle($style);
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param mixed $param1
  * @param mixed $param2
  * @param mixed $param3
  *
  * @throws Zend_Pdf_Exception
  *
  * @return void
  */
 public function __construct($param1, $param2 = NULL, $param3 = NULL)
 {
     parent::__construct($param1, $param2, $param3);
     if ($param1 instanceof Phprojekt_Pdf_Page && $param2 === null && $param3 === null) {
         // Clone additional properties
         $this->setBorder($param1->borderTop, $param1->borderRight, $param1->borderBottom, $param1->borderLeft);
     }
 }
Exemplo n.º 4
0
 public function __construct($page = 1, $initalize = true, $margin = array(), $format = 'A5', $format_size = '419:595:', $print = false)
 {
     if ($margin) {
         $this->MARGIN = $margin;
     }
     parent::__construct($format_size);
     $this->pageNum = $page;
     $this->pageFormat = $format;
     $this->print = $print;
     if ($this->pageFormat == 'A4') {
         $this->fontSizeFormat = 7.0;
         $this->fontSizeFormatDiscription = 8.0;
         $this->fontSizeFormatHeader = 7.0;
         $this->fontSizeFormatSnoski = 6.5;
     } else {
         $this->fontSizeFormat = 5.5;
         $this->fontSizeFormatDiscription = 6.5;
         $this->fontSizeFormatHeader = 5.0;
         $this->fontSizeFormatSnoski = 4.5;
     }
     $this->dumpStyle = new Zend_Pdf_Style();
     $this->dumpStyle->setFont(Model_Static_Fonts::get("Arial Narrow"), 15);
     // init / draw line
     if ($initalize) {
         $this->init();
     }
     // init / draw logo
     $this->drawPic(APPLICATION_ROOT . '/files/pdf/alfa-hydro.png', $page % 2 ? 0 : $this->getWidth() - $this::LOGO_WIDTH, 10, $this::LOGO_WIDTH, $this::LOGO_HEIGHT);
     // init / draw category background
     $this->drawHorizontalLine($page % 2 ? $this::LOGO_WIDTH + 30 : 30, $page % 2 ? $this->getWidth() - 30 : $this->getWidth() - $this::LOGO_WIDTH - 40, 0, $this::LOGO_HEIGHT, new Zend_Pdf_Color_Html("#e5e5e5"));
     // write page number
     $this->saveGS();
     $this->setFillColor(new Zend_Pdf_Color_Html("white"));
     $this->setFont(Model_Static_Fonts::get("Arial Narrow Bold"), 7.75);
     $this->drawHorizontalLine($page % 2 ? $this->getWidth() + $this->MARGIN['right'] - $this::PAGENUM_WIDTH : -$this->MARGIN['left'], $page % 2 ? $this->getWidth() + $this->MARGIN['right'] : -$this->MARGIN['left'] + $this::PAGENUM_WIDTH, 0, Model_Static_PdfPage::LOGO_HEIGHT, new Zend_Pdf_Color_Html("#0095da"));
     if ($this->pageFormat == "A4") {
         $this->drawTextBlock($page, $page % 2 ? $this->getWidth() + $this->MARGIN['right'] - $this::PAGENUM_WIDTH + 10 : -$this->MARGIN['left'] + 25, -3);
     } else {
         $this->drawTextBlock($page, $page % 2 ? $this->getWidth() + $this->MARGIN['right'] - $this::PAGENUM_WIDTH + 10 : -$this->MARGIN['left'] + 10, -3);
     }
     $this->restoreGS();
     // start position - top of page
     $this->currentPosition = $this->getHeight();
 }