Merge pull request #19966 from habot-it/develop

Fix "Warning: This option make TCPDF library being crazy sometime and…
This commit is contained in:
Laurent Destailleur 2022-02-04 12:14:26 +01:00 committed by GitHub
commit bfea5cd69d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -713,6 +713,7 @@ function pdf_pagehead(&$pdf, $outputlangs, $page_height)
if (file_exists($filepath)) {
$pdf->SetAutoPageBreak(0, 0); // Disable auto pagebreak before adding image
$pdf->Image($filepath, (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_X : 0), (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y : 0), 0, $page_height);
$pdf->SetPageMark(); // This option avoid to have the images missing on some pages
$pdf->SetAutoPageBreak(1, 0); // Restore pagebreak
}
}