mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix pic for word
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cn.hutool.poi.word.test;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.io.File;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
@@ -21,4 +22,15 @@ public class WordWriterTest {
|
||||
writer.close();
|
||||
Console.log("OK");
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Ignore
|
||||
public void writePicTest() {
|
||||
Word07Writer writer = new Word07Writer();
|
||||
writer.addPicture(new File("d:\\test\\qrcodeCustom.jpg"), 100, 200);
|
||||
// 写出到文件
|
||||
writer.flush(FileUtil.file("d:/test/writePic.docx"));
|
||||
// 关闭
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user