Bug 156565 - FILESAVE PDF Using tabulator inside a link results to a PAC2021 "Inconsistent entry found" error
Summary: FILESAVE PDF Using tabulator inside a link results to a PAC2021 "Inconsistent...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:24.2.0 target:7.6.3 target:7.6.4
Keywords:
Depends on:
Blocks: PDF-Export PDF-Accessibility
  Show dependency treegraph
 
Reported: 2023-08-01 13:38 UTC by devseppala
Modified: 2023-11-11 17:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The second paragraph has a link that contains tabulator, which results to PAC2021 error (13.05 KB, application/vnd.oasis.opendocument.text)
2023-08-01 13:38 UTC, devseppala
Details
PAC2021 screenshot of the "Inconsistent entry found" error (130.31 KB, image/gif)
2023-08-01 13:39 UTC, devseppala
Details
Screenshot of new PAC2021 error from links that are divided by a line break (80.32 KB, image/png)
2023-10-31 11:17 UTC, devseppala
Details
Example odt-file for the line break bug (14.75 KB, application/vnd.oasis.opendocument.text)
2023-10-31 11:20 UTC, devseppala
Details
Example PDF-file for the line break bug (17.80 KB, application/pdf)
2023-10-31 11:20 UTC, devseppala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description devseppala 2023-08-01 13:38:11 UTC
Created attachment 188696 [details]
The second paragraph has a link that contains tabulator, which results to PAC2021 error

When checking PDF documents exported from LibreOffice Writer, PAC2021 checker reports 

PDF/UA
    Basic requirements
        ISO3200-1
            Structural parent tree
                "Inconsistent entry found"

errors,if document has links that contain tabulator.
Comment 1 devseppala 2023-08-01 13:39:40 UTC
Created attachment 188697 [details]
PAC2021 screenshot of the "Inconsistent entry found" error
Comment 2 Gabor Kelemen (allotropia) 2023-08-04 07:51:17 UTC
Confirming in

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 34387332173782498acd4998c7c665d04ebc3c7d
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

also in 7.4, 7.0, 6.2, but not yet in 6.1.
Comment 3 Gabor Kelemen (allotropia) 2023-08-04 15:39:13 UTC
Wrong info, if the Tagged PDF option is enabled, then even 3.3 creates a wrong file.
Comment 4 devseppala 2023-10-11 15:53:42 UTC
I would just like to add that, while it may seem that this bug affects only a very small number of users, because who uses tabulators inside links. The reality is quite the opposite, the default "Table of Contents" configuration places number, entry, TABULATOR and page number within single link element. 

By solving this issue, you remove one PAC20201 issue type (with each heading adding failure count by one) from every new LO generated PDF-document that contains Table of Contents.
Comment 5 Commit Notification 2023-10-24 14:45:08 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4c5283a3a11008a06a995c49ed777734dc1f6066

tdf#156565 sw: PDF/UA export: only one Link ILSE per link

It will be available in 24.2.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 6 Michael Stahl (allotropia) 2023-10-24 14:46:20 UTC
fixed on master
Comment 7 Commit Notification 2023-10-25 09:29:06 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#156565 sw: PDF/UA export: only one Link ILSE per link

It will be available in 7.6.3.

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 8 devseppala 2023-10-31 11:17:21 UTC
Created attachment 190547 [details]
Screenshot of new PAC2021 error from links that are divided by a line break

!!! IMPORTANT !!!

I tested this change in LO_7.6.3 Nightly from 28.10 and it appears to cause a new accessibility bug that maybe even more serious then the one fixed. After this change both Acrobat and PAC2021 report link tagging errors in cases where a line break divides a link text to two lines.

PAC2021
* Nesting of ”Link” annotations inside ”Link” structure elements
   * ”Link” annotation is not nested inside a ”Link” structure element

See the attached screenshot and example files.
Comment 9 devseppala 2023-10-31 11:20:05 UTC
Created attachment 190550 [details]
Example odt-file for the line break bug
Comment 10 devseppala 2023-10-31 11:20:41 UTC
Created attachment 190551 [details]
Example PDF-file for the line break bug
Comment 11 Commit Notification 2023-11-02 10:54:46 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#156565 sw: PDF/UA export: split Link SE at line break

It will be available in 24.2.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 12 Michael Stahl (allotropia) 2023-11-02 11:00:52 UTC
thanks for testing, that's a good find, should be fixed now

see also bug 157816 for more Link problems
Comment 13 devseppala 2023-11-03 08:58:27 UTC
(In reply to Michael Stahl (allotropia) from comment #12)
> thanks for testing, that's a good find, should be fixed now

Thank you for fixing this. I haven't tested this fix eyet, but I thought I should ask if this fix also solves a case where the link contains a forced line break as I did not mention this case earlier.
Comment 14 devseppala 2023-11-06 16:56:55 UTC
I tested the latest fix with LO24.2 from 6.11.2023 and all link errors are now gone. It also fixes the forced line break case I mentioned in my last message. Good work!

I quess it is too late to get the fix to LO 7.6.3 , but hopefully it will be available in 7.6.4
Comment 15 Commit Notification 2023-11-11 17:07:58 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/6898f3ad90f2128de78726e689318bc3565b644a

tdf#156565 sw: PDF/UA export: split Link SE at line break

It will be available in 7.6.4.

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.