Foxit PDF SDK
com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData Class Reference

Public Member Functions

 PDF2MdSettingData ()
 Constructor.
 
 PDF2MdSettingData (int table_format, boolean include_header_footer, boolean enable_italic, boolean enable_bold, boolean skip_ocr_pages)
 Constructor, with parameters. More...
 
synchronized void delete ()
 Clean up related C++ resources immediately. More...
 
boolean getEnable_bold ()
 Get whether to preserve bold formatting from the original PDF. More...
 
boolean getEnable_italic ()
 Get whether to preserve italic formatting from the original PDF. More...
 
boolean getInclude_header_footer ()
 Get whether to include page header/footer (artifact) content. More...
 
boolean getSkip_ocr_pages ()
 Get whether to silently skip pages that contain only path/image objects. More...
 
int getTable_format ()
 Get table output format. More...
 
void set (int table_format, boolean include_header_footer, boolean enable_italic, boolean enable_bold, boolean skip_ocr_pages)
 Set value. More...
 
void setEnable_bold (boolean value)
 Set whether to preserve bold formatting from the original PDF. More...
 
void setEnable_italic (boolean value)
 Set whether to preserve italic formatting from the original PDF. More...
 
void setInclude_header_footer (boolean value)
 Set whether to include page header/footer (artifact) content. More...
 
void setSkip_ocr_pages (boolean value)
 Set whether to silently skip pages that contain only path/image objects. More...
 
void setTable_format (int value)
 Set table output format. More...
 

Static Public Attributes

static final int e_TableFormatHTML = 1
 Table format: HTML table tags.
 
static final int e_TableFormatMarkdown = 0
 Table format: Markdown pipe syntax (default).
 

Detailed Description

This class represents setting data used for converting PDF documents to Markdown format.

Constructor & Destructor Documentation

◆ PDF2MdSettingData()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.PDF2MdSettingData ( int  table_format,
boolean  include_header_footer,
boolean  enable_italic,
boolean  enable_bold,
boolean  skip_ocr_pages 
)

Constructor, with parameters.

Parameters
[in]table_formatTable output format. Default: .
[in]include_header_footerWhether to include page header/footer content. Default: false.
[in]enable_italicWhether to apply italic markers in output. Default: true.
[in]enable_boldWhether to apply bold markers in output. Default: false.
[in]skip_ocr_pagesWhether to silently skip scan-only pages. Default: false.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.delete ( )

Clean up related C++ resources immediately.

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

◆ getEnable_bold()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.getEnable_bold ( )

Get whether to preserve bold formatting from the original PDF.

When true, text that is bold in the PDF will have bold markers in output. When false, bold formatting is stripped.

Returns
Whether to preserve bold formatting from the original PDF. Default: false.

◆ getEnable_italic()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.getEnable_italic ( )

Get whether to preserve italic formatting from the original PDF.

When true, text that is italic in the PDF will have italic markers in output. When false, italic formatting is stripped.

Returns
Whether to preserve italic formatting from the original PDF. Default: true.

◆ getInclude_header_footer()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.getInclude_header_footer ( )

Get whether to include page header/footer (artifact) content.

true means to include header/footer text in the output Markdown. false means to skip header/footer text.

Returns
Whether to include page header/footer (artifact) content. Default: false.

◆ getSkip_ocr_pages()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.getSkip_ocr_pages ( )

Get whether to silently skip pages that contain only path/image objects.

When false, such scan-only pages cause an error to be thrown. When true, such pages are skipped and conversion continues.

Returns
Whether to silently skip pages that contain only path/image objects. Default: false.

◆ getTable_format()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.getTable_format ( )

Get table output format.

Please refer to values starting from com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.e_TableFormatMarkdown and this should be one of these values.

Returns
Table output format. Default value: .

◆ set()

void com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.set ( int  table_format,
boolean  include_header_footer,
boolean  enable_italic,
boolean  enable_bold,
boolean  skip_ocr_pages 
)

Set value.

Parameters
[in]table_formatTable output format.
[in]include_header_footerWhether to include page header/footer content.
[in]enable_italicWhether to apply italic markers in output.
[in]enable_boldWhether to apply bold markers in output.
[in]skip_ocr_pagesWhether to silently skip scan-only pages.
Returns
None.

◆ setEnable_bold()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.setEnable_bold ( boolean  value)

Set whether to preserve bold formatting from the original PDF.

When true, text that is bold in the PDF will have bold markers in output. When false, bold formatting is stripped.

Parameters
[in]valueWhether to preserve bold formatting from the original PDF. Default: false.
Returns
None.

◆ setEnable_italic()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.setEnable_italic ( boolean  value)

Set whether to preserve italic formatting from the original PDF.

When true, text that is italic in the PDF will have italic markers in output. When false, italic formatting is stripped.

Parameters
[in]valueWhether to preserve italic formatting from the original PDF. Default: true.
Returns
None.

◆ setInclude_header_footer()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.setInclude_header_footer ( boolean  value)

Set whether to include page header/footer (artifact) content.

true means to include header/footer text in the output Markdown. false means to skip header/footer text.

Parameters
[in]valueWhether to include page header/footer (artifact) content. Default: false.
Returns
None.

◆ setSkip_ocr_pages()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.setSkip_ocr_pages ( boolean  value)

Set whether to silently skip pages that contain only path/image objects.

When false, such scan-only pages cause an error to be thrown. When true, such pages are skipped and conversion continues.

Parameters
[in]valueWhether to silently skip pages that contain only path/image objects. Default: false.
Returns
None.

◆ setTable_format()

com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.setTable_format ( int  value)

Set table output format.

Please refer to values starting from com.foxit.sdk.addon.conversion.pdf2md.PDF2MdSettingData.e_TableFormatMarkdown and this should be one of these values.

Parameters
[in]valueTable output format. Default value: .
Returns
None.