PDF Export with Black Text

I am looking for a way to change the text color when exporting a note to PDF.

I am using the Atom theme with Dark mode enabled.

The dark code block with dark text makes the PDF unreadable.


You want to modify your codeblocks in using CSS: How to style the PDF with @media print?

I had the same issue just edit the Atom.css navigate to the folder of your vault goto .obsidian/themes/Atom.css open it in your favourite text editor and then find .markdown-preview-view code { color: inherit; }
Change color to wahtever color you want

Hi did you figure out how to change the colour of the blockquote text such that it works upon pdf export… Mine is defaulting to black and can’t be seen. Pls help! thanks, Karan

Hey @karanmariojude,
Not sure if you’re having the issue with exporting still.

I have had the same kind of issue and managed to find a workaround by specifying code blocks rather than the <pre> and <code> tags.
PDF Export - Code Blocks Unreadable - check the updated section of my post.

Would be interested to find out if this resolves your issue :slight_smile:


Thanks, that works!

However, I want to do 2 things:

  1. Export pdf with black background like in theme,
  2. Export my nicely formatted code blocks with the text staying white on a black background…

Let me know if you figure this out please.