Chart as Images into docxtemplater
is it possible to render a chart with jsreport, write it into the sampled data object (Base64 encoded) and use it in a second step for docxtemplater (with the Image Module)?
This could work maybe...
Create a separate template rendering chart into image using
Then create a beforeRender script hook attached to the main docxtemplater template. There invoke the rendering of the chart template
Use the result buffer, convert it to the base64 and pass it to the
req.datain the format expected by docxtemplater.
Thank you! This was the solution for my problem. You need the commercial version of docxtemplater, but it works in the online demo.