Foxit PDF SDK
com.foxit.sdk.addon.conversion.md2pdf.Md2PDF Class Reference

Public Member Functions

synchronized void delete ()
 Clean up related C++ resources immediately. More...
 

Static Public Member Functions

static boolean convertFromMarkdown (String src_markdown_file_path, String src_file_password, String saved_pdf_path, Md2PDFSettingData setting_data) throws com.foxit.sdk.PDFException
 Convert a Markdown format file to a PDF file. More...
 
static String getVersion () throws com.foxit.sdk.PDFException
 Get the version of Foxit PDF Conversion SDK. More...
 
static void initialize (String library_path) throws com.foxit.sdk.PDFException
 Initialize the Md2PDF module by loading the Foxit PDF Conversion SDK library. More...
 
static void release () throws com.foxit.sdk.PDFException
 Release the Md2PDF module and unload the Foxit PDF Conversion SDK library. More...
 

Detailed Description

This class can be used to convert Markdown format files to PDF files.

Note
Before using this class, please call Md2PDF.initialize to load the Foxit PDF Conversion SDK library. After all conversions are done, call Md2PDF.release to unload the library.

Member Function Documentation

◆ convertFromMarkdown()

static boolean com.foxit.sdk.addon.conversion.md2pdf.Md2PDF.convertFromMarkdown ( String  src_markdown_file_path,
String  src_file_password,
String  saved_pdf_path,
Md2PDFSettingData  setting_data 
) throws com.foxit.sdk.PDFException
static

Convert a Markdown format file to a PDF file.

Function Md2PDF.initialize must be called successfully before calling this function.

Parameters
[in]src_markdown_file_pathPath of a Markdown format file. This should not be an empty string.
[in]src_file_password(Reserved) Password for the input file. Please pass an empty string.
[in]saved_pdf_pathPath of the saved PDF file as conversion result. This should not be an empty string.
[in]setting_dataA Md2PDFSettingData object which is used for converting. Default value: Md2PDFSettingData default values.
Returns
true means success, while false means failure.

◆ delete()

synchronized void com.foxit.sdk.addon.conversion.md2pdf.Md2PDF.delete ( )

Clean up related C++ resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

◆ getVersion()

static String com.foxit.sdk.addon.conversion.md2pdf.Md2PDF.getVersion ( ) throws com.foxit.sdk.PDFException
static

Get the version of Foxit PDF Conversion SDK.

This function should be called after the function Md2PDF.initialize has been called successfully.

Returns
A string which contains the version information of Foxit PDF Conversion SDK.

◆ initialize()

static void com.foxit.sdk.addon.conversion.md2pdf.Md2PDF.initialize ( String  library_path) throws com.foxit.sdk.PDFException
static

Initialize the Md2PDF module by loading the Foxit PDF Conversion SDK library.

Before using Md2PDF.convertFromMarkdown , please call this function first with the path to the Foxit PDF Conversion SDK library. Function common.Library.initialize must already have been called successfully with a key including "Md2PDF" module right.

Parameters
[in]library_pathPath to the Foxit PDF Conversion SDK dynamic library (e.g. "fpdfconversionsdk_win64.dll" on Windows, "libfpdfconversionsdk.so" on Linux). This should not be an empty string.
Returns
None.

◆ release()

static void com.foxit.sdk.addon.conversion.md2pdf.Md2PDF.release ( ) throws com.foxit.sdk.PDFException
static

Release the Md2PDF module and unload the Foxit PDF Conversion SDK library.

This function should be called after all Md2PDF.convertFromMarkdown calls are finished. It must be called after Md2PDF.initialize has been called successfully.

Returns
None.