Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new XInvoice from existing xml file #14

Closed
LarsK1 opened this issue Aug 8, 2023 · 5 comments · Fixed by #17
Closed

Create new XInvoice from existing xml file #14

LarsK1 opened this issue Aug 8, 2023 · 5 comments · Fixed by #17
Assignees
Milestone

Comments

@LarsK1
Copy link

LarsK1 commented Aug 8, 2023

Hi there,
we currently trying to implement a "cache" like solution for InvoiceNinja. But were keep stoping on these lines:
https://github.com/invoiceninja/invoiceninja/pull/8697/files#diff-558c6325a311d57c92a9f54148bb37d8aefe30fdb8e3a7d5371966586b2cf773R47-R65.

So to give you a matter of context. The invoicing system is currently generating the single xml file and saves it. When the customers requests the invoice pdf file, this method is launched to reuse the generated xml-file and embed it into the pdf.

Is there a way to re-use the read xml file to build a "new" xml-document or do I really need to parse every parameter and pass it through to the DocumentBuilder? Any ideas are appreciated.

Kind regards,
Lars Kusch

@horstoeko
Copy link
Owner

Hi @LarsK1,

I have a few thoughts about your requirement. Please give me some time as I am about to take my annual leave and still have some things to do for my actual professional life.

Regards

@LarsK1
Copy link
Author

LarsK1 commented Aug 15, 2023

Hi @horstoeko
thanks for you reply. I will await your answer, once you're back!

Thanks in advance for your awesome module!

@horstoeko
Copy link
Owner

Hi @LarsK1,

I have created a new class ZugferdDocumentPdfMerger. With this one can add an existing XML file (or XML data string) to a PDF file (or PDF data string). Please note that there is an example of how to use it at /examples/En16931PdfMerger.php. This feature will be available in the next release (which I will create later today).

Regards

@horstoeko horstoeko self-assigned this Aug 16, 2023
@horstoeko horstoeko added this to the v1.0.21 milestone Aug 16, 2023
@LarsK1
Copy link
Author

LarsK1 commented Aug 16, 2023

@horstoeko thanks for the quick resolution. 👍

@horstoeko
Copy link
Owner

Hi @LarsK1

It was a pleasure. I hope my solution will help you. If you have any comments, I would ask you to open a new issue.

Regards

Repository owner locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants