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


PHP HTML2PDF_locale::load方法代碼示例

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


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

示例1: __construct

 /**
  * class constructor
  *
  * @access public
  * @param  string      $orientation page orientation, same as TCPDF
  * @param  mixed       $format      The format used for pages, same as TCPDF
  * @param  $tring      $langue      Lang : fr, en, it...
  * @param  boolean     $unicode     TRUE means that the input text is unicode (default = true)
  * @param  String      $encoding    charset encoding; default is UTF-8
  * @param  array       $marges      Default margins (left, top, right, bottom)
  * @return LMSHTML2PDF $this
  */
 public function __construct($orientation = 'P', $format = 'A4', $langue = 'fr', $unicode = true, $encoding = 'UTF-8', $marges = array(5, 5, 5, 8))
 {
     // init the page number
     $this->_page = 0;
     $this->_firstPage = true;
     // save the parameters
     $this->_orientation = $orientation;
     $this->_format = $format;
     $this->_langue = strtolower($langue);
     $this->_unicode = $unicode;
     $this->_encoding = $encoding;
     // load the Local
     HTML2PDF_locale::load($this->_langue);
     // create the LMSTML2PDF_myPdf object
     $this->pdf = new HTML2PDF_myPdf($orientation, 'mm', $format, $unicode, $encoding);
     // init the CSS parsing object
     $this->parsingCss = new LMSHTML2PDF_parsingCss($this->pdf);
     $this->parsingCss->fontSet();
     $this->_defList = array();
     // init some tests
     $this->setTestTdInOnePage(false);
     $this->setTestIsImage(true);
     $this->setTestIsDeprecated(true);
     // init the default font
     $this->setDefaultFont(null);
     // init the HTML parsing object
     $this->parsingHtml = new HTML2PDF_parsingHtml($this->_encoding);
     $this->_subHtml = null;
     $this->_subPart = false;
     // init the marges of the page
     if (!is_array($marges)) {
         $marges = array($marges, $marges, $marges, $marges);
     }
     $this->_setDefaultMargins($marges[0], $marges[1], $marges[2], $marges[3]);
     $this->_setMargins();
     $this->_marges = array();
     // init the form's fields
     $this->_lstField = array();
     return $this;
 }
開發者ID:itav,項目名稱:lms,代碼行數:52,代碼來源:LMSHTML2PDF.php


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