当前位置:网站首页>Insert picture in freemark
Insert picture in freemark
2022-04-23 05:42:00 【wyazyf】
freemark The picture format in the file is BASE64,
Picture code block in template ,${(img)!} Is a picture variable
<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://02000001.jpg" xml:space="preserve">${(img)!}</w:binData>
<v:shape id="_x0000_i1025" type="#_x0000_t75" style="width:69pt;height:62.25pt">
<v:imagedata src="wordml://02000001.jpg" o:title="timg"/>
</v:shape>
</w:pict>
Generate ${(img)!} Picture variables (BASE64 Format )
public String getEmpAutograph(String filePath) {
String img =null;
if(StringUtils.isNotEmpty(filePath)){
InputStream in = null;
byte[] picdata = null;
try {
in = new FileInputStream(filePath);
picdata = new byte[in.available()];
in.read(picdata);
} catch (Exception e) {
e.printStackTrace();
}finally{
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
BASE64Encoder encoder = new BASE64Encoder();
img = encoder.encode(picdata);
return img;
}else{
return null;
}
}
版权声明
本文为[wyazyf]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230538215293.html
边栏推荐
- CMake基础教程(39)pkgconfig
- 弘玑|数字化时代下,HR如何进行自我变革和组织变革?
- TypeScript interface & type 粗略理解
- Similarities and differences between vector and array (notes)
- Sea Level Anomaly 和 Sea Surface Height Anomaly 的区别
- what is wifi6?
- Arithmetic and logical operations
- Formal parameters, local variables and local static variables
- AcWing 1096. Detailed notes of Dungeon Master (3D BFS) code
- The address value indicated by the pointer and the value of the object indicated by the pointer (learning notes)
猜你喜欢
随机推荐
弘玑Cyclone RPA为国金证券提供技术支撑,超200个业务场景实现流程自动化
STL learning notes 0x0001 (container classification)
On the use of constant pointer and pointer constant -- exercise (record)
Usage and difference of shellexecute, shellexecuteex and winexec in QT
QT displays the specified position and size of the picture
第36期《AtCoder Beginner Contest 248 打比赛总结》
STD:: String implements split
acwing854. Floyd finds the shortest path
Error 2003 (HY000) when Windows connects MySQL: can't connect to MySQL server on 'localhost' (10061)
what is wifi6?
js数字大写方法
世界与个人发展
OSI层常用协议
solidity合约DOS攻击
Hongji | how does HR carry out self change and organizational change in the digital era?
QT compressed folder
Arithmetic and logical operations
Hongji micro classroom | cyclone RPA's "flexible digital employee" actuator
Phlli in a VM node
弘玑|数字化时代下,HR如何进行自我变革和组织变革?




![[the background color changes after clicking a line]](/img/3a/709d47fd3a370d86569fb9b560b403.png)




