# OptionalContentGroup

## Content

# Type Alias: OptionalContentGroup

```ts
type OptionalContentGroup = object;
```

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.

## Properties

### creatorInfo?

```ts
optional creatorInfo: object;
```

Metadata about the application that created the optional content group.
This is an optional dictionary that stores application-specific data.

#### Creator

```ts
Creator: string;
```

The name of the application that created the group.

#### Subtype

```ts
Subtype: string;
```

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.

***

### exportState?

```ts
optional exportState: "ON" | "OFF";
```

The 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.

***

### id

```ts
id: string;
```

The unique identifier of the optional content group.

***

### intent?

```ts
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.

***

### name

```ts
name: string;
```

The display name of the optional content group.

***

### printState?

```ts
optional printState: "ON" | "OFF";
```

The print state of the group.
If `"ON"`, the group will be printed.
If `"OFF"`, the group will be hidden in printed output.

***

### type

```ts
type: "OCG" | string;
```

The type of the optional content group.
"OCG" (Optional Content Group) is the standard type, but custom types may be used.

***

### viewState?

```ts
optional viewState: "ON" | "OFF";
```

The 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.

***

### visible

```ts
visible: boolean;
```

The current visibility state of the group in the viewer.
This does not necessarily reflect its default state in the document.

***

### zoom?

```ts
optional zoom: object;
```

Defines a range of zoom levels at which this optional content group should be visible.

#### max?

```ts
optional max: number;
```

The maximum zoom level beyond which the group should be hidden.
Default: `Infinity` (always visible at any zoom level).

#### min?

```ts
optional min: number;
```

The minimum zoom level at which the group should be visible.
Default: `0` (always visible at any zoom level).
