1.需求是这样的:

一个对象可能有图片,也可能没有,在对象有图片的时候输出图片,没有的时候不做处理。

2.新建一个doc文档,另存为Xml文档(2003版本的)。

修改Xml文档:用Freemarker的if标签包住图片那一行,如果不为空显示,否则不做处理。

<#if test.img??>

<w:p wsp:rsidR="00602F11" wsp:rsidRDefault="00602F11">
<w:r wsp:rsidRPr="009527B6"><w:rPr><w:noProof/></w:rPr><w:pict>
<v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/><v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/><v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<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"/>
<o:lock v:ext="edit" aspectratio="t"/></v:shapetype> <w:binData w:name="${"wordml://0200000"+test_index+1+".jpg"}" xml:space="preserve">
${test.img}
</w:binData> <v:shape id="图片 1" o:spid="_x0000_i1025" type="#_x0000_t75" style="width:236pt;height:144.5pt;visibility:visible;mso-wrap-style:square">
<v:imagedata src="${"wordml://0200000"+test_index+1+".jpg"}" o:title=""/>
</v:shape>
</w:pict>
</w:r>
</w:p> </#if>

4.Java测试代码

package Test8;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map; import org.junit.Test; import bean.TestFreemarkerBean;
import freemarker.template.Configuration;
import freemarker.template.Template;
import sun.misc.BASE64Encoder; /**
* 如果图片不为空才显示图片,为空则不显示。
* @author: qlq
* @date : 2017年7月26日下午4:44:59
*/
public class FreeamrkExport { @Test
public void exportSimpleWord() throws Exception {
// 要填充的数据, 注意map的key要和word中${xxx}的xxx一致
Map<String, Object> dataMap = new HashMap<String, Object>(); // Configuration用于读取ftl文件
Configuration configuration = new Configuration();
configuration.setDefaultEncoding("utf-8"); /*
* 以下是两种指定ftl文件所在目录路径的方式, 注意这两种方式都是 指定ftl文件所在目录的路径,而不是ftl文件的路径
*/
// 指定路径的第一种方式(根据某个类的相对路径指定)
configuration.setClassForTemplateLoading(this.getClass(), "");
// 指定路径的第二种方式,我的路径是C:/a.ftl
// configuration.setDirectoryForTemplateLoading(new File("C:/")); List<person> mylist = new ArrayList<person>();
mylist.add(new person("QQQ", getImageStr("C:/Users/liqiang/Desktop/tupian/kdmt.jpg"), "11111111111111"));
mylist.add(new person("QQQ", getImageStr("C:/Users/liqiang/Desktop/tupian/2.jpg"), "11111111111111"));
mylist.add(new person("QQQ", getImageStr("C:/Users/liqiang/Desktop/tupian/1.jpg"), "11111111111111"));
mylist.add(new person("QQQ", getImageStr("C:/Users/liqiang/Desktop/tupian/3.jpg"), "11111111111111"));
mylist.add(new person("QQQ", getImageStr("C:/Users/liqiang/Desktop/tupian/4.jpg"), "11111111111111"));
mylist.add(new person("QQQ", "11111111111111"));
mylist.add(new person("QQQ", "11111111111111"));
dataMap.put("mylist", mylist);
// 输出文档路径及名称
File outFile = new File("F:/test8.doc"); // 以utf-8的编码读取ftl文件
Template t = configuration.getTemplate("test8.ftl", "utf-8");
Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile), "utf-8"), 10240);
t.process(dataMap, out);
out.close();
}
private String getImageStr(String imgFile) throws Exception {
InputStream inputStream = null;
byte []data=null;
inputStream = new FileInputStream(imgFile);
data = new byte[inputStream.available()];
inputStream.read(data);
inputStream .close();
BASE64Encoder encoder = new BASE64Encoder();
return encoder.encode(data); }
}

5.结果:

最后两个img属性为null,则不输出。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlEAAADsCAIAAADb1WQLAAAWfUlEQVR4nO3d2XIb14GA4X6Ffga8Aq4nN1PTF8m4JnEcOHYcObI2SLQkWyQlQhRFUaQoiCv2xg5ia+xcQVKSYzvuZDK5wwvgDfodMBdHQqGIhYRiggbP/xVLRQIHh42+OL+6ATSV1vkzYhEjFqlsJbez6Wo6VU2nqlupcipWy8R3cqnd/FYxES7EQ0YslPBtJHyefDScDYdSAV9GD6ZDgYTPk/B5chHdiEWy4VAuEi4l4+VUopyKF6N6OrCZ073FSGAnFdnbihRCm6n1peTa86K+XolsxlcXIi/nNucmX07dnrvz5YMvP3FP34655zKbS5nNxaz3ZT6wtp0IVuPBbGA9HdjIhjzpwEbSuyr+TfnW4puv4puvtvzrW/71+OarhGcl4VmJb76Kbbi3/O8eUowF82FfNuTJ6d6c7k0HNo1wIB8KZPzeXMif9nsyAW8u5M+Fg9lwMKMHMnog+/77fCRUiAaMiD+++UpfWYptuGMb7qR3NenfSAU82XAgGw7kIkEjpuejoUI8nI+GxI/FRKQQDxvxcCEeLsaClWS4nNDFl5iwEAsVEhHxKCOmixmKiUg5FaumE6Vk1IjphXhY3FLZile24rVMsppOiFv2C9ntbKqWSYobK1vxajqxk9uqppPbmfR2NrOTy+7mc9vZTDW9tZvL7Rq5nXx2J5/dNXL7RaNeLu4Xjb1Cvl4uHlXLB6VC+5a9Qn4nn90r5PeLhhhZLxePa5W3u9vHtep+sXBYKR/Xqq+3a0fVykGpeFgpHVXLR9Xyca1yWCntFw3xb/vhB6WCuPegVNgvGgelgvi94peKweIbMZX45rBSOq5Vj2vVg1JRfB1Wygel4q6Rr2UztWxmr2DUy6W9giG2ZK9g7BcL9XKpXi4dVspH1cpRrXJYKx/WykfbleOd6vFO9bBW3i+9G1Mvlw5Kxf1iYb9YOCgVxdMXmyp2iNiYzm/E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QAAWdA8AIAsaB4AQBY0DwAgC5oHAJAFzQMAyILmAQBkQfMAALKgeQAAWdA8AIAsaB4AQBY0DwAgC5oHAJAFzQMAyILmAQBkQfMAALKgeQAAWdA8AIAsaB4AQBY0DwAgC5oHAJAFzQMAyILmAQBkQfMAALKgeQAAWdA8AIAsaB4AQBY0DwAgC5oHAJAFzQMAyOL/AZFwqv3k7CbPAAAAAElFTkSuQmCC" alt="" />

