|
Foxit PDF SDK
|
Public 成员函数 | |
| def | IsEmpty () |
| 检查当前对象是否为空。 更多... | |
| def | ReplaceNext (replace_text) |
| 用替换文本替换下一个文本。 更多... | |
| def | ReplacePrev (replace_text) |
| 用替换文本替换上一个文本。 更多... | |
| def | SetPattern (keywords, page_index, find_option) |
| 设置关键字和页面索引以进行搜索和替换。 更多... | |
| def | SetReplaceCallback (replace_callback) |
| 设置替换回调函数。 更多... | |
此类可用于搜索和替换文本。 在使用此模块中的任何类或方法之前,请确保 Foxit PDF SDK 已成功初始化 通过函数 fsdk.LibraryInitialize 使用包含 "AdvEdit" 模块的密钥。
| def fsdk.TextSearchReplace.IsEmpty | ( | ) |
检查当前对象是否为空。
当前对象为空时,意味着当前对象无用。
| def fsdk.TextSearchReplace.ReplaceNext | ( | replace_text | ) |
用替换文本替换下一个文本。
| [in] | replace_text | 要替换的文本。不应为空字符串。 |
| def fsdk.TextSearchReplace.ReplacePrev | ( | replace_text | ) |
用替换文本替换上一个文本。
| [in] | replace_text | 要替换的文本。不应为空字符串。 |
| def fsdk.TextSearchReplace.SetPattern | ( | keywords, | |
| page_index, | |||
| find_option | |||
| ) |
设置关键字和页面索引以进行搜索和替换。
| [in] | keywords | 要替换的文本内容。不应为空字符串。 |
| [in] | page_index | 将被搜索和替换的页面索引。有效范围:从 0 到 (count-1)。count 由 PDF 文档的函数 fsdk.PDFDoc.GetPageCount 返回。 这仅用于 fsdk.TextSearchReplace.ReplacePrev 和 fsdk.TextSearchReplace.ReplaceNext 。 |
| [in] | find_option | 查找选项。应该是有效的查找选项对象。 |
| def fsdk.TextSearchReplace.SetReplaceCallback | ( | replace_callback | ) |
设置替换回调函数。
| [in] | replace_callback | 用于替换的回调对象。这应该由用户实现, 可以为 null。如果为 null,表示找到的文本总是需要被替换。 |