Changed $path_to_root and stamped copyright
[fa-stable.git] / reporting / includes / class.pdf.inc
index 7c182017526dc8cd406e95c39f3946f55e719ed5..1fcda8596dbac483deff83eb50074df02105ccfa 100644 (file)
@@ -1,4 +1,14 @@
 <?php
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU Affero General Public License,
+       AGPL, as published by the Free Software Foundation, either version 
+       3 of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
 /*
        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);
@@ -202,16 +212,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 = "";