Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
FoxitPDFSDKPython3.TextState Class Reference

Inherits FoxitPDFSDKPython3._object.

## Public Member Functions
def | TextState (version, font, font_size, charspace, wordspace, textmode, origin_position, textmatrix)
| Constructor, with parameters. More...
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 = _fsdk.TextState_charspace
| 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 = _fsdk.TextState_font
| A font object.
| font_horizontal_size = _fsdk.TextState_font_horizontal_size
| Font horizontal size in device units (read-only). If valid, it would be above 0.
| font_size = _fsdk.TextState_font_size
| The font size in "Tf". If valid, it should be above 0.
| font_vertical_size = _fsdk.TextState_font_vertical_size
| Font vertical size in device units (read-only). If valid, it would be above 0.
| origin_position = _fsdk.TextState_origin_position
| The origin point, in [PDF coordinate system] ().
| textmatrix = _fsdk.TextState_textmatrix
| Text transformation matrix. More...
| textmode = _fsdk.TextState_textmode
| Text rendering mode. Please refer to values starting from FoxitPDFSDKPython3.TextState.e_ModeFill and this should be one of these values.
| version = _fsdk.TextState_version
| Version of this class. More...
| wordspace = _fsdk.TextState_wordspace
| Word spacing (only apply to space character). More...

## Detailed Description

This class represents PDF text state.

## Constructor & Destructor Documentation

## ◆ TextState() [1/2]

def FoxitPDFSDKPython3.TextState.TextState | ( |  | version,
|  |  | font,
|  |  | font_size,
|  |  | charspace,
|  |  | wordspace,
|  |  | textmode,
|  |  | origin_position,
|  |  | textmatrix
| ) |  |

Constructor, with parameters.

Parameters

  [in] | version | Version 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 FoxitPDFSDKPython3.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.

## ◆ TextState() [2/2]

def FoxitPDFSDKPython3.TextState.TextState | ( |  | state | ) |

Constructor, with another text state object.

Parameters

  [in] | state | Another text state object.

## Member Function Documentation

## ◆ Set()

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

Set value.

Parameters

  [in] | version | Version 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 FoxitPDFSDKPython3.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

FoxitPDFSDKPython3.TextState.charspace = _fsdk.TextState_charspace
| 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.

## ◆ textmatrix

FoxitPDFSDKPython3.TextState.textmatrix = _fsdk.TextState_textmatrix
| 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.

## ◆ version

FoxitPDFSDKPython3.TextState.version = _fsdk.TextState_version
| 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

FoxitPDFSDKPython3.TextState.wordspace = _fsdk.TextState_wordspace
| 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.