| PdfOCAutoState Class |
Represents an optional content usage application dictionary.
Inheritance Hierarchy Namespace: Patagames.Pdf.Net.Wrappers.OptionalContentAssembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.89.2704
Syntax public class PdfOCAutoState : PdfWrapper
Public Class PdfOCAutoState
Inherits PdfWrapper
public ref class PdfOCAutoState : public PdfWrapper
type PdfOCAutoState =
class
inherit PdfWrapper
end
public class PdfOCAutoState extends PdfWrapper
Patagames.Pdf.Net.Wrappers.OptionalContent.PdfOCAutoState = function();
Type.createClass(
'Patagames.Pdf.Net.Wrappers.OptionalContent.PdfOCAutoState',
Patagames.Pdf.Net.Wrappers.PdfWrapper);
The PdfOCAutoState type exposes the following members.
Constructors Properties | Name | Description |
---|
| Category |
Gets or sets a OCGCategory flags, each of which corresponds to PdfOCUsage property.
|
| Event |
Gets or sets a value defining the situation in which this PdfOCAutoState should be used.
|
| OCGs |
Gets or sets a collection of the optional content groups that should have their states automatically managed based on information in their Usage property.
|
TopRemarks
While the PdfOCUsage can be viewed as information for a document user to examine, it can also be used by viewer applications
to automatically manipulate the state of optional content groups based on external factors such as current system language settings or
zoom level. Document authors can use PdfOCAutoState to specify which properties in the PdfOCUsage should be
consulted to automatically set the state of optional content groups based on such factors.
A PdfOCAutoState class specifies the rules for which PdfOCUsage should be used by viewer applications
to automatically manipulate the state of optional content groups, which groups should be affected, and under which circumstances.
The Event property specifies whether the usage settings should be applied during
viewing, printing, or exporting the document. The OCGs property specifies the set of
optional content groups to which usage settings should be applied. For each of the groups in OCGs,
the properties in its Usage specified by Category are examined to yield a
recommended state for the group. If all the entries yield a recommended state of On,
the group’s state is set to On; otherwise, its state is set to Off.
The Category is used as follows:
- View: The recommended state is the value of the ViewState property. This property allows a document to contain content that is relevant only when the document is viewed interactively, such as instructions for how to interact with the document.
- Print: The recommended state is the value of the PrintState property. If PrintState is Unspecified, the state of the optional content group is left unchanged.
- Export: The recommended state is the value of the ExportState property.
- Zoom: If the current magnification level of the document is greater than or equal to Min and less than Max, an On state is recommended; otherwise, Off is recommended.
- User: The Name property specifies a name or names to match with the user’s identification. The UserType property determines how the Name property is interpreted (name, title, or organization). If there is an exact match, an On state is recommended; otherwise Off is recommended.
- Language: This category allows the selection of content based on the language and locale of the application.
If an exact match to the language and locale is found among the Language properties of the optional content groups
in the PdfOCAutoState list, all groups that have exact matches receive an On recommendation.
If no exact match is found, but a partial match is found (that is, the language matches but not the locale), all partially matching groups
that have Preferred properties with a value of On receive an On recommendation.
All other groups receive an Off recommendation.
See Also