Use case or problem
I had my PDF export for documentations set up perfectly for my use case. With the new update to 1.2.7 under “bug fixes” it reads: " Export to PDF will now always export in light mode."
Not even the print.css seems to have an effect anymore, so I seem to be stuck with the default light mode introduced with this version.
Please make this setting optional. Or allow overrides using custom CSS.
We are not going to add this toggle as it does not make sense to have a light and dark theme for printing.
There’s no print.css. you can customize how things appear in the printed version by targeting @media print in css.
Sorry, I meant the “pdf.css” which has @media print CSS - no matter, what I do with this file, it does not change the exported PDF at all. I even completely deleted it to see, what happens. The toggle under appearance for this CSS-file also makes no difference. Also it sometimes switches on again by itself after toggling it off. So where exactly can I modify the CSS for the PDF-export now?
Edit: I asked for a way to override, because it reads “always export with light theme” and then the above happened. If I understand you right, it can be overridden, now I am just not sure where to make the changes as I have not been successful so far.
There’s no pdf.css either. This is not part of default obsidian. It is something that either you created or copied from somewhere else.
You most likely need to fix your css snippet(s).
I found, that @media print in my case - whyever that may be - did not work. However, changing the styles in the pdf.css so that each tag or class was inside a .print class (without using a media query at all) did work.
The pdf.css originally came from here: PDF export stylesheet for obsidian · GitHub
In the comments below there is a link to a plugin, that still works and was quite helpful for finding the right classes to change, allowing to inspect the classes used for the PDF.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.