Foxit PDF SDK
|
Static Public Member Functions | |
static | FromDWG (engine_pat, src_dwg_path, saved_pdf_path, settings) |
Convert a DWG format file to a PDF file. More... | |
static | FromExcel (src_excel_file_path, src_file_password, saved_pdf_path, engine_path, setting_data) |
Convert an Excel format file to a PDF file. More... | |
static | FromExcel (src_excel_file_path, src_file_password, saved_pdf_path, setting_data) |
Convert an Excel format file to a PDF file. More... | |
static | FromHTML (src_html, engine_path, cookies_path, setting_data, saved_pdf_path, timeout) |
Convert a HTML format file or a URL of a Web page to a PDF file. More... | |
static | FromHTML (src_html, engine_path, cookies_reader, setting_data, saved_pdf_filestream, timeout) |
Convert a HTML format file or a URL of a Web page to a PDF file. More... | |
static | FromHTML (src_html, engine_path, cookies_reader, setting_data, saved_pdf_path, timeout) |
Convert a HTML format file or a URL of a Web page to a PDF file. More... | |
static | FromHTML (src_html, html2pdf_related_resource_array, engine_path, cookies_reader, setting_data, saved_pdf_filestream, timeout) |
Convert a HTML format file or a URL of a Web page to a PDF file. More... | |
static | FromImage (file_reader, saved_pdf_filestream) |
Convert a Image format file to a PDF file. More... | |
static | FromImage (src_img, saved_pdf_path) |
Convert a Image format file to a PDF file. More... | |
static | FromOFD (src_ofd_path, password, saved_pdf_file_path, OFDConvertParam) |
Convert OFD file to PDF file. More... | |
static | FromPowerPoint (src_ppt_file_path, src_file_password, saved_pdf_path, engine_path, setting_data) |
Convert a PowerPoint format file to a PDF file. More... | |
static | FromPowerPoint (src_ppt_file_path, src_file_password, saved_pdf_path, setting_data) |
Convert a PowerPoint format file to a PDF file. More... | |
static | FromTXT (src_txt, saved_pdf_path, setting_data) |
Convert a TXT format file to a PDF file. More... | |
static | FromWord (src_word_file_path, src_file_password, saved_pdf_path, engine_path, setting_data) |
Convert a Word format file to a PDF file. More... | |
static | FromWord (src_word_file_path, src_file_password, saved_pdf_path, setting_data) |
Convert a Word format file to a PDF file. More... | |
static | ToOFD (src_pdf_path, password, saved_ofd_file_path, convert_param) |
Convert PDF file to OFD file. More... | |
static | ToXML (src_pdf_path, src_file_password, saved_xml_path, saved_image_folder_path, is_force_to_tagged_pdf) |
Convert a PDF file to a XML format file. More... | |
Conversion add-on module can be used to do some conversion between PDF file and other file formats. Before using "Conversion" module, user should first prepare font resource folder as described in "Foxit PDF SDK Developer Guide.pdf" document. Before using any class or methods in this module, please ensure Foxit PDF SDK has been initialized successfully by function FSDK.Library.Initialize with a key including "Conversion" module. Before using function FSDK.Convert.FromDWG, please ensure Foxit PDF SDK has been initialized successfully by function FSDK.Library.Initialize with a key including "DWG2PDF" module.
|
static |
Convert a DWG format file to a PDF file.
Currently, this function can only be used for desktop platforms; for other platform, this function will return false directly without doing anything.
[in] | engine_path | The directory path of "DWG to PDF" engine. This should not be an empty string. |
[in] | src_dwg_path | A DWG or DXF format file path. This should not be an empty string. |
[in] | saved_pdf_path | A path for saving the converted PDF file. This should not be an empty string. |
[in] | settings | The FSDK.DWG2PDFSettingData object used for converting. |
|
static |
Convert an Excel format file to a PDF file.
Currently, this function can be used for Linux armv8 or Linux desktop system. If you are on a Linux armv8 system, then please ensure that WPS professional is installed on the machine. If you are on a Linux desktop system, then please ensure that LibreOffice is installed on the machine. Currently, it does not support LibreOffice 7.0 and later version.
[in] | src_excel_file_path | Path of a Excel format file. This should not be an empty string. |
[in] | src_file_password | 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] | engine_path | In linux armv8 system, it is used to represent the path of WPS engine(librpcetapi.so). For examples, "/opt/kingsoft/wps-office/office6". It can be empty. Default path: "/opt/kingsoft/wps-office/office6". In linux desktop system, it is used to represent the path of LibreOffice engine(soffice.bin), and it can not be empty. For examples, "/usr/lib/libreoffice/program". |
[in] | setting_data | (Reserved, unsupported yet)Setting data used for converting. |
|
static |
Convert an Excel format file to a PDF file.
Currently, this function can only be used for Windows.
[in] | src_excel_file_path | Path of a Excel format file. This should not be an empty string. |
[in] | src_file_password | 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 | Setting data used for converting. |
|
static |
Convert a HTML format file or a URL of a Web page to a PDF file.
Currently, this function can only be used for desktop platforms; for other platform, this function will return directly without doing anything.
[in] | src_html | A URL of Web page or a HTML format file path. This should not be an empty string. |
[in] | engine_path | The directory path of "HTML to PDF" engine. This should not be an empty string. |
[in] | cookies_path | Path of cookies file. If this is an empty string, that means no cookie file is used. Data format is strongly recommended to use JSON format. |
[in] | setting_data | Setting data used for converting. |
[in] | saved_pdf_path | A path for saving the converted PDF file. This should not be an empty string. |
[in] | timeout | Seconds for timeout used for loading web pages. It should be set to a value greater than 15. If this is less than 15, 15 will be used by default. |
|
static |
Convert a HTML format file or a URL of a Web page to a PDF file.
Currently, this function can only be used for desktop platforms; for other platform, this function will return directly without doing anything.
[in] | src_html | A URL of Web page or a HTML format file path. This should not be an empty string. |
[in] | engine_path | The directory path of "HTML to PDF" engine. This should not be an empty string. |
[in] | cookies_reader | A FSDK.FileReaderCallback object which is implemented by user to pass cookies data to Foxit PDF SDK. If this is null, that means no cookie data is used. Data format is strongly recommended to use JSON format. |
[in] | setting_data | Setting data used for converting. |
[in] | saved_pdf_filestream | A FSDK.FileWriterCallback object for saving the converted PDF file. This should not be null. |
[in] | timeout | Seconds for timeout used for loading web pages. It should be set to a value greater than 15. If this is less than 15, 15 will be used by default. |
|
static |
Convert a HTML format file or a URL of a Web page to a PDF file.
Currently, this function can only be used for desktop platforms; for other platform, this function will return directly without doing anything.
[in] | src_html | A URL of Web page or a HTML format file path. This should not be an empty string. |
[in] | engine_path | The directory path of "HTML to PDF" engine. This should not be an empty string. |
[in] | cookies_reader | A FSDK.FileReaderCallback object which is implemented by user to pass cookies data to Foxit PDF SDK. If this is null, that means no cookie data is used. Data format is strongly recommended to use JSON format. |
[in] | setting_data | Setting data used for converting. |
[in] | saved_pdf_path | A path for saving the converted PDF file. This should not be an empty string. |
[in] | timeout | Seconds for timeout used for loading web pages. It should be set to a value greater than 15. If this is less than 15, 15 will be used by default. |
|
static |
Convert a HTML format file or a URL of a Web page to a PDF file.
Currently, this function can only be used for desktop platforms and mac arm platforms; for other platform, this function will return directly without doing anything.
[in] | src_html | A FSDK.FileReaderCallback object which is implemented by user to pass html data to Foxit PDF SDK. It must be vaild. |
[in] | html2pdf_related_resource_array | The FSDK.HTML2PDFRelatedResourceArray which is related to source HTML. |
[in] | engine_path | The directory path of "HTML to PDF" engine. This should not be an empty string. |
[in] | cookies_reader | (Reserved;Not supported yet)A FSDK.FileReaderCallback object which is implemented by user to pass cookies data to Foxit PDF SDK. If this is null, that means no cookie data is used. Data format is strongly recommended to use JSON format. |
[in] | setting_data | Setting data used for converting. |
[in] | saved_pdf_filestream | A FSDK.FileWriterCallback object for saving the converted PDF file. This should not be null. |
[in] | timeout | Seconds for timeout used for loading web pages. It should be set to a value greater than 15. If this is less than 15, 15 will be used by default. |
|
static |
Convert a Image format file to a PDF file.
[in] | file_reader | A FSDK.FileReaderCallback object which is implemented by user to pass image data to Foxit PDF SDK. It must be valid. |
[in] | saved_pdf_filestream | A FSDK.FileWriterCallback object for saving the converted PDF file. This should not be null. |
|
static |
Convert a Image format file to a PDF file.
[in] | src_img | A image format file path. This should not be an empty string. |
[in] | saved_pdf_path | A path for saving the converted PDF file. This should not be an empty string. |
|
static |
Convert OFD file to PDF file.
Please ensure FSDK.Library.InitializeOFDEngine has been called successfully before using this function.
[in] | src_ofd_path | A full path of an existing OFD file. It should not be an empty string. |
[in] | password | Password for the OFD file. It should be an empty string if the OFD file is not encrypted. |
[in] | saved_pdf_file_path | A full path for the converted PDF file. It should not be an empty string. |
[in] | convert_param | A convert parameter object. |
|
static |
Convert a PowerPoint format file to a PDF file.
Currently, this function can be used for Linux armv8 or Linux desktop system. If you are on a Linux armv8 system, then please ensure that WPS professional is installed on the machine. If you are on a Linux desktop system, then please ensure that LibreOffice is installed on the machine. Currently, it does not support LibreOffice 7.0 and later version.
[in] | src_ppt_file_path | Path of a PowerPoint format file. This should not be an empty string. |
[in] | src_file_password | 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] | engine_path | In linux armv8 system, it is used to represent the path of WPS engine(librpcwppapi.so). For examples, "/opt/kingsoft/wps-office/office6". It can be empty. Default path: "/opt/kingsoft/wps-office/office6". In linux desktop system, it is used to represent the path of LibreOffice engine(soffice.bin), and it can not be empty. For examples, "/usr/lib/libreoffice/program". |
[in] | setting_data | (Reserved, unsupported yet)Setting data used for converting. |
|
static |
Convert a PowerPoint format file to a PDF file.
Currently, this function can only be used for Windows.
[in] | src_ppt_file_path | Path of a PowerPoint format file. This should not be an empty string. |
[in] | src_file_password | 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 | Setting data used for converting. |
|
static |
Convert a TXT format file to a PDF file.
[in] | src_txt | A TXT format file path. This should not be an empty string. |
[in] | saved_pdf_path | A path for saving the converted PDF file. This should not be an empty string. |
[in] | setting_data | Setting data used for converting. |
|
static |
Convert a Word format file to a PDF file.
Currently, this function can be used for Linux armv8 or Linux desktop system. If you are on a Linux armv8 system, then please ensure that WPS professional is installed on the machine. If you are on a Linux desktop system, then please ensure that LibreOffice is installed on the machine. Currently, it does not support LibreOffice 7.0 and later version.
[in] | src_word_file_path | Path of a Word format file. This should not be an empty string. |
[in] | src_file_password | 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] | engine_path | In linux armv8 system, it is used to represent the path of WPS engine(librpcwpsapi.so). For examples, "/opt/kingsoft/wps-office/office6". It can be empty. Default path: "/opt/kingsoft/wps-office/office6". In linux desktop system, it is used to represent the path of LibreOffice engine(soffice.bin), and it can not be empty. For examples, "/usr/lib/libreoffice/program". |
[in] | setting_data | (Reserved, unsupported yet)Setting data used for converting. |
|
static |
Convert a Word format file to a PDF file.
Currently, this function can only be used for Windows.
[in] | src_word_file_path | Path of a Word format file. This should not be an empty string. |
[in] | src_file_password | 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 | Setting data used for converting. |
|
static |
Convert PDF file to OFD file.
Please ensure FSDK.Library.InitializeOFDEngine has been called successfully before using this function.
[in] | src_pdf_path | A full path of an existing PDF file. It should not be an empty string. |
[in] | password | Password for the PDF file. It should be an empty string if the PDF file is not encrypted. |
[in] | saved_ofd_file_path | A full path for the converted OFD file. It should not be an empty string. |
[in] | convert_param | A convert parameter object. |
|
static |
Convert a PDF file to a XML format file.
[in] | src_pdf_path | Path of a PDF file. This should not be an empty string. |
[in] | src_file_password | Password for the input PDF file. If no password is needed for the file, please pass an empty string. |
[in] | saved_xml_path | Path of the saved XML format file as conversion result. This should not be an empty string. |
[in] | saved_image_folder_path | A path to specify a folder where image files will be generated during the converting. If this is an empty string, image files will be generated to a folder named "images" (if not exist, Foxit PDF SDK will generate such folder by default). Folder "images" would be in the same directory with saved XML format file (as parameter saved_xml_path). |
[in] | is_force_to_tagged_pdf | (Only useful when input PDF file is not a tagged PDF file) A boolean value to decide whether input PDF file is allowed to be converted to a tagged PDF when input PDF file is not a tagged PDF:
|