Foxit PDF SDK
fsdk.RichTextStyle Class Reference

Public Member Functions

def GetChar_space ()
 Get the char space. More...
 
def GetFont ()
 Get a font used in rich text style. More...
 
def GetIs_bold ()
 Get a boolean value which indicates whether to make text bold or not. More...
 
def GetIs_italic ()
 Get a boolean value which indicates whether to italicize text or not. More...
 
def GetIs_strikethrough ()
 Get a boolean value which indicates whether to cross text out with strike through or not. More...
 
def GetIs_underline ()
 Get a boolean value which indicates whether to underline text or not. More...
 
def GetMark_style ()
 Get corner mark style. More...
 
def GetText_alignment ()
 Get alignment value. More...
 
def GetText_color ()
 Get text color. More...
 
def GetText_size ()
 Get text size. More...
 
def GetWord_space ()
 Get the word space. More...
 
def Set (font, text_size, text_alignment, text_color, is_bold, is_italic, is_underline, is_strikethrough, mark_style, char_space, word_space)
 Set value.
More...
 
def SetChar_space (value)
 Set the char space. More...
 
def SetFont (value)
 Set a font used in rich text style. More...
 
def SetIs_bold (value)
 Set a boolean value which indicates whether to make text bold or not. More...
 
def SetIs_italic (value)
 Set a boolean value which indicates whether to italicize text or not. More...
 
def SetIs_strikethrough (value)
 Set a boolean value which indicates whether to cross text out with strike through or not. More...
 
def SetIs_underline (value)
 Set a boolean value which indicates whether to underline text or not. More...
 
def SetMark_style (value)
 Set corner mark style. More...
 
def SetText_alignment (value)
 Set alignment value. More...
 
def SetText_color (value)
 Set text color. More...
 
def SetText_size (value)
 Set text size. More...
 
def SetWord_space (value)
 Set the word space. More...
 

Detailed Description

This class represents rich text style data, which is used to specify the style of rich text.

Member Function Documentation

◆ GetChar_space()

fsdk.RichTextStyle.GetChar_space ( )

Get the char space.

Returns
The char space. It should not be negative value for table generator. It is only used in fsdk.PDFPage.AddText .

◆ GetFont()

fsdk.RichTextStyle.GetFont ( )

Get a font used in rich text style.

  • When current style is used to set a rich text or add/insert a new rich text, this font means "user expects to use this font for a rich text". Then during resetting appearance process, Foxit PDF SDK will check if the expected font is suitable and decide to use it or change to a more suitable font for showing text content.
  • When current style is retrieved from a rich text, this font represents the used font of a rich text.


Returns
A font used in rich text style. It should be a valid font object.

◆ GetIs_bold()

fsdk.RichTextStyle.GetIs_bold ( )

Get a boolean value which indicates whether to make text bold or not.

Returns
A boolean value which indicates whether to make text bold or not.

◆ GetIs_italic()

fsdk.RichTextStyle.GetIs_italic ( )

Get a boolean value which indicates whether to italicize text or not.

Returns
A boolean value which indicates whether to italicize text or not.

◆ GetIs_strikethrough()

fsdk.RichTextStyle.GetIs_strikethrough ( )

Get a boolean value which indicates whether to cross text out with strike through or not.

Returns
A boolean value which indicates whether to cross text out with strike through or not.

◆ GetIs_underline()

fsdk.RichTextStyle.GetIs_underline ( )

Get a boolean value which indicates whether to underline text or not.

Returns
A boolean value which indicates whether to underline text or not.

◆ GetMark_style()

fsdk.RichTextStyle.GetMark_style ( )

Get corner mark style.

Returns
Corner mark style. Corner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from fsdk.RichTextStyleE_CornerMarkNone and this should be one of these values.

◆ GetText_alignment()

fsdk.RichTextStyle.GetText_alignment ( )

Get alignment value.

Returns
Alignment value. Please refer to values starting from fsdk.E_AlignmentLeft and this should be one of these values.

◆ GetText_color()

fsdk.RichTextStyle.GetText_color ( )

Get text color.

Returns
Text color. Format: 0xRRGGBB.

◆ GetText_size()

fsdk.RichTextStyle.GetText_size ( )

Get text size.

Returns
Text size. It should not be negative value. 0 means text will not be shown.

◆ GetWord_space()

