How to export to pdf directly what I see in the editor?

I’ve a doc, which I’ve been using as a journal for a while now. I wanted to export it to a PDF recently, but I’ve ran into a problem: since I use dark theme, then there is some text which I’ve deliberately set to white, to be visible, but when it’s exported, in the basic white background/black letter, then those pieces of text are still white. Now, I understand why this happens; it mainly served as an example for what I’m asking: is there a way to export to PDF the doc exactly as I see it in the editor? Because there are a thousand little things like this, parts that only look the way I want them to when looking at them in dark mode.

The problem is that “dark mode” is just a view option. It does NOT represent the actual document. PDF is a paper print into a file. Printing white ink on black paper would be interesting indeed.

[Windows 10 Home 19045, Libreoffice 7.4, odt format]

Better to upgrade LibreOffice, dark theme was still very recent and incomplete in 7.4. Later versions handle a dark theme better.

After upgrading, in Tools > Options > LibreOffice > Application Colours set to System theme or Dark. In the same place, set the text (and possibly other element colours) to Automatic (text will show white in dark mode). You will see white text on black background but print black text on white paper and export to pdf with black text on white background.


If you really want black background in PDF, disregarding difficulties in printing such as ink bleed into white areas, ink cost, etc., then set the background of the page to black.

  • Click Format > Page style > Area > Colour and select black. Text set to white will remain white and text set to Automatic will switch to white. Export to pdf.
  • You can print this with a white background and black text if, in the Print dialogue, in the LibreOffice tab, you untick Page background. Text set to Automatic will appear black but the text set as white won’t print unless you also tick the box Print text in black or you change the white text to Automatic in Tools > Options > LibreOffice > Application Colours

The short answer is no.

When you force any typographical attribute, Writer considers this is a voluntary intents of yours. While “default” formatting can be tweaked to be compatible with theme, Writer will always respect your explicit specifications and never question them or alter them.

Now it all depends on how you forced text to white.

If you did that with a specific character style, just change the colour in this style and everything will be fixed.

Unfortunately, I fear according to the way you asked your question (omitting OS name, LO version and save format which are basic information) that you are quite a newbie with LO and you formatted your document manually. This is the worst case because this “direct formatting” must be removed individually.

Remember that, with the advent of dark themes (which are inconsistent with print purpose) and request from non-typographic-professional users, applications behaviour has been tweaked towards automatic colour changes. Therefore, what you see is no longer what you’ll get because there will be implicit non-user-controllable changes behind the scene. These “auto” changes conflict with a straight document specification.

1 Like