Foxit PDF Conversion SDK
PDFConversionSDK.PDF2Office Class Reference

Static Public Member Functions

static StartConvertToExcelWithPath (src_pdf_path, src_pdf_password, saved_excel_file_path, setting_data, convert_callback)
 Start to convert a PDF file to a Excel format file. More...
 
static StartConvertToExcelWithStream (src_pdf_reader, src_pdf_password, saved_excel_file_stream, setting_data, convert_callback)
 Start to convert a PDF file to a Excel format file. More...
 
static StartConvertToPowerPointWithPath (src_pdf_path, src_pdf_password, saved_powerpoint_file_path, setting_data, convert_callback)
 Start to convert a PDF file to a PowerPoint format file. More...
 
static StartConvertToPowerPointWithStream (src_pdf_reader, src_pdf_password, saved_ppt_file_stream, setting_data, convert_callback)
 Start to convert a PDF file to a PowerPoint format file. More...
 
static StartConvertToWordWithPath (src_pdf_path, src_pdf_password, saved_word_file_path, setting_data, convert_callback)
 Start to convert a PDF file to a Word format file. More...
 
static StartConvertToWordWithStream (src_pdf_reader, src_pdf_password, saved_word_file_stream, setting_data, convert_callback)
 Start to convert a PDF file to a Word format file. More...
 

Detailed Description

This class can be used to convert PDF files to Office(Word, Excel or PowerPoint) format files. Before using "Conversion" module, please ensure the resource folder named "res" in the PDF Conversion SDK package is valid. Before using methods in this module, please ensure Foxit PDF Conversion SDK has been initialized successfully by function Library.Initialize with a key including "PDF2Office" module.

See also
Library

Member Function Documentation

◆ StartConvertToExcelWithPath()

static PDFConversionSDK.PDF2Office.StartConvertToExcelWithPath ( src_pdf_path  ,
src_pdf_password  ,
saved_excel_file_path  ,
setting_data  ,
convert_callback   
)
static

Start to convert a PDF file to a Excel format file.

Currently only support converting to XLSX format file.

Parameters
[in]src_pdf_pathPath of a PDF file. This should not be an empty string.
[in]src_pdf_passwordPassword for the input PDF file. If no password is needed for the file, please pass an empty string.
[in]saved_excel_file_pathPath of the saved Excel format file as conversion result. This should not be an empty string. If the suffix name of the saved Excel format file is not "xlsx", a new suffix named "xlsx" will be added to the original file name.
[in]setting_dataSetting data used for converting.If the parameter page_range of PDF2OfficeSettingData object is empty, that means convert each page of the PDF file to Word format file.
[in]convert_callbackA PDFConversionSDK.ConvertCallback object which is implemented by user to pause and notify the conversion progress during the converting process. This can be NULL which means not to pause and notify the conversion progress. If this is not NULL, it should be a valid PDFConversionSDK.ConvertCallback object implemented by user. Default value: NULL.
Returns
A progressive object. Please check the rate of current progress by function Progressive.GetRateOfProgress. If the rate is not 100 yet, call function Progressive.Continue to continue the progress until the progress is finished.
Note
If module "PDF2Office" is not defined in the license information which is used in function Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoPDF2OfficeModuleRight.

◆ StartConvertToExcelWithStream()

static PDFConversionSDK.PDF2Office.StartConvertToExcelWithStream ( src_pdf_reader  ,
src_pdf_password  ,
saved_excel_file_stream  ,
setting_data  ,
convert_callback   
)
static

Start to convert a PDF file to a Excel format file.

Currently only support converting to XLSX format file.

Parameters
[in]src_pdf_readerA ReaderCallback object which is implemented by user to load a PDF document. It should not be NULL.
[in]src_pdf_passwordPassword for the input PDF file. If no password is needed for the file, please pass an empty string.
[in]saved_excel_file_streamA StreamCallback object which is implemented by user to read the contents of the converted Excel format file. It should not be NULL.
[in]setting_dataSetting data used for converting.If the parameter page_range of PDF2OfficeSettingData object is empty, that means convert each page of the PDF file to Word format file.
[in]convert_callbackA ConvertCallback object which is implemented by user to pause and notify the conversion progress during the converting process. This can be NULL which means not to pause and notify the conversion progress. If this is not NULL, it should be a valid ConvertCallback object implemented by user. Default value: NULL.
Returns
A progressive object. Please check the rate of current progress by function Progressive.GetRateOfProgress. If the rate is not 100 yet, call function Progressive.Continue to continue the progress until the progress is finished.
Note
If module "PDF2Office" is not defined in the license information which is used in function Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoPDF2OfficeModuleRight.

◆ StartConvertToPowerPointWithPath()

static PDFConversionSDK.PDF2Office.StartConvertToPowerPointWithPath ( src_pdf_path  ,
src_pdf_password  ,
saved_powerpoint_file_path  ,
setting_data  ,
convert_callback   
)
static

Start to convert a PDF file to a PowerPoint format file.

Currently only support converting to PPTX format file.

