From 31b37c5aff4167a76cf784876e7a9dca96cc3f3f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 1 Dec 2012 11:31:02 +0100 Subject: [PATCH] Fix: Length not hard coded --- htdocs/core/lib/pdf.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 27f9613b08d..2613d773ab1 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -718,7 +718,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass { $pdf->SetFont('','B',7); $pdf->SetXY($dims['lm'],-$posy); - $pdf->MultiCell(200, 2, $line1, 0, 'C', 0); + $pdf->MultiCell($dims['wk']-$dims['rm'], 2, $line1, 0, 'C', 0); $posy-=3; $pdf->SetFont('','',7); } @@ -727,7 +727,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass { $pdf->SetFont('','B',7); $pdf->SetXY($dims['lm'],-$posy); - $pdf->MultiCell(200, 2, $line2, 0, 'C', 0); + $pdf->MultiCell($dims['wk']-$dims['rm'], 2, $line2, 0, 'C', 0); $posy-=3; $pdf->SetFont('','',7); } @@ -735,14 +735,14 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass if (! empty($line3)) { $pdf->SetXY($dims['lm'],-$posy); - $pdf->MultiCell(200, 2, $line3, 0, 'C', 0); + $pdf->MultiCell($dims['wk']-$dims['rm'], 2, $line3, 0, 'C', 0); } if (! empty($line4)) { $posy-=3; $pdf->SetXY($dims['lm'],-$posy); - $pdf->MultiCell(200, 2, $line4, 0, 'C', 0); + $pdf->MultiCell($dims['wk']-$dims['rm'], 2, $line4, 0, 'C', 0); } // Show page nb only on iso languages (so default Helvetica font)