Update pdf_azur.modules.php

This commit is contained in:
Frédéric FRANCE
2021-04-13 09:49:03 +02:00
committed by GitHub
parent fcca5d7d5c
commit ee4f846eb9

View File

@@ -335,9 +335,12 @@ class pdf_azur extends ModelePDFPropales
}
$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);
}