Optional
creatorMetadata about the application that created the optional content group. This is an optional dictionary that stores application-specific data.
The name of the application that created the group.
The intended content type of the group. Suggested values include:
"Artwork"
- for graphic design or publishing applications."Technical"
- for technical drawings such as schematics or architectural plans.Optional
exportThe export state of the group.
If "ON"
, content in this group should be included in exported output (e.g., saving, flattening).
If "OFF"
, content in this group should be excluded from export.
The unique identifier of the optional content group.
Optional
intent?: "View" | "Design"Specifies the intended use of the graphics in this group. A PDF processor may selectively render content based on this intent.
"View"
: Intended for on-screen viewing (default)."Design"
: Intended for design-related content.If "Design"
is specified, a creatorInfo
entry should also be included.
The display name of the optional content group.
Optional
printThe print state of the group.
If "ON"
, the group will be printed.
If "OFF"
, the group will be hidden in printed output.
The type of the optional content group. "OCG" (Optional Content Group) is the standard type, but custom types may be used.
Optional
viewThe initial view state of the group when the document is opened.
If "ON"
, the group is visible by default.
If "OFF"
, the group is hidden by default.
The current visibility state of the group in the viewer. This does not necessarily reflect its default state in the document.
Optional
zoom?: { max?: number; min?: number }Defines a range of zoom levels at which this optional content group should be visible.
Optional
max?: numberThe maximum zoom level beyond which the group should be hidden.
Default: Infinity
(always visible at any zoom level).
Optional
min?: numberThe minimum zoom level at which the group should be visible.
Default: 0
(always visible at any zoom level).
Represents an Optional Content Group (OCG), also known as a "Layer" in a PDF document. OCGs allow content to be dynamically shown or hidden based on user interactions or viewing conditions. Defined in ISO 32000-2.