OperatorCollection
概述
OperatorCollection 是 Aspose.PDF FOSS 中用于 .NET 的类。继承自:IEnumerable<Operator>,IDisposable。
页面的内容流操作符集合。
此类提供 23 种方法,用于在 .NET 程序中处理 OperatorCollection 对象。可用的方法包括:Accept、Add、CancelUpdate、Clear、Contains、CopyTo、Delete、Dispose、GetEnumerator、Insert、Remove、Replace,以及另外 4 个方法。安装 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Commands、Count、IsFastTextExtractionMode、IsReadOnly。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
Commands | OperatorCollection | 读取 | 公共-API 别名,返回此集合本身(调用者使用 page.Contents.Commands[i])。 |
IsFastTextExtractionMode | bool | 读取 | 指示吸收器/解析器是否处于快速文本提取模式(仅使用字符位置近似,不提供字形宽度度量)。 |
IsReadOnly | bool | 读取 | 始终为 false:调用者可能会添加和移除操作符。 |
Count | int | 读取 | 页面内容流中的操作符数量。 |
方法
| 签名 | 描述 |
|---|---|
Add(op: Operator) | 向集合中添加一个操作符。 |
Add(ops: Operator[]) | 一次调用中添加多个操作符。 |
Add(ops: System.Collections.Generic.ICollection<Operator>) | 一次调用中从任意集合添加多个运算符。 |
Accept(visitor: IOperatorSelector) | 使用给定的选择器访问每个运算符。 |
CancelUpdate() | 取消由 SuppressUpdate 启动的抑制更新窗口,而不刷新待处理的更改。 |
Clear() | 从集合中移除所有运算符。 |
Contains(op: Operator) | 当 op 当前在集合中时为 True。 |
CopyTo(array: Operator[], index: int) | 将实时运算符(内存中的可变列表,而非已解析的缓存)复制到数组中,从指定索引开始。 |
Delete(ops: Operator[]) | 删除 ops 中每个运算符的所有出现。 |
Delete(list: System.Collections.Generic.IList<Operator>) | 删除列表中的所有运算符。 |
Dispose() | 释放集合持有的资源。 |
Insert(index: int, op: Operator) | 在给定的从1开始的索引处插入一个操作符。 |
Insert(at: int, ops: Operator[]) | 在(基于1的)位置插入多个操作符。 |
Insert(at: int, ops: System.Collections.Generic.IList<Operator>) | 在(基于1的)位置插入多个操作符(任意 IList)。 |
Remove(op: Operator) | 删除第一次出现的 op;当操作符被删除时返回 true。 |
Replace(operators: System.Collections.Generic.IList<Operator>) | 就地替换操作符:operators 中的每个操作符会覆盖其 1 基索引位置上的现有操作符。 |
SuppressUpdate() | 在执行一批操作符变更期间,暂停自动 content-stream 重新序列化。 |
ResumeUpdate() | 恢复自动 content-stream 重新序列化。 |
ResumeUpdate(updateAll: bool) | 恢复自动重新序列化,使用可选的全刷新语义(仅存储 updateAll 标志)。 |
UpdateData() | 将待处理的运算符变更持久化到后备内容流。 |
Delete(index: int) | 在给定的以1为起始的索引处移除运算符。 |
GetEnumerator() | 枚举内容流中的所有运算符,作为已键入的 Operator 实例(对于无法识别的命令使用 RawOperator 作为回退)。 |
ToString() | 将所有运算符作为单个字符串返回。 |