[TikiWiki-commits] [Git][tikiwiki/tiki][master] [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 <691dbaaad5771_2aa5e1b499828@gitlab-sidekiq-low-urgency-cpu-bound-v2-cbb4bb8f8-sxq7q.mail>

Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
73a08198 by Jonny Bradley at 2025-11-19T12:32:07+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

- - - - -


1 changed file:

- lib/pdflib.php


Changes:

=====================================
lib/pdflib.php
=====================================
@@ -411,6 +411,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/73a08198be214bb8592884a69af00dd690390eab

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