Foxit PDF SDK
FSConvert Class Reference
Inheritance diagram for FSConvert:
FSBase

Class Methods

(void) + fromHTML: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...
 
(void) + fromHTMLWithReaderCallback: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...
 
(void) + fromTXT:saved_pdf_path:setting_data:
 Convert a TXT format file to a PDF file.
More...
 

Detailed Description

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 FSLibrary::initialize:key: with a key including "Conversion" module.

See also
FSLibrary

Method Documentation

◆ fromHTML:engine_path:cookies_path:setting_data:saved_pdf_path:timeout:()

+ (void) fromHTML: (NSString *)  src_html
engine_path: (NSString *)  engine_path
cookies_path: (NSString *)  cookies_path
setting_data: (FSHTML2PDFSettingData*)  setting_data
saved_pdf_path: (NSString *)  saved_pdf_path
timeout: (int)  timeout 

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.

Parameters
[in]src_htmlA URL of Web page or a HTML format file path. This should not be an empty string.
[in]engine_pathThe directory path of "HTML to PDF" engine. This should not be an empty string.
[in]cookies_pathPath 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. Currently, this parameter is not supported to be used in MAC OS.
[in]setting_dataSetting data used for converting.
[in]saved_pdf_pathA path for saving the converted PDF file. This should not be an empty string.
[in]timeoutSeconds for timeout used for loading webpages. It should be set to a value greater than 15. If this is less than 15, 15 will be used by default.
Returns
None.

◆ fromHTMLWithReaderCallback:engine_path:cookies_reader:setting_data:saved_pdf_path:timeout:()

+ (void) fromHTMLWithReaderCallback: (NSString *)  src_html
engine_path: (NSString *)  engine_path
cookies_reader: (id<FSFileReaderCallback>)  cookies_reader
setting_data: (FSHTML2PDFSettingData*)  setting_data
saved_pdf_path: (NSString *)  saved_pdf_path
timeout: (int)  timeout 

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.

Parameters
[in]src_htmlA URL of Web page or a HTML format file path. This should not be an empty string.
[in]engine_pathThe directory path of "HTML to PDF" engine. This should not be an empty string.
[in]cookies_readerA FSFileReaderCallback object which is implemented by user to pass cookies data to Foxit PDF SDK. If this is nil, that means no cookie data is used. Data format is strongly recommended to use JSON format. Currently, this parameter is not supported to be used in MAC OS.
[in]setting_dataSetting data used for converting.
[in]saved_pdf_pathA path for saving the converted PDF file. This should not be an empty string.
[in]timeoutSeconds for timeout used for loading webpages. It should be set to a value greater than 15. If this is less than 15, 15 will be used by default.
Returns
None.

◆ fromTXT:saved_pdf_path:setting_data:()

+ (void) fromTXT: (NSString *)  src_txt
saved_pdf_path: (NSString *)  saved_pdf_path
setting_data: (FSTXT2PDFSettingData*)  setting_data 

Convert a TXT format file to a PDF file.

Parameters
[in]src_txtA TXT format file path. This should not be an empty string.
[in]saved_pdf_pathA path for saving the converted PDF file. This should not be an empty string.
[in]setting_dataSetting data used for converting.
Returns
None.