Class PDFExporterIText
java.lang.Object
org.ofdrw.converter.export.PDFExporterIText
- All Implemented Interfaces:
Closeable, AutoCloseable, OFDExporter
iText7 实现的OFD转换PDF
- Since:
- 2023-3-7 21:30:40
- Author:
- 权观宇
-
Constructor Summary
ConstructorsConstructorDescriptionPDFExporterIText(InputStream ofdInStream, OutputStream pdfOutStream) 通过流 创建PDF转换器PDFExporterIText(Path ofdFilePath, Path pdfFilePath) 通过文件路径 创建PDF转换器 -
Method Summary
-
Constructor Details
-
PDFExporterIText
通过文件路径 创建PDF转换器- Parameters:
ofdFilePath- 待转换的OFD文件路径pdfFilePath- 生成PDF文件路径- Throws:
IOException- 文件创建失败
-
PDFExporterIText
通过流 创建PDF转换器注意:流由调用者负责关闭!
- Parameters:
ofdInStream- 待转换的OFD文件流,流由调用者负责关闭。pdfOutStream- 生成PDF文件流,流由调用者负责关闭。- Throws:
IOException- 流操作失败
-
-
Method Details
-
export
导出指定OFD页- Specified by:
exportin interfaceOFDExporter- Parameters:
indexes- 页码序列,如果为空表示全部页码(注意:页码从0起)- Throws:
GeneralConvertException- 导出异常
-
close
关闭所有打开的文件并把附件添加到PDF文件中
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- 文件关闭异常
-