public class ImageExporter extends Object implements OFDExporter
| 构造器和说明 |
|---|
ImageExporter(InputStream ofdInput,
Path imgDirPath)
构造图片转换器
|
ImageExporter(InputStream ofdInput,
Path imgDirPath,
String imageType,
double ppm)
构造图片转换器
|
ImageExporter(Path ofdFilePath,
Path imgDirPath)
构造图片转换器
|
ImageExporter(Path ofdFilePath,
Path imgDirPath,
String imageType,
double ppm)
构造图片转换器
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
export(int... indexes)
导出指定OFD页为图片
|
String |
getImageType()
获取转换图片类型
|
List<Path> |
getImgFilePaths()
获取已经转换完成的页面的图片路径
|
void |
setPPM(double ppm)
设置转换图片质量
请在调用
export(int...) |
public ImageExporter(Path ofdFilePath, Path imgDirPath) throws IOException
ofdFilePath - 待转换OFD文件imgDirPath - 生成图片存放目录IOException - 文件解析异常public ImageExporter(InputStream ofdInput, Path imgDirPath) throws IOException
ofdInput - 待转换OFD文件流,该流由调用者负责关闭imgDirPath - 生成图片存放目录IOException - 文件解析异常public ImageExporter(Path ofdFilePath, Path imgDirPath, String imageType, double ppm) throws IOException
ofdFilePath - 待转换OFD文件imgDirPath - 生成图片存放目录imageType - 生成图片的格式,如 JPG、PNG、GIF、BMPppm - 转换图片质量,每毫米像素数量(Pixels per millimeter)IOException - 文件解析异常public ImageExporter(InputStream ofdInput, Path imgDirPath, String imageType, double ppm) throws IOException
ofdInput - 待转换OFD文件流,该文件流由调用者负责关闭imgDirPath - 生成图片存放目录imageType - 生成图片的格式,如 JPG、PNG、GIF、BMPppm - 转换图片质量,每毫米像素数量(Pixels per millimeter)IOException - 文件解析异常public void export(int... indexes)
throws GeneralConvertException
export 在接口中 OFDExporterindexes - 页码序列,如果为空表示全部页码(注意:页码从0起)GeneralConvertException - 转换异常public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic String getImageType()
public void setPPM(double ppm)
请在调用 export(int...) 方法之前设置PPM!
ppm - 每毫米像素数量(Pixels per millimeter)Copyright © 2024. All rights reserved.