Hi all,
I am trying to generate dynamically images within a dynamic grid on a Word template with the dynamic template smart service.
The requirement is to have a different image on each row depending on other values of that row (for instance a "Green / Approved" logo, "Red / Rejected" one, etc.
Using a dynamic list of images doesn't work, the list will just get duplicated on each row.
Passing an array of images for the bookmark image in the template row is generating the following error:
freemarker.template.TemplateModelException: Method "public fr.opensagres.xdocreport.document.images.ImageProviderInfo fr.opensagres.xdocreport.document.images.AbstractImageRegistry.registerImage(java.lang.Object,java.lang.String,fr.opensagres.xdocreport.template.IContext) throws fr.opensagres.xdocreport.core.XDocReportException,java.io.IOException" threw an exception when invoked on fr.opensagres.xdocreport.document.docx.images.DocxImageRegistry object "fr.opensagres.xdocreport.document.docx.images.DocxImageRegistry@3c1f38ae". See cause exception.The failing instruction:==> #assign ___imageInfo = ___ImageRegist... [in template "fr.opensagres.xdocreport.document.docx.DocxReport@5ab2eb91!word/document.xml" at line 4, column 161984]
Does anybody have experience with such case and if so what approach did you used?
Thanks in advance!
Olivier
Discussion posts and replies are publicly visible
Hi Oliverd388, did you solved it?
Hi pierpaolol0001, unfortunately no we didn't find a technical solution to enable the adding of image dynamically per row, so we decided to go for an approach without images.
Hello,
any solution for this issue? please advice
I got the same issue. My issue was the bookmark added was not for the image placeholder. Please see whether this works for you. Open the template, go to bookmark and click on the book mark and press go to. See whether it is taking you to the image placeholder. for me it was not. For correcting this, I have added bookmark to the image. it worked.