fsdk.RichTextStyle.GetWord_space ( )

Get the word space.

Returns
The word space. It should not be negative value for table generator. It is only used in fsdk.PDFPage.AddText .

◆ Set()

def fsdk.RichTextStyle.Set (   font,
  text_size,
  text_alignment,
  text_color,
  is_bold,
  is_italic,
  is_underline,
  is_strikethrough,
  mark_style,
  char_space,
  word_space 
)

Set value.

Parameters
[in]fontA valid font object.
[in]text_sizeText size. It should not be negative value. 0 means text will not be shown.
[in]text_alignmentAlignment value. Please refer to values starting from fsdk.E_AlignmentLeft and this should be one of these values.
[in]text_colorText color. Format: 0xRRGGBB.
[in]is_boldA boolean value which indicates whether to make text bold or not.
[in]is_italicA boolean value which indicates whether to italicize text or not.
[in]is_underlineA boolean value which indicates whether to underline text or not.
[in]is_strikethroughA boolean value which indicates whether to cross text out with strike through or not.
[in]mark_styleCorner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from fsdk.RichTextStyleE_CornerMarkNone and this should be one of these values.
[in]char_spaceThe char space. It should not be negative value for table generator. It is only used in fsdk.PDFPage.AddText .
[in]word_spaceThe word space. It should not be negative value for table generator. It is only used in fsdk.PDFPage.AddText .
Returns
None.

◆ SetChar_space()

fsdk.RichTextStyle.SetChar_space (   value)

Set the char space.

Parameters
[in]valueThe char space. It should not be negative value for table generator. It is only used in fsdk.PDFPage.AddText .
Returns
None.

◆ SetFont()

fsdk.RichTextStyle.SetFont (   value)

Set a font used in rich text style.

  • When current style is used to set a rich text or add/insert a new rich text, this font means "user expects to use this font for a rich text". Then during resetting appearance process, Foxit PDF SDK will check if the expected font is suitable and decide to use it or change to a more suitable font for showing text content.
  • When current style is retrieved from a rich text, this font represents the used font of a rich text.


Parameters
[in]valueA font used in rich text style. It should be a valid font object.
Returns
None.

◆ SetIs_bold()

fsdk.RichTextStyle.SetIs_bold (   value)

Set a boolean value which indicates whether to make text bold or not.

Parameters
[in]valueA boolean value which indicates whether to make text bold or not.
Returns
None.

◆ SetIs_italic()

fsdk.RichTextStyle.SetIs_italic (   value)

Set a boolean value which indicates whether to italicize text or not.

Parameters
[in]valueA boolean value which indicates whether to italicize text or not.
Returns
None.

◆ SetIs_strikethrough()

fsdk.RichTextStyle.SetIs_strikethrough (   value)

Set a boolean value which indicates whether to cross text out with strike through or not.

Parameters
[in]valueA boolean value which indicates whether to cross text out with strike through or not.
Returns
None.

◆ SetIs_underline()

fsdk.RichTextStyle.SetIs_underline (   value)

Set a boolean value which indicates whether to underline text or not.

Parameters
[in]valueA boolean value which indicates whether to underline text or not.
Returns
None.

◆ SetMark_style()

fsdk.RichTextStyle.SetMark_style (   value)

Set corner mark style.

Parameters
[in]valueCorner mark style. Corner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from fsdk.RichTextStyleE_CornerMarkNone and this should be one of these values.
Returns
None.

◆ SetText_alignment()

fsdk.RichTextStyle.SetText_alignment (   value)

Set alignment value.

Parameters
[in]valueAlignment value. Please refer to values starting from fsdk.E_AlignmentLeft and this should be one of these values.
Returns
None.

◆ SetText_color()

fsdk.RichTextStyle.SetText_color (   value)

Set text color.

Parameters
[in]valueText color. Format: 0xRRGGBB.
Returns
None.

◆ SetText_size()

fsdk.RichTextStyle.SetText_size (   value)

Set text size.

Parameters
[in]valueText size. It should not be negative value. 0 means text will not be shown.
Returns
None.

◆ SetWord_space()

fsdk.RichTextStyle.SetWord_space (   value)

Set the word space.

Parameters
[in]valueThe word space. It should not be negative value for table generator. It is only used in fsdk.PDFPage.AddText .
Returns
None.