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


PHP Cpdf::getFirstPageId方法代碼示例

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


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

示例1: list

 /**
  * Class constructor
  *
  * @param mixed  $paper  The size of paper to use in this PDF ({@link CPDF_Adapter::$PAPER_SIZES})
  * @param string $orientation The orienation of the document (either 'landscape' or 'portrait')
  */
 function __construct($paper = "letter", $orientation = "portrait")
 {
     if (is_array($paper)) {
         $size = $paper;
     } else {
         if (isset(self::$PAPER_SIZES[mb_strtolower($paper)])) {
             $size = self::$PAPER_SIZES[mb_strtolower($paper)];
         } else {
             $size = self::$PAPER_SIZES["letter"];
         }
     }
     if (mb_strtolower($orientation) === "landscape") {
         list($size[2], $size[3]) = array($size[3], $size[2]);
     }
     $this->_pdf = new Cpdf($size, DOMPDF_UNICODE_ENABLED, DOMPDF_FONT_CACHE, DOMPDF_TEMP_DIR);
     $this->_pdf->addInfo("Creator", "DOMPDF");
     $time = substr_replace(date('YmdHisO'), '\'', -2, 0) . '\'';
     $this->_pdf->addInfo("CreationDate", "D:{$time}");
     $this->_pdf->addInfo("ModDate", "D:{$time}");
     $this->_width = $size[2] - $size[0];
     $this->_height = $size[3] - $size[1];
     $this->_page_number = $this->_page_count = 1;
     $this->_page_text = array();
     $this->_pages = array($this->_pdf->getFirstPageId());
     $this->_image_cache = array();
 }
開發者ID:darshanmodi2010,項目名稱:dompdf,代碼行數:32,代碼來源:cpdf_adapter.cls.php

示例2: elseif

 /**
  * Class constructor
  *
  * @param mixed  $paper       The size of paper to use in this PDF ({@link CPDF_Adapter::$PAPER_SIZES})
  * @param string $orientation The orientation of the document (either 'landscape' or 'portrait')
  * @param DOMPDF $dompdf      The DOMPDF instance
  */
 function __construct($paper = "letter", $orientation = "portrait", DOMPDF $dompdf)
 {
     if (is_array($paper)) {
         $size = $paper;
     } elseif (isset(self::$PAPER_SIZES[mb_strtolower($paper)])) {
         $size = self::$PAPER_SIZES[mb_strtolower($paper)];
     } else {
         $size = self::$PAPER_SIZES["letter"];
     }
     if (mb_strtolower($orientation) === "landscape") {
         list($size[2], $size[3]) = array($size[3], $size[2]);
     }
     $this->_dompdf = $dompdf;
     $this->_pdf = new Cpdf($size, $dompdf->get_option("enable_unicode"), $dompdf->get_option("font_cache"), $dompdf->get_option("temp_dir"));
     $this->_pdf->addInfo("Creator", "DOMPDF");
     $time = substr_replace(date('YmdHisO'), '\'', -2, 0) . '\'';
     $this->_pdf->addInfo("CreationDate", "D:{$time}");
     $this->_pdf->addInfo("ModDate", "D:{$time}");
     $this->_width = $size[2] - $size[0];
     $this->_height = $size[3] - $size[1];
     $this->_page_number = $this->_page_count = 1;
     $this->_page_text = array();
     $this->_pages = array($this->_pdf->getFirstPageId());
     $this->_image_cache = array();
 }
開發者ID:skyosev,項目名稱:OpenCart-Overclocked,代碼行數:32,代碼來源:cpdf_adapter.cls.php

