public class ImageExporter extends Object implements OFDExporter
| Constructor and Description |
|---|
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)
构造图片转换器
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
export(int... indexes)
导出指定OFD页为图片
|
String |
getImageType()
获取转换图片类型
|
List<Path> |
getImgFilePaths()
获取已经转换完成的页面的图片路径
|
void |
setPPM(double ppm)
设置转换图片质量
|
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 in interface OFDExporterindexes - 页码序列,如果为空表示全部页码(注意:页码从0起)GeneralConvertException - 转换异常public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic String getImageType()
public void setPPM(double ppm)
请在调用 export(int...) 方法之前设置PPM!
ppm - 每毫米像素数量(Pixels per millimeter)Copyright © 2026. All rights reserved.