|
Foxit PDF SDK
|
Public Member Functions | |
| def | GetCharCount () |
| Get character count in current text object. More... | |
| def | GetCharHeightByIndex (index) |
| Get the height of a character specified by index in current text object. More... | |
| def | GetCharPos (index) |
| Get the position of a character specified by index in current text object. More... | |
| def | GetCharWidthByIndex (index) |
| Get the width of a character specified by index in current text object. More... | |
| def | GetText () |
| Get text string. More... | |
| def | GetTextState (page) |
| Get text state information. More... | |
| def | SetText (text) |
| Set text string. More... | |
| def | SetTextState (page, text_state, is_italic, weight) |
| Set text state information. More... | |
Text graphics object is a kind of PDF graphics object, so class TextObject is derived from class GraphicsObject . It offers functions to get/set text graphics object's data.
To create a new text graphics object, please use function fsdk.TextObjectCreate and then use setting functions to set information to the new text graphics object.
| def fsdk.TextObject.GetCharCount | ( | ) |
Get character count in current text object.
| def fsdk.TextObject.GetCharHeightByIndex | ( | index | ) |
Get the height of a character specified by index in current text object.
| [in] | index | The index of character whose position is to be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.TextObject.GetCharCount . |
| def fsdk.TextObject.GetCharPos | ( | index | ) |
Get the position of a character specified by index in current text object.
| [in] | index | The index of character whose position is to be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.TextObject.GetCharCount . |
| def fsdk.TextObject.GetCharWidthByIndex | ( | index | ) |
Get the width of a character specified by index in current text object.
| [in] | index | The index of character whose position is to be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.TextObject.GetCharCount . |
| def fsdk.TextObject.GetText | ( | ) |
Get text string.
| def fsdk.TextObject.GetTextState | ( | page | ) |
Get text state information.
| [in] | page | A valid PDF page.Please ensure that current graphics object just belongs to this page. |
| def fsdk.TextObject.SetText | ( | text | ) |
Set text string.
| [in] | text | New text string. |
| def fsdk.TextObject.SetTextState | ( | page, | |
| text_state, | |||
| is_italic, | |||
| weight | |||
| ) |
Set text state information.
| [in] | page | A valid PDF page.Please ensure that current graphics object just belongs to this page. |
| [in] | text_state | New text state information. |
| [in] | is_italic | true means the text of current graphics object is italic, while false means not. |
| [in] | weight | Original font weight. If the value is larger than 500, that means to use bold. |