Hi
when I generate a word document with an image example: {logo: CONS!APP_IMAGE} works perfectly, but when I have more than one image in the template. For example logo2 and I call the smart service as follows {logo: CONS!APP_IMAGE, logo2: CON!APP_IMAGE2} I get the following error: freemarker.core.NonSequenceOrCollectionException: The value you try to list is an extended_hash+string (fr.opensagres.xdocreport.document.images.ByteArrayImageProvider wrapped into f.e.b.StringModel), thus you must specify two loop variables after the "as"; one for the key, and another for the value, like <#... as k, v>). ---- FTL stack trace ("~" means nesting-related): - Failed at: #list logo as logo [in template "fr.opensagres.xdocreport.document.docx.DocxReport@7f2dbfc!word/document.xml" at line 4, column 6773]
---- Plugin: Advanced Document Templating
Version: 1.1.0
Smart Service: DOCX From Dynamic Template
Discussion posts and replies are publicly visible
Hello Pablo León Páliz,Could you please share the code part of Logo/Image fro your DOCX template. And how did you define it? have you defined it as a list? I have faced a similar issue but it was resolved when I changed the size of the image block and its positioning. Never understood the exact reason.
Thank you for your reply Konduru. Yes, I defined as a list as follows:
For the first image: «[#list logo as logo]»«[/#list]»
For he second image: «[#list logo1 as logo1]»«[/#list]»
It works when I test it with only one image
images.docx
Might just be a typo but in your original post you have the 2nd logo defined as logo2 but your word doc references logo1.
{logo: CONS!APP_IMAGE, logo2: CON!APP_IMAGE2}
and in your word doc
«[#list logo as logo]» «[/#list]» «[#list logo1 as logo1]» «[/#list]»
Yes, it was a typo in the original post but In the document and Appian it was defined as logo and logo1