Bug 157703 - FILESAVE PDF: Since LO 7.6.0 Beta1, Numbered headings result to a Acrobat / PAC2021 "Lbl / LBody" errors
Summary: FILESAVE PDF: Since LO 7.6.0 Beta1, Numbered headings result to a Acrobat / P...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 beta1+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:24.2.0 target:7.6.3
Keywords: accessibility, bibisected, bisected, filter:pdf, regression
Depends on:
Blocks: PDF-Accessibility
  Show dependency treegraph
 
Reported: 2023-10-11 15:10 UTC by devseppala
Modified: 2023-11-06 12:40 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document containing numbered heading that causes LBody accssibility error (11.05 KB, application/vnd.oasis.opendocument.text)
2023-10-11 15:10 UTC, devseppala
Details
Adobe accessibility checker screenshot (23.19 KB, image/png)
2023-10-11 15:11 UTC, devseppala
Details
PAC2021 screenshot (156.14 KB, image/png)
2023-10-11 15:12 UTC, devseppala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description devseppala 2023-10-11 15:10:29 UTC
Created attachment 190144 [details]
Example document containing numbered heading that causes LBody accssibility error

Starting from LO 7.6.0 Beta1, enabling heading numbering from "Tools->Heading Numbering.." results to PAC2021 and Acrobat accessibility checkers reporting "Lbl" and "LBody" errors.

PAC2021
WCAG
  4. Robust
    4.1 Compatible
      4.1.1 Parsing
        "LBody" structure elements
          Invalid use of an "LBody" structure element


Acrobat 2019
Lbl and LBody - Failed
  Lbl/LBody 1
  Lbl/LBody 2 

Acrobats explanation link:
https://helpx.adobe.com/acrobat/using/create-verify-pdf-accessibility.html?trackingid=KACNN#LblLBody

See also attached screenshots.


This bug was introduced in 7.6 alpha or beta builds:
https://wiki.documentfoundation.org/Releases/7.6.0/Beta1


Version: 7.6.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: be55b15d98c5f059483845a183fcb5ea8023d27c
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_FI); UI: en-GB
Calc: CL threaded
Comment 1 devseppala 2023-10-11 15:11:35 UTC
Created attachment 190145 [details]
Adobe accessibility checker screenshot
Comment 2 devseppala 2023-10-11 15:12:05 UTC
Created attachment 190146 [details]
PAC2021 screenshot
Comment 3 raal 2023-10-16 16:20:31 UTC
Confirm in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9f44f9fad759dea644356b67b9cd0fab030e8b77
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

VeraPDF checker:
Specification: ISO 14289-1:2014, Clause: 7.2, Test number: 18	
LBody element should be contained in LI element	Failed
1 occurrences 	Hide
SELBody	
parentStandardType == 'LI'	
root/document[0]/StructTreeRoot[0](19 0 obj PDStructTreeRoot)/K[0](4 0 obj SEDocument Document)/K[1](6 0 obj SELBody LBody)
Comment 4 Gabor Kelemen (allotropia) 2023-10-16 20:47:36 UTC
This broke first in 7.6 with:

https://git.libreoffice.org/core/+log/d8de2dc3c55a9013a71167c8058a333e7221a6a0

author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	Sat Jan 28 18:43:51 2023 +0900
committer	Tomaž Vajngerl <quikee@gmail.com>	Wed Feb 01 08:41:30 2023 +0000

xmloff: import of theme structure + import/export/round-trip tests

Before this, the PAC did not complain about the PDF/UA PDFs structure.
But at this commit Writer started to crash at opening the example file, both in UI mode and with --convert-to pdf.

This changed again in commit:

https://git.libreoffice.org/core/+/4f347ebabad6355014889f0a81b107dc774590fe

author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	Sat Feb 25 19:12:23 2023 +0900
committer	Tomaž Vajngerl <quikee@gmail.com>	Sat Apr 08 07:56:19 2023 +0200

use shared_ptr for model::Theme instead of unique_ptr

At this the file can be opened, but the PDF structure is invalid according to PAC.
Comment 5 Gabor Kelemen (allotropia) 2023-10-17 15:25:17 UTC
@mst this may interest us as well
Comment 6 Michael Stahl (allotropia) 2023-10-18 15:15:43 UTC
obviously my fault, from commit 

commit 9b38beadf9eaf027b201cdf0ecb2bce5611014dd
Author:     Michael Stahl <michael.stahl@allotropia.de>
AuthorDate: Wed Mar 8 14:25:26 2023 +0100
Commit:     Michael Stahl <michael.stahl@allotropia.de>
CommitDate: Fri Mar 10 10:59:26 2023 +0000

    sw: PDF/UA export: produce Lbl tagged element
Comment 7 Commit Notification 2023-10-19 15:16:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7cb283cf0e92cba4bd53b1cd69816ac7037937e4

tdf#157703 sw: PDF/UA export: fix headings with labels

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 8 Commit Notification 2023-10-25 11:37:31 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5dfae9e00f245da78613224ed8e0dbd8b6633192

tdf#157703 sw: PDF/UA export: export heading labels as text

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 9 devseppala 2023-10-30 13:56:17 UTC
I thought I would test the fix in 24.2.0. ,but apparently there are no daily builds for it eyet. 

Anyways, is this fix coming to 7.6 series also?
Comment 10 Gabor Kelemen (allotropia) 2023-11-02 09:42:49 UTC
No more complaints by PAC when exported from

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c0c8cffd3541e3cd616c96791b04e7ebf2b2ed03
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default
Comment 11 Commit Notification 2023-11-02 10:12:38 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#157703 sw: PDF/UA export: fix headings with labels

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 12 devseppala 2023-11-06 12:40:33 UTC
I tested LO 7.6.3 RC1 and there are no "Lbl / LBody" errors anymore. Thank you for fixing this.