Package org.miaixz.bus.office.ofd
Class OfdWriter
java.lang.Object
org.miaixz.bus.office.ofd.OfdWriter
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
OFD文件生成器
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(int page, org.ofdrw.layout.edit.Annotation annotation) 增加注释,比如水印等add(org.ofdrw.layout.element.Div div) 增加节点addPicture(File picFile, int width, int height) 追加图片addPicture(Path picFile, int width, int height) 追加图片增加文本内容voidclose()
-
Constructor Details
-
OfdWriter
构造- Parameters:
file- 生成的文件
-
OfdWriter
构造- Parameters:
file- 生成的文件
-
OfdWriter
构造- Parameters:
out- 需要输出的流
-
-
Method Details
-
addText
增加文本内容- Parameters:
font- 字体texts- 文本- Returns:
- this
-
addPicture
追加图片- Parameters:
picFile- 图片文件width- 宽度height- 高度- Returns:
- this
-
addPicture
追加图片- Parameters:
picFile- 图片文件width- 宽度height- 高度- Returns:
- this
-
add
增加节点- Parameters:
div- 节点,可以是段落、Canvas、Img或者填充- Returns:
- this
-
add
增加注释,比如水印等- Parameters:
page- 页码annotation- 节点,可以是段落、Canvas、Img或者填充- Returns:
- this
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-