Export To PDF with no color theme

Use case or problem

Sometimes I need to print my notes, so I usually export them as a PDF and then print them. However, the exported PDF retains the editor’s theme. If you have a monochrome printer, highlighted (red) words in the PDF may appear as light grey when printed, making them difficult to read on paper.

Proposed solution

Add a new setting to export PDF with no color theme that disables color themes while retaining formatting for bold headings, italics, etc.


(ignore “#tag”)

Current workaround (optional)

Change the theme back to default and then revert it. However, even with the default theme, there is still coloring.

Related feature requests (optional)

2 Likes

This is going to vary theme-by-theme. Some folks want more of the theme’s styling in the PDF.

What theme are you currently using? Other than switching to the default theme, a CSS export snippet could be used to remove the colors for PDF export.

I’m using things. To export a PDF with a theme, I believe it is ideal. However, when you need to print it in black and white, the hue of the colors might pose a problem.

I agree with @ariehen that it’s not obvious use case to export with colors completely off. This kind of work should be done by using a pdf editing program.

I’m not sure why it’s more difficult to not using a theme than making the all themes compatible in the exported PDF. Just consider this: editing a PDF has never been easy. While you can change all the colors simultaneously, adjusting the hues is not possible. As a result, any pink colors will turn into light grey maybe. If you ever need to print a note, you will get why this is such an annoying issue. You can easily add a toggle for it I believe. Or just give users an option to pick a theme while exporting, and maybe we can find a community theme that does not use any colors at all.

This doesn’t cover callout colors, but you could give this a try. Tested with the Things theme.

@media print {
    .print > :is(.markdown-preview-view, .markdown-rendered) {
        --h1-color: black;
        --h2-color: black;
        --h3-color: black;
        --h4-color: black;
        --h5-color: black;
        --h6-color: black;
        --em-color: black;
        --strong-color: black;
        --tag-color: black;
        --tag-background: transparent;
     }
}

https://help.obsidian.md/Extending+Obsidian/CSS+snippets

2 Likes

Thank you! I’m not an expert in this area, so there must be a theme-specific thing?

I second this request. I’d like to be able to globally configure colors for export to PDF, even if the fonts/layout stay the same. I’d like to be exporting job reports from Obsidian instead of copy/pasting info, converting from Markdown, etc in Pages or Word or something.

I agree, Obsidian should strip theme colors, if desired.

Themes are nice and useful on-screen but printing notes on paper is yet another story. So, a toggle to deactivate themes for printing -be it default or custom themes- would be definitely meaningful.

Just to be more specific, this setting should be located in Export to PDF dialog box.

I also think it’s good to have a togglable option for disabling the used theme in the PDF exportation dialog box. I use a theme to have a nice editing and writing experience, not to beautify the output.