public class DocConverterUtil extends Object
ofdrw-converter
文档转换,提供:
具体见:https://toscode.gitee.com/ofdrw/ofdrw/blob/master/ofdrw-converter/doc/CONVERTER.md
Constructor and Description |
---|
DocConverterUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
imgToOfd(Path target,
Path... images)
多个图片转为ODF
|
static void |
odfToHtml(Path src,
Path targetPath)
OFD转HTML
|
static void |
odfToImage(Path src,
Path targetDir,
String imgType,
double ppm)
OFD转图片
|
static void |
odfToPdf(Path src,
Path targetPath)
OFD转PDF
|
static void |
odfToText(Path src,
Path targetPath)
OFD转文本
|
static void |
pdfToOfd(Path src,
Path target,
int... pages)
PDF转为ODF
|
static void |
textToOfd(Path src,
Path target,
double fontSize)
纯文本转为ODF
|
public static void pdfToOfd(Path src, Path target, int... pages)
src
- PDF文件路径target
- OFD文件路径pages
- 页码,(从0起)public static void textToOfd(Path src, Path target, double fontSize)
src
- 纯文件路径target
- OFD文件路径fontSize
- 字体大小public static void imgToOfd(Path target, Path... images)
target
- OFD文件路径images
- 图片列表public static void odfToImage(Path src, Path targetDir, String imgType, double ppm)
src
- ODF路径targetDir
- 生成图片存放目录imgType
- 生成图片的格式,如 JPG、PNG、GIF、BMP、SVGppm
- 转换图片质量,每毫米像素数量(Pixels per millimeter)public static void odfToHtml(Path src, Path targetPath)
src
- ODF路径targetPath
- 生成HTML路径public static void odfToText(Path src, Path targetPath)
src
- ODF路径targetPath
- 生成文本路径Copyright © 2025. All rights reserved.