[module.professor.pdf] Generate PDF link
This commit is contained in:
parent
2c0681dd7c
commit
6273a58046
|
@ -5,4 +5,5 @@
|
|||
/public_html/js
|
||||
/node_modules
|
||||
/backup
|
||||
/tmp
|
||||
/tmp
|
||||
/public_html/tmp
|
|
@ -140,9 +140,15 @@ class pdfController{
|
|||
$body = self::generate_pdf_body($data);
|
||||
|
||||
/* (2) Set headers */
|
||||
|
||||
$fullname = $data['prof']['firstName'].' '.$data['prof']['lastName'];
|
||||
$date = date('d-m-Y');
|
||||
$title = "Fiche enseignant - $fullname ($date)";
|
||||
|
||||
$headers = [
|
||||
'Content-Description' => 'File Transfer',
|
||||
// 'Content-Description' => 'File Transfer',
|
||||
'Content-Transfer-Encoding' => 'binary',
|
||||
'Content-Disposition' => 'attachment; filename=\"'.$title.'\"',
|
||||
'Cache-Control' => 'public, must-revalidate, max-age=0',
|
||||
'Pragma' => 'public',
|
||||
'X-Generator' => 'mPDF',
|
||||
|
|
Loading…
Reference in New Issue