Fix Prints.php
This commit is contained in:
parent
10028e47fe
commit
3804208470
|
@ -386,6 +386,7 @@ class Prints
|
|||
include $infos['full_directory'].'/pdfgen.'.$infos['directory'].'.php';
|
||||
}
|
||||
|
||||
if(empty($filename)){
|
||||
// Sostituzione di variabili generiche
|
||||
$report = str_replace('$body$', $body, $report);
|
||||
$report = str_replace('$footer$', $footer, $report);
|
||||
|
@ -416,6 +417,10 @@ class Prints
|
|||
|
||||
$pdf = $html2pdf->output($path, $mode);
|
||||
$file['pdf'] = $pdf;
|
||||
}else{
|
||||
$file = self::getFile($infos, $id_record, $directory, $replaces);
|
||||
$file['pdf'] = file_get_contents($filename);
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
@ -553,6 +558,7 @@ class Prints
|
|||
}
|
||||
}
|
||||
|
||||
if(empty($filename)){
|
||||
// Generazione dei contenuti dell'header
|
||||
ob_start();
|
||||
$print_header = self::filepath($id_print, 'header.php');
|
||||
|
@ -660,6 +666,10 @@ class Prints
|
|||
// Creazione effettiva del PDF
|
||||
$pdf = $mpdf->Output($path, $mode);
|
||||
$file['pdf'] = $pdf;
|
||||
}else{
|
||||
$file = self::getFile($infos, $id_record, $directory, $replaces);
|
||||
$file['pdf'] = file_get_contents($filename);
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue