diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 48c6e2f1f89..3b8c769b14a 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -778,7 +778,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Add last page for document footer if there are not enough size left $afterPosData = $this->getMaxAfterColsLinePositionsData(); - if ($afterPosData['y'] > $this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot) ) { + if (isset($afterPosData['y']) && $afterPosData['y'] > $this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot) ) { $pdf->AddPage(); if (!empty($tplidx)) { $pdf->useTemplate($tplidx); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index f3039d6fc2b..f5457fc919d 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -968,7 +968,7 @@ class pdf_sponge extends ModelePDFFactures $afterPosData = $this->getMaxAfterColsLinePositionsData(); $page_bottom_margin = $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs); - if ($afterPosData['y'] > $this->page_hauteur - $page_bottom_margin) { + if (isset($afterPosData['y']) && $afterPosData['y'] > $this->page_hauteur - $page_bottom_margin) { $pdf->AddPage(); if (!empty($tplidx)) { $pdf->useTemplate($tplidx); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index bb025e78755..8865c2cf8e0 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -804,7 +804,7 @@ class pdf_cyan extends ModelePDFPropales // Add last page for document footer if there are not enough size left $afterPosData = $this->getMaxAfterColsLinePositionsData(); - if ($afterPosData['y'] > $this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot) ) { + if (isset($afterPosData['y']) && $afterPosData['y'] > $this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot) ) { $pdf->AddPage(); if (!empty($tplidx)) { $pdf->useTemplate($tplidx);