Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fooman
Copy link

@fooman fooman commented Feb 12, 2025

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

@williamdes
Copy link
Contributor

Very nice!

@williamdes
Copy link
Contributor

Maybe add a Fixes #578 to the PR description

@williamdes
Copy link
Contributor

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

@fooman
Copy link
Author

fooman commented Feb 12, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to add a file into the PDF, without adding annotation?
2 participants