[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] [ENH] pdf: Add a theme specific custom css include file especially for PDF...

"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <691dbc2674a9b_2a17ed2846132@gitlab-sidekiq-low-urgency-cpu-bound-v2-cbb4bb8f8-jg7pc.mail>

Jonny Bradley pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki


Commits:
391923e7 by Jonny Bradley at 2025-11-19T12:46:25+00:00
[ENH] pdf: Add a theme specific custom css include file especially for PDF...
---
* [ENH] pdf: Add a theme specific custom css include file especially for PDF export - only works for mPDF so far

See merge request tikiwiki/tiki!9062


(cherry picked from commit 73a08198be214bb8592884a69af00dd690390eab)

cc3b0a1f [ENH] pdf: Add a theme specific custom css include file especially for PDF...

Co-authored-by: Jonny Bradley <[email protected]>

(cherry picked from commit 95d0351fecf1f872b824996949b5886d16d65e90)

Co-authored-by: Jonny Bradley <[email protected]>
- - - - -


1 changed file:

- lib/pdflib.php


Changes:

=====================================
lib/pdflib.php
=====================================
@@ -406,6 +406,26 @@ class PdfGenerator
                 $themecss .= file_get_contents($themePath);
             }
 
+            // and a theme pdf.css
+            $themePath = ThemeLib::getThemePath(
+                $prefs['theme'],
+                '',
+                'css/pdf.css'
+            );
+            if ($themePath) {
+                $themecss .= file_get_contents($themePath);
+            }
+
+            // and an option pdf.css
+            $themePath = ThemeLib::getThemePath(
+                $prefs['theme'],
+                $prefs['theme_option'],
+                'css/pdf.css'
+            );
+            if ($themePath) {
+                $themecss .= file_get_contents($themePath);
+            }
+
             $themecss .= "\nb,strong{font-weight:bold !important;}";
             // preserving theme styles by removing media print styles to print what is shown on screen
             $themecss = str_replace(["media print", "color : fff"], ["media p","color : #fff"], $themecss);



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/391923e741fec9b1fb28445063e9064ded994e39

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/391923e741fec9b1fb28445063e9064ded994e39
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.