当前位置: 首页>>代码示例>>PHP>>正文


PHP TCPDF::__construct方法代码示例

本文整理汇总了PHP中TCPDF::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP TCPDF::__construct方法的具体用法?PHP TCPDF::__construct怎么用?PHP TCPDF::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TCPDF的用法示例。


在下文中一共展示了TCPDF::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function __construct($size = 'letter')
 {
     parent::__construct('P', 'mm', $size, true, 'UTF-8', false, false);
     $this->SetMargins(PAGE_MARGIN, PAGE_MARGIN, PAGE_MARGIN);
     $this->SetTopMargin(75);
     $this->SetAutoPageBreak(TRUE, 90);
 }
开发者ID:chileindica,项目名称:SIMPLE,代码行数:7,代码来源:certificadopdf.php

示例2: array

 function __construct($options = array())
 {
     $default = array('orientation' => PDF_PAGE_ORIENTATION, 'unit' => PDF_UNIT, 'format' => PDF_PAGE_FORMAT, 'unicode' => true, 'encoding' => 'UTF-8');
     $options = array_merge($default, $options);
     extract($options);
     parent::__construct($orientation, $unit, $format, $unicode, $encoding, false);
 }
开发者ID:slywalker,项目名称:pdf,代码行数:7,代码来源:tcpdf.php

示例3: PDF

 function PDF()
 {
     global $Prefs;
     define('RowSpace', 2);
     // define separation between the heading rows
     $PaperSize = explode(':', $Prefs['papersize']);
     if (PDF_APP == 'FPDF') {
         $this->FPDF($Prefs['paperorientation'], 'mm', $PaperSize[0]);
     } else {
         parent::__construct($Prefs['paperorientation'], 'mm', $PaperSize[0], true, 'UTF-8', false);
         $this->SetCellPadding(0);
     }
     if ($Prefs['paperorientation'] == 'P') {
         // Portrait - calculate max page height
         $this->pageY = $PaperSize[2] - $Prefs['marginbottom'];
     } else {
         // Landscape
         $this->pageY = $PaperSize[1] - $Prefs['marginbottom'];
     }
     $this->SetMargins($Prefs['marginleft'], $Prefs['margintop'], $Prefs['marginright']);
     $this->SetAutoPageBreak(0, $Prefs['marginbottom']);
     $this->SetFont(PDF_DEFAULT_FONT);
     $this->SetDrawColor(128, 0, 0);
     $this->SetLineWidth(0.35);
     // 1 point
     $this->AliasNbPages();
 }
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:27,代码来源:form_generator.php

示例4: explode

 function __construct()
 {
     global $report;
     $PaperSize = explode(':', $report->page->size);
     if (PDF_APP == 'TCPDF') {
         parent::__construct($report->page->orientation, 'mm', $PaperSize[0], true, 'UTF-8', false);
         $this->SetCellPadding(0);
     } else {
         $this->FPDF($report->page->orientation, 'mm', $PaperSize[0]);
     }
     if ($report->page->orientation == 'P') {
         // Portrait - calculate max page height
         $this->pageY = $PaperSize[2] - $report->page->margin->bottom;
     } else {
         // Landscape
         $this->pageY = $PaperSize[1] - $report->page->margin->bottom;
     }
     $this->SetMargins($report->page->margin->left, $report->page->margin->top, $report->page->margin->right);
     $this->SetAutoPageBreak(0, $report->page->margin->bottom);
     $this->SetFont(PDF_DEFAULT_FONT);
     $this->SetDrawColor(128, 0, 0);
     $this->SetLineWidth(0.35);
     // 1 point
     //	  $this->AliasNbPages(); // deprecated
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:25,代码来源:form_generator.php

示例5: __construct

 /**
  * __construct
  *
  * @param array $options Array of options.
  *
  * @return void
  */
 public function __construct($options)
 {
     $this->options(array_merge($this->_defaultOptions, $options));
     $options = $this->options();
     parent::__construct($options['orientation'], $options['unit'], $options['format'], $options['unicode'], $options['encoding'], $options['diskcache']);
     mb_internal_encoding('UTF-8');
     $this->SetCreator($options['creator']);
     $this->SetAuthor($options['author']);
     $this->SetTitle($options['title']);
     $this->SetSubject($options['subject']);
     $this->SetKeywords($options['keywords']);
     // lang
     $this->setLanguageArray($options['language']);
     //set auto page breaks
     $this->SetAutoPageBreak(true, $options['footer']['margin']);
     // set font
     $this->SetFont($options['font'], '', $options['font_size']);
     $this->SetCellPadding(2);
     // margins
     $this->SetMargins($options['margin']['left'], $options['margin']['top'], $options['margin']['right'], true);
     if (empty($options['header'])) {
         $this->SetPrintHeader(false);
     } else {
         $this->SetHeaderMargin($options['header']['margin']);
     }
     if (empty($options['footer'])) {
         $this->SetPrintFooter(false);
     } else {
         $this->SetFooterMargin($options['footer']['margin']);
     }
 }
开发者ID:malamalca,项目名称:lil,代码行数:38,代码来源:LilTCPDFEngine.php

示例6: array

 /**
  * Initialize 
  *
  */
 function __construct($params = array())
 {
     $orientation = 'P';
     $unit = 'mm';
     $format = 'A4';
     $unicode = true;
     $encoding = 'UTF-8';
     $diskcache = false;
     if (isset($params['orientation'])) {
         $orientation = $params['orientation'];
     }
     if (isset($params['unit'])) {
         $unit = $params['unit'];
     }
     if (isset($params['format'])) {
         $format = $params['format'];
     }
     if (isset($params['encoding'])) {
         $encoding = $params['encoding'];
     }
     if (isset($params['diskcache'])) {
         $diskcache = $params['diskcache'];
     }
     # initialize TCPDF
     parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);
 }