示例3: Cpdf

 /**
  * Class constructor
  *
  * @param mixed  $paper  The size of paper to use in this PDF ({@link CPDF_Adapter::$PAPER_SIZES})
  * @param string $orientation The orienation of the document (either 'landscape' or 'portrait')
  */
 function __construct($paper = "letter", $orientation = "portrait")
 {
     if (is_array($paper)) {
         $size = $paper;
     } else {
         if (isset(self::$PAPER_SIZES[mb_strtolower($paper)])) {
             $size = self::$PAPER_SIZES[$paper];
         } else {
             $size = self::$PAPER_SIZES["letter"];
         }
     }
     if (mb_strtolower($orientation) == "landscape") {
         $a = $size[3];
         $size[3] = $size[2];
         $size[2] = $a;
     }
     $this->_pdf = new Cpdf($size);
     $this->_pdf->addInfo("Creator", "DOMPDF Converter");
     // Silence pedantic warnings about missing TZ settings
     if (function_exists("date_default_timezone_get")) {
         $tz = @date_default_timezone_get();
         date_default_timezone_set("UTC");
         $this->_pdf->addInfo("CreationDate", date("Y-m-d"));
         date_default_timezone_set($tz);
     } else {
         $this->_pdf->addInfo("CreationDate", date("Y-m-d"));
     }
     $this->_width = $size[2] - $size[0];
     $this->_height = $size[3] - $size[1];
     $this->_pdf->openHere('Fit');
     $this->_page_number = $this->_page_count = 1;
     $this->_page_text = array();
     $this->_pages = array($this->_pdf->getFirstPageId());
     $this->_image_cache = array();
 }
開發者ID:SkMamtajuddin,項目名稱:bamboo-invoice,代碼行數:41,代碼來源:cpdf_adapter.cls.php

示例4: Cpdf

 /**
  * Class constructor
  *
  * @param mixed  $paper  The size of paper to use in this PDF ({@link CPDF_Adapter::$PAPER_SIZES})
  * @param string $orientation The orienation of the document (either 'landscape' or 'portrait')
  */
 function __construct($paper = "letter", $orientation = "portrait")
 {
     if (is_array($paper)) {
         $size = $paper;
     } else {
         if (isset(self::$PAPER_SIZES[mb_strtolower($paper)])) {
             $size = self::$PAPER_SIZES[mb_strtolower($paper)];
         } else {
             $size = self::$PAPER_SIZES["letter"];
         }
     }
     if (mb_strtolower($orientation) === "landscape") {
         $a = $size[3];
         $size[3] = $size[2];
         $size[2] = $a;
     }
     $this->_pdf = new Cpdf($size, DOMPDF_UNICODE_ENABLED, DOMPDF_FONT_CACHE, DOMPDF_TEMP_DIR);
     $this->_pdf->addInfo("Creator", "dompdf");
     // Silence pedantic warnings about missing TZ settings
     $time = substr_replace(date('YmdHisO'), '\'', 0 - 2, 0) . '\'';
     $this->_pdf->addInfo("CreationDate", "D:" . $time);
     $this->_pdf->addInfo("ModDate", "D:" . $time);
     $this->_width = $size[2] - $size[0];
     $this->_height = $size[3] - $size[1];
     $this->_pdf->openHere('Fit');
     $this->_page_number = $this->_page_count = 1;
     $this->_page_text = array();
     $this->_pages = array($this->_pdf->getFirstPageId());
     $this->_image_cache = array();
 }
開發者ID:kuwox,項目名稱:buenavista,代碼行數:36,代碼來源:cpdf_adapter.cls.php

示例5: list

 /**
  * Class constructor
  *
  * @param mixed $paper The size of paper to use in this PDF ({@link CPDF::$PAPER_SIZES})
  * @param string $orientation The orientation of the document (either 'landscape' or 'portrait')
  * @param Dompdf $dompdf The Dompdf instance
  */
 function __construct($paper = "letter", $orientation = "portrait", Dompdf $dompdf)
 {
     if (is_array($paper)) {
         $size = $paper;
     } else {
         if (isset(self::$PAPER_SIZES[mb_strtolower($paper)])) {
             $size = self::$PAPER_SIZES[mb_strtolower($paper)];
         } else {
             $size = self::$PAPER_SIZES["letter"];
         }
     }
     if (mb_strtolower($orientation) === "landscape") {
         list($size[2], $size[3]) = array($size[3], $size[2]);
     }
     $this->_dompdf = $dompdf;
     $this->_pdf = new \Cpdf($size, true, $dompdf->getOptions()->getFontCache(), $dompdf->getOptions()->getTempDir());
     $this->_pdf->addInfo("Producer", sprintf("%s + CPDF", $dompdf->version));
     $time = substr_replace(date('YmdHisO'), '\'', -2, 0) . '\'';
     $this->_pdf->addInfo("CreationDate", "D:{$time}");
     $this->_pdf->addInfo("ModDate", "D:{$time}");
     $this->_width = $size[2] - $size[0];
     $this->_height = $size[3] - $size[1];
     $this->_page_number = $this->_page_count = 1;
     $this->_page_text = array();
     $this->_pages = array($this->_pdf->getFirstPageId());
     $this->_image_cache = array();
 }
