ArtifactCollection

ArtifactCollection

概述

ArtifactCollection 是 Aspose.PDF FOSS 中用于 .NET 的类。继承自:IEnumerable<Artifact>。

页面上的制品集合。

此类提供 9 个方法,用于在 .NET 程序中处理 ArtifactCollection 对象。可用的方法包括:Add、CopyTo、Delete、FindByValue、GetEnumerator、Update。安装 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Count、IsReadOnly、IsSynchronized、SyncRoot。

属性

名称类型访问描述
IsReadOnlybool读取此集合是否为只读(始终为 false)。
IsSynchronizedbool读取此集合的访问是否为线程安全(始终为 false)。
SyncRootobject读取用于线程安全访问的同步根。
Countint读取页面上的工件数量。

方法

签名描述
Add(artifact: WatermarkArtifact)向页面添加水印工件。
Add(artifact: BackgroundArtifact)向页面添加背景工件:它会以预置的 /Artifact /Subtype /Background 块的形式渲染到页面内容中,并记录在集合中,以便在重新加载时往返传递。
Add(artifact: Artifact)向集合中添加一个通用工件。
CopyTo(dest: Artifact[], index: int)将此集合的工件复制到 dest,起始于 index。
FindByValue(name: string, expectedValue: string)查找名称条目等于 expectedValue 的工件。
Update(artifact: Artifact)在页面上更新工件的条目(当工件不在集合中时为无操作)。
GetEnumerator()在此 ArtifactCollection 实例上调用 GetEnumerator。
Delete(index: int)删除给定的从1开始的索引处的工件。
Delete(artifact: Artifact)通过引用移除工件;如果不在集合中则不执行任何操作。

另请参阅

 中文