public class OfdWriter extends Object implements Serializable, Closeable
Constructor and Description |
---|
OfdWriter(File file)
构造
|
OfdWriter(OutputStream out)
构造
|
OfdWriter(Path file)
构造
|
Modifier and Type | Method and Description |
---|---|
OfdWriter |
add(org.ofdrw.layout.element.Div div)
增加节点
|
OfdWriter |
add(int page,
org.ofdrw.layout.edit.Annotation annotation)
增加注释,比如水印等
|
OfdWriter |
addPicture(File picFile,
int width,
int height)
追加图片
|
OfdWriter |
addPicture(Path picFile,
int width,
int height)
追加图片
|
OfdWriter |
addText(org.ofdrw.font.Font font,
String... texts)
增加文本内容
|
void |
close() |
public OfdWriter(File file)
file
- 生成的文件public OfdWriter(Path file)
file
- 生成的文件public OfdWriter(OutputStream out)
out
- 需要输出的流public OfdWriter addText(org.ofdrw.font.Font font, String... texts)
font
- 字体texts
- 文本public OfdWriter addPicture(File picFile, int width, int height)
picFile
- 图片文件width
- 宽度height
- 高度public OfdWriter addPicture(Path picFile, int width, int height)
picFile
- 图片文件width
- 宽度height
- 高度public OfdWriter add(org.ofdrw.layout.element.Div div)
div
- 节点,可以是段落、Canvas、Img或者填充public OfdWriter add(int page, org.ofdrw.layout.edit.Annotation annotation)
page
- 页码annotation
- 节点,可以是段落、Canvas、Img或者填充public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2024. All rights reserved.