Skip to main content
beenav4597
January 23, 2023
Solved

Issue with Docx From Dynamic Template while inserting image.

  • January 23, 2023
  • 1 reply
  • 4 views

Hi Everyone,

I'm using ADT plugin to generate Docx dynamically. I'm using the given adtDocxtemplate (attached) as a sample in my process model. All texts and tables are displaying fine. However, when I use images, it throws 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@29b865ac!word/document.xml" at line 4, column 5608]----"

I'm passing images={logo:pv!document} in the data input tab, where pv!document is an image.

I have also added the bookmark in the hyperlink of the Docx template as suggested in the other discussions. It's still not working.

Can you please let me know where I might be going wrong.

[View:/cfs-file/__key/communityserver-discussions-components-files/11/adtDocxTemplate.docx:0:0] 

Best answer by beenav4597

I was working in community edition. Looks like it's environment issue. In the context of this plugin, looks like community edition doesn't have access to our local file systems to process the image. When I tried in our company dev environment, it worked completely fine.

1 reply

beenav4597
beenav4597AuthorAnswer
January 26, 2023

I was working in community edition. Looks like it's environment issue. In the context of this plugin, looks like community edition doesn't have access to our local file systems to process the image. When I tried in our company dev environment, it worked completely fine.