https://bugs.documentfoundation.org/show_bug.cgi?id=173162

            Bug ID: 173162
           Summary: DF/UA-2 export uses PDF 1.7-only /TOC//TOCI structure
                    tags (WTPDF/PDF/UA-2 Clause 8.2.4 failure) and writes
                    non-structure destinations for TOC links (Clause 8.8
                    failure)
           Product: LibreOffice
           Version: 26.2.5.2 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Exporting a Writer document containing a Table of Contents to PDF with
"Universal Accessibility (PDF/UA)" enabled produces a file that declares
PDF/UA-2 conformance (pdfuaid:part = 2 in XMP metadata) but fails WTPDF 1.0 /
ISO 14289-2:2024 validation in two related ways:

Issue A — Clause 8.2.4 (structure element namespace mapping):
The TOC is tagged using the legacy /TOC and /TOCI structure types. These do not
exist as standard structure types in PDF 2.0 (ISO 32000-2:2020) — they were
part of PDF 1.7 only, replaced in PDF 2.0 by generic list tags (/L//LI). Since
these elements are declared in the PDF 2.0 structure namespace
(http://iso.org/pdf2/ssn) without a corresponding RoleMapNS entry mapping them
to a standard type, every TOC entry fails validation. In our test document (58
TOC entries) this produced 59 failures (58× /TOCI + 1× /TOCI//TOC container).

Issue B — Clause 8.8 (non-structure destinations):
Internal links from the TOC to their target headings use plain /XYZ coordinate
destinations rather than structure destinations. We found this failure had two
independent sources, both from LibreOffice's PDF export:

The "Export bookmarks as named destinations" export option (Tools label: "Vie
kirjanmerkit nimettyinä kohteina") — when enabled, this generates a /Names
/Dests table entry per bookmark, also using plain coordinate destinations,
which the validator flags. Disabling this option removes half the failures (in
our case, from 116 down to 58), confirming it's a distinct contributing cause,
separate from the TOC links themselves.
The TOC's own hyperlink annotations (the clickable page numbers) — these remain
as /XYZ destinations regardless of the named-destinations setting, and account
for the remaining failures (58 in our test document, one per TOC entry).

Steps to Reproduce:
1. Create a Writer document with a Table of Contents (Insert → Table of
Contents and Index) containing several entries.
2. File → Export As → Export as PDF.
3. On the General tab, check "Universal Accessibility (PDF/UA)".
4. Export twice: once with "Export bookmarks as named destinations" checked,
once unchecked.
5. Validate both PDFs with veraPDF against the WTPDF 1.0 or ISO 14289-2:2024
(PDF/UA-2) validation profile.

Actual Results:
Clause 8.2.4: Non-standard structure type http://iso.org/pdf2/ssn:/TOC is not
mapped to a standard type
Clause 8.2.4: Non-standard structure type http://iso.org/pdf2/ssn:/TOCI is not
mapped to a standard type
Clause 8.8: Destination in Outline item, OpenAction or Link annotation is not a
structure destination

Expected Results:
TOC structure elements should use PDF 2.0–valid types (/L//LI with
/Lbl//LBody), or be declared via RoleMapNS to a standard type, regardless of
the "named destinations" setting.
TOC link annotations and any named/outline destinations should target structure
elements (structure destinations) rather than page coordinates, when PDF/UA-2
conformance is being claimed.


Reproducible: Always


User Profile Reset: No

Additional Info:
With "Export bookmarks as named destinations" enabled: 116 Clause 8.8 failures.
With it disabled: 58 Clause 8.8 failures (the TOC's own link annotations only).
Clause 8.2.4: 59 failures either way (unaffected by the named-destinations
setting).

Additional notes:
The document's XMP metadata also lacks the separate WTPDF pdfd:conformsTo PDF
Declaration (Clause 6.1.3), which LibreOffice has no export option for at all —
a distinct, likely lower-priority gap since it's a newer requirement on top of
PDF/UA-2 itself.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to