I’m creating a PDF with PDF Conjurer and also generating an XML file. I want to combine both into one file, with the XML file embedded in the metadata of the PDF and not visible in the document itself.
The goal is to create a ZUGFeRD-compliant e-invoice, where the XML data is correctly embedded in the PDF’s metadata.
Question: Is it possible to use PDF Conjurer to attach the XML file as an invisible attachment in the metadata? If not, is there another solution to embed the XML data into the PDF’s metadata without displaying it?
Thank you for your question! The PDF Conjurer plugin in Bubble is a powerful tool for generating PDFs, but unfortunately, it doesn’t currently support embedding files, such as XML, into the metadata of a PDF. This functionality, especially for creating ZUGFeRD-compliant e-invoices, requires a more specialized approach.
Here are some alternative solutions and general suggestions you might consider:
1. Using an External PDF Library or Service
After generating the PDF using PDF Conjurer, you can send it to an external service or API that supports embedding XML into PDF metadata. Libraries like iText or APIs like PDF.co or Invoicexpress can handle ZUGFeRD compliance and allow you to attach XML as an invisible file.
Workflow:
Generate the PDF in Bubble using PDF Conjurer.
Generate your XML file via a backend workflow in Bubble.
Use a custom API call to send both files to the external service for combining.
2. Custom Development
If you’re comfortable with a bit of custom coding, you could create a small server-side script (using Python, Node.js, etc.) with a library like PyPDF2, iText, or PDFBox to modify the PDF after it’s created. You can trigger this script via Bubble’s API Connector.
3. Exploring Alternative Plugins
While PDF Conjurer doesn’t support this feature, it’s worth exploring other Bubble plugins or recent updates to see if any offer functionality for embedding metadata or attachments in a PDF. The Zeroqode plugin marketplace is a good place to start: https://zeroqode.com/plugins.