Bug 156278 - Hyperlinks and footnotes are not converted the same way anymore
Summary: Hyperlinks and footnotes are not converted the same way anymore
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks:
 
Reported: 2023-07-13 19:04 UTC by Louis Coste
Modified: 2023-07-14 21:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Word document with a link (12.17 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-07-13 19:04 UTC, Louis Coste
Details
Word document with a footer (15.26 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-07-13 19:05 UTC, Louis Coste
Details
non-UA PDF export before commit fa3f04bd (15.15 KB, application/pdf)
2023-07-13 23:10 UTC, Stéphane Guillou (stragu)
Details
non-UA PDF export after commit fa3f04bd (15.23 KB, application/pdf)
2023-07-13 23:11 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Louis Coste 2023-07-13 19:04:14 UTC
Description:
Since 7.4 documents converted to PDF that contain hyperlinks and footers are no longer converted the same way. We pass the PDF output to PSPDFkit and started noticing an annotation showing up where the hyperlink and footers are that should not be there.



Steps to Reproduce:
1. Open word document in libreoffice and export to PDF
2. Open the generated PDF document in the PSPDFkit demo page (https://pspdfkit.com/demo/custom)
3. Note the annotations that have been added where the hyperlinks and footers are.

Actual Results:
Annotations are added where the hyperlinks and footers are

Expected Results:
No annotation should be created by default


Reproducible: Always


User Profile Reset: No

Additional Info:
Tested this in the latest version of libreoffice 7.3 and 7.4. 

We only found this problem on 7.4 and onward
Comment 1 Louis Coste 2023-07-13 19:04:49 UTC
Created attachment 188354 [details]
Word document with a link
Comment 2 Louis Coste 2023-07-13 19:05:08 UTC
Created attachment 188355 [details]
Word document with a footer
Comment 3 Stéphane Guillou (stragu) 2023-07-13 23:09:16 UTC
Thank you Louis.
I can reproduce in 7.4, not in 7.3.

Bibisecting with the linux-64-7.4 repository, I get to commit 1a200c468c07c2919be8513b47c0d2a35158eaa5 which points to core commit c5a8728d8f9e943bad4bb55dbde30ae9eceefecf, a cherrypick of:

commit fa3f04bdd4f73a1b3be70dfb709c44638ef7e3d9
author	Michael Stahl <michael.stahl@allotropia.de>	Tue Oct 25 13:41:05 2022 +0200
committer	Michael Stahl <michael.stahl@allotropia.de>	Tue Oct 25 20:50:04 2022 +0200
tdf#148934 PDF/UA export: add Contents entry to Link annotations
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141826

Michael, the commit message makes it sound like the change was only directed at PDF/UA, but even a non-UA export includes these annotations.
Was that intended?
Comment 4 Stéphane Guillou (stragu) 2023-07-13 23:10:54 UTC
Created attachment 188364 [details]
non-UA PDF export before commit fa3f04bd
Comment 5 Stéphane Guillou (stragu) 2023-07-13 23:11:17 UTC
Created attachment 188365 [details]
non-UA PDF export after commit fa3f04bd
Comment 6 Michael Stahl 2023-07-14 14:06:49 UTC
that's a feature - hyperlinks are converted into PDF Link annotations (obviously), and footnotes as well (2 links, from the reference to the footnote, and back).

the PDF Link annotation only describes a rectangular area of the page that can be clicked (if the reader supports it), and it has this additional "Contents" entry to specify an alternative text description.

> Michael, the commit message makes it sound like the change was only directed at
> PDF/UA, but even a non-UA export includes these annotations.
> Was that intended?

the PDF/UA setting actually has very little effect, almost everything relevant is already enabled by "Tagged PDF"; but the annotations aren't even governed by that, they are always produced, and nobody ever saw a problem with that.

trying Okular, Evince, Chromium, Firefox, none of them display anything visible for these annotations; perhaps it's an UI problem with PSPDFkit?


ISO 32000-2:2020(E), 12.5.6.2 Markup annotations
> As mentioned in 12.5.2, "Annotation dictionaries", the meaning of an annotation’s Contents entry
> varies by annotation type. Typically, it is the text that shall be displayed for the annotation or, if the
> annotation does not display text, an alternative description of the annotation’s contents in human-
> readable form. In either case, the Contents entry is useful when extracting the document’s contents in
> support of accessibility to users with disabilities or for other purposes (see 14.9.3, "Alternate
> descriptions").
Comment 7 Stéphane Guillou (stragu) 2023-07-14 21:32:17 UTC
Thanks for clarifying, Michael. Closing as "not a bug" then.