Freemarker进行非空处理的更多相关文章

  1. freemarker的非空判断

    ${price} 判断非空写法就是 ${(price)!}

  2. select标签非空验证,第一个option value=&quot;&quot;即可

    select标签非空验证,第一个option value=""即可,否则不能验证

  3. JavaWeb 学习008-今日问题(非空验证尚未解决) 2016-12-2

    1. 学生模块list页面 不能正常跳转 说是找不到stuid属性,但是我在entity里面和数据库建表的属性就是stuid:Grade模块代码一样,却可以正常运行 这是什么问题? <c:for ...

  4. 使用mysql 命令行,增加 ,删除 字段 并 设置默认值 及 非空

    使用mysql 命令行,增加 ,删除 字段 并 设置默认值 及 非空 添加 alter table table_name add field_name field_type; 添加,并设置默认值,及非 ...

  5. Oracle数据库,非空约束、主键约束、外键约束、唯一约束

    非空约束:设置列时,可为空默认可为空,去掉对号之后设置数据不可为空: 唯一约束:在键中设置,唯一约束名称.类型Unique.列名:设置应用完成之后,此列数据具有唯一性:即数据不可重复(类型:Uniqu ...

  6. 非空二叉树的一个有趣的性质:n0 = n2 + 1

    对任何非空二叉树T,若n0 表示叶结点的个数.n2 表示度为2 的非叶结点的个数,那么两者满足关系n0 = n2 + 1. 这个性质很有意思,下面我们来证明它. 证明:首先,假设该二叉树有N 个节点, ...

  7. 将src非空的属性注入到des中

    package lizikj.bigwheel.common.vo.merchandise.util; import java.lang.reflect.Field; import lizikj.bi ...

  8. javascript判断非空

    /* *判断非空 * */ function isEmpty(val){ if(val == null)return true; if(val == undefined || val == 'unde ...

  9. phalcon:非空字段不能在beforeCreate赋值,可以改用beforeValidationOnCreate

    phalcon非空字段不能在beforeCreate赋值 碰到了这个问题,不知道什么原因记录一下. 表users: action_act 字段 varchar 10  not null,非空字段, 在 ...

随机推荐

  1. [BigData]关于Hadoop学习笔记第一天(PPT总结)(一)

    适合大数据的分布式存储与计算平台 l作者:Doug Cutting l受Google三篇论文的启发   lApache 官方版本(1.0.4) lCloudera 使用下载最多的版本,稳定,有商业支持 ...

  2. HDOJ --- 1160

    FatMouse's Speed Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  3. 【APP UI 设计模式】(一)APP UI 设计原则和流程

    一.基本原则         1.用户体验原则UCD,以用户为中心去设计         2.设计模式是可重用的设计规范实现         3.反模式是糟糕设计的典型,极力避免使用         ...

  4. ubuntu 修改计算机名

    ubuntu装好系统之后打开终端,命令行前边会有一长串名字,看起来好烦(格式为:用户名@计算机名:~$),所以改计算机名: 需要改两个文件: sudo gedit /etc/hostname sudo ...

  5. 团队项目(六)- Alpha阶段项目复审(江山代有才人秃)

    排名仅代表个人观点: 小组名字 优点 缺点&Bug报告 排名 中午吃啥队 从测试链接来看,作为一个订餐的APP,有着跟现在的订餐APP相似的功能,很完整,是一个踏踏实实做出来的项目 向购物车中 ...

  6. 论文阅读笔记四十五:Region Proposal by Guided Anchoring(CVPR2019)

    论文原址:https://arxiv.org/abs/1901.03278 github:code will be available 摘要 区域anchor是现阶段目标检测方法的重要基石.大多数好的 ...

  7. [UE4]Spline Mesh Actor

    作用: 1.按照Spline设置的轨迹,进行显示网格物体. 曲线模型 一.赋值Static Mesh,任意的Static Mesh都可以. 二.调整方向 三.Spline Mesh Actor有2个端 ...

  8. CF915E Physical Education Lessons 动态开点线段树

    题目链接 CF915E Physical Education Lessons 题解 动态开点线段树 代码 /* 动态开点线段树 */ #include<cstdio> #include&l ...

  9. Linux访问Windows共享目录的方法——smbclient

    之前写过Ubuntu访问Windows共享目录,里面主要介绍如何在GUI上访问windows共享目录. 本文侧重于整理通过命令行访问的方法. 先确保smbclient.ubuntu下可以直接运行下面命 ...

  10. 【BZOJ】【2219】数论之神

    中国剩余定理+原根+扩展欧几里得+BSGS 题解:http://blog.csdn.net/regina8023/article/details/44863519 新技能get√: LL Get_yu ...