public class ImageConverter extends Object implements DocConverter
| 构造器和说明 |
|---|
ImageConverter(OutputStream output)
创建PDF转换OFD转换器
|
ImageConverter(Path ofdPath)
创建PDF转换OFD转换器
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
append(Path filepath,
double width,
double height)
追加图片到新一页
|
void |
close() |
void |
convert(Path filepath,
int... indexes)
新建OFD页面并放入图片
|
void |
setPageSize(PageLayout pageLayout)
设置页面尺寸
|
void |
setPPM(double ppm)
设置图片质量
|
public ImageConverter(Path ofdPath) throws IOException
ofdPath - 转换后的OFD文件路径IOException - 文件解析异常public ImageConverter(OutputStream output) throws IOException
output - 转换后的OFD流IOException - 文件解析异常public void convert(Path filepath, int... indexes) throws GeneralConvertException
convert 在接口中 DocConverterfilepath - 待转换文件路径indexes - 忽略GeneralConvertException - 转换异常public void append(Path filepath, double width, double height)
filepath - 图片文件width - 图片在页面中宽度height - 图片在页面中高度public void setPPM(double ppm)
ppm - 像素每毫米public void setPageSize(PageLayout pageLayout)
pageLayout - 页面尺寸public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2024. All rights reserved.