feat: add embeds metadata#1521
Merged
gulien merged 1 commit intogotenberg:mainfrom Apr 16, 2026
Merged
Conversation
4212b2f to
192e6d2
Compare
Contributor
Author
|
FYI, this PR focuses on Factur-X compliance. Other metadata could be added later. Ex:
|
gulien
approved these changes
Apr 16, 2026
Collaborator
|
Thanks! |
Collaborator
|
@Jean-Beru could you update the documentation from gotenberg.dev too? 😄 |
Jean-Beru
added a commit
to Jean-Beru/gotenberg.dev
that referenced
this pull request
Apr 17, 2026
Covers the changes from gotenberg/gotenberg#1521: - new embedsMetadata form field on Chromium, LibreOffice and PDF Engines routes - new /forms/pdfengines/embed route - new --pdfengines-embed-metadata-engines flag (default qpdf)
4 tasks
Jean-Beru
added a commit
to Jean-Beru/gotenberg.dev
that referenced
this pull request
Apr 17, 2026
Covers the changes from gotenberg/gotenberg#1521: - new embedsMetadata form field on the shared attachments PDF engines partial and on the attachments route - updated --pdfengines-embed-engines default to qpdf,pdfcpu - new --pdfengines-embed-metadata-engines flag (default qpdf)
Jean-Beru
added a commit
to Jean-Beru/gotenberg.dev
that referenced
this pull request
Apr 17, 2026
Covers the changes from gotenberg/gotenberg#1521: - new embedsMetadata form field on the shared attachments PDF engines partial and on the attachments route - updated --pdfengines-embed-engines default to qpdf,pdfcpu - new --pdfengines-embed-metadata-engines flag (default qpdf)
Jean-Beru
added a commit
to Jean-Beru/gotenberg.dev
that referenced
this pull request
Apr 17, 2026
Covers the changes from gotenberg/gotenberg#1521: - new embedsMetadata form field on the shared attachments PDF engines partial and on the attachments route - updated --pdfengines-embed-engines default to qpdf,pdfcpu - new --pdfengines-embed-metadata-engines flag (default qpdf)
Jean-Beru
added a commit
to Jean-Beru/gotenberg.dev
that referenced
this pull request
Apr 17, 2026
Covers the changes from gotenberg/gotenberg#1521: - new embedsMetadata form field on the shared attachments PDF engines partial and on the attachments route - updated --pdfengines-embed-engines default to qpdf,pdfcpu - new --pdfengines-embed-metadata-engines flag (default qpdf)
Contributor
Author
For sure 😎 |
Jean-Beru
added a commit
to Jean-Beru/gotenberg.dev
that referenced
this pull request
Apr 17, 2026
Covers the changes from gotenberg/gotenberg#1521: - new embedsMetadata form field on the shared attachments PDF engines partial and on the attachments route - updated --pdfengines-embed-engines default to qpdf,pdfcpu - new --pdfengines-embed-metadata-engines flag (default qpdf) Assisted-by: Claude:claude-opus-4-7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
embedsMetadataform field across Chromium, LibreOffice, and PDF Engines routes that writes PDF/A embedded-file metadata (Subtype,AFRelationship, and the document-level/AFarray) on attached files. A newEmbedFilesMetadatamethod is added to thePdfEngineinterface and fully implemented in the QPDF engine via JSON manipulation.Why
This is required for Factur-X / ZUGFeRD compliance. The Factur-X specification mandates that the XML invoice embedded in the PDF carries a
Subtype, anAFRelationship(e.g.Alternative,Source), and that every associated file is referenced from the/AFarray in the Document Catalog. Without these, PDFs produced by Gotenberg fail validation at https://services.fnfe-mpe.org/ and cannot be used as legal electronic invoices in jurisdictions that require Factur-X (France, Germany, and the broader EU e-invoicing rollout).Factur-X validation
Likely fixes #1485.