Skip to main content
Chromium converters and LibreOffice accept an embeds array to attach files to the generated PDF. Each item can be a file path string, a Buffer, or a ReadStream.
Embedded files are attached to the PDF and can be extracted in readers that support attachments. This is used for ZUGFeRD / Factur-X and similar standards that require embedding XML or other files inside the PDF — see Factur-X for the dedicated e-invoice option.

Attachment metadata

Optional embedsMetadata sets per-attachment metadata, keyed by filename, required for PDF/A-3 and Factur-X compliance:

Embedding into existing PDFs

There’s also a dedicated PDFEngines.embed() route for attaching files to existing PDFs directly, without a conversion:
See Embed files for the full dedicated-route reference.