TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

Embedded files support (Factur-X 1.07 / ZUGFeRD 2.3)

Open fooman opened this issue 11 months ago • 5 comments

This PR should get merged after #788 - fixes #578, #684

The changes proposed in this PR allow the generation of compliant Factur-X 1.07 / ZUGFeRD 2.3 pdfs that embed additional invoice information as XML.

To achieve this one additional insertion point inside the XMP section for PDF/A extension has been added as well as methods to directly insert embedded files without the need to use annotations.

The last required change was to include all embedded files in the catalog under /AF to pass PDF/A-3b validation.

The pdf generated via example_068.php will pass the online validator for FacturX found here https://services.fnfe-mpe.org/ Snip20250212_3 as well as https://www.portinvoice.com/ to validate it as Zugferd 2.3 compatible pdf image

fooman avatar Feb 12 '25 04:02 fooman

Very nice!

williamdes avatar Feb 12 '25 08:02 williamdes

Maybe add a Fixes https://github.com/tecnickcom/TCPDF/issues/578 to the PR description

williamdes avatar Feb 12 '25 08:02 williamdes

For reference on Dompdf Factur-x support is near to work. Could you help me with the last VeraPDF error? https://github.com/dompdf/dompdf/issues/3443

williamdes avatar Feb 12 '25 08:02 williamdes

Thanks @williamdes - updated the description.

In regards to dompdf I am unfortunately not sure either what the error entails. One thing which tcpdf does when in pdfa mode is the forced embedding of fonts even for core fonts like https://github.com/tecnickcom/TCPDF/blob/main/fonts/pdfacourier.php and it also suppresses font subsetting.

fooman avatar Feb 12 '25 21:02 fooman

Please trey to add this instead on the tc-lib-pdf project.

nicolaasuni avatar Mar 30 '25 14:03 nicolaasuni

Please trey to add this instead on the tc-lib-pdf project.

Could you re-consider for this one? this feature is very critical for all the tcpdf current users that want to get Factur-X compliance done

williamdes avatar Apr 07 '25 13:04 williamdes

Please trey to add this instead on the tc-lib-pdf project.

Could you re-consider for this one? this feature is very critical for all the tcpdf current users that want to get Factur-X compliance done

Yes, could you please re-consider? I can confirm that I check this PR two/three times a week, because we need the ability to embed xml files complaint for ZUGFeRD...

thomasDG897 avatar Apr 10 '25 12:04 thomasDG897

Please trey to add this instead on the tc-lib-pdf project.

Could you re-consider for this one? this feature is very critical for all the tcpdf current users that want to get Factur-X compliance done

Yes, could you please re-consider? I can confirm that I check this PR two/three times a week, because we need the ability to embed xml files complaint for ZUGFeRD...

Yes please, this would help a lot.

AdrienWeber avatar Apr 10 '25 15:04 AdrienWeber