X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fclass.pdf.inc;h=0fd5aedc39b6948c16e49fa7da9dde2fba7e0aed;hb=3141d7755efbca4d2eb7babc1d31629295451885;hp=726919f896de3142baa16634e6e14e0f95b51d43;hpb=9967d9b22e1200e516aadf98ffcbcc65ac1c35bb;p=fa-stable.git diff --git a/reporting/includes/class.pdf.inc b/reporting/includes/class.pdf.inc index 726919f8..0fd5aedc 100644 --- a/reporting/includes/class.pdf.inc +++ b/reporting/includes/class.pdf.inc @@ -1,4 +1,14 @@ . +***********************************************************************/ /* This class is an extension to the tcpdf class using a syntax that the original reports were written in (the R &OS pdf.php class) - due to easily portation this wrapper class @@ -58,8 +68,8 @@ class Cpdf extends TCPDF { $l = array('a_meta_charset' => 'ISO-8859-1', 'a_meta_dir' => 'ltr', 'a_meta_language' => 'en_GB', 'w_page' => 'page'); $enc = $l['a_meta_charset']; $uni = ($enc == 'UTF-8' || $enc == 'GB2312' ? true : false); - if ($enc == "GB2312") - ini_set("memory_limit", "25M"); + if ($uni) + ini_set("memory_limit", "48M"); $this->TCPDF('P', 'pt', $pageSize, $uni, $enc); $this->setLanguageArray($l); $this->setPrintHeader(false); @@ -90,6 +100,7 @@ class Cpdf extends TCPDF { { case "ar_EG" : $fontname = "ae_tholoth"; break; case "zh_CN" : $fontname = "gbsn00lp"; break; + case "zh_TW" : $fontname = "chinese_traditional_cid0"; break; default : $fontname = "dejavu"; break; } } @@ -202,16 +213,12 @@ class Cpdf extends TCPDF { { TCPDF::Ellipse($x0, $y0, $r1, $r2, $angle, $astart. $afinish, ($close?'C':''), "", "", $nSeg); } + function Stream() { TCPDF::Output('', 'I'); } - function Output() - { - return TCPDF::Output('','S'); - } - function calcTextWrap($txt, $width, $spacebreak=false) { $ret = ""; @@ -263,7 +270,7 @@ class Cpdf extends TCPDF { */ function setStrokeColor($r,$g,$b,$force=0) { - TCPDF::SetDrawColor(255*$r,255*$g,255*$b); + TCPDF::SetDrawColor($r,$g,$b); } /** * this sets the line drawing style. @@ -283,7 +290,7 @@ class Cpdf extends TCPDF { $this->SetLineWidth($width); } - function Text($x, $y, $txt, $stroke=0, $clip=false) + function Text($x, $y, $txt, $stroke=0, $clip=false) { TCPDF::Text($x,$y, TCPDF::unhtmlentities($txt), $stroke, $clip); }