-
Notifications
You must be signed in to change notification settings - Fork 341
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
Zipping multiple documents in one zipfile fails #538
Comments
Hello @timm333 , First, You should not reuse a docxtemplater instance twice. As for the error that you get, you can use the following by using var out=doc.getZip().generate();
zipDocs.file(name+".docx", out); |
Thanks, I improved the code with your suggestions. This eliminates the error and I get multiple docx in one zip file. But the docx-files don't seem to be valid and I cannot open them. Is this because the generate is without options?
|
You're right, it works if you do : Fully working snippet :
|
That works perfect. Many thanks! |
Environment
How to reproduce my problem :
My template is the following : https://docxtemplater.com/tag-example.docx
With the following html file :
The generation of the zip-file fails with the error message:
I guess that I have to generate a different output but I don't know how.
The text was updated successfully, but these errors were encountered: