Foxit PDF SDK
FoxitPDFSDKPython2.TextState Class Reference

Inherits FoxitPDFSDKPython2._object.

Public Member Functions

def TextState ()
 Constructor.

 
def TextState (state)
 Constructor, with another text state object.
More...
 
def Set (version, font, font_size, charspace, wordspace, textmode, origin_position, textmatrix)
 Set value.
More...
 

Static Public Attributes

 charspace = _swig_property(_fsdk.TextState_charspace_get, _fsdk.TextState_charspace_set)
 Character spacing.
More...
 
 e_ModeClip = _fsdk.TextState_e_ModeClip
 Text mode: add text to path for clipping.

 
 e_ModeFill = _fsdk.TextState_e_ModeFill
 Text mode: fill text.

 
 e_ModeFillClip = _fsdk.TextState_e_ModeFillClip
 Text mode: fill text and add to path for clipping.

 
 e_ModeFillStroke = _fsdk.TextState_e_ModeFillStroke
 Text mode: fill and stroke text.

 
 e_ModeFillStrokeClip = _fsdk.TextState_e_ModeFillStrokeClip
 Text mode: fill and stroke text, and add to path for clipping.

 
 e_ModeInvisible = _fsdk.TextState_e_ModeInvisible
 Text mode: neither fill nor stroke text, to make it invisible.

 
 e_ModeStroke = _fsdk.TextState_e_ModeStroke
 Text mode: stroke text.

 
 e_ModeStrokeClip = _fsdk.TextState_e_ModeStrokeClip
 Text mode: stroke text and add to path for clipping.

 
 font = _swig_property(_fsdk.TextState_font_get, _fsdk.TextState_font_set)
 A font object.
More...
 
 font_size = _swig_property(_fsdk.TextState_font_size_get, _fsdk.TextState_font_size_set)
 The font size in "Tf". If valid, it should be above 0.
More...
 
 origin_position = _swig_property(_fsdk.TextState_origin_position_get, _fsdk.TextState_origin_position_set)
 The origin point, in [PDF coordinate system] ().
More...
 
 textmatrix = _swig_property(_fsdk.TextState_textmatrix_get, _fsdk.TextState_textmatrix_set)
 Text transformation matrix.
More...
 
 textmode = _swig_property(_fsdk.TextState_textmode_get, _fsdk.TextState_textmode_set)
 Text rendering mode. Please refer to values starting from FoxitPDFSDKPython2.TextState.e_ModeFill and this should be one of these values.
More...
 
 version = _swig_property(_fsdk.TextState_version_get, _fsdk.TextState_version_set)
 Version of this class.
More...
 
 wordspace = _swig_property(_fsdk.TextState_wordspace_get, _fsdk.TextState_wordspace_set)
 Word spacing (only apply to space character).
More...
 

Detailed Description

This class represents PDF text state.

Constructor & Destructor Documentation

◆ TextState()

def FoxitPDFSDKPython2.TextState.TextState (   state)

Constructor, with another text state object.

Parameters
[in]stateAnother text state object.

Member Function Documentation

◆ Set()

def FoxitPDFSDKPython2.TextState.Set (   version,
  font,
  font_size,
  charspace,
  wordspace,
  textmode,
  origin_position,
  textmatrix 
)

Set value.

Parameters
[in]versionVersion of this structure, which is used to decide which members are useful. Currently, only 1 is valid.
[in]font(Version 1) A valid font object.
[in]font_size(Version 1) The font size in "Tf". It should be above 0.
[in]charspace(Version 1) Character spacing.
[in]wordspace(Version 1) Word spacing (only apply to space character).
[in]textmode(Version 1) Text rendering mode. Please refer to values starting from FoxitPDFSDKPython2.TextState.e_ModeFill and this should be one of these values.
[in]origin_position(Version 1) The origin point, in [PDF coordinate system] ().
[in]textmatrix(Version 1) Text transformation matrix. This is an array of four numbers.
Returns
None.

Member Data Documentation

◆ charspace

FoxitPDFSDKPython2.TextState.charspace = _swig_property(_fsdk.TextState_charspace_get, _fsdk.TextState_charspace_set)
static

Character spacing.

For horizontal writing, a positive value has the effect of expanding the distance between glyphs, whereas for vertical writing, a negative value has this effect.

◆ font

FoxitPDFSDKPython2.TextState.font = _swig_property(_fsdk.TextState_font_get, _fsdk.TextState_font_set)
static

A font object.


◆ font_size

FoxitPDFSDKPython2.TextState.font_size = _swig_property(_fsdk.TextState_font_size_get, _fsdk.TextState_font_size_set)
static

The font size in "Tf". If valid, it should be above 0.


◆ origin_position

FoxitPDFSDKPython2.TextState.origin_position = _swig_property(_fsdk.TextState_origin_position_get, _fsdk.TextState_origin_position_set)
static

The origin point, in [PDF coordinate system] ().


◆ textmatrix

FoxitPDFSDKPython2.TextState.textmatrix = _swig_property(_fsdk.TextState_textmatrix_get, _fsdk.TextState_textmatrix_set)
static

Text transformation matrix.

This is an array of four numbers. The first number is the input coefficient a, the second number is the input coefficient b, the third number is the input coefficient c, the forth number is the input coefficient d.

◆ textmode

FoxitPDFSDKPython2.TextState.textmode = _swig_property(_fsdk.TextState_textmode_get, _fsdk.TextState_textmode_set)
static

Text rendering mode. Please refer to values starting from FoxitPDFSDKPython2.TextState.e_ModeFill and this should be one of these values.


◆ version

FoxitPDFSDKPython2.TextState.version = _swig_property(_fsdk.TextState_version_get, _fsdk.TextState_version_set)
static

Version of this class.

Members of this class may be extended in the future. This version can be used to separate the different extended members.

◆ wordspace

FoxitPDFSDKPython2.TextState.wordspace = _swig_property(_fsdk.TextState_wordspace_get, _fsdk.TextState_wordspace_set)
static

Word spacing (only apply to space character).

For horizontal writing, a positive value has the effect of increasing the spacing between words. For vertical writing, a positive value decreases the spacing between words (and a negative value increases it), since vertical coordinates increase from bottom to top. This will not take effect if font of current object is an embedded font.