Foxit PDF SDK
FoxitPDFSDKPython2.RichTextStyle Class Reference

Inherits FoxitPDFSDKPython2._object.

Public Member Functions

def RichTextStyle ()
 Constructor.

 
def RichTextStyle (style)
 Constructor, with another style object.
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...
 

Static Public Attributes

 char_space = _swig_property(_fsdk.RichTextStyle_char_space_get, _fsdk.RichTextStyle_char_space_set)
 The char space. It should not be negative value. It is only used in FoxitPDFSDKPython2.PDFPage.AddText .

 
 e_CornerMarkNone = _fsdk.RichTextStyle_e_CornerMarkNone
 Corner mark style: none.

 
 e_CornerMarkSubscript = _fsdk.RichTextStyle_e_CornerMarkSubscript
 Corner mark style: subscript.

 
 e_CornerMarkSuperscript = _fsdk.RichTextStyle_e_CornerMarkSuperscript
 Corner mark style: superscript.

 
 font = _swig_property(_fsdk.RichTextStyle_font_get, _fsdk.RichTextStyle_font_set)
 A font used in rich text style. It should be a valid font object.
More...
 
 is_bold = _swig_property(_fsdk.RichTextStyle_is_bold_get, _fsdk.RichTextStyle_is_bold_set)
 A boolean value which indicates whether to make text bold or not.

 
 is_italic = _swig_property(_fsdk.RichTextStyle_is_italic_get, _fsdk.RichTextStyle_is_italic_set)
 A boolean value which indicates whether to italicize text or not.

 
 is_strikethrough = _swig_property(_fsdk.RichTextStyle_is_strikethrough_get, _fsdk.RichTextStyle_is_strikethrough_set)
 A boolean value which indicates whether to cross text out with strike through or not.

 
 is_underline = _swig_property(_fsdk.RichTextStyle_is_underline_get, _fsdk.RichTextStyle_is_underline_set)
 A boolean value which indicates whether to underline text or not.

 
 mark_style = _swig_property(_fsdk.RichTextStyle_mark_style_get, _fsdk.RichTextStyle_mark_style_set)
 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 FoxitPDFSDKPython2.RichTextStyle.e_CornerMarkNone and this should be one of these values.

 
 text_alignment = _swig_property(_fsdk.RichTextStyle_text_alignment_get, _fsdk.RichTextStyle_text_alignment_set)
 Alignment value. Please refer to values starting from FoxitPDFSDKPython2.e_AlignmentLeft and this should be one of these values.

 
 text_color = _swig_property(_fsdk.RichTextStyle_text_color_get, _fsdk.RichTextStyle_text_color_set)
 Text color. Format: 0xRRGGBB.

 
 text_size = _swig_property(_fsdk.RichTextStyle_text_size_get, _fsdk.RichTextStyle_text_size_set)
 Text size. It should not be negative value. 0 means text will not be shown.

 
 word_space = _swig_property(_fsdk.RichTextStyle_word_space_get, _fsdk.RichTextStyle_word_space_set)
 The word space. It should not be negative value. It is only used in FoxitPDFSDKPython2.PDFPage.AddText .

 

Detailed Description

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

Constructor & Destructor Documentation

◆ RichTextStyle()

def FoxitPDFSDKPython2.RichTextStyle.RichTextStyle (   style)

Constructor, with another style object.

Parameters
[in]styleAnother style object.

Member Function Documentation

◆ Set()

def FoxitPDFSDKPython2.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 FoxitPDFSDKPython2.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 FoxitPDFSDKPython2.RichTextStyle.e_CornerMarkNone and this should be one of these values.
[in]char_spaceThe char space. It should not be negative value. It is only used in FoxitPDFSDKPython2.PDFPage.AddText .
[in]word_spaceThe word space. It should not be negative value. It is only used in FoxitPDFSDKPython2.PDFPage.AddText .
Returns
None.

Member Data Documentation

◆ font

FoxitPDFSDKPython2.RichTextStyle.font = _swig_property(_fsdk.RichTextStyle_font_get, _fsdk.RichTextStyle_font_set)
static

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

  • 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.