PdfOptionalContentProperties Class
The optional content of a document (/OCProperties, ISO 32000-2, 8.11.4): its groups (the layers) and its configurations. The dictionary is created when a group is added.
public sealed class PdfOptionalContentPropertiesProperties
| Name | Description |
|---|---|
| Configurations | Gets the alternate configurations (/Configs). |
| DefaultConfiguration | Gets the default configuration (/D): the state of the groups when the document is opened; null when the document has no optional content. |
| Dictionary | Gets the optional content properties dictionary of the catalog, or null when the document has none. |
| Groups | Gets the groups of the document (/OCGs). |
Configurations
PdfOptionalContentProperties.csGets the alternate configurations (/Configs).
public IReadOnlyList<PdfOptionalContentConfiguration> Configurations { get; }Property value
DefaultConfiguration
PdfOptionalContentProperties.csGets the default configuration (/D): the state of the groups when the document is opened; null when the document has no optional content.
public PdfOptionalContentConfiguration? DefaultConfiguration { get; }Property value
Dictionary
PdfOptionalContentProperties.csGets the optional content properties dictionary of the catalog, or null when the document has none.
public PdfDictionary? Dictionary { get; }Property value
Gets the groups of the document (/OCGs).
public IReadOnlyList<PdfOptionalContentGroup> Groups { get; }Property value
Methods
| Name | Description |
|---|---|
| AddGroup(string, bool) | Adds a group to the document, at the end of the list of layers viewers show (/Order of the default configuration). |
AddGroup(string, bool)
PdfOptionalContentProperties.csAdds a group to the document, at the end of the list of layers viewers show (/Order of the default configuration).
public PdfOptionalContentGroup AddGroup(string name, bool visible = true)Parameters
namestring- The name of the group.
visiblebool- Whether the group is visible when the document is opened.
Returns
PdfOptionalContentGroup The group.