Bug 161583 - PDF exported from Writer show a hyperlink’s text also as it's tool tip in Acrobat Reader
Summary: PDF exported from Writer show a hyperlink’s text also as it's tool tip in Acr...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
24.2.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:25.8.0 target:25.2.2 target:24...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2024-06-15 08:10 UTC by Burkhard Erdlenbruch
Modified: 2025-03-10 00:43 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
That's how the link is set up in Writer. (182.26 KB, image/jpeg)
2024-06-15 09:07 UTC, Burkhard Erdlenbruch
Details
That's how the tooltip simply duplicates the text in Acrobat Reader. (122.34 KB, image/jpeg)
2024-06-15 09:10 UTC, Burkhard Erdlenbruch
Details
And that's how the same Reader displays the too tip in an older version of the document, exported from an older Writer version. (127.00 KB, image/jpeg)
2024-06-15 09:17 UTC, Burkhard Erdlenbruch
Details
That's the document as exported today with LO 24.2.3.2 (x86_64), Windows 11. (7.85 MB, application/pdf)
2024-06-15 09:42 UTC, Burkhard Erdlenbruch
Details
And that's the same document exported in 2019 with the Writer version up to date back then under Windows 10. (12.74 MB, application/pdf)
2024-06-15 09:44 UTC, Burkhard Erdlenbruch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Burkhard Erdlenbruch 2024-06-15 08:10:14 UTC
Description:
That’s redundant and leaves readers of the PDF vulnerable to bad or malicious links. Until a few years ago, the hyperlink was displayed as tool tip so the reader of the PDF could check it.

For instance, a hyperlink “https://foobar.com” is not visible in the document but the text “Foobar Company”, and “https://foobar.com” should be displayed as tool tip instead (as has been before).

Steps to Reproduce:
1. In a Writer document, create a hyperlink to a remote web page.
2. Export the document to PDF.
3. Open the document in Reader and move the mouse pointer over the hyperlink.

Actual Results:
The text of the hyperlink is shown as tool tip, for instance "Foobar Company".

Expected Results:
The tool tip should show the actual hyperlink so I can check it before clicking, for instance "https://foobar.com".


Reproducible: Always


User Profile Reset: No

Additional Info:
Hint I got from EarnestAl:

I suspect it was a result of tdf#140617 or linked bugs but it leaves readers of the pdf vulnerable to bad or malicious links.
Links are confused with alternative text so there should be another method so that both can be displayed.
Comment 1 Robert Großkopf 2024-06-15 08:54:55 UTC
Tested with 

Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

Wrote some text with a hyperlink.
Opened "Edit Hyperlink".
Edited "Hyperlinks Settings" → "Text".

Then saved the document, exported to *.pdf and opened the pdf-file.
PDF shows the edited "Text" and will show the hyperlink in tooltip.
All tested under OpenSUSE 15.6 64bit rpm Linux with viewer "Okular".

So I could not confirm any buggy behavior here.
Comment 2 Burkhard Erdlenbruch 2024-06-15 09:07:31 UTC
Created attachment 194746 [details]
That's how the link is set up in Writer.
Comment 3 Burkhard Erdlenbruch 2024-06-15 09:10:08 UTC
Created attachment 194747 [details]
That's how the tooltip simply duplicates the text in Acrobat Reader.
Comment 4 Burkhard Erdlenbruch 2024-06-15 09:17:03 UTC
Created attachment 194748 [details]
And that's how the same Reader displays the too tip in an older version of the document, exported from an older Writer version.
Comment 5 Robert Großkopf 2024-06-15 09:32:42 UTC
Upload a *.pdf-Datei, which has been created with LO and will show this behavior. Screenshots won't help, because it shows different behavior here: Tooltip shows the whole link, not only the "Name".

Also add the version of LO you are using. Might be it isn't the newest version and the bug doesn't exist any more.
Comment 6 Burkhard Erdlenbruch 2024-06-15 09:42:32 UTC
Created attachment 194749 [details]
That's the document as exported today with LO 24.2.3.2 (x86_64), Windows 11.
Comment 7 Burkhard Erdlenbruch 2024-06-15 09:44:33 UTC
Created attachment 194750 [details]
And that's the same document exported in 2019 with the Writer version up to date back then under Windows 10.
Comment 8 Robert Großkopf 2024-06-15 10:00:30 UTC
Have tested both documents. Seems to be page 4 - right?
Both documents will show the whole link in tooltip here with PDF reader Okular.
The same is shown with Foxit PDF-reader installed here under Linux with Wine.

So we need a person testing this with Windows and Acrobat.
Try to post the buggy behavior here: https://ask.libreoffice.org/c/german/6
There we could find testers without any problem.
Comment 9 Burkhard Erdlenbruch 2024-06-15 15:44:51 UTC
Now I tried with the latest Foxit version under Windows 11. Indeed the PDF exported today (fourth attachment) displays the links correctly as tool tips.

So the problem seems to be in the combination of the recent versions of LO and Acrobat Reader.
Comment 10 Robert Großkopf 2024-06-15 16:58:04 UTC
Seems to be a special bug in combination with Acrobat Reader and LO.
See https://ask.libreoffice.org/t/tooltips-zu-hyperlinks-nicht-richtig-in-acrobat-reader-in-pdfs-die-aus-lo-writer-exportiert-wurden/106931

