TextReplaceOptions

TextReplaceOptions

概述

TextReplaceOptions 是 Aspose.PDF FOSS 中用于 .NET 的一个类。

文本替换操作的选项。

此类提供了 3 个用于在 .NET 程序中处理 TextReplaceOptions 对象的方法。可用的方法包括:TextReplaceOptions。在安装了 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序都是可访问的。属性:AdjustmentNewLineSpacing、FontSizeAdjustmentAction、IgnoreParagraphs、LeftAdjustment、Rectangle、ReplaceAdjustmentAction,以及另外 2 项。

属性

名称类型访问描述
ReplaceAdjustmentActionReplaceAdjustment读写在替换文本时要应用的调整操作。
ReplaceScopeScope读写要替换的匹配次数;默认情况下为 REPLACE_FIRST(调用者可通过 REPLACE_ALL 选择替换所有匹配)。
FontSizeAdjustmentActionFontSizeAdjustment读写当替换文本不适配时采用的字体大小策略。
IgnoreParagraphsbool读写匹配时是否忽略段落边界。
RectangleRectangle?读写可选的矩形约束,用于限制替换的适用范围。
LeftAdjustmentdouble读写在被替换的运行左侧应用的水平点调整。
RightAdjustmentdouble读写在被替换的运行右侧应用的水平点调整。
AdjustmentNewLineSpacingdouble读写当替换导致新行时的垂直调整(额外行距)。

方法

签名描述
TextReplaceOptions()默认构造的选项(ReplaceAdjustmentAction = None)。
TextReplaceOptions(adjustment: ReplaceAdjustment)使用特定的调整操作进行构造。
TextReplaceOptions(scope: Scope)使用替换范围进行构造(REPLACE_FIRST 或 REPLACE_ALL)。

另请参阅

 中文