Bug 160475 - Support embedded Files in PDF Export Options, implement PDF/A-3 support
Summary: Support embedded Files in PDF Export Options, implement PDF/A-3 support
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
24.2.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2024-04-02 08:25 UTC by Robert Großkopf
Modified: 2024-11-09 13:23 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Descripion with screenshot of the dialog (103.64 KB, application/pdf)
2024-04-02 08:25 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2024-04-02 08:25:42 UTC
Created attachment 193431 [details]
Descripion with screenshot of the dialog

PDF-Options will allow to embed the opened ODF file to the exported PDF document. Export filter will provide this with command IsAddStream.

For many electronic invoices it is needed to create a PDF, which has embedded a XML file. At this moment all solutions for this will only work with external tools like PDFtk.

Function for embedding a file is there. Only the possibility to add an external file is missing in GUI and in parameters for PDF export filter.

Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 1 V Stuart Foote 2024-04-02 11:38:50 UTC
Not following the use case. IsAddStream is already how we embed an ODF [1] toggling bAddStream to create our Hybrid PDF. And otherwise the PDF export is just a PDF, with just an additional stream added via the existing checkbox.

Before this was proprietary to OOo, with refactoring needed for bug 95328 to make it "visible" as a know attachment. Which looks to be done already by quikee with [1] as for bug 66580 in place from 7.6.0

Is that not generating suitable PDF with an ODF held in a usable PDF stream?

=-ref-=
[1] https://gerrit.libreoffice.org/c/core/+/146053
[2] https://opengrok.libreoffice.org/xref/core/filter/source/pdf/pdfexport.cxx?r=fae655c4&h=979#979
Comment 2 Tomaz Vajngerl 2024-04-02 13:05:37 UTC
If I understand this correctly Robert wants to attach an unrelated external file (invoice XML) to the exported PDF, and it is not related to hybrid ODF file embedding. If this is so then this shouldn't be that hard to add, but would be good to know about the use case a bit more.
Comment 3 V Stuart Foote 2024-04-02 13:26:22 UTC
(In reply to Tomaz Vajngerl from comment #2)
> If I understand this correctly Robert wants to attach an unrelated external
> file (invoice XML) to the exported PDF, and it is not related to hybrid ODF
> file embedding. If this is so then this shouldn't be that hard to add, but
> would be good to know about the use case a bit more.

But then for sure we'd bump into PDF/A validation issues like see also bug 160196
Comment 4 Robert Großkopf 2024-04-02 13:36:09 UTC
So a little bit more information:

For electronic invoices there exist 2 solutions in Germany.
1. Creating an XML-file and send it to the buyer.
2. Creating an XML-file and embedd it in a readable PDF-file and send it to the buyer.
XML-file is needed for send the data.
At this moment I will create the second solution by pdftk:
pdftk rec.pdf attach_files rec.xml relation Source output out.pdf

PDF/A-3 is needed for this kind of electronic invoices, called ZUGFeRD in Germany or Factur-X in France.
Comment 5 Tomaz Vajngerl 2024-04-04 10:50:44 UTC
(In reply to V Stuart Foote from comment #3)
> But then for sure we'd bump into PDF/A validation issues like see also bug
> 160196

Well, true, but that's only about tweaking the PDF export UI and implementation to not allow that.