开发者ID:masaru-nemoto-biz,项目名称:AiuProject,代码行数:30,代码来源:pdf.php

示例7: __construct

 public function __construct($orientation = 'P', $format = "Letter", $color = 'gray')
 {
     parent::__construct($orientation, "pt", $format);
     self::$document_orientation = $orientation;
     self::$document_format = $format;
     $margins = parent::getMargins();
     $this->document_width = parent::getPageWidth() - $margins['left'] - $margins['right'];
     $this->last_width = $margins['left'];
     $this->last_height = $margins['top'];
     $this->document_color = $color;
     if ($color == 'red') {
         parent::SetDrawColorArray(array(255, 128, 128));
     } elseif ($color == 'green') {
         parent::SetDrawColorArray(array(128, 255, 128));
     } elseif ($color == 'blue') {
         parent::SetDrawColorArray(array(128, 128, 255));
     } else {
         parent::SetDrawColorArray(array(128, 128, 128));
     }
     parent::SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     parent::SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
     parent::setImageScale(PDF_IMAGE_SCALE_RATIO);
     parent::SetHeaderMargin(PDF_MARGIN_HEADER);
     parent::SetFooterMargin(PDF_MARGIN_FOOTER + 10);
 }
开发者ID:kailIII,项目名称:pos-erp,代码行数:25,代码来源:pdf.php

示例8:

 /**
 	Constructor
 */
 function __construct($orientation = 'P', $unit = 'in', $format = 'LETTER', $unicode = true, $encoding = 'utf-8', $diskcache = false, $pdfa = false)
 {
     parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache, $pdfa);
     // set document information
     $this->setAuthor(APP_NAME);
     $this->setCreator(APP_NAME);
     // $this->properties['Producer'] = 'Edoceo Imperium';
     // $this->setKeywords($this->name);
     //$pdf->properties['Keywords'] = 'Edoceo Imperium';
     //$pdf->properties['CreationDate']
     //$pdf->properties['ModDate'];
     //$pdf->properties['Trapped']
     // set margins
     $this->setMargins(0, 0, 0, true);
     $this->setHeaderFont(array(self::FONT_SANS, '', 12));
     $this->setHeaderMargin(0);
     $this->setPrintHeader(false);
     $this->setFooterMargin(0);
     //$this->setPrintFooter(false);
     // set auto page breaks
     $this->setAutoPageBreak(true, 1 / 2);
     //
     // set image scale factor
     $this->setImageScale(0);
     // set default font subsetting mode
     $this->setFontSubsetting(true);
     $this->setFont(self::FONT_SANS, '', 14);
     // Add a page
     // This method has several options, check the source code documentation for more information.
     //$this->addPage();
 }
