Foxit PDF Conversion SDK
PDFConversionSDK::Office2PDF类 参考

静态 Public 成员函数

static ConvertFromExcelWithPath (src_excel_file_path, src_file_password, saved_pdf_path, setting_data)
 将 Excel 格式文件转换为 PDF 文件。 更多...
 
static ConvertFromExcelWithStream (src_excel_reader, src_file_password, saved_pdf_file_stream, setting_data)
 将 Excel 格式文件转换为 PDF 文件。 更多...
 
static ConvertFromPowerPointWithPath (src_ppt_file_path, src_file_password, saved_pdf_path, setting_data)
 将 PowerPoint 格式文件转换为 PDF 文件。 更多...
 
static ConvertFromPowerPointWithStream (src_ppt_reader, src_file_password, saved_pdf_file_stream, setting_data)
 将 PowerPoint 格式文件转换为 PDF 文件。 更多...
 
static ConvertFromWordWithPath (src_word_file_path, src_file_password, saved_pdf_path, setting_data)
 将 Word 格式文件转换为 PDF 文件。 更多...
 
static ConvertFromWordWithStream (src_word_reader, src_file_password, saved_pdf_file_stream, setting_data)
 将 Word 格式文件转换为 PDF 文件。 更多...
 

详细描述

此类可用于将 Office(Word、Excel 或 PowerPoint)格式文件转换为 PDF 文件。 在使用此模块中的方法之前,请确保已通过函数 PDFConversionSDK.Library.Initialize 使用包含“Office2PDF”模块的密钥成功初始化 Foxit PDF Conversion SDK。

参见
PDFConversionSDK.Library

成员函数说明

◆ ConvertFromExcelWithPath()

static PDFConversionSDK::Office2PDF::ConvertFromExcelWithPath ( src_excel_file_path  ,
src_file_password  ,
saved_pdf_path  ,
setting_data   
)
static

将 Excel 格式文件转换为 PDF 文件。

目前,此函数仅适用于 Windows 和 Linux 桌面版(32 位和 64 位),并且仅支持从 XLSX 格式文件转换。

参数
[in]src_excel_file_pathExcel 格式文件的路径。不应为空字符串。
[in]src_file_password(保留,尚不支持加密文件)输入 Excel 格式文件的密码。 如果文件不需要密码,请传递空字符串。
[in]saved_pdf_path作为转换结果保存的 PDF 文件的路径。不应为空字符串。
[in]setting_data用于转换的 PDFConversionSDK.Office2PDFSettingData 对象。
返回
true 表示成功,false 表示失败。
注解
如果在函数 PDFConversionSDK.Library.Initialize 中使用的许可证信息中未定义模块“Office2PDF”, 则表示用户没有使用此函数的权限,此函数将抛出异常 PDFConversionSDK.e_ErrNoOffice2PDFModuleRight

◆ ConvertFromExcelWithStream()

static PDFConversionSDK::Office2PDF::ConvertFromExcelWithStream ( src_excel_reader  ,
src_file_password  ,
saved_pdf_file_stream  ,
setting_data   
)
static

将 Excel 格式文件转换为 PDF 文件。

目前,此函数仅适用于 Windows 和 Linux 桌面版(32 位和 64 位),并且仅支持从 XLSX 格式文件转换。 文件是一次性读取的,而不是渐进式的。

参数
[in]src_excel_reader由用户实现的 ReaderCallback 对象,用于 加载 Excel 文档。不应为 NULL
[in]src_file_password(保留,尚不支持加密文件)输入 Word 格式文件的密码。 如果文件不需要密码,请传递空字符串。
[in]saved_pdf_file_stream由用户实现的 PDFConversionSDK.StreamCallback 对象, 用于读取转换后的 PDF 文件的内容。不应为 NULL
[in]setting_data用于转换的 PDFConversionSDK.Office2PDFSettingData 对象。
返回
true 表示成功,false 表示失败。
注解
如果在函数 PDFConversionSDK.Library.Initialize 中使用的许可证信息中未定义模块“Office2PDF”, 则表示用户没有使用此函数的权限,此函数将抛出异常 PDFConversionSDK.e_ErrNoOffice2PDFModuleRight

◆ ConvertFromPowerPointWithPath()

static PDFConversionSDK::Office2PDF::ConvertFromPowerPointWithPath ( src_ppt_file_path  ,
src_file_password  ,
saved_pdf_path  ,
setting_data   
)
static

将 PowerPoint 格式文件转换为 PDF 文件。

目前,此函数仅适用于 Windows 和 Linux 桌面版(32 位和 64 位),并且仅支持从 PPTX 格式文件转换。

