From a29f3ce4985c9003f168c24d54f2899545d13134 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 19 Nov 2024 23:52:18 +0100 Subject: [PATCH] Added example how to combine existing PDF and existing invoice XML --- README.md | 5 +++++ .../src/test/kotlin/net/codinux/invoicing/Demonstration.kt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index ed39139..e3dea1e 100644 --- a/README.md +++ b/README.md @@ -79,4 +79,9 @@ val output = File("Zugferd.pdf") val creator = EInvoiceCreator() creator.combinePdfAndInvoiceXml(invoice, existingPdf, output) + +// or if you already have the invoice XML: +val invoiceXml: String = "..." // e.g. creator.createZugferdXml(invoice) + +creator.combinePdfAndInvoiceXml(invoiceXml, existingPdf, output) ``` \ No newline at end of file diff --git a/e-invoicing-domain/src/test/kotlin/net/codinux/invoicing/Demonstration.kt b/e-invoicing-domain/src/test/kotlin/net/codinux/invoicing/Demonstration.kt index 69a3424..d0c4aed 100644 --- a/e-invoicing-domain/src/test/kotlin/net/codinux/invoicing/Demonstration.kt +++ b/e-invoicing-domain/src/test/kotlin/net/codinux/invoicing/Demonstration.kt @@ -70,6 +70,11 @@ class Demonstration { val creator = EInvoiceCreator() creator.combinePdfAndInvoiceXml(invoice, existingPdf, output) + + // or if you already have the invoice XML: + val invoiceXml: String = "..." // e.g. creator.createZugferdXml(invoice) + + creator.combinePdfAndInvoiceXml(invoiceXml, existingPdf, output) }