From 06b2d459c03ea622e4e71d8ce353f3f12a4d276e Mon Sep 17 00:00:00 2001 From: John Botella Date: Mon, 24 Feb 2020 14:18:49 +0100 Subject: [PATCH] Fix cell padding --- htdocs/core/class/commondocgenerator.class.php | 4 ++++ htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 7fa97349f01..9e78672f0bd 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1096,7 +1096,11 @@ abstract class CommonDocGenerator if (empty($columnText)) return; $pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position $colDef = $this->cols[$colKey]; + $curentCellPaddinds = $pdf->getCellPaddings(); + $pdf->setCellPadding(0); $pdf->writeHTMLCell($this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 1, 0, true, $colDef['content']['align']); + $curentCellPaddinds = $pdf->getCellPaddings(); + $pdf->setCellPaddings( $curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']); } } diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index c4e0ef792ac..68101161ce1 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2242,7 +2242,7 @@ class pdf_sponge extends ModelePDFFactures // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content