Bug 123777 - Hyperlinks' fonts (type and color) keep changing when saved/exported as PDF
Summary: Hyperlinks' fonts (type and color) keep changing when saved/exported as PDF
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: Other Mac OS X (All)
: medium normal
Assignee: Not Assigned
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
Reported: 2019-03-01 05:04 UTC by the.heavenly.earth
Modified: 2019-04-15 14:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

ODT file, examples for bug_123777 (35.24 KB, application/vnd.oasis.opendocument.text)
2019-03-13 16:51 UTC, the.heavenly.earth
PDF output, using the earlier submitted test file ODT, for bug_123777 (344.43 KB, application/pdf)
2019-03-13 16:52 UTC, the.heavenly.earth
side-by-side comparison of the two files (PDF and ODT) (366.11 KB, image/png)
2019-03-14 14:18 UTC, the.heavenly.earth
another screen capture showing the differences between the two (291.83 KB, image/png)
2019-03-14 14:23 UTC, the.heavenly.earth
Comparison between LO6152 and Preview (325.74 KB, image/png)
2019-03-15 08:34 UTC, Alex Thurgood
PDF option setting 1 (67.40 KB, image/png)
2019-03-15 14:58 UTC, the.heavenly.earth
PDF option setting changed 2 (40.52 KB, image/png)
2019-03-15 14:59 UTC, the.heavenly.earth

Note You need to log in before you can comment on or make changes to this bug.
Description the.heavenly.earth 2019-03-01 05:04:36 UTC
[1] The document looks Okay on LibreOffice (as designed); however, the fonts of hyperlinked texts look different, as they randomly change to unspecified type and/or color in exported PDF.  Even when the Preference setting was adjusted to use black color only to both visited and unvisited links.
[2] Also, there I noticed a sentence where it looked highlighted on LibreOffice, but not on the exported PDF.

Steps to Reproduce:
1. Write a document.
2. Create bookmarks.
3. Set the hyperlinks.
4. Export as PDF.
1. Write a text in purple.
2. Highlight a text.
2. Export as PDF.

Actual Results:
[1] Parts of Hyperlinked texts appear blue and in different font type in PDF, but looks black in the right font on LibreOffice.
[2] Highlighting function generally seems to work Okay for other highlighted texts, but there is only one highlighted sentence in a document, where the highlight does not show up in an exported PDF.  The text is purple #9B4FE7, and highlight color is "Light Yellow 3".  The text color shows correctly, but no highlight.

Expected Results:
[1&2] I would expect the PDF to appear in the same way as you see on the LibreOffice.

Reproducible: Always

User Profile Reset: No

Additional Info:
Thank you -- otherwise, It is a wonderful software.  I have used OpenOffice decades ago, but the software has significantly improved and stable.
Comment 1 Alex Thurgood 2019-03-13 14:56:13 UTC
Please provide a sample document we can use to try and reproduce.

Setting to NEEDINFO
Comment 2 the.heavenly.earth 2019-03-13 16:51:10 UTC
Created attachment 149942 [details]
ODT file, examples for bug_123777

Attached is the example ODT file that will reproduce the bug [1].  I could not reproduce the bug [2], however, using this example file.  Thank you.
Comment 3 the.heavenly.earth 2019-03-13 16:52:56 UTC
Created attachment 149943 [details]
PDF output, using the earlier submitted test file ODT, for bug_123777

Attached is the output PDF example from bug 123777.
Comment 4 Alex Thurgood 2019-03-13 17:05:27 UTC
Thanks !
Comment 5 Alex Thurgood 2019-03-14 09:10:46 UTC
I either don't understand what the problem is, or else I can't reproduce. When I take the supplied ODT file and open it in LOdev-master, I don't see any difference between the font colours of the ODT text and the resulting PDF obtained via direct export (PDF button from main toolbar as opposed to File > Export as PDF)).

