Foxit PDF Conversion SDK

Static Public Member Functions | List of all members
PDFConversionSDK.Office2PDF Class Reference

## Static Public Member Functions
static | ConvertFromExcelWithPath (src_excel_file_path, src_file_password, saved_pdf_path, setting_data)
| Convert an Excel format file to a PDF file. More...
static | ConvertFromExcelWithStream (src_excel_reader, src_file_password, saved_pdf_file_stream, setting_data)
| Convert an Excel format file to a PDF file. More...
static | ConvertFromPowerPointWithPath (src_ppt_file_path, src_file_password, saved_pdf_path, setting_data)
| Convert a PowerPoint format file to a PDF file. More...
static | ConvertFromPowerPointWithStream (src_ppt_reader, src_file_password, saved_pdf_file_stream, setting_data)
| Convert a PowerPoint format file to a PDF file. More...
static | ConvertFromWordWithPath (src_word_file_path, src_file_password, saved_pdf_path, setting_data)
| Convert a Word format file to a PDF file. More...
static | ConvertFromWordWithStream (src_word_reader, src_file_password, saved_pdf_file_stream, setting_data)
| Convert a Word format file to a PDF file. More...

## Detailed Description

This class can be used to convert Office(Word, Excel or PowerPoint) format files to PDF files. Before using methods in this module, please ensure Foxit PDF Conversion SDK has been initialized successfully by function PDFConversionSDK.Library.Initialize with a key including "Office2PDF" module.

See also
  PDFConversionSDK.Library

## Member Function Documentation

## ◆ ConvertFromExcelWithPath()

static PDFConversionSDK.Office2PDF.ConvertFromExcelWithPath | ( | src_excel_file_path | ,
|  | src_file_password | ,
|  | saved_pdf_path | ,
|  | setting_data |
| ) |  |
| static

Convert an Excel format file to a PDF file.

Currently,this function is only available for Windows and Linux Desktop (32-bit and 64-bit), and it supports conversion only from XLSX format files.

Parameters

  [in] | src_excel_file_path | Path of an Excel format file. This should not be an empty string.
  [in] | src_file_password | (Reserved,encrypted files are unsupported yet)Password for the input Excel format file. If no password is needed for the file,please pass an empty string.
  [in] | saved_pdf_path | Path of the saved PDF file as conversion result. This should not be an empty string.
  [in] | setting_data | A PDFConversionSDK.Office2PDFSettingData object which is used for converting.

Returns
  true means success, while false means failure.

Note
  If module "Office2PDF" is not defined in the license information which is used in function PDFConversionSDK.Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoOffice2PDFModuleRight.

## ◆ ConvertFromExcelWithStream()

static PDFConversionSDK.Office2PDF.ConvertFromExcelWithStream | ( | src_excel_reader | ,
|  | src_file_password | ,
|  | saved_pdf_file_stream | ,
|  | setting_data |
| ) |  |
| static

Convert an Excel format file to a PDF file.

Currently,this function is only available for Windows and Linux Desktop (32-bit and 64-bit), and it supports conversion only from XLSX format files. The file is read all at once, rather than progressively.

Parameters

  [in] | src_excel_reader | A ReaderCallback object which is implemented by user to load an excel document. It should not be NULL.
  [in] | src_file_password | (Reserved,encrypted files are unsupported yet)Password for the input Word format file. If no password is needed for the file,please pass an empty string.
  [in] | saved_pdf_file_stream | A PDFConversionSDK.StreamCallback object which is implemented by user to read the contents of the converted PDF file. It should not be NULL.
  [in] | setting_data | A PDFConversionSDK.Office2PDFSettingData object which is used for converting.

Returns
  true means success, while false means failure.

Note
  If module "Office2PDF" is not defined in the license information which is used in function PDFConversionSDK.Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoOffice2PDFModuleRight.

## ◆ ConvertFromPowerPointWithPath()

static PDFConversionSDK.Office2PDF.ConvertFromPowerPointWithPath | ( | src_ppt_file_path | ,
|  | src_file_password | ,
|  | saved_pdf_path | ,
|  | setting_data |
| ) |  |
| static

Convert a PowerPoint format file to a PDF file.

Currently,this function is only available for Windows and Linux Desktop (32-bit and 64-bit), and it supports conversion only from PPTX format files.

