Foxit PDF SDK
com.foxit.sdk.addon.conversion.TXT2PDFSettingData Class Reference

Public Member Functions

 TXT2PDFSettingData ()
 Constructor.
 
 TXT2PDFSettingData (float page_width, float page_height, RectF page_margin, Font font, float text_size, long text_color, float linespace, boolean is_break_page)
 Constructor, with parameters. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
Font getFont ()
 Get a font object. More...
 
boolean getIs_break_page ()
 Get used to decide whether to insert a page break in converted PDF document when meeting character 0x0c. More...
 
float getLinespace ()
 Get line spacing. More...
 
float getPage_height ()
 Get page height used for the converted PDF document. More...
 
RectF getPage_margin ()
 Get page margin used for converted PDF document. More...
 
float getPage_width ()
 Get page width used for the converted PDF document. More...
 
long getText_color ()
 Get font color. More...
 
float getText_size ()
 Get font size. More...
 
void set (float page_width, float page_height, RectF page_margin, Font font, float text_size, long text_color, float linespace, boolean is_break_page)
 Set value. More...
 
void setFont (Font value)
 Set a font object. More...
 
void setIs_break_page (boolean value)
 Set used to decide whether to insert a page break in converted PDF document when meeting character 0x0c. More...
 
void setLinespace (float value)
 Set line spacing. More...
 
void setPage_height (float value)
 Set page height used for the converted PDF document. More...
 
void setPage_margin (RectF value)
 Set page margin used for converted PDF document. More...
 
void setPage_width (float value)
 Set page width used for the converted PDF document. More...
 
void setText_color (long value)
 Set font color. More...
 
void setText_size (float value)
 Set font size. More...
 

Detailed Description

This class represents setting data used for converting TXT to PDF.

Constructor & Destructor Documentation

◆ TXT2PDFSettingData()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.TXT2PDFSettingData ( float  page_width,
float  page_height,
RectF  page_margin,
Font  font,
float  text_size,
long  text_color,
float  linespace,
boolean  is_break_page 
)

Constructor, with parameters.

Parameters
[in]page_widthPage width used for the converted PDF document.
[in]page_heightPage height used for the converted PDF document.
[in]page_marginPage margin used for converted PDF document.
[in]fontFont object used for converted PDF document.
[in]text_sizeFont size used for converted PDF document.
[in]text_colorFont color used for converted PDF document.
[in]linespaceLine space used for converted PDF document.
[in]is_break_pageUsed to decide whether to insert a page break in converted PDF document when meeting character 0x0c.
Returns
None.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.addon.conversion.TXT2PDFSettingData.delete ( )

Clean up related resources immediately.

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

◆ getFont()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.getFont ( )

Get a font object.

Returns
A font object.

◆ getIs_break_page()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.getIs_break_page ( )

Get used to decide whether to insert a page break in converted PDF document when meeting character 0x0c.

Returns
Used to decide whether to insert a page break in converted PDF document when meeting character 0x0c.

◆ getLinespace()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.getLinespace ( )

Get line spacing.

Returns
Line spacing. If valid, it should be above 0.

◆ getPage_height()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.getPage_height ( )

Get page height used for the converted PDF document.

Returns
Page height used for the converted PDF document.

◆ getPage_margin()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.getPage_margin ( )

Get page margin used for converted PDF document.

Note
This value does not represent a rectangle. It just defines the left margin, bottom margin, right margin and top margin of a PDF page.
Returns
Page margin used for converted PDF document.

◆ getPage_width()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.getPage_width ( )

Get page width used for the converted PDF document.

Returns
Page width used for the converted PDF document.

◆ getText_color()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.getText_color ( )

Get font color.

Returns
Font color.

◆ getText_size()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.getText_size ( )

Get font size.

Returns
Font size. If valid, it should be above 0.

◆ set()

void com.foxit.sdk.addon.conversion.TXT2PDFSettingData.set ( float  page_width,
float  page_height,
RectF  page_margin,
Font  font,
float  text_size,
long  text_color,
float  linespace,
boolean  is_break_page 
)

Set value.

Parameters
[in]page_widthPage width used for the converted PDF document.
[in]page_heightPage height used for the converted PDF document.
[in]page_marginPage margin used for converted PDF document.
[in]fontFont object used for converted PDF document.
[in]text_sizeFont size used for converted PDF document.
[in]text_colorFont color used for converted PDF document.
[in]linespaceLine space used for converted PDF document.
[in]is_break_pageUsed to decide whether to insert a page break in converted PDF document when meeting character 0x0c.
Returns
None.

◆ setFont()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.setFont ( Font  value)

Set a font object.

Parameters
[in]valueA font object.
Returns
None.

◆ setIs_break_page()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.setIs_break_page ( boolean  value)

Set used to decide whether to insert a page break in converted PDF document when meeting character 0x0c.

Parameters
[in]valueUsed to decide whether to insert a page break in converted PDF document when meeting character 0x0c.
Returns
None.

◆ setLinespace()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.setLinespace ( float  value)

Set line spacing.

Parameters
[in]valueLine spacing. If valid, it should be above 0.
Returns
None.

◆ setPage_height()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.setPage_height ( float  value)

Set page height used for the converted PDF document.

Parameters
[in]valuePage height used for the converted PDF document.
Returns
None.

◆ setPage_margin()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.setPage_margin ( RectF  value)

Set page margin used for converted PDF document.

Note
This value does not represent a rectangle. It just defines the left margin, bottom margin, right margin and top margin of a PDF page.
Parameters
[in]valuePage margin used for converted PDF document.
Returns
None.

◆ setPage_width()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.setPage_width ( float  value)

Set page width used for the converted PDF document.

Parameters
[in]valuePage width used for the converted PDF document.
Returns
None.

◆ setText_color()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.setText_color ( long  value)

Set font color.

Parameters
[in]valueFont color.
Returns
None.

◆ setText_size()

com.foxit.sdk.addon.conversion.TXT2PDFSettingData.setText_size ( float  value)

Set font size.

Parameters
[in]valueFont size. If valid, it should be above 0.
Returns
None.