Older document shows the link as tooltip in Acrobat Reader, newer document only shows the text content as tooltip.

Set this one to NEW and regression.
Comment 11 Burkhard Erdlenbruch 2024-06-16 21:11:39 UTC
Checked my PDF documents for this bug:
There are some from last April, of course all of them with the bug.
The next PDF backwards in time has been exported from LOW 7.3 at 2022-12-31 and it displays links correctly.
Comment 12 Saburo 2025-02-05 03:25:15 UTC
bibisected
first bad commit
source c5a8728d8f9e943bad4bb55dbde30ae9eceefecf
Comment 13 BogdanB 2025-02-05 17:30:35 UTC
commit c5a8728d8f9e943bad4bb55dbde30ae9eceefecf	[log]
author	Michael Stahl <michael.stahl@allotropia.de>	Tue Oct 25 13:41:05 2022 +0200
committer	Xisco Fauli <xiscofauli@libreoffice.org>	Tue Nov 01 11:14:20 2022 +0100
tree 6056bb68d6987f1145e4cc1fc68a7cfeaebe0cd2
parent 3f8b95015e4f542f39b3ecb6763d1aad8e04284f [diff]
tdf#148934 PDF/UA export: add Contents entry to Link annotations

* Specification: ISO 14289-1:2014, Clause: 7.18.5, Test number: 2
Links shall contain an alternate description via their Contents key as described in ISO 32000-1:2008, 14.9.3.

These links are created all over the code, in some cases it's a bit
dubious what the content/alt-text should be, but let's try to use the
most suitable looking bit of text in whatever the context is.

* Specification: ISO 14289-1:2014, Clause: 7.18.3, Test number: 1
Every page on which there is an annotation shall contain in its page dictionary the key Tabs, and its value shall be S.

Change-Id: I7b63feb759f0c75047f854ed9997918f829a537e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141826
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit fa3f04bdd4f73a1b3be70dfb709c44638ef7e3d9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141873
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Comment 14 Commit Notification 2025-03-06 15:25:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5445e9de41b1330fa27e07d46eaa4babe956645f

tdf#161583 sw: a11y check: warn about flys with RES_URL with no "name"

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2025-03-06 18:17:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8bf8873f3091f131f6b4067d5a5f868882949114

tdf#161583 drawinglayer,editeng,svx,sd: add "Name" to SvxURLField ...

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2025-03-06 19:51:42 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9cef7e5ba50b483cd84682528c7ef503965b6104

tdf#161583 vcl,sc,sw: PDF/UA export: fix Contents of Link annotations

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Michael Stahl (allotropia) 2025-03-07 10:04:36 UTC
so the following PDF readers all display the hyperlink in the tooltip:

* Okular
* Evince
* Firefox
* Chromium
* FoxIt (according to comment#8)
* Adobe Reader 9.5.5 for Linux

... but rereading the relevant specifications i got the impression that what we export as "Contents" isn't what we should be exporting: it should describe the target of the URL, using the text representation of the link is not so useful.

there is a kind of alt-text for hyperlinks that is called the "Name" in the LO hyperlink dialogs, we should be exporting that instead, but only if it exists.

while PDF/UA 1 has a mandatory requirement to produce "Contents" for Link annotations, this has been downgraded to optional ("should") in PDF/UA 2.

so we should warn about links in the document that are missing the "Name"; this was already done in Writer for links in paragraphs, but was missing for links on fly frames.

in Impress you could insert "Name" for hyperlinks, but it was immediately discarded because the document model couldn't store it.

the above 3 problems are fixed now in master.

of course this means there will be warnings generated by PDF/UA 1 validators like PAC or veraPDF if the "Contents" is missing on a link.
Comment 18 Commit Notification 2025-03-07 16:07:41 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/222e6a558497b7132cade966eda01f88cd945e70

tdf#161583 sw: a11y check: warn about flys with RES_URL with no "name"

It will be available in 25.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2025-03-07 16:07:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/a65d8b7b6f5a98f2688bcd83fb49ee998d492f87

tdf#161583 drawinglayer,editeng,svx,sd: add "Name" to SvxURLField ...

It will be available in 25.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2025-03-07 16:07:46 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/f4b09d869f1844738a744209bc7744396ccc3baf

tdf#161583 vcl,sc,sw: PDF/UA export: fix Contents of Link annotations

It will be available in 25.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2025-03-10 00:42:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/fa13d9c0e7c113a0a39ba4cbc5093135597513d2

tdf#161583 sw: a11y check: warn about flys with RES_URL with no "name"

It will be available in 24.8.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2025-03-10 00:42:31 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/e36e5a7dd05f150372a3b2bea5d5d0c785b54520

tdf#161583 drawinglayer,editeng,svx,sd: add "Name" to SvxURLField ...

It will be available in 24.8.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2025-03-10 00:43:34 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/3b4f0b2b0d54f605602587fb3ffc1b901d4a3c4e

tdf#161583 vcl,sc,sw: PDF/UA export: fix Contents of Link annotations

It will be available in 24.8.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.