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