Class OptionalContentCollection
Collection of optional content groups (layers) owned by a Document.
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class OptionalContentCollection
Properties
Groups
All groups in this collection.
Declaration
public IReadOnlyList<OptionalContentGroup> Groups { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<OptionalContentGroup> |
HasGroups
Whether any groups have been added.
Declaration
public bool HasGroups { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
AddGroup(string)
Add a new optional content group with the given display name.
Declaration
public OptionalContentGroup AddGroup(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Returns
| Type | Description |
|---|---|
| OptionalContentGroup |
Clear()
Remove all optional content groups.
Declaration
public void Clear()
Remove(OptionalContentGroup)
Remove a specific optional content group. Returns true if removed.
Declaration
public bool Remove(OptionalContentGroup group)
Parameters
| Type | Name | Description |
|---|---|---|
| OptionalContentGroup | group |
Returns
| Type | Description |
|---|---|
| bool |
RemoveAt(int)
Remove the optional content group at the given zero-based index.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |