horstoeko / zugferd

ZUGFeRD/XRechnung/Factur-X Library
MIT License
158 stars 26 forks source link

[QUESTION] Additional attachments in PDF #153

Open wurst-hans opened 3 hours ago

wurst-hans commented 3 hours ago

I would like to thank you very much for your library, it is a really big help (I'm a German user). I have not yet been able to find any information here on whether I can also embed attachments such as timesheets (which I usually embed in the XRechnung) directly in ZUGFeRD. Unfortunately, I don't understand anything about PDF/A, but if I understand the ZUGFeRD specification correctly, you seem to be able to attach additional documents with AFRelationship/Supplement. Hence my question: Does your library support adding and reading additional attachments from the PDF?

horstoeko commented 3 hours ago

Hi @wurst-hans,

thank you for your question.

I would like to thank you very much for your library, it is a really big help (I'm a German user)

Many thanks for the kind words

I have not yet been able to find any information here on whether I can also embed attachments such as timesheets (which I usually embed in the XRechnung) directly in ZUGFeRD. Unfortunately, I don't understand anything about PDF/A, but if I understand the ZUGFeRD specification correctly, you seem to be able to attach additional documents with AFRelationship/Supplement. Hence my question: Does your library support adding and reading additional attachments from the PDF?

There are currently no plans to include additional attachments in the ZUGFeRD PDF. However, it is certainly a good idea to include this in the future.

Kind regards

horstoeko commented 3 hours ago

Hi @wurst-hans,

An addendum on my part: One idea would be to include the additional documents in the embedded XML. My library offers possibilities for this. The ZugferdDocumentBuilder, for example, provides a method addDocumentAdditionalReferencedDocument for this purpose. You can pass a file name with the file to be embedded to this method.