Fix "Warning: This option make TCPDF library being crazy sometime and content on image disappeared!"

This commit is contained in:
habot-it 2022-01-30 13:09:42 +00:00
parent 7f13561158
commit 93ae62431c

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(); // Fix "Warning: This option make TCPDF library being crazy sometime and content on image disappeared!"
$pdf->SetAutoPageBreak(1, 0); // Restore pagebreak
}
}