開發者ID:BrunoDeBarros,項目名稱:dompdf,代碼行數:34,代碼來源:CPDF.php

示例6: Cpdf

 /**
  * Class constructor
  *
  * @param mixed  $paper       The size of paper to use in this PDF ({@link CPDF_Adapter::$PAPER_SIZES})
  * @param string $orientation The orientation of the document (either 'landscape' or 'portrait')
  * @param DOMPDF $dompdf      The DOMPDF instance
  */
 function __construct($paper = "letter", $orientation = "portrait", DOMPDF $dompdf)
 {
     $size = $this->get_size($paper, $orientation);
     $this->_width = $size[2] - $size[0];
     $this->_height = $size[3] - $size[1];
     $this->_dompdf = $dompdf;
     $this->_pdf = new Cpdf($size, $dompdf->get_option("enable_unicode"), $dompdf->get_option("font_cache"), $dompdf->get_option("temp_dir"));
     $this->_pdf->addInfo("Creator", "DOMPDF");
     $time = substr_replace(date('YmdHisO'), '\'', -2, 0) . '\'';
     $this->_pdf->addInfo("CreationDate", "D:{$time}");
     $this->_pdf->addInfo("ModDate", "D:{$time}");
     $this->_page_number = $this->_page_count = 1;
     $this->_page_text = array();
     $this->_pages = array($this->_pdf->getFirstPageId());
     $this->_image_cache = array();
 }
開發者ID:artyfarty,項目名稱:dompdf,代碼行數:23,代碼來源:cpdf_adapter.cls.php

示例7: Cpdf

 /**
  * Class constructor
  *
  * @param mixed  $paper  The size of paper to use in this PDF ({@link CPDF_Adapter::$PAPER_SIZES})
  * @param string $orientation The orienation of the document (either 'landscape' or 'portrait')
  */
 function __construct($paper = "letter", $orientation = "portrait")
 {
     if (is_array($paper)) {
         $size = $paper;
     } else {
         if (isset(self::$PAPER_SIZES[mb_strtolower($paper)])) {
             $size = self::$PAPER_SIZES[$paper];
         } else {
             $size = self::$PAPER_SIZES["letter"];
         }
     }
     if (mb_strtolower($orientation) == "landscape") {
         $a = $size[3];
         $size[3] = $size[2];
         $size[2] = $a;
     }
     // OAR - Setting isUnicode to true by default!
     // Some people may not want to do this.  Should we have
     // a DOMPDF config variable somewhere that lets people
     // choose?
     $this->_pdf = new Cpdf($size, true);
     $this->_pdf->addInfo("Creator", "dompdf");
     // Silence pedantic warnings about missing TZ settings
     if (function_exists("date_default_timezone_get")) {
         $tz = @date_default_timezone_get();
         date_default_timezone_set("UTC");
         $this->_pdf->addInfo("CreationDate", date("Y-m-d"));
         date_default_timezone_set($tz);
     } else {
         $this->_pdf->addInfo("CreationDate", date("Y-m-d"));
     }
     $this->_width = $size[2] - $size[0];
     $this->_height = $size[3] - $size[1];
     $this->_pdf->openHere('Fit');
     $this->_page_number = $this->_page_count = 1;
     $this->_page_text = array();
     $this->_pages = array($this->_pdf->getFirstPageId());
     $this->_image_cache = array();
 }
開發者ID:sgrove,項目名稱:cothinker,代碼行數:45,代碼來源:cpdf_adapter.cls.php


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