参数
[in]src_ppt_file_pathPowerPoint 格式文件的路径。不应为空字符串。
[in]src_file_password(保留,尚不支持加密文件)输入 Excel 格式文件的密码。 如果文件不需要密码,请传递空字符串。
[in]saved_pdf_path作为转换结果保存的 PDF 文件的路径。不应为空字符串。
[in]setting_data用于转换的 PDFConversionSDK.Office2PDFSettingData 对象。
返回
true 表示成功,false 表示失败。
注解
如果在函数 PDFConversionSDK.Library.Initialize 中使用的许可证信息中未定义模块“Office2PDF”, 则表示用户没有使用此函数的权限,此函数将抛出异常 PDFConversionSDK.e_ErrNoOffice2PDFModuleRight

◆ ConvertFromPowerPointWithStream()

static PDFConversionSDK::Office2PDF::ConvertFromPowerPointWithStream ( src_ppt_reader  ,
src_file_password  ,
saved_pdf_file_stream  ,
setting_data   
)
static

将 PowerPoint 格式文件转换为 PDF 文件。

目前,此函数仅适用于 Windows 和 Linux 桌面版(32 位和 64 位),并且仅支持从 PPTX 格式文件转换。 文件是一次性读取的,而不是渐进式的。

参数
[in]src_ppt_reader由用户实现的 ReaderCallback 对象,用于 加载 PPT 文档。不应为 NULL
[in]src_file_password(保留,尚不支持加密文件)输入 Word 格式文件的密码。 如果文件不需要密码,请传递空字符串。
[in]saved_pdf_file_stream由用户实现的 PDFConversionSDK.StreamCallback 对象, 用于读取转换后的 PDF 文件的内容。不应为 NULL
[in]setting_data用于转换的 PDFConversionSDK.Office2PDFSettingData 对象。
返回
true 表示成功,false 表示失败。
注解
如果在函数 PDFConversionSDK.Library.Initialize 中使用的许可证信息中未定义模块“Office2PDF”, 则表示用户没有使用此函数的权限,此函数将抛出异常 PDFConversionSDK.e_ErrNoOffice2PDFModuleRight

◆ ConvertFromWordWithPath()

static PDFConversionSDK::Office2PDF::ConvertFromWordWithPath ( src_word_file_path  ,
src_file_password  ,
saved_pdf_path  ,
setting_data   
)
static

将 Word 格式文件转换为 PDF 文件。

目前,此函数仅适用于 Windows 和 Linux 桌面版(32 位和 64 位),并且仅支持从 DOC 和 DOCX 格式文件转换。

参数
[in]src_word_file_pathWord 格式文件的路径。不应为空字符串。
[in]src_file_password(保留,尚不支持加密文件)输入 Word 格式文件的密码。 如果文件不需要密码,请传递空字符串。
[in]saved_pdf_path作为转换结果保存的 PDF 文件的路径。不应为空字符串。
[in]setting_data用于转换的 PDFConversionSDK.Office2PDFSettingData 对象。
返回
true 表示成功,false 表示失败。
注解
如果在函数 PDFConversionSDK.Library.Initialize 中使用的许可证信息中未定义模块“Office2PDF”, 则表示用户没有使用此函数的权限,此函数将抛出异常 PDFConversionSDK.e_ErrNoOffice2PDFModuleRight

◆ ConvertFromWordWithStream()

static PDFConversionSDK::Office2PDF::ConvertFromWordWithStream ( src_word_reader  ,
src_file_password  ,
saved_pdf_file_stream  ,
setting_data   
)
static

将 Word 格式文件转换为 PDF 文件。

目前,此函数仅适用于 Windows 和 Linux 桌面版(32 位和 64 位),并且仅支持从 DOC 和 DOCX 格式文件转换。 文件是一次性读取的,而不是渐进式的。

参数
[in]src_word_reader由用户实现的 ReaderCallback 对象,用于 加载 Word 文档。不应为 NULL
[in]src_file_password(保留,尚不支持加密文件)输入 Word 格式文件的密码。 如果文件不需要密码,请传递空字符串。
[in]saved_pdf_file_stream由用户实现的 PDFConversionSDK.StreamCallback 对象, 用于读取转换后的 PDF 文件的内容。不应为 NULL
[in]setting_data用于转换的 PDFConversionSDK.Office2PDFSettingData 对象。
返回
true 表示成功,false 表示失败。
注解
如果在函数 PDFConversionSDK.Library.Initialize 中使用的许可证信息中未定义模块“Office2PDF”, 则表示用户没有使用此函数的权限,此函数将抛出异常 PDFConversionSDK.e_ErrNoOffice2PDFModuleRight