当前位置: 首页>>代码示例>>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;未经允许,请勿转载。