java根据模板生成word 带图,xml模板图片注意标签处理

       循环给word插入图片

       <#if image??>
      <#list image as bean>
      <w:p>
        <w:pPr>
          <w:ind w:first-line="420" w:first-line-chars="0"/>
          <w:jc w:val="left"/>
          <w:rPr>
            <w:rFonts w:hint="fareast"/>
            <w:lang w:val="EN-US" w:fareast="ZH-CN"/>
          </w:rPr>
        </w:pPr>
        <w:r>
          <w:rPr>
            <w:rFonts w:hint="fareast"/>
            <w:lang w:val="EN-US" w:fareast="ZH-CN"/>
          </w:rPr>
           <w:pict>
            <w:binData w:name="${" wordml://0200000"+bean.im_index+".png"}" xml:space="preserve">
            ${bean.image1}
            </w:binData>   
            <v:shape id="_x0000_s1026" o:spt="75" alt="img" type="#_x0000_t75" style="width:450.25pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600">
            <v:path/> 
            <v:fill on="f" focussize="0,0"/>
            <v:stroke on="f"/>
            <v:imagedata src="${" wordml://0200000"+bean.im_index+".png"}" o:title="img"/>
            <o:lock v:ext="edit" aspectratio="t"/> 
            <w10:wrap type="none"/>
            <w10:anchorlock/>
            </v:shape> 
            </w:pict> 
        </w:r>
      </w:p>
      </#list>
      </#if>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值