Making the stretch parameter = 1 on default print pdf all over
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 4 Jan 2010 15:43:11 +0000 (15:43 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 4 Jan 2010 15:43:11 +0000 (15:43 +0000)
CHANGELOG.txt
reporting/includes/class.pdf.inc
reporting/includes/pdf_report.inc

index f0963d07cacdae78a6b957f2ee968f7701ffed47..d2c2bbfc5b1b7a35958706eeab9a6ce8dede120e 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+04-Jan-2010 Joe Hunt
+! Making the stretch parameter = 1 on default print pdf all over
+$ /reporting/includes/class.pdf.inc
+  /reporting/includes/pdf_report.inc
+  
 31-Dec-2009 Joe Hunt
 # When updating tax rate, it didn't show and calculate correct in documents.
 $ /taxes/db/tax_groups_db.inc
index 6eae796133ea9faa3a08533a60321a46a231e93c..778459dc7124c603b6382df824a2ae6d965172a9 100644 (file)
@@ -258,7 +258,7 @@ class Cpdf extends TCPDF {
                return array($txt2, $ret);
        }
 
-       function addTextWrap($xb, $yb, $w, $h, $txt, $align='left', $border=0, $fill=0, $link = NULL, $stretch = 0, $spacebreak=false)
+       function addTextWrap($xb, $yb, $w, $h, $txt, $align='left', $border=0, $fill=0, $link = NULL, $stretch = 1, $spacebreak=false)
        {
                $ret = "";
                if (!$this->rtl)
index b17d5700d5407d7b651ce89cf9ce11330e1047e9..bb70cbe4ef3656b06e29426bd80f3fe43c9ed408 100644 (file)
@@ -693,7 +693,7 @@ class FrontReport extends Cpdf
                parent::SetCellPadding($pad);
        }
        
-       function Text($c, $txt, $n=0, $corr=0, $r=0, $align='left', $border=0, $fill=0, $link=NULL, $stretch=0)
+       function Text($c, $txt, $n=0, $corr=0, $r=0, $align='left', $border=0, $fill=0, $link=NULL, $stretch=1)
        {
                if ($n == 0)
                        $n = $this->pageWidth - $this->rightMargin;
@@ -701,7 +701,7 @@ class FrontReport extends Cpdf
                return $this->TextWrap($c, $this->row - $r, $n - $c + $corr, $txt, $align, $border, $fill, $link, $stretch);
        }
 
-       function TextWrap($xpos, $ypos, $len, $str, $align = 'left', $border = 0, $fill = 0, $link = NULL, $stretch = 0)
+       function TextWrap($xpos, $ypos, $len, $str, $align = 'left', $border = 0, $fill = 0, $link = NULL, $stretch = 1)
        {
                if ($this->fontSize != $this->oldFontSize)
                {
@@ -711,12 +711,12 @@ class FrontReport extends Cpdf
                return $this->addTextWrap($xpos, $ypos, $len, $this->fontSize, $str, $align, $border, $fill, $link, $stretch);
        }
 
-       function TextCol($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)
+       function TextCol($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1)
        {
                return $this->TextWrap($this->cols[$c], $this->row - $r, $this->cols[$n] - $this->cols[$c] + $corr, $txt, $this->aligns[$c], $border, $fill, $link, $stretch);
        }
        
-       function AmountCol($c, $n, $txt, $dec=0, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0, $color_red=false)
+       function AmountCol($c, $n, $txt, $dec=0, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1, $color_red=false)
        {
                if ($color_red && $txt < 0)
                        $this->SetTextColor(255, 0, 0);
@@ -726,7 +726,7 @@ class FrontReport extends Cpdf
                return $ret;    
        }
 
-       function AmountCol2($c, $n, $txt, $dec=0, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0, $color_red=false, $amount_locale = 'en_US.UTF-8', $amount_format = '%(!.2n')
+       function AmountCol2($c, $n, $txt, $dec=0, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1, $color_red=false, $amount_locale = 'en_US.UTF-8', $amount_format = '%(!.2n')
        {
                setlocale(LC_MONETARY, $amount_locale);
                if ($color_red && $txt < 0)
@@ -737,25 +737,25 @@ class FrontReport extends Cpdf
                return $ret;    
        }
        
-       function DateCol($c, $n, $txt, $conv=false, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)
+       function DateCol($c, $n, $txt, $conv=false, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1)
        {
                if ($conv)
                        $txt = sql2date($txt);
                return $this->TextCol($c, $n, $txt, $corr, $r, $border, $fill, $link, $stretch);
        }
 
-       function TextCol2($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)
+       function TextCol2($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1)
        {
                return $this->TextWrap($this->cols2[$c], $this->row - $r, $this->cols2[$n] - $this->cols2[$c] + $corr, $txt, $this->aligns2[$c], $border, $fill, $link, $stretch);
        }
 
-       function TextColLines($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)
+       function TextColLines($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=1)
        {
                $this->row -= $r;
                $this->TextWrapLines($this->cols[$c], $this->cols[$n] - $this->cols[$c] + $corr, $txt, $this->aligns[$c], $border, $fill, $link, $stretch);
        }
 
-       function TextWrapLines($c, $width, $txt, $align='left', $border=0, $fill=0, $link=NULL, $stretch=0)
+       function TextWrapLines($c, $width, $txt, $align='left', $border=0, $fill=0, $link=NULL, $stretch=1)
        {
                $str = Explode("\n", $txt);
                for ($i = 0; $i < count($str); $i++)