Some of the highlighted text in the ODT is in purple (some with yellow highlighting and some without). These appear to be faithfully reproduced in the exported PDF.

In Preferences > Application Colours, for Visited/Unvisited links, I have the automatic default, although the boxes aren't ticked.

Sorry, no repro for me in master at least.

You might need to be more specific about which areas, links, of the document etc are misbehaving in your opinion or give further details on any configuration changes you might have made that could have an affect on the end result.
Comment 6 the.heavenly.earth 2019-03-14 14:18:40 UTC
Created attachment 149968 [details]
side-by-side comparison of the two files (PDF and ODT)
Comment 7 the.heavenly.earth 2019-03-14 14:23:56 UTC
Created attachment 149969 [details]
another screen capture showing the differences between the two
Comment 8 Alex Thurgood 2019-03-15 08:32:40 UTC
The ODT you supplied shows blue links (unvisited) for me with LO6152 and L0dev-master 6300, for example, in the Table of Contents. I have enclosed a comparative screenshot.
Comment 9 Alex Thurgood 2019-03-15 08:34:00 UTC
Created attachment 149990 [details]
Comparison between LO6152 and Preview
Comment 10 Alex Thurgood 2019-03-15 08:40:24 UTC
Please indicate which version of macOS you are using.
Also please indicate how you produced the PDF from LO:

- direct export (clicking on PDF button in main toolbar) ?
- export as PDF, and then choosing particular expport options ?
- if export to PDF with options, which boxes are ticked ?
Comment 11 the.heavenly.earth 2019-03-15 14:58:20 UTC
> version of macOS:

macOS Mojave
Version 10.14.3

> how the PDF was produced from LO:
- direct export (clicking on PDF button in main toolbar) ?
- export as PDF, and then choosing particular expport options ?

the results were the same however you produce the PDF.
- direct export (button)
- export as PDF
- export ..., then PDF selected

>- if export to PDF with options, which boxes are ticked ?

I was using the default setting first as in the fresh new install.  Similar problem persisted, so I decided to select all texts and unified the Font Type, Colour, and partly Size.

Then, I changed the Preferences setting > Application Colors > Unvisited links [Black] & Visited links [Black].

At least then, I could see all links in the same Black colour in LibreOffice but not when saved as a PDF.

Then, I tried different options for PDF, and the results were the same.
The final options for PDF selected (changed from the default) are shown on the following two attachments/screencaptures.
Comment 12 the.heavenly.earth 2019-03-15 14:58:57 UTC
Created attachment 150000 [details]
PDF option setting 1
Comment 13 the.heavenly.earth 2019-03-15 14:59:32 UTC
Created attachment 150002 [details]
PDF option setting changed 2
Comment 14 the.heavenly.earth 2019-03-15 15:06:04 UTC
Also, I remembered that not all hyperlinks showed underlines and/or appeared in Black, as I was writing in LO.  In some cases, I could not manually adjust the Font Colour or add the Underline.  In such a case, I deleted the text, re-typed the same text, and re-linked them to targets again.
Comment 15 Xisco Faulí 2019-03-21 10:05:34 UTC
You can configure how hyperlinks are displayed in LibreOffice from tools - Options - Application Color.

Could you please reset your Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and
Comment 16 the.heavenly.earth 2019-03-21 13:46:34 UTC
As I described in my comment provided at 2019-03-15 14:58:20 UTC, I have tried to set/fix the link color to black, to make them appear in the same color (instead of them showing up in different colors throughout the text).

I reseted the user profile, rechecked the hyperlink colors, and reproduced PDFs.  Nothing is changed -- I still see the mix color links in output PDFs.
Comment 17 Heiko Tietze 2019-04-15 14:18:08 UTC
Tried with both simplified example (some text and links) and your document. In all tests the visited link was blue whether or not visited. So maybe a macOS issue?

Nevertheless, visited links must not get this color when exporting to PDF. Clearly a bug to me.

Build ID: 6.1.5-4
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group threaded