Bug 152236 - FILESAVE PDF PAC tool reports ""F" or "UF" key missing in file specification" in file containing multimedia files (clause 7.11)
Summary: FILESAVE PDF PAC tool reports ""F" or "UF" key missing in file specification"...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.0.6.2 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.6.0 target:7.5.3
Keywords: accessibility
Depends on:
Blocks: PDF-Accessibility
  Show dependency treegraph
 
Reported: 2022-11-26 14:18 UTC by Gabor Kelemen (allotropia)
Modified: 2023-04-12 22:24 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file with multimedia embedded (471.06 KB, application/vnd.oasis.opendocument.text)
2022-11-26 14:18 UTC, Gabor Kelemen (allotropia)
Details
The example file exported to PDF (498.41 KB, application/pdf)
2022-11-26 14:19 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the issue in the PAC tool (81.91 KB, image/png)
2022-11-26 14:20 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) 2022-11-26 14:18:28 UTC
Created attachment 183810 [details]
Example file with multimedia embedded

When the attached file with embedded media files is exported to PDF with PDF/UA enabled and the file is checked in the PAC tool, the reported error is ""F" or "UF" key missing in file specification" and "Annotation is not nested inside an "Annot" structure element"


1, Open attached file
2, Export it as PDF, with enabled PDF/UA option
3, Check with the PAC tool: https://pdfua.foundation/en/pdf-accessibility-checker-pac

PAC would report the error on the attached screenshot.

VeraPDF https://demo.verapdf.org/ with PDF/UA setting on the second page, reports:

Validation information
Rule	Status
Specification: ISO 14289-1:2014, Clause: 7.3, Test number: 1	
Figure tags shall include an alternative representation or replacement text that represents the contents marked with the Figure tag as noted in ISO 32000-1:2008, 14.7.2, Table 323	Failed
2 occurrences 	Hide
SEFigure	
(Alt != null && Alt != '') || ActualText != null	
root/document[0]/StructTreeRoot[0](66 0 obj PDStructTreeRoot)/K[0](4 0 obj SEDocument Document)/K[5](10 0 obj SEHn H4)/K[0](17 0 obj SEFigure Figure)
root/document[0]/StructTreeRoot[0](66 0 obj PDStructTreeRoot)/K[0](4 0 obj SEDocument Document)/K[11](16 0 obj SEP Standard)/K[0](19 0 obj SEFigure Figure)

	
Specification: ISO 14289-1:2014, Clause: 7.18.6.2, Test number: 2	
In the media clip data dictionary, the optional Alt key (ISO 32000-1:2008, 13.2.4.2, Table 274) is required.	Failed
2 occurrences 	Hide
PDMediaClip	
hasCorrectAlt == true	
root/document[0]/pages[0](1 0 obj PDPage)/annots[0](21 0 obj PDAnnot)/A[0]/C[0]
root/document[0]/pages[0](1 0 obj PDPage)/annots[1](23 0 obj PDAnnot)/A[0]/C[0]

	
Specification: ISO 14289-1:2014, Clause: 7.18.1, Test number: 1	
An annotation, excluding annotations of subtype Widget, Popup or Link, shall be nested within an Annot tag	Failed
2 occurrences 	Hide
PDAnnot	
Subtype == 'Widget' || Subtype == 'Popup' || Subtype == 'Link' || isOutsideCropBox == true || (F & 2) == 2 || structParentType == 'Annot'	
root/document[0]/pages[0](1 0 obj PDPage)/annots[0](21 0 obj PDAnnot)
root/document[0]/pages[0](1 0 obj PDPage)/annots[1](23 0 obj PDAnnot)

	
Specification: ISO 14289-1:2014, Clause: 7.18.1, Test number: 2	
An annotation (except annotations of type Link, Widget or Popup, or hidden annotations, or those having rectangle outside the crop-box) shall have either Contents key or an Alt entry in the enclosing structure element	Failed
2 occurrences 	Hide
PDAnnot	
Subtype == 'Widget' || Subtype == 'Popup' || Subtype == 'Link' || isOutsideCropBox == true || (F & 2) == 2 || (Contents != null && Contents != '') || (Alt != null && Alt != '')	
root/document[0]/pages[0](1 0 obj PDPage)/annots[0](21 0 obj PDAnnot)
root/document[0]/pages[0](1 0 obj PDPage)/annots[1](23 0 obj PDAnnot)

	
Specification: ISO 14289-1:2014, Clause: 7.11, Test number: 1	
The file specification dictionary for an embedded file shall contain the non-empty F and UF keys	Failed
2 occurrences 	Hide
CosFileSpecification	
containsEF == false || (F != null && F != '' && UF != null && UF != '')	
root/indirectObjects[5](21 0)/directObject[0]/values[1]/values[2]/values[3]/values[4]
root/indirectObjects[46](23 0)/directObject[0]/values[1]/values[2]/values[3]/values[4]

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 3b0b9fcb80242abcedc01eb388a57b1016916353
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: en-US
Calc: threaded
Comment 1 Gabor Kelemen (allotropia) 2022-11-26 14:19:18 UTC
Created attachment 183811 [details]
The example file exported to PDF
Comment 2 Gabor Kelemen (allotropia) 2022-11-26 14:20:21 UTC
Created attachment 183812 [details]
Screenshot of the issue in the PAC tool
Comment 3 Stéphane Guillou (stragu) 2022-12-05 15:17:23 UTC
Reproduced with:

