Export to PDF makes code hard to read if exported from dark mode

Steps to reproduce

  1. Switch Obsidian to dark mode
  2. Write some text that includes backtick-delimited sections or triple-backtick sections, like this one.
  3. Export to PDF
  4. Open the PDF and notice that the backtick-delimited sections all have a dark background, even on the white background of the paper. This makes them very difficult to read.

Expected result

Text content in backticks should have a background color similar to the background color of the PDF “paper” so it’s easy to read. When doing the PDF export from Obsidian’s light mode, the backticks text is a pleasant light grey color.

Actual result

The text in backticks is on a black background. Overall, it’s a white “sheet of paper” in the PDF, with a black rectangle as the backticks text background, and red text written on it. It’s quite difficult to read.

Environment

  • Operating system: Windows 10 Pro x64 21H2 build 19044.1415
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.13.14
    Installer version: v0.12.15
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on

RECOMMENDATIONS:
none


Additional information

Here’s a screenshot from a document I wrote in dark mode and exported to PDF.


It gives me “top secret” vibes because the dark rectangles on light background look like redactions :laughing:

Here’s a screenshot from the same portion of the document, but exported to PDF from light mode instead.

Thanks for making Obsidian! I recently discovered it, and I keep finding new things it’s good at helping me do!

1 Like

This bug is still there in 0.16.1.

I can’t repro. Post a screen recording of this happening in 0.16.1 in the sandbox vault.

SYSTEM INFO:
Obsidian version: v0.16.2
Installer version: v0.15.9
Operating system: Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 21.6.0
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: light
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0

RECOMMENDATIONS:
none

With Dark Mode,

the exported PDF looks like the following.

With Light Mode,

the exported PDF looks like the following.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.