开发者ID:rahmanazhar,项目名称:imperium,代码行数:34,代码来源:Base.php

示例9: array

 function __construct($options)
 {
     $defaults = array('orientation' => 'P', 'unit' => 'mm', 'format' => 'A4', 'unicode' => true, 'encoding' => "UTF-8");
     $options = is_array($options) ? am($defaults, $options) : $defaults;
     extract(am($defaults, $options));
     parent::__construct($orientation, $unit, $format, $unicode, $encoding);
 }
开发者ID:predominant,项目名称:candycane,代码行数:7,代码来源:tcpdf.php

示例10: __construct

 /**
  * @param string $pageOrientation the pageOrientation, like "Portrait" or "Landscape". Standard is Protrait.
  * @param string $unit the measurement of the pdf-Site, like "cm", "mm", "pt" or "in". Standard: cm.
  * @param string $pageFormat the Format of the Page, like "A4". Standard: A4.
  */
 public function __construct($pageOrientation = "Portrait", $unit = "cm", $pageFormat = "A4")
 {
     parent::__construct($pageOrientation, $unit, $pageFormat);
     $this->_htmlCode = '';
     $this->_tempVarSurroundPattern = '';
     $this->_tempDirName = 'kuwasysPdf';
 }
开发者ID:Auwibana,项目名称:babesk,代码行数:12,代码来源:HtmlToPdfImporter.php

示例11: __construct

	public function __construct($websiteName, $prettyDate, $description, $language)
	{
		parent::__construct();
		$this->websiteName = $websiteName;
		$this->prettyDate = $prettyDate;
		$this->description = $description;
		
		switch($language)
		{
			case 'zh-tw':
			case 'ja':
				$reportFont = 'msungstdlight';
				break;
			
			case 'zh-cn':
				$reportFont = 'stsongstdlight';
			break;
			
			case 'ko':
				$reportFont = 'hysmyeongjostdmedium';
				break;
			
			case 'ar':
				$reportFont = 'almohanad';
				break;
				
			case 'en':
			default:
				$reportFont = 'dejavusans';
				break;
		}
		$this->reportFont = $reportFont;
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:33,代码来源:PDFRenderer.php

示例12: __construct

 /**
  * override standard constructor so we can use Magento's factory
  * and pass in additional constructor arguments
  *
  * @param array $arguments array of 7 constructor arguments
  */
 public function __construct($arguments)
 {
     $cacheDir = Mage::getConfig()->getOptions()->getDir('cache');
     $pdfDir = $cacheDir . DS . 'pdfcache';
     Mage::getConfig()->getOptions()->createDirIfNotExists($pdfDir);
     list($orientation, $unit, $format, $unicode, $encoding, $diskcache, $pdfa) = $arguments;
     return parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache, $pdfa);
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:14,代码来源:Mypdf.php

示例13: __construct

 public function __construct($orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false, $pdfa = false)
 {
     parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache, $pdfa);
     $this->SetCreator('COM_GGLMS');
     $this->setImageScale(PDF_IMAGE_SCALE_RATIO);
     $this->SetFont('helvetica', '', 10);
     $this->_data = array();
 }
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:8,代码来源:certificatePDF.class.php

示例14:

 function __construct($filename, array $data)
 {
     parent::__construct();
     $this->setFileName($filename);
     $this->setData($data);
     $this->init();
     $this->setup();
 }
开发者ID:hugi2002,项目名称:mylibrary,代码行数:8,代码来源:Abstract.php

示例15: __construct

 /**
  *
  *
  * @param string $orientation
  * @param string $unit
  * @param string $format
  * @param bool|true $unicode
  * @param string $encoding
  * @param bool|false $diskcache
  * @param bool|false $pdfa
  */
 public function __construct($orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false, $pdfa = false)
 {
     if (!class_exists('TCPDF', FALSE)) {
         // Load SwiftMailer
         require Kohana::find_file('vendor', 'tcpdf/tcpdf');
     }
     parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache, $pdfa);
     // TODO:
 }
开发者ID:snoblucha,项目名称:kohana-tcpdf,代码行数:20,代码来源:PDF.php


注:本文中的TCPDF::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。