Linux: Obsidian exporting to pdf produces white text on white when color scheme is set to adapt to system

Steps to reproduce

  1. set Linux theme to dark
  2. set obsidian theme to adapt to system
  3. try exporting a pdf

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

black text on white background in the pdf

Actual result

white text on white background

Environment

SYSTEM INFO:
Obsidian version: v1.6.3
Installer version: v1.6.3
Operating system: #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 6.5.0-35-generic
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

screen recording: Screencast_20240612_184826.webm - Google Drive

I am experiencing the same behaviour. Is this in the scope of the developers?

Steps to reproduce

  1. Use Gnome DE and choose Style->Dark under appearance settings.
  2. Go to Settings->Appearance->Base color scheme and set it to “Adapt to system”.
  3. For the “Start here” document first shown when opening the sandbox vault, choose “Export to pdf”.
  4. Choose default options, save anywhere.
  5. Open pdf.

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

Non-transparent text in the generated pdf.

Actual result

The text is transparent, i.e white on white background.

Environment

SYSTEM INFO:
Obsidian version: v1.4.12
Installer version: v1.3.5
Operating system: #1 SMP PREEMPT_DYNAMIC Thu Sep 7 00:25:01 UTC 2023 6.4.15-200.fc38.x86_64
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

The problem only appears when the theme is “adapt to system theme” and my system theme is dark (on GNOME, Fedora 38). If I pick the dark theme in Obsidian, the issue disappears.

There was a similar issue named " How to set basic black text on white background colors for PDF export when using a dark theme?" [How to set basic black text on white background colors for PDF export when using a dark theme?] but that was for the manual dark theme (which works in my case). Not sure if this is expected behaviour, if so, let me know.

3 Likes

I am experiencing the same, here’s the info from the bug report I was making when I found this existing one.

Environment

SYSTEM INFO:
Obsidian version: v1.4.14
Installer version: v1.4.13
Operating system: #1 SMP PREEMPT_DYNAMIC Sun Sep 24 15:52:44 UTC 2023 6.5.5-200.fc38.x86_64
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

Note this debug info was taken before I found out that it was ‘Adapt to System’, so the theme info might be confusing.


Additional information

Here is a screen recording showing the issue:

I’m experiencing this on the latest version v1.5.3. Is there a suggested work around? I would like to not need to switch my theme back and forth to generate the PDF.

Originally I had the Obsidian theme set to Adapt to System, with it explicitly set to Dark this functions as expected.

1 Like

I am having the same issue. Interestingly, toggling ‘dark mode’ off an on solved the issue for me (Ubuntu 22.10, Gnome).

Are you all on linux?
I wonder if this is just another manifestation of this

Using dark as the base color scheme seems to solve the problem


5 Likes

Thank you so much! I really needed to print my notes for class. This works great.

1 Like

Same problem here, and like you said, I use the Linux (PopOS/GNOME).

Using the solution propose by ihab_dahel solve the problem.

1 Like

Same issue 100% reproduced on my Ubuntu 22.04 laptop.

1 Like

Same issue reproduced as of today on snap installed obsidian version 1.5.8 on ubuntu 23.10.
The issue goes away by switching from use system default to dark under settings → apperances → base color scheme.

did you download and reinstall the snap from our website?

1 Like

Issue also occurs with flatpak in debian. Text is white unless my system is set removed from dark mode.

flatpak 1.5.12, md.obsidian.Obsidian
debian 12
GNOME Shell 43.9

1 Like

Thanks, indeed this issue is only present with Adapt to System set when system is in dark mode.

When obsidian is explicitly set to dark mode, this issue is not present. Good workaround.

Adapt to System is unfortunately the default setting.

1 Like

Thanks for the solution. This fixed my issue. I think it is a flatpak issue.

When exporting to a PDF from dark-mode, the font-color of dark mode is retained, while the background color is not. So, the result is unreadable white-on-white text.

I am able to work-around the issue by changing the base color scheme to “light” before exporting.

Personally, I think the color scheme of a printable document should not be tied to the color scheme of the editor. They’re different use cases, and CSS has @media queries because of similar issues.

I also don’t think the color scheme of the editor needs to be tied to the document, either. BTW, I’m not using any custom CSS or inline color attributes or anything like that.

I’m running the AppImage on Ubuntu 20.04 with Gnome desktop.

SYSTEM INFO:
Obsidian version: v1.5.8
Installer version: v1.5.3
Operating system: #83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023 5.15.0-76-generic
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

Steps to reproduce

  1. Enable dark mode (Settings > Appearance > Base color scheme > Adapt to system) — which is dark mode for me.
  2. Export a document to PDF

Did you follow the troubleshooting guide? [Y/N]

I was able to reproduce this in the sandbox vault. The “Official Help Site” is in a black box because of my OS. (It’s selected text in a non-active window.) The text was invisible before I selected it.

Expected result

Actual result

Environment


Additional information

Please, Download and reinstall Obsidian as asked in the troubleshooting steps.

i am having the same issue on Fedora 39 using the Flatpak

If you are using the dark mode color scheme, try switching to the light mode using the default theme before exporting the PDF.