2
0
forked from Wavyzz/dolibarr

Merge branch 'fix_v20_pdf_space_lost_with_images' into fix_v20_pdf_space_lost_with_images_eratosthene2

This commit is contained in:
John BOTELLA
2024-10-18 14:13:03 +02:00

View File

@@ -620,11 +620,12 @@ class pdf_cyan extends ModelePDFPropales
$afterPosData = $this->getMaxAfterColsLinePositionsData();
$pdf->setPage($pageposbefore);
$pdf->setTopMargin($this->marge_haute);
// $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
$curY = $curYBefore;
$pdf->setPageOrientation('', 0, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
// We suppose that a too long description or photo were moved completely on next page
if ($afterPosData['page'] > $pageposbefore && empty($showpricebeforepagebreak)) {
if ($afterPosData['page'] > $pageposbefore && empty($showpricebeforepagebreak) || ($curY + 9) > ($this->page_hauteur - $heightforfooter)) {
$pdf->setPage($afterPosData['page']);
$curY = $tab_top_newpage;
}