From 585b1c575dd5be99280be4d696020a3abfb27fa2 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 6 Dec 2014 19:56:10 +0100 Subject: [PATCH] Task #1069 - PDF : saut de page non voulu quand une ligne est trop longue --- include/export_gl_pdf.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/export_gl_pdf.php b/include/export_gl_pdf.php index dc43bce48..41633f8a2 100644 --- a/include/export_gl_pdf.php +++ b/include/export_gl_pdf.php @@ -189,8 +189,9 @@ foreach ($a_poste as $poste) $i++; $pdf->LongLine($width[$i], 6, $detail['jr_internal'], 0, $lor[$i] ); $i++; - /* limit set to 20 for the substring */ - $pdf->LongLine($width[$i], 6, mb_substr($detail['description'],0,120), 0,$lor[$i]); + /* limit set to 40 for the substring */ + $triple_point = (mb_strlen($detail['description']) > 40 ) ? '...':''; + $pdf->LongLine($width[$i], 6, mb_substr($detail['description'],0,40).$triple_point, 0,$lor[$i]); $i++; $pdf->Cell($width[$i], 6, $detail['jr_pj_number'], 0, 0, $lor[$i]); $i++;