Parameters
[in]src_pdf_pathPath of a PDF file. This should not be an empty string.
[in]src_pdf_passwordPassword for the input PDF file. If no password is needed for the file, please pass an empty string.
[in]saved_ppt_file_pathPath of the saved PowerPoint format file as conversion result. This should not be an empty string. If the suffix name of the saved PowerPoint format file is not "pptx", a new suffix named "pptx" will be added to the original file name.
[in]setting_dataSetting data used for converting.If the parameter page_range of PDF2OfficeSettingData object is empty, that means convert each page of the PDF file to Word format file.
[in]convert_callbackA PDFConversionSDK.ConvertCallback object which is implemented by user to pause and notify the conversion progress during the converting process. This can be NULL which means not to pause and notify the conversion progress. If this is not NULL, it should be a valid PDFConversionSDK.ConvertCallback object implemented by user. Default value: NULL.
Returns
A progressive object. Please check the rate of current progress by function Progressive.GetRateOfProgress. If the rate is not 100 yet, call function Progressive.Continue to continue the progress until the progress is finished.
Note
If module "PDF2Office" is not defined in the license information which is used in function Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoPDF2OfficeModuleRight.

◆ StartConvertToPowerPointWithStream()

static PDFConversionSDK.PDF2Office.StartConvertToPowerPointWithStream ( src_pdf_reader  ,
src_pdf_password  ,
saved_ppt_file_stream  ,
setting_data  ,
convert_callback   
)
static

Start to convert a PDF file to a PowerPoint format file.

Currently only support converting to PPTX format file.

Parameters
[in]src_pdf_readerA ReaderCallback object which is implemented by user to load a PDF document. It should not be NULL.
[in]src_pdf_passwordPassword for the input PDF file. If no password is needed for the file, please pass an empty string.
[in]saved_ppt_file_streamA StreamCallback object which is implemented by user to read the contents of the converted PowerPoint format file. It should not be NULL.
[in]setting_dataSetting data used for converting.If the parameter page_range of PDF2OfficeSettingData object is empty, that means convert each page of the PDF file to Word format file.
[in]convert_callbackA ConvertCallback object which is implemented by user to pause and notify the conversion progress during the converting process. This can be NULL which means not to pause and notify the conversion progress. If this is not NULL, it should be a valid ConvertCallback object implemented by user. Default value: NULL.
Returns
A progressive object. Please check the rate of current progress by function Progressive.GetRateOfProgress. If the rate is not 100 yet, call function Progressive.Continue to continue the progress until the progress is finished.
Note
If module "PDF2Office" is not defined in the license information which is used in function Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoPDF2OfficeModuleRight.

◆ StartConvertToWordWithPath()

static PDFConversionSDK.PDF2Office.StartConvertToWordWithPath ( src_pdf_path  ,
src_pdf_password  ,
saved_word_file_path  ,
setting_data  ,
convert_callback   
)
static

Start to convert a PDF file to a Word format file.

Currently only support converting to DOCX format file. This function supports the identification of headings in PDF documents and converts them into Word documents. Currently, the headings conversion is still in beta and will be further improved in subsequent versions.

Parameters
[in]src_pdf_pathPath of a PDF file. This should not be an empty string.
[in]src_pdf_passwordPassword for the input PDF file. If no password is needed for the file, please pass an empty string.
[in]saved_word_file_pathPath of the saved Word format file as conversion result. This should not be an empty string. If the suffix name of the saved Word format file is not "docx", a new suffix named "docx" will be added to the original file name.
[in]setting_dataSetting data used for converting.If the parameter page_range of PDF2OfficeSettingData object is empty, that means convert each page of the PDF file to Word format file.
[in]convert_callbackA PDFConversionSDK.ConvertCallback object which is implemented by user to pause and notify the conversion progress during the converting process. This can be NULL which means not to pause and notify the conversion progress. If this is not NULL, it should be a valid PDFConversionSDK.ConvertCallback object implemented by user. Default value: NULL.
Returns
A progressive object. Please check the rate of current progress by function Progressive.GetRateOfProgress. If the rate is not 100 yet, call function Progressive.Continue to continue the progress until the progress is finished.
Note
If module "PDF2Office" is not defined in the license information which is used in function Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoPDF2OfficeModuleRight.

◆ StartConvertToWordWithStream()

static PDFConversionSDK.PDF2Office.StartConvertToWordWithStream ( src_pdf_reader  ,
src_pdf_password  ,
saved_word_file_stream  ,
setting_data  ,
convert_callback   
)
static

Start to convert a PDF file to a Word format file.

Currently only support converting to DOCX format file. This function supports the identification of headings in PDF documents and converts them into Word documents. Currently, the headings conversion is still in beta and will be further improved in subsequent versions.

Parameters
[in]src_pdf_readerA ReaderCallback object which is implemented by user to load a PDF document. It should not be NULL.
[in]src_pdf_passwordPassword for the input PDF file. If no password is needed for the file, please pass an empty string.
[in]saved_word_file_streamA StreamCallback object which is implemented by user to read the contents of the converted Word format file. It should not be NULL.
[in]setting_dataSetting data used for converting.If the parameter page_range of PDF2OfficeSettingData object is empty, that means convert each page of the PDF file to Word format file.
[in]convert_callbackA ConvertCallback object which is implemented by user to pause and notify the conversion progress during the converting process. This can be NULL which means not to pause and notify the conversion progress. If this is not NULL, it should be a valid ConvertCallback object implemented by user. Default value: NULL.
Returns
A progressive object. Please check the rate of current progress by function Progressive.GetRateOfProgress. If the rate is not 100 yet, call function Progressive.Continue to continue the progress until the progress is finished..
Note
If module "PDF2Office" is not defined in the license information which is used in function Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoPDF2OfficeModuleRight.