Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1404 from denisbilchenko/issue/1335
Browse files Browse the repository at this point in the history
issue/1335 added title of the PDF schedules page
  • Loading branch information
podarok authored Dec 24, 2018
2 parents cdd20b7 + a3c134c commit 2da14d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ public function getPdf(Request $request) {
'max-age' => 0
],
],
'title' => $this->t("Download PDF schedule"),
'#cache' => [
'max-age' => 0
],
Expand Down
1 change: 1 addition & 0 deletions modules/custom/openy_repeat/src/PDFGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function generatePdf($settings) {
$html = mb_convert_encoding(render($settings['body']), 'UTF-8', 'UTF-8');
$mpdf = new \Mpdf\Mpdf(['format' => 'A4-L', 'tempDir' => $temporary_directory]);
$stylesheet = file_get_contents(drupal_get_path('module', 'openy_repeat') . '/css/print_pdf.css');
$mpdf->SetTitle($settings['title']);
$mpdf->SetHTMLFooter(render($settings['footer']));
$mpdf->WriteHTML($stylesheet, 1);
$mpdf->WriteHTML($html, 2);
Expand Down

0 comments on commit 2da14d8

Please # to comment.