Export to PDF in a theme other than the current theme

Use case or problem

If you want to export in a specific theme (ex. a more professional one) you currently have to change your system theme and this is especially inconvenient if you’ve made a custom CSS that you’ll need to copy and paste in after you export.

Proposed solution

Provide a prompt after clicking export to pdf that lets you pick which theme you want it to export in.

Current workaround (optional)

Changing the system theme, exporting, then changing it back.

12 Likes

Woah, this is a great idea - it’ll make it so much easier to make things look the way you want, especially if you use a funky theme like 80s Neon(which I think is too bright and in your face), but want the pdf to be professional

2 Likes

Exactly! (I love 80s Neon!)

1 Like

Nested vaults.

Set up a top vault - call it PDF export for example. Set it up with the CSS you want to export in.
Put your existing vault inside it. When you are in your top vault, your existing vault will just be a sub-folder.
You will be able to open all files in both vaults, even at the same time, so very easy to do all your editing one and just use the other for PDF export.

3 Likes

Interesting idea! Thanks for the workaround!

I think you’ll find it faster than having a switch to choose CSS.

It may be faster but that isn’t a feature - that is simply a clunky workaround and it is great to have but it would be much better as an included feature in Obsidian.

Though even I appreciate the workaround, since this an issue I was having!

I think multiple custom CSS in the roadmap can be good solution too.

1 Like

Woah, i didn’t see that before! Thanks, I am really curious to see how that will work

1 Like

just messing with it but i can change the pdf background color just fine

@media print { .print .markdown-preview-view { -webkit-print-color-adjust: exact; background-color:blue; }

Naturally people dont want to waste ink so chromium strips your theme CSS when you “print” but you can specifically add it back via @media print { }

1 Like

Anything new on that?

1 Like

Exporting still seems to be a weakness of Obsidian …

1 Like

The idea to export with a different theme isn’t bad, still pdf export can be styled like anything other, (css snippets,
themes )so my advice is, to try out some of the popular themes from Obsidians settings>appearance>themes . Then check how your pdf export looks like.

if you aren’t interested to use themes, check out Obsidians appearance thread on discord and search for keywords like export or similar.

I’m guessing no progress on this?

I like the “Dracula Official” theme but have to change it back to “Default” in order to export to PDF and then print. It sure would be nice not to have to go through all those steps just to print…