Update pdf_eratosthene.modules.php

This commit is contained in:
Frédéric FRANCE
2021-04-13 09:55:04 +02:00
committed by GitHub
parent 8085f10995
commit d007e75a8e

View File

@@ -338,9 +338,12 @@ class pdf_eratosthene extends ModelePDFCommandes
}
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
{
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
$tplidx = $pdf->importPage(1);
}