Exported PDF adopts Linux theme colors

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
rawkhopper
Posts: 5
Joined: Tue Nov 23, 2021 5:44 pm

Exported PDF adopts Linux theme colors

Post 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.
LibreOffice 7.2.2-2 / Manjaro / KDE Plasma 5.23.3
User avatar
Hagar Delest
Moderator
Posts: 32670
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Small issue exporting to PDF

Post 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.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
rawkhopper
Posts: 5
Joined: Tue Nov 23, 2021 5:44 pm

Re: Small issue exporting to PDF

Post 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.
LibreOffice 7.2.2-2 / Manjaro / KDE Plasma 5.23.3
User avatar
Hagar Delest
Moderator
Posts: 32670
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Small issue exporting to PDF

Post by Hagar Delest »

LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
rawkhopper
Posts: 5
Joined: Tue Nov 23, 2021 5:44 pm

Re: Small issue exporting to PDF

Post by rawkhopper »

The GTK theme does not appear to affect LibreOffice. Switching the KDE theme changes the look but GTK theme does not.
LibreOffice 7.2.2-2 / Manjaro / KDE Plasma 5.23.3
User avatar
Hagar Delest
Moderator
Posts: 32670
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Small issue exporting to PDF

Post by Hagar Delest »

Well, no further idea, I fear we have to wait for a KDE power user.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
rawkhopper
Posts: 5
Joined: Tue Nov 23, 2021 5:44 pm

Re: Small issue exporting to PDF

Post by rawkhopper »

Thanks for trying
LibreOffice 7.2.2-2 / Manjaro / KDE Plasma 5.23.3
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: Small issue exporting to PDF

Post 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
AOO 4.1.14 on Ubuntu MATE 22.04
rawkhopper
Posts: 5
Joined: Tue Nov 23, 2021 5:44 pm

Re: Small issue exporting to PDF

Post 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.
LibreOffice 7.2.2-2 / Manjaro / KDE Plasma 5.23.3
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: Small issue exporting to PDF

Post 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
AOO 4.1.14 on Ubuntu MATE 22.04
Post Reply