From 46f5c3da520ab4562f335b625990ddd81fd6fa78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Despont?= Date: Wed, 1 Jul 2020 11:25:37 +0200 Subject: [PATCH] TcPdfOutput : Fix cell height ratio Because the payment slip generation adjusts the cell height ratio, the document ratio used by the user must be retained, then reset after the generation. --- src/PaymentPart/Output/TcPdfOutput/TcPdfOutput.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PaymentPart/Output/TcPdfOutput/TcPdfOutput.php b/src/PaymentPart/Output/TcPdfOutput/TcPdfOutput.php index 06824128..58562560 100644 --- a/src/PaymentPart/Output/TcPdfOutput/TcPdfOutput.php +++ b/src/PaymentPart/Output/TcPdfOutput/TcPdfOutput.php @@ -72,6 +72,8 @@ public function __construct( public function getPaymentPart(): void { + $retainCellHeightRatio = $this->tcPdf->getCellHeightRatio(); + $this->tcPdf->SetAutoPageBreak(false); $this->addSeparatorContentIfNotPrintable(); @@ -85,6 +87,8 @@ public function getPaymentPart(): void $this->addCurrencyContent(); $this->addAmountContent(); $this->addFurtherInformationContent(); + + $this->tcPdf->setCellHeightRatio($retainCellHeightRatio); } private function addSwissQrCodeImage(): void