Linux, PDF prints font in white color when using dark-mode

THIS ISSUE IS SIMILAR TO:

Steps to reproduce

  1. Create a file with text using Obsidian in dark-mode
  2. Use the option “Export to PDF…” and save the file
  3. Open the file

Did you follow the troubleshooting guide? [Y]

Expected result

Black colored text in the exported PDF.

Actual result

White colored text in the exported PDF.

Environment

SYSTEM INFO:
Obsidian version: v1.5.3
Installer version: v1.5.3
Operating system: #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2 6.5.0-14-generic
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: Atom v0.0.0
Snippets enabled: 1
Restricted mode: off
Plugins installed: 3
Plugins enabled: 3
1: Ninja Cursor v0.0.13
2: Excalidraw v2.0.17
3: Pomodoro Timer v1.1.4


Additional information

Workaround:

@media print {
	h1, h2, h3, h4, h5, h6, p, ul, li, ol {
		color: black !important;
	}

	 pre,
        code span,
        code {
                color: black !important;
                background-color: white !important;
  }
}

Result without snippet:

Result using snippet:

2 Likes

Same thing happens to me, I am using the flatpak version. Obsidian v1.5.3 at the time of this writing. I am not using any community plugins. This bug did not happened in earlier releases.

Steps to replicate


  1. Open Obsidian (flatpak version) (app version 1.5.3)
  2. Go to Settings > Appearance > Base color scheme. Change it to Dark (or Adapt to system if the system is in dark mode)
  3. Export any note to PDF

You will notice that the PDF looks weird. This does not happen if the Base color scheme is Light

System


Hardware Information:

  • Hardware Model: Micro-Star International Co., Ltd. MS-7B51
  • Memory: 64.0 GiB
  • Processor: Intel® Core™ i9-9900K × 16
  • Graphics: AMD Radeon™ RX 6700 XT
  • Disk Capacity: 1.0 TB

Software Information:

  • Firmware Version: 1.80
  • OS Name: Fedora Linux 39 (Workstation Edition)
  • OS Build: (null)
  • OS Type: 64-bit
  • GNOME Version: 45.3
  • Windowing System: Wayland
  • Kernel Version: Linux 6.6.13-200.fc39.x86_64
1 Like