TextReplaceOptions
概述
TextReplaceOptions 是 Aspose.PDF FOSS 中用于 .NET 的一个类。
文本替换操作的选项。
此类提供了 3 个用于在 .NET 程序中处理 TextReplaceOptions 对象的方法。可用的方法包括:TextReplaceOptions。在安装了 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序都是可访问的。属性:AdjustmentNewLineSpacing、FontSizeAdjustmentAction、IgnoreParagraphs、LeftAdjustment、Rectangle、ReplaceAdjustmentAction,以及另外 2 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
ReplaceAdjustmentAction | ReplaceAdjustment | 读写 | 在替换文本时要应用的调整操作。 |
ReplaceScope | Scope | 读写 | 要替换的匹配次数;默认情况下为 REPLACE_FIRST(调用者可通过 REPLACE_ALL 选择替换所有匹配)。 |
FontSizeAdjustmentAction | FontSizeAdjustment | 读写 | 当替换文本不适配时采用的字体大小策略。 |
IgnoreParagraphs | bool | 读写 | 匹配时是否忽略段落边界。 |
Rectangle | Rectangle? | 读写 | 可选的矩形约束,用于限制替换的适用范围。 |
LeftAdjustment | double | 读写 | 在被替换的运行左侧应用的水平点调整。 |
RightAdjustment | double | 读写 | 在被替换的运行右侧应用的水平点调整。 |
AdjustmentNewLineSpacing | double | 读写 | 当替换导致新行时的垂直调整(额外行距)。 |
方法
| 签名 | 描述 |
|---|---|
TextReplaceOptions() | 默认构造的选项(ReplaceAdjustmentAction = None)。 |
TextReplaceOptions(adjustment: ReplaceAdjustment) | 使用特定的调整操作进行构造。 |
TextReplaceOptions(scope: Scope) | 使用替换范围进行构造(REPLACE_FIRST 或 REPLACE_ALL)。 |