public class PDFExporterPDFBox extends Object implements OFDExporter
| 构造器和说明 |
|---|
PDFExporterPDFBox(InputStream ofdInStream,
OutputStream pdfOutStream)
通过流 创建PDF转换器
注意:流由调用者负责关闭!
|
PDFExporterPDFBox(Path ofdFilePath,
Path pdfFilePath)
通过文件路径 创建PDF转换器
|
public PDFExporterPDFBox(Path ofdFilePath, Path pdfFilePath) throws IOException
ofdFilePath - 待转换的OFD文件路径pdfFilePath - 生成PDF文件路径IOException - 文件创建失败public PDFExporterPDFBox(InputStream ofdInStream, OutputStream pdfOutStream) throws IOException
注意:流由调用者负责关闭!
ofdInStream - 待转换的OFD文件流,流由调用者负责关闭。pdfOutStream - 生成PDF文件流,流由调用者负责关闭。IOException - 流操作失败public void export(int... indexes)
throws GeneralConvertException
export 在接口中 OFDExporterindexes - 页码序列,如果为空表示全部页码(注意:页码从0起)GeneralConvertException - 导出异常public void close()
throws IOException
并把附件添加到PDF文件中
close 在接口中 Closeableclose 在接口中 AutoCloseableIOException - 文件关闭异常Copyright © 2024. All rights reserved.