SuperNova
SuperNova

Reputation: 3002

How can I embed a file as an attachment to a pdf file via php?

I want to embed generated ZUGFeRD Data to a PDF file (generated via FPDF). I think it's not possible using FPDF directly. So the PDF file must be opened after it's written. How can I do this without command line tools? The site is hosted on a server, where I cannot install any command line tools.

ZUGFeRD is literally a XML file (german standard for exchange of invoices to make it easier for computers to read the document).

This is an example, how it should look like

Upvotes: 0

Views: 1475

Answers (1)

J. Staerk
J. Staerk

Reputation: 146

When talking of the "simple attachment" you speak about PDF/A-3 file attachments, all of which require custom PDF/A Schema Extensions. If you have at least a PDF/A-1 compliant file you can use @GPs library https://packagist.org/packages/atgp/factur-x to convert to PDF/A-3 and attach the XML.

Upvotes: 0

Related Questions