There seem to be many questions about this, but no definitive answers.
I’m using the Tomorrow Night Bright theme.
Here is how the exported code blocks look:
I’ve tried custom css, to no avail. Here are two variations I’ve tried:
@media print {
pre, code {
background-color: #f5f5f5; /* Your desired background color */
color: #000; /* Your desired text color */
}
}
@media print {
background-color: #f5f5f5; /* Your desired background color */
color: #000; /* Your desired text color */
}
I put them in .obsidian/snippets/pdf_export.css
, then enable the custom css in Settings.
The export is the same:
Default theme is better, but still not black on white:
Thanks for any help!