Exemplo n.º 1
0
 /**
  * class constructor
  *
  * @param string  $orientation page orientation, same as TCPDF
  * @param string  $unit        User measure unit, same as TCPDF
  * @param mixed   $format      The format used for pages, same as TCPDF
  * @param boolean $unicode     TRUE means that the input text is unicode (default = true)
  * @param String  $encoding    charset encoding; default is UTF-8
  * @param boolean $diskcache   if TRUE reduce the RAM memory usage by caching temporary data on filesystem (slower).
  * @access public
  */
 public function __construct($orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false)
 {
     // call the parent constructor
     parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);
     // init the specific parameters used by HTML2PDF
     $this->SetCreator(PDF_CREATOR);
     $this->SetAutoPageBreak(false, 0);
     $this->linestyleCap = '2 J';
     $this->setPrintHeader(false);
     $this->jpeg_quality = 90;
     // prepare the automatic footer
     $this->SetMyFooter();
     $this->cMargin = 0;
 }
Exemplo n.º 2
0
 public function __construct($pagesize, $orientation, $title)
 {
     global $layout;
     parent::__construct($orientation, PDF_UNIT, $pagesize, true, 'UTF-8', false, false);
     $this->SetProducer('LMS Developers');
     $this->SetSubject($title);
     $this->SetCreator('LMS ' . $layout['lmsv']);
     $this->SetDisplayMode('fullwidth', 'SinglePage', 'UseNone');
     $this->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
     $this->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
     $this->SetHeaderMargin(PDF_MARGIN_HEADER);
     $this->SetFooterMargin(PDF_MARGIN_FOOTER);
     $this->setImageScale(PDF_IMAGE_SCALE_RATIO);
     $this->setLanguageArray($l);
     /* disable font subsetting to improve performance */
     $this->setFontSubsetting(false);
     $this->AppendPage();
 }