X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Ftcpdf.php;h=803416a89396111855d865e50df1725f1a8b1dfd;hb=df660a601cabb0afe7f3246884f16207b9a0c314;hp=6e7b6f4af9f50135c536984c6dc61288685d310f;hpb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;p=fa-stable.git diff --git a/reporting/includes/tcpdf.php b/reporting/includes/tcpdf.php index 6e7b6f4a..803416a8 100644 --- a/reporting/includes/tcpdf.php +++ b/reporting/includes/tcpdf.php @@ -1112,7 +1112,7 @@ if (!class_exists('TCPDF')) { * @param boolean $unicode TRUE means that the input text is unicode (default = true) * @param String $encoding charset encoding; default is UTF-8 */ - function TCPDF($orientation='P', $unit='mm', $format='A4', $uni=true, $encoding="UTF-8") { + function __construct($orientation='P', $unit='mm', $format='A4', $uni=true, $encoding="UTF-8") { if ($uni) // Fix for FrontAccounting { global $unicode, $unicode_mirror, $unicode_arlet, $laa_array, $diacritics; @@ -4690,7 +4690,7 @@ if (!class_exists('TCPDF')) { function _putimages() { $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; reset($this->images); - while (list($file, $info) = each($this->images)) { + foreach ($this->images as $file => $info) { $this->_newobj(); $this->images[$file]['n'] = $this->n; $this->_out('<isunicode) { - return html_entity_decode($text_to_convert, ENT_QUOTES); - } - return html_entity_decode_php4($text_to_convert); + return html_entity_decode($text_to_convert, ENT_QUOTES, $this->encoding); } // ENCRYPTION METHODS ---------------------------------- @@ -7765,7 +7762,7 @@ if (!class_exists('TCPDF')) { $k = $this->k; $this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%d,[%.2f,%.2f,%.2f,%.2f]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n"; $this->javascript .= "f".$name.".textSize=".$this->FontSizePt.";\n"; - while (list($key, $val) = each($prop)) { + foreach ($prop as $key => $val) { if (strcmp(substr($key,-5),"Color") == 0) { $val = $this->_JScolor($val); } else { @@ -9239,7 +9236,7 @@ if (!class_exists('TCPDF')) { // get attributes preg_match_all('/([^=\s]*)=["\']?([^"\']*)["\']?/', $element, $attr_array, PREG_PATTERN_ORDER); $dom[$key]['attribute'] = array(); // reset attribute array - while (list($id, $name) = each($attr_array[1])) { + foreach ($attr_array[1] as $id => $name) { $dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id]; } // split style attributes @@ -9247,7 +9244,7 @@ if (!class_exists('TCPDF')) { // get style attributes preg_match_all('/([^:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER); $dom[$key]['style'] = array(); // reset style attribute array - while (list($id, $name) = each($style_array[1])) { + foreach ($style_array[1] as $id => $name) { $dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]); } // --- get some style attributes ---