Single picture display: First write the word format of the document, insert a picture in it, then rename to FTL, and then open with the editor, the picture that section of base64 information with Freemarker expression replaced. Then output the image information to the template.
Multiple pictures display: It should be noted that when multiple pictures are displayed, when the list loop, if you do not change the image two properties w:name and ImageData src value, then it will always be called the first image of the address, showing the first picture. To change the two properties W:name and ImageData src methods:
Use the index of the variable individual to change the name of the two attribute, the variable individual index format is "variable name _index", see the following Red Bold font section. < #list images as im> < w:pict > < v:shapetype id = "T75" coordsize = "21600,21600" O:SPT = "page" o:preferrelative = "T" Path = "M@4@5l@4@11@9@11@9@5xe" filled = "F" stroked = "F" > &nbs p; < v:stroke Joinstyle = "miter"/> < V:formulas > &N bsp; < v:f eqn = "if linedrawn pixellinewidth 0"/ > < v:f eqn = "sum @0 1 0"/> < v:f eqn = "sum 0 0 @1"/> & nbsp; < v:f eqn = "Prod @2 1 2"/> & Nbsp; < v:f eqn = "Prod @3 21600 pixelwidth"/> & nbsp; < v:f eqn = "Prod @3 21600 pixelheight"/> < v:f eqn = "sum @0 0 1"/> & nbsp; < v:f eqn = "Prod @6 1 2"/> < v:f eqn = "Prod @7 21600 pixelwidth"/> < v:f eqn = "sum @8 21600 0"/> < v:f eqn = "Prod @7 21600 pixelheight"/> < v:f eqn = "sum @10 21600 0"/> </V: Formulas > < v:path o:extrUsionok = "F" Gradientshapeok = "T" O:connecttype = "rect"/> & Lt o:lock v:ext = "edit" Aspectratio = "T"/> </v:shapetype > &nbs p; < W:bindata w:name= "${" wordml://0200000 "+im_index+1+". jpg "}"Xml:space = "preserve" >${im}</W:bindata > < V:shape id = "Picture" O:spid = "i1025" type = "#t75" St YLE = "Width:414.75pt;height:207.75pt;visibility:visible;mso-wrap-style:square" ><v:imagedata src= "${" wordml://0200000 "+im_index+1+". jpg "}"O:title = "Menu"/> </v:shape > </w:pict > </#list >
Reference: http://www.oschina.net/question/246518_45251 http://bbs.csdn.net/topics/390556319?page=1#post-397392952