Version: 7.4.3.2 / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: de-DE (en_AU.UTF-8); UI: en-US
Calc: threaded

VeraPDF lists clauses 7.1, *7.11*, 7.18.1, 7.18.6 (not 7.3)

Also with:

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

VeraPDF lists clauses 7.1, *7.11*, 7.18.1, 7.18.3, 7.18.6 (not 7.3)
Comment 4 Michael Stahl (allotropia) 2023-04-06 09:05:16 UTC
oops didn't notice this bug before, fixed on master:
 5cc69594e4382c258f0e3e3b1ef210567fce1bd8 vcl,sw,sd: PDF/UA export: produce better /CT for SdrMediaObj a5225ba82e94a549f44420f56a7cb9d7906561cc avmedia,*: guess the mime type of media files based on file name d41c3c820dad7c78bc57815e0f4a6999d125561d vcl: PDF/UA export: produce UF and Desc for embedded files e84b310b59825fd572d79def98c3d21566aac603 vcl,drawinglayer,svx,sw,sd: PDF/UA export: Annot StructElem for SdrMediaObj fb93cf7e3f70cf711742c5b492d520d9d49c3c5e sd: PDF export: produce annotations for shapes before painting shapes e7d5e346677efeb7d7d14537a9151ea7a1a32809 vcl,sd,sw: PDF/UA export: add Alt text to SdrMediaObj media shapes 9070c1b0404fb72d2553f6fa8f702e70c0abb269 xmloff: ODF export: produce alt text and description for MediaShape

fixed on libreoffice-7-5:
 3aa83e95f965434ef2e1ba4e9cdb90319fba2aa1 vcl: PDF/UA export: produce UF and Desc
 for embedded files 11959d05b3df3a2b7670da2df1cc914b22eabae4 vcl,drawinglayer,svx,sw,sd: PDF/UA export: Annot StructElem for SdrMediaObj 1c92038e2e4fdc556ec4ca1e00eff3ae355b683f vcl,sd,sw: PDF/UA export: add Alt text to SdrMediaObj media shapes b82de080efc883f688a6d9c7dcafc7672c3bffef sd: PDF export: produce annotations for shapes before painting shapes d505d6b5c60aae0109130e731fd8298a1905b501 xmloff: ODF export: produce alt text and description for MediaShape
Comment 5 Gabor Kelemen (allotropia) 2023-04-12 22:24:47 UTC
Verified in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fc6806c4be8585ce0d35a6b581bf8b3dbf858500
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded

VeraPDF and PAC complain about missing Alt text annotations, but manually adding via right click - Description, the new PDF passes fine.