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

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


Commits:
778dd02d by Jonny Bradley at 2025-11-19T12:46:51+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]>

(cherry picked from commit 391923e741fec9b1fb28445063e9064ded994e39)

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


1 changed file:

- lib/pdflib.php


Changes:

=====================================
lib/pdflib.php
=====================================
@@ -405,6 +405,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/778dd02d559d3fcc8e66d5048f3e24a03a4e771a

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