Foxit PDF SDK
foxit::addon::conversion::TXT2PDFSettingData Class Reference

Inherits Object.

Public Member Functions

 TXT2PDFSettingData ()
 Constructor.
 
 TXT2PDFSettingData (float page_width, float page_height, RectF page_margin, const common::Font &font, float text_size, ARGB text_color, float linespace, bool is_break_page)
 Constructor, with parameters. More...
 
TXT2PDFSettingDataoperator= (const TXT2PDFSettingData &data)
 Assign operator. More...
 
void Set (float page_width, float page_height, RectF page_margin, const common::Font &font, float text_size, ARGB text_color, float linespace, bool is_break_page)
 Set value. More...
 

Public Attributes

common::Font font
 A font object.
 
bool is_break_page
 Used to decide whether to insert a page break in converted PDF document when meeting character 0x0c.
 
float linespace
 Line spacing. If valid, it should be above 0.
 
float page_height
 Page height used for the converted PDF document.
 
RectF page_margin
 Page margin used for converted PDF document. More...
 
float page_width
 Page width used for the converted PDF document.
 
ARGB text_color
 Font color.
 
float text_size
 Font size. If valid, it should be above 0.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ TXT2PDFSettingData()

foxit::addon::conversion::TXT2PDFSettingData::TXT2PDFSettingData ( float  page_width,
float  page_height,
RectF  page_margin,
const common::Font font,
float  text_size,
ARGB  text_color,
float  linespace,
bool  is_break_page 
)
inline

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

◆ operator=()

TXT2PDFSettingData& foxit::addon::conversion::TXT2PDFSettingData::operator= ( const TXT2PDFSettingData data)
inline

Assign operator.

Parameters
[in]dataAnother TXT-to-PDF setting data object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ Set()

void foxit::addon::conversion::TXT2PDFSettingData::Set ( float  page_width,
float  page_height,
RectF  page_margin,
const common::Font font,
float  text_size,
ARGB  text_color,
float  linespace,
bool  is_break_page 
)
inline

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.

Member Data Documentation

◆ page_margin

RectF foxit::addon::conversion::TXT2PDFSettingData::page_margin

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.