Page 1 of 1

Exported PDF adopts Linux theme colors

Posted: Tue Nov 23, 2021 5:54 pm
by rawkhopper
LibreOffice has been great for creating PDF forms. Unfortunately there seems to be a small problem with doing it using a dark theme. When I open my .odt with a text box in it LibreOffice seems to use the theme colors for the text box. This is not an issue until you export as PDF. The exported PDF seems to adopt the theme colors. Almost as if it did a screen cap for the PDF. If I take the .ODT and open it in Windows 10 the form is a normal black border with white background and black text. The PDF that was exported however has the text box black with white text. If I switch my theme to a light theme before exporting the file as PDF then the resulting PDF looks like it does in Windows. If I open the ODT in Windows and export the file it also look normal in the resulting PDF.

Is there a way to have LibreOffice document display ignoring the KDE theme I use? I would like the page to be rendered on my screen the same no matter which theme I am using. More importantly I would like the exported PDF to look the same regardless of the theme I am using.

Any help would be much appreciated.

Re: Small issue exporting to PDF

Posted: Tue Nov 23, 2021 7:54 pm
by Hagar Delest
Hi and welcome to the forum!

Personally, I use the standard VCL plugin for rendering, see: Missing arrow keys on scrollbars.
Hope that helps.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the *EDIT button if your issue has been fixed.

Re: Small issue exporting to PDF

Posted: Tue Nov 23, 2021 8:41 pm
by rawkhopper
Well this looks like an interesting solution but I can not seem to get it to work. Maybe I am missing something. I typed in "SAL_USE_VCLPLUGIN=gen libreoffice --writer" and LibreOffice splash screen starts but then disappears and nothing happens. No error message.

Re: Small issue exporting to PDF

Posted: Tue Nov 23, 2021 8:55 pm
by Hagar Delest

Re: Small issue exporting to PDF

Posted: Tue Nov 23, 2021 9:22 pm
by rawkhopper
The GTK theme does not appear to affect LibreOffice. Switching the KDE theme changes the look but GTK theme does not.

Re: Small issue exporting to PDF

Posted: Tue Nov 23, 2021 11:55 pm
by Hagar Delest
Well, no further idea, I fear we have to wait for a KDE power user.

Re: Small issue exporting to PDF

Posted: Wed Nov 24, 2021 3:38 am
by rawkhopper
Thanks for trying

Re: Small issue exporting to PDF

Posted: Wed Nov 24, 2021 7:48 pm
by Bill
It seems that LO is using the "View background" and the "View text" color settings in the selected KDE color scheme, making the background dark and the text light. As a workaround, you can swap these settings so the background is light and the text is dark. In System Settings, select Appearance > Colors. Click the "Edit" button on the color scheme you're using. Swap the View color settings then save the settings in a new scheme and close the settings editor. Select the new scheme and click "Apply". Note that this change will also change the colors for other elements like lists on toolbars and dialog boxes.

Colors

Re: Small issue exporting to PDF

Posted: Wed Nov 24, 2021 9:18 pm
by rawkhopper
Well, as much as I appreciate the help that does not work as it makes everything look horrible. Not to mention that the text boxes in libreoffice now do not have a border. So I guess I will just have to switch themes every time I have to save a pdf form.

Re: Small issue exporting to PDF

Posted: Fri Nov 26, 2021 10:17 am
by Bill
rawkhopper wrote:Well this looks like an interesting solution but I can not seem to get it to work. Maybe I am missing something. I typed in "SAL_USE_VCLPLUGIN=gen libreoffice --writer" and LibreOffice splash screen starts but then disappears and nothing happens. No error message.
I hadn't tested this before, but when using a dark global theme on my system these do open Writer and LO normally without the dark theme:
SAL_USE_VCLPLUGIN=gen libreoffice --writer
SAL_USE_VCLPLUGIN=gen soffice

These open Writer and LO with the dark theme:
SAL_USE_VCLPLUGIN=genlo libreoffice --writer
SAL_USE_VCLPLUGIN=genlo soffice