Bug 160196 - Combined "Hybrid PDF" and "Archival PDF" options generate non-conformant PDF/A files
Summary: Combined "Hybrid PDF" and "Archival PDF" options generate non-conformant PDF/...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.2.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2024-03-14 06:55 UTC by peter.wyatt
Modified: 2024-04-05 03:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Invalid PDF/A-2 file with file attachment (Hybrid PDF w/ ODF) (38.20 KB, application/pdf)
2024-03-14 23:43 UTC, peter.wyatt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peter.wyatt 2024-03-14 06:55:46 UTC
LibreOffice 24.2 release allows a user to check both(!) the "Hybrid PDF (embed ODF file)" and "Archival (PDF/A, ISO 19005)" options. However the resultant PDF can  NEVER BE COMPLIANT to PDF/A-1 or PDF/A-2 for any conformance levels as embedded files are not permitted by any of these older PDF/A standards. 

You need to use PDF/A-3 (ISO 19005-3:2012) - quoting introduction of PDF/A-3:

"This part of ISO 19005 adds a new goal (beyond that of ISO 19005-2) which is to enable PDF documents to serve as containers for other file formats, so that a single physical file can contain not only the visual representation but also other representations including the original authored version, richer semantic formats, and others. This part of ISO 19005 does not address the long-term suitability of formats, that may be embedded, other than those compliant with any part of this International Standard." - see https://www.iso.org/obp/ui/en/#iso:std:iso:19005:-3:ed-1:v1:en

Without checking the details of every possible PDF output that LibreOffice might generate, it is probably safe (or at least very very close) to simply change the XMP metadata conformance information to be PDF/A-3 instead of PDF/A-2 for this situation. Of course, you should validate the generated PDFs with a tool such as veraPDF to check conformance.

PS. When you look at PDF/A-3, also read Annex E "Associated Files", since the embedded ODF file is the "source" of the PDF export so additionally adding the AF entry to the DocCatalog with an AFRelationship key value of Source. Associated Files were also directly adopted into PDF 2.0 (ISO 32000-2) to facilitate open data transfer and are being used by the likes of LaTeX for MathML, etc. A few PDF readers are also now supporting Associated Files in their attachment panes.
Comment 1 peter.wyatt 2024-03-14 23:43:53 UTC
Created attachment 193117 [details]
Invalid PDF/A-2 file with file attachment (Hybrid PDF w/ ODF)

Example invalid PDF/A-2 that contains the ODF file attachment
Comment 2 Tomaz Vajngerl 2024-04-04 10:49:32 UTC
Good point - thanks!
Comment 3 peter.wyatt 2024-04-05 02:27:29 UTC
If you want to pass me some sample corrected PDFs, I'm more than happy to check them for you for both ISO subset compliance as well as correctness against the PDF specifications.