Parameters

  [in] | src_ppt_file_path | Path of a PowerPoint format file. This should not be an empty string.
  [in] | src_file_password | (Reserved,encrypted files are unsupported yet)Password for the input Excel format file. If no password is needed for the file,please pass an empty string.
  [in] | saved_pdf_path | Path of the saved PDF file as conversion result. This should not be an empty string.
  [in] | setting_data | A PDFConversionSDK.Office2PDFSettingData object which is used for converting.

Returns
  true means success, while false means failure.

Note
  If module "Office2PDF" is not defined in the license information which is used in function PDFConversionSDK.Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoOffice2PDFModuleRight.

## ◆ ConvertFromPowerPointWithStream()

static PDFConversionSDK.Office2PDF.ConvertFromPowerPointWithStream | ( | src_ppt_reader | ,
|  | src_file_password | ,
|  | saved_pdf_file_stream | ,
|  | setting_data |
| ) |  |
| static

Convert a PowerPoint format file to a PDF file.

Currently,this function is only available for Windows and Linux Desktop (32-bit and 64-bit), and it supports conversion only from PPTX format files. The file is read all at once, rather than progressively.

Parameters

  [in] | src_ppt_reader | A ReaderCallback object which is implemented by user to load a ppt document. It should not be NULL.
  [in] | src_file_password | (Reserved,encrypted files are unsupported yet)Password for the input Word format file. If no password is needed for the file,please pass an empty string.
  [in] | saved_pdf_file_stream | A PDFConversionSDK.StreamCallback object which is implemented by user to read the contents of the converted PDF file. It should not be NULL.
  [in] | setting_data | A PDFConversionSDK.Office2PDFSettingData object which is used for converting.

Returns
  true means success, while false means failure.

Note
  If module "Office2PDF" is not defined in the license information which is used in function PDFConversionSDK.Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoOffice2PDFModuleRight.

## ◆ ConvertFromWordWithPath()

static PDFConversionSDK.Office2PDF.ConvertFromWordWithPath | ( | src_word_file_path | ,
|  | src_file_password | ,
|  | saved_pdf_path | ,
|  | setting_data |
| ) |  |
| static

Convert a Word format file to a PDF file.

Currently,this function is only available for Windows and Linux Desktop (32-bit and 64-bit), and it supports conversion only from from DOC and DOCX format files.

Parameters

  [in] | src_word_file_path | Path of a Word format file. This should not be an empty string.
  [in] | src_file_password | (Reserved,encrypted files are unsupported yet)Password for the input Word format file. If no password is needed for the file,please pass an empty string.
  [in] | saved_pdf_path | Path of the saved PDF file as conversion result. This should not be an empty string.
  [in] | setting_data | A PDFConversionSDK.Office2PDFSettingData object which is used for converting.

Returns
  true means success, while false means failure.

Note
  If module "Office2PDF" is not defined in the license information which is used in function PDFConversionSDK.Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoOffice2PDFModuleRight.

## ◆ ConvertFromWordWithStream()

static PDFConversionSDK.Office2PDF.ConvertFromWordWithStream | ( | src_word_reader | ,
|  | src_file_password | ,
|  | saved_pdf_file_stream | ,
|  | setting_data |
| ) |  |
| static

Convert a Word format file to a PDF file.

Currently,this function is only available for Windows and Linux Desktop (32-bit and 64-bit), and it supports conversion only from from DOC and DOCX format files. The file is read all at once, rather than progressively.

Parameters

  [in] | src_word_reader | A ReaderCallback object which is implemented by user to load a word document. It should not be NULL.
  [in] | src_file_password | (Reserved,encrypted files are unsupported yet)Password for the input Word format file. If no password is needed for the file,please pass an empty string.
  [in] | saved_pdf_file_stream | A PDFConversionSDK.StreamCallback object which is implemented by user to read the contents of the converted PDF file. It should not be NULL.
  [in] | setting_data | A PDFConversionSDK.Office2PDFSettingData object which is used for converting.

Returns
  true means success, while false means failure.

Note
  If module "Office2PDF" is not defined in the license information which is used in function PDFConversionSDK.Library.Initialize, that means user has no right in using this function and this function will throw exception PDFConversionSDK.e_ErrNoOffice2PDFModuleRight.