文本图形对象是一种PDF图形对象,因此TextObject 类派生自 GraphicsObject 类。它提供了获取/设置文本图形对象数据的函数。
要创建新的文本图形对象,请使用fsdk.TextObjectCreate 函数,然后 使用设置函数为新的文本图形对象设置信息。
- 参见
- GraphicsObject
◆ GetCharCount()
| def fsdk.TextObject.GetCharCount |
( |
| ) |
|
◆ GetCharHeightByIndex()
| def fsdk.TextObject.GetCharHeightByIndex |
( |
|
index | ) |
|
获取当前文本对象中指定索引字符的高度。
- 参数
-
- 返回
- 指定字符的高度。
◆ GetCharPos()
| def fsdk.TextObject.GetCharPos |
( |
|
index | ) |
|
获取当前文本对象中指定索引字符的位置。
- 参数
-
- 返回
- 指定字符的位置,在中。
◆ GetCharWidthByIndex()
| def fsdk.TextObject.GetCharWidthByIndex |
( |
|
index | ) |
|
获取当前文本对象中指定索引字符的宽度。
- 参数
-
- 返回
- 指定字符的宽度。
◆ GetText()
| def fsdk.TextObject.GetText |
( |
| ) |
|
◆ GetTextState()
| def fsdk.TextObject.GetTextState |
( |
|
page | ) |
|
获取文本状态信息。
- 参数
-
| [in] | page | 有效的PDF页面。请确保当前图形对象正好属于此页面。 |
- 返回
- 文本状态信息。
◆ SetText()
| def fsdk.TextObject.SetText |
( |
|
text | ) |
|
◆ SetTextState()
| def fsdk.TextObject.SetTextState |
( |
|
page, |
|
|
|
text_state, |
|
|
|
is_italic, |
|
|
|
weight |
|
) |
| |