LibreOffice.convert() accept a facturx option that turns the resulting PDF into a Factur-X / ZUGFeRD e-invoice: it embeds the CII invoice XML under the canonical factur-x.xml name and converts the PDF to PDF/A-3.
facturx payload shape
Turning existing PDFs into Factur-X
There’s also a dedicatedPDFEngines.facturX() route for turning existing PDFs into Factur-X e-invoices directly, without a conversion:
embeds/embedsMetadata attachment options that ZUGFeRD/Factur-X compliance also relies on.