public class SVGExporter extends Object implements OFDExporter
| Constructor and Description |
|---|
SVGExporter(InputStream ofdInput,
Path imgDirPath)
构造图片转换器
|
SVGExporter(InputStream ofdInput,
Path imgDirPath,
double ppm)
构造图片转换器
|
SVGExporter(Path ofdFilePath,
Path imgDirPath)
构造图片转换器
|
SVGExporter(Path ofdFilePath,
Path imgDirPath,
double ppm)
构造图片转换器
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
export(int... indexes)
导出指定OFD页为SVG
|
List<Path> |
getSvgFilePaths()
获取已经转换完成的页面的图片路径
|
void |
setPPM(double ppm)
设置转换SVG质量
|
public SVGExporter(Path ofdFilePath, Path imgDirPath) throws IOException
ofdFilePath - 待转换OFD文件imgDirPath - 生成SVG存放目录IOException - 文件解析异常public SVGExporter(InputStream ofdInput, Path imgDirPath) throws IOException
ofdInput - 待转换OFD文件流,该流由调用者负责关闭imgDirPath - 生成SVG存放目录IOException - 文件解析异常public SVGExporter(Path ofdFilePath, Path imgDirPath, double ppm) throws IOException
ofdFilePath - 待转换OFD文件imgDirPath - 生成SVG存放目录ppm - 转换SVG质量,每毫米像素数量(Pixels per millimeter)IOException - 文件解析异常public SVGExporter(InputStream ofdInput, Path imgDirPath, double ppm) throws IOException
ofdInput - 待转换OFD文件流,该文件流由调用者负责关闭imgDirPath - 生成SVG存放目录ppm - 转换SVG质量,每毫米像素数量(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 void setPPM(double ppm)
请在调用 export(int...) 方法之前设置PPM!
ppm - 每毫米像素数量(Pixels per millimeter)Copyright © 2026. All rights reserved.