fix pic for word

This commit is contained in:
Looly
2020-03-20 09:21:18 +08:00
parent 249f20d0ed
commit 81c2850cfc
6 changed files with 74 additions and 7 deletions

View File

@@ -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();
}
}