X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fclass.pdf.inc;h=ab76ab46ed20fb3311ef59e971682608a97b64ae;hb=074e859275e21fa17943e19ade8ef75dbefea9d2;hp=a1e989172ebd382e2ef01aba0719ffb29b9c50a5;hpb=a9d55e1c13cbd6a6305b9322ec8621a06516f9f3;p=fa-stable.git diff --git a/reporting/includes/class.pdf.inc b/reporting/includes/class.pdf.inc index a1e98917..ab76ab46 100644 --- a/reporting/includes/class.pdf.inc +++ b/reporting/includes/class.pdf.inc @@ -63,9 +63,9 @@ include_once (dirname(__FILE__).'/fpdi/fpdi.php'); class Cpdf extends FPDI { - function Cpdf($pageSize='A4', $lang=null, $pageOrientation='P') + function __construct($pageSize='A4', $lang=null, $pageOrientation='P') { - $this->TCPDF($pageOrientation, 'pt', $pageSize);//, $uni, $enc); + parent::__construct($pageOrientation, 'pt', $pageSize);//, $uni, $enc); $this->SetLang($lang); $this->setPrintHeader(false); $this->setPrintFooter(false); @@ -308,6 +308,7 @@ class Cpdf extends FPDI { else $align = 'R'; + $txt = parent::unhtmlentities($txt); // If horizontal scaling was requested, check to see if we're trying to scale // too much. If so, cut back string first and then scale it. $maxScaleFactor = 1.4; @@ -319,7 +320,7 @@ class Cpdf extends FPDI { $ret = $txt[1]; $txt = $txt[0]; $this->SetXY($xb, $this->h - $yb - $h); - $txt = parent::unhtmlentities($txt); + if ($this->isunicode && $this->encoding != "UTF-8") $txt = iconv($this->encoding, "UTF-8", $txt); $this->Cell($w, $h, $txt, $border, 0, $align, $fill, $link, $stretch);