Class ConvertHelper
java.lang.Object
org.ofdrw.converter.ConvertHelper
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated.static voidOFD转HTMLstatic void转HTMLstatic voidtoPdf(InputStream input, File output) 转PDFstatic voidtoPdf(InputStream input, OutputStream output) 转PDFstatic voidtoPdf(InputStream input, String output) 转PDFstatic void转PDF,源文件目录为已经解压的OFD根目录static void转PDFstatic voidtoPdf(Path input, OutputStream output) 转PDFstatic void转PDFstatic voiduseIText()使用iText作为转换实现static void使用PDFBox作为转换实现
-
Field Details
-
lib
转换使用库名称
-
-
Constructor Details
-
ConvertHelper
public ConvertHelper()
-
-
Method Details
-
useIText
public static void useIText()使用iText作为转换实现 -
usePDFBox
public static void usePDFBox()使用PDFBox作为转换实现 -
ofd2pdf
Deprecated.不建议使用该方法,建议使用toPdf(Path, Path)系列明确参数方法。OFD转换PDF- Parameters:
input- OFD文件路径,支持OutputStream、Path、String(文件路径)output- PDF输出流,支持OutputStream、Path、File、String(文件路径)- Throws:
IllegalArgumentException- 参数错误GeneralConvertException- 文档转换过程中异常
-
toPdf
转PDF- Parameters:
input- OFD输入流output- PDF输出流- Throws:
IllegalArgumentException- 参数错误GeneralConvertException- 文档转换过程中异常
-
toPdf
转PDF- Parameters:
input- OFD输入流output- PDF输出文件- Throws:
IllegalArgumentException- 参数错误GeneralConvertException- 文档转换过程中异常
-
toPdf
转PDF- Parameters:
input- OFD输入流output- PDF输出文件路径- Throws:
IllegalArgumentException- 参数错误GeneralConvertException- 文档转换过程中异常
-
toPdf
转PDF- Parameters:
input- OFD输入文件output- PDF输出流- Throws:
IllegalArgumentException- 参数错误GeneralConvertException- 文档转换过程中异常
-
toPdf
转PDF- Parameters:
input- OFD输入文件output- PDF输出文件- Throws:
IllegalArgumentException- 参数错误GeneralConvertException- 文档转换过程中异常
-
toPdf
转PDF- Parameters:
input- OFD输入文件output- PDF输出文件路径- Throws:
IllegalArgumentException- 参数错误GeneralConvertException- 文档转换过程中异常
-
toPdf
-
toHtml
转HTML需要手动关闭外部Reader
- Parameters:
ofdReader- OFD输入文件,OFDReader应该由外部关闭output- HTML输出文件路径screenWidth- 页面宽度,或者屏幕宽度- Throws:
IOException- 文件处理异常
-
toHtml
OFD转HTML- Parameters:
ofdIn- OFD文件路径htmlOut- HTML输出文件路径screenWidth- 页面宽度,或者屏幕宽度- Throws:
IOException- 文件处理异常
-
toPdf(Path, Path)系列明确参数方法。