We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My template is the following : multi.zip
With the following js file :
const fs = require("fs"); const path = require("path"); const PizZip = require("pizzip"); const Docxtemplater = require("docxtemplater"); const XlsxModule = require("docxtemplater-xlsx-module"); const ImageModule = require("docxtemplater-image-module"); const imageOpts = { centered: true, getImage: (tagValue, tagName) => fs.readFileSync(tagValue), getSize: (img, tagValue, tagName, options) => [160, 90], }; const content = fs.readFileSync("multi.xlsx"); const xslxzip = new PizZip(content); const doc = new Docxtemplater(xslxzip, { modules: [new ImageModule(imageOpts), new XlsxModule({})], }); doc.render({ image: path.resolve(__dirname, "image.jpg"), }); const buffer = doc.getZip().generate({ type: "nodebuffer", compression: "DEFLATE", }); fs.writeFileSync("test.xlsx", buffer);
It should display the image in both sheets, but currently I don't see anything.
If I use a template with only 1 sheet, it works
Any idea what's wrong ?
Thanks for your help 🙏
The text was updated successfully, but these errors were encountered:
Hello @Pierre-Gilles , thanks for your detailed report, it helped to fix this issue quickly.
I have just released version 3.15.1 of the image module which fixes the issue.
Sorry, something went wrong.
No branches or pull requests
Environment
How to reproduce my problem :
My template is the following : multi.zip
With the following js file :
It should display the image in both sheets, but currently I don't see anything.
If I use a template with only 1 sheet, it works
Any idea what's wrong ?
Thanks for your help 🙏
The text was updated successfully, but these errors were encountered: