當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Pdf_Page::__construct方法代碼示例

本文整理匯總了PHP中Zend_Pdf_Page::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Pdf_Page::__construct方法的具體用法?PHP Zend_Pdf_Page::__construct怎麽用?PHP Zend_Pdf_Page::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Pdf_Page的用法示例。


在下文中一共展示了Zend_Pdf_Page::__construct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * 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);
 }
開發者ID:usamatahir,項目名稱:BulletProof,代碼行數:15,代碼來源:Page.php

示例2: __construct

 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);
 }
開發者ID:uglide,項目名稱:zfcore-transition,代碼行數:13,代碼來源:Page.php

示例3: __construct

 /**
  * 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);
     }
 }
開發者ID:penSecIT,項目名稱:PHProjekt,代碼行數:19,代碼來源:Page.php

示例4: __construct

 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();
 }
開發者ID:Alpha-Hydro,項目名稱:alpha-hydro-antares,代碼行數:44,代碼來源:PdfPage.php


注:本文中的Zend_Pdf_Page::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。