Bug 160707 - FILESAVE PDF/UA Image with caption generates extra "Div" in PDF
Summary: FILESAVE PDF/UA Image with caption generates extra "Div" in PDF
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Accessibility
  Show dependency treegraph
 
Reported: 2024-04-17 12:29 UTC by Gabor Kelemen (allotropia)
Modified: 2025-01-23 12:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Image with caption (24.43 KB, application/vnd.oasis.opendocument.text)
2024-04-17 12:29 UTC, Gabor Kelemen (allotropia)
Details
The example file exported as PDF from current master (30.88 KB, application/pdf)
2024-04-17 12:38 UTC, Gabor Kelemen (allotropia)
Details
The PDF example in the PAC tool (53.06 KB, image/png)
2024-04-17 12:40 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-04-17 12:29:15 UTC
Created attachment 193725 [details]
Image with caption

Attached example image has a caption.
When this is exported as PDF with PDF/UA enabled, an extra Div tag is added and the PAC tool complains about it.

1. Open attached file
2. Save as PDF with PDF/UA enabled
3. Open the resulting file in the PAC tool
-> there is a warning about a "Possibly inappropriate use of a "Div" structure element"

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d76f1877f699c91f5e4a020641c6d65064bfb997
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default
Comment 1 Gabor Kelemen (allotropia) 2024-04-17 12:38:57 UTC
Created attachment 193726 [details]
The example file exported as PDF from current master
Comment 2 Gabor Kelemen (allotropia) 2024-04-17 12:40:20 UTC
Created attachment 193727 [details]
The PDF example in the PAC tool
Comment 3 Gabor Kelemen (allotropia) 2025-01-23 12:08:08 UTC
Tibor looked into this and said in the internal tracker that this is fine:

It's not really a bug!

In this case, we need to use "Div" grouping tag as the “Figure Grouper”, because this element is also the only thing that could have a "bounding box" of the whole frame, and without the "Div" element if the user anchors another "Figure" on the "Caption", it will be a problem...

So we need this element if the "Figure "contains a "Caption", otherwise, just the "Figure" tag is sufficient (this works good).