[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] [BP][FIX] PluginPDF: Fix header display

"Bruno Kambere \(@kambereBr\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6960fd0f1e3ce_2c1806c8160ad@gitlab-sidekiq-low-urgency-cpu-bound-v2-59f56fc6f-ghkdm.mail>

Bruno Kambere pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki


Commits:
48335a10 by Bruno Kambere at 2026-01-09T14:58:21+02:00
[BP][FIX] PluginPDF: Fix header display
---
* [FIX] PluginPDF: Fix header display
---
* [FIX] PluginPDF: Fix header display

See merge request tikiwiki/tiki!6789

See merge request tikiwiki/tiki!9334

- - - - -


1 changed file:

- lib/pdflib.php


Changes:

=====================================
lib/pdflib.php
=====================================
@@ -602,8 +602,11 @@ class PdfGenerator
                     } elseif ($pdfPage['footer']) {
                         $footer = $pdfPage['footer'];
                     }
-                    $mpdf->SetHTMLHeader($this->processHeaderFooter($header, $params['page'] ?? ''));
+                    //Add the header to the first page
+                    $mpdf->SetHTMLHeader($this->processHeaderFooter($header, $params['page'] ?? ''), "O");
+                    $mpdf->SetHTMLHeader($this->processHeaderFooter($header, $params['page'] ?? ''), "E");
                     $mpdf->AddPage($pdfPage['orientation'], '', $resetPage, '', '', $pdfPage['margin_left'], $pdfPage['margin_right'], $pdfPage['margin_top'], $pdfPage['margin_bottom'], $pdfPage['margin_header'], $pdfPage['margin_footer'], '', '', '', '', '', '', '', '', '', $pdfPage['pagesize']);
+                    $mpdf->SetHTMLHeader($this->processHeaderFooter($header, $params['page'] ?? '')); //Add the header to other pages
                     $mpdf->SetHTMLFooter($this->processHeaderFooter($footer, $params['page'] ?? '', 'top')); //footer needs to be reset after page content is added
                     //checking watermark on page
                     $mpdf->SetWatermarkText($pdfPage['watermark']);



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/48335a10800e360f1f03d0e8e9c924f49ca00428

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/48335a10800e360f1f03d0e8e9c924f49ca00428
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.