How to prevent hyperlink text color changes

I want to prevent my internal document hyperlinks text from turning blue with the underlining. I got the writer odt document to display the hyperlink text with black color and no underlining. The hyperlink functions but is not marked with a font color change and underlining. However when I export to pdf, the resulting pdf file turns the hyperlink text from black to blue, but it does not add the underlining. Is there any way I can get the pdf export function to retain the black hyperlink text color I have in the writer odt document?

When you convert/print a Writer document to a pdf-file, the pdf-writer/exporter interpretes the incorporate link as a link and changes the color. If you don’t want to see that the link is a link in your pdf-file, you must look into the pdf-writer/exporter application.

As you don’t want to see that the link is a link, there could be another possibility. You paste the link as unformatted text in Writer and than the link is gone and the pdf-writer/exporter doesn’t change the color and underlines the link.

Since my last edit here, I added to my standard document template the following:

Changed blue with underling to black without underlining in both the Internet Link character style and the Visited Internet Link character style.

While keeping black selected in checked boxes for unvisited links and visited links in Tools>Options>LibreOffice>Appearance

Using that template with the above Appearance settings I have created about ten documents full of endnotes with no reappearance of blue text or underlining in my Writer document or my exported pdf hyperlinks.

I now have some measure of confidence that this problem will not pop up again.

=============================================================================================
Since my last edit of this answer I have encountered situations with documents where what I thought was a reliable solution did not work.

In addition to changing the internet link character style from blue and underling to black without underlining, I have also found that making the following selections under Tools may be ncessary.

Tools>Options>LibreOffice>Appearance
check unvisited links - select black
check visited links - select black

I have had some documents on which doing both of these things did not work.

The most dissapointing aspect of this situation is the inconsistency in the way the program responds to these settings. What works on one document may not work the next time on another document.

There is still something going on here that I do not understand. Simply formatting hyperlinks in a word processing program and getting that formatting exported unchanged into a pdf should not be such a problem. But it is for some reason.

============================================================================================
New updated answer:

I think I finally found the correct way to do this reliably.

To change the formatting of internal document hyperlinks such as internal document links to internal document bookmarks, and have that changed formatting be carried over into exported pdf documents made using the writer export to pdf function, you do the following.
Open the styles and formatting window by clicking the first icon on the left on the Formatting toolbar at the top of the screen (This is the round pink one with the white open ended wrench symbol.), or hit F11, or from the Menu bar at the top of the screen choose Format>Styles and Formatting.
Click the character styles icon, which is the second icon from the left at the top of the Styles and Formatting Window and select the character style named “Internet Link”.
Right click and select “Modify”.
Select the Font effect tab and change the Font color and Underlining settings.
Save the document and then export it to pdf by choosing from the menu bar File>Export to pdf.
This has worked fine for my documents with internal hyperlinks to bookmarks.
So far, when I do it this way I get the same hyperlink formatting in the resulting pdf document as I have in the Writer document, and it is quick and easy.
One reason this was not obvious to me earlier is that the styles and formatting window does not show you that the hyperlink text is being controlled by the character style named “Internet Link”. When the cursor is in the hyperlink text, the “Default Style” is highlighted and not the “Internet Link” style, but it is the internet link style that is controlling the formatting, even if the link in question is not an internet link, but an internal document bookmark link.
I hope the version 4.3 writer manual, whenever there is one, will clearly explain this.

=================================================================================================
Updated answer:
I was just able to remove the blue color and underlining from the exported pdf file without having to remove and then re-insert all the hyperlinks. I added a large number of text to endnote and endnote to text internal document hyperlinks to a large document and then removed the blue color and underlining in all the hyperlinks at once using regular expressions in the find and replace function and then exported to pdf, and this time it worked as it should with the pdf document not showing the blue color and underlining. I do not know why this same action did not work when I did it before, but I am very relieved that it did this time. If this continues to work on subsequent documents, it will make this operation trivial. I had all the check boxes unchecked in the pdf export dialog and the odt document was not embedded in the pdf.

===============================================================================================
After much experimentation, I have found a way to end up with a pdf file with working internal document hyperlinks that are not blue and not underlined.
I am doing this to have a document that looks and reads just like a published printed on paper book with an attractive humanist Venetian style slab serif font Linden Hill.
I have found that for lengthy reading an attractive serif font is more readable for me than a web font like Verdana.
I am sure there must be a much simple and more elegant way of accomplishing this but the process below is the only way that has worked consistently and reliably for this.

The process is as follows.

Create, name, save, and close new odt file.
Open new odt file and create bookmarks and hyperlinks and verify they work.
Save and close odt file.
Open odt file and remove color and underlining from hyperlinks with direct formatting or find and replace formatting.
Verify hyperlinks still work without color and underlines and save and close odt file.

open odt file and remove hyperlinks and save and close odt file

open odt file and create hyperlinks again and verfy they still work without color and underlining

save and close odt file

open odt file

export to pdf using pdf options dialog with odt file not embedded and all boxes unchecked

close odt file

open pdf file and verify hyperlinks work without color and underlining.

If anyone knows a simpler way to do this that always works please inform me.

I really like the Writer export pdf function because it seems to work mluch better than the one in Word, especiall with some serif style fonts that I like to use. Word has trouble with some serif fonts that I like to use and makes pdf files that use up much more memory than those made by the Writer export to pdf function.

Congratulations!

This fix doesn’t work any more in LO v6.4, because it no longer uses any style called “Internet Link.” Whenever I try to change the color of part of a heading that is a web address, LO refuses to obey my color change. Also, I was not able to find the relevant Options setting now.

Okay, let me correct that: It does still work: I pressed F11, and then I found that Character Format icon. Once I found that icon and clicked on it, the Internet Link style was listed and I could modify it. (But there is no such thing now as Options > LibreOffice > Appearance.)

It is there as Options > LibreOffice > Application Colours . I have Unvisited and Visited links unticked anyway and can’t remember if I did that, probably a long time ago. Right click Character style Internet Link, select Modify and change colour to black and underline to (Without), OK out. Export to PDF and black hyperlinks are in the pdf.

LO 6.4.4.2, Windows 10 Pro 2004

1 Like

@guanolto: contrary to other suites, styles are ubiquitous in Writer: paragraph, character, frame, page, list. Since an hyperlink is only part of a paragraph, it can’t be controlled by a paragraph style otherwise the full paragraph would be formatted differently. Therefore, Internet Link can only be a character style, as is Visited Internet Link.

Read about styles in Writer Guide and get used to character styles instead of direct formatting.

So there are different kinds of styles in LO. Okay, thanks for pointing this out. Good to know.