Foxit PDF SDK

Instance Methods | Properties | List of all members
FSTextState Class Reference

Inherits NSObject.

## Instance Methods
(id) | - init
| Constructor.
(id) | - initWithState:
| Constructor, with another text state object. More...
(id) | - initWithVersion:font:font_size:charspace:wordspace:textmode:origin_position:textmatrix:
| Constructor, with parameters. More...
(void) | - set:font:font_size:charspace:wordspace:textmode:origin_position:textmatrix:
| Set value. More...

## Properties
float | charspace
| Character spacing. More...
FSFont * | font
| A font object. More...
float | font_horizontal_size
| Font horizontal size in device units (read-only). If valid, it would be above 0. More...
float | font_size
| The font size in "Tf". If valid, it should be above 0. More...
float | font_vertical_size
| Font vertical size in device units (read-only). If valid, it would be above 0. More...
FSPointF * | origin_position
| The origin point, in PDF coordinate system. More...
NSArray< NSNumber * > * | textmatrix
| Text transformation matrix. More...
FSTextStateMode | textmode
| Text rendering mode. Please refer to values starting from FSTextStateModeFill and this should be one of these values. More...
unsigned int | version
| Version of this class. More...
float | wordspace
| Word spacing (only apply to space character). More...

## Detailed Description

This class represents PDF text state.

## Method Documentation

## ◆ initWithState:()

- (id) initWithState: |  | (FSTextState*) | state |

Constructor, with another text state object.

Parameters

  [in] | state | Another text state object.

## ◆ initWithVersion:font:font_size:charspace:wordspace:textmode:origin_position:textmatrix:()

- (id) initWithVersion: |  | (unsigned int) | version
font: |  | (FSFont*) | font
font_size: |  | (float) | font_size
charspace: |  | (float) | charspace
wordspace: |  | (float) | wordspace
textmode: |  | (FSTextStateMode) | textmode
origin_position: |  | (FSPointF*) | origin_position
textmatrix: |  | (NSArray<NSNumber *> *) | 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 FSTextStateModeFill 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.

## ◆ set:font:font_size:charspace:wordspace:textmode:origin_position:textmatrix:()

- (void) set: |  | (unsigned int) | version
font: |  | (FSFont*) | font
font_size: |  | (float) | font_size
charspace: |  | (float) | charspace
wordspace: |  | (float) | wordspace
textmode: |  | (FSTextStateMode) | textmode
origin_position: |  | (FSPointF*) | origin_position
textmatrix: |  | (NSArray<NSNumber *> *) | 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 FSTextStateModeFill 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.

## Property Documentation

## ◆ charspace

- (float) charspace
| read write nonatomic assign

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

- (FSFont *) font
| read write nonatomic weak

A font object.

## ◆ font_horizontal_size

- (float) font_horizontal_size
| read write nonatomic assign

Font horizontal size in device units (read-only). If valid, it would be above 0.

## ◆ font_size

- (float) font_size
| read write nonatomic assign

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

## ◆ font_vertical_size

- (float) font_vertical_size
| read write nonatomic assign

Font vertical size in device units (read-only). If valid, it would be above 0.

## ◆ origin_position

- (FSPointF *) origin_position
| read write nonatomic weak

The origin point, in PDF coordinate system.

## ◆ textmatrix

- (NSArray< NSNumber * > *) textmatrix
| read write nonatomic weak

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

- (FSTextStateMode) textmode
| read write nonatomic assign

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

## ◆ version

- (unsigned int) version
| read write nonatomic assign

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

- (float) wordspace
| read write nonatomic assign

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.