Merged changes from mai trunk up to 2.3.1
[fa-stable.git] / reporting / includes / pdf_report.inc
index daacbd2dbbb26a010b6fd3c82b790f1833130a5c..98bd06a240502d571a3b25073457f27117e799a2 100644 (file)
@@ -738,6 +738,8 @@ class FrontReport extends Cpdf
 
        function TextWrap($xpos, $ypos, $len, $str, $align = 'left', $border = 0, $fill = 0, $link = NULL, $stretch = 1, $spacebreak=false)
        {
+               $str = strtr($str, array("\r"=>''));
+
                if ($this->fontSize != $this->oldFontSize)
                {
                        $this->SetFontSize($this->fontSize);
@@ -792,7 +794,8 @@ class FrontReport extends Cpdf
 
        function TextWrapLines($c, $width, $txt, $align='left', $border=0, $fill=0, $link=NULL, $stretch=0, $spacebreak=true)
        {
-               $str = Explode("\n", $txt);
+               $str = explode("\n", $txt);
+
                for ($i = 0; $i < count($str); $i++)
                {
                        $l = $str[$i];