OptionalContentContext Class Documentation

classOptionalContentContext : SystemIDisposable

Namespace:Datalogics::PDFL

Inherits from:
SystemIDisposable

Detailed Description

Defines the context for optional content in a PDF.

An Optional Content Context is a status object that defines the context for optional content within a document.

The context tracks the On/Off status for Optional Content Groups (layers) within a document. It contains flags that control whether to display content that is marked as optional.

Constructor & Destructor Documentation

OptionalContentContext

OptionalContentContext(Documentdocument)

Parameters

document: Document

The document for which to create a context.

Creates a context object that represents an optional-content state of the document, using the current state as the initial state for each group (OCG), as determined by the document's optional-content configuration.

~OptionalContentContext

~OptionalContentContext()

Property Documentation

DrawOptionalContent

OptionalContentDrawingPolicyDrawOptionalContent[get, set]

Member Function Documentation

Clone

Returns:

A copy of the original optional content context.

Makes a copy of the optional content context.

Dispose

voidDispose()

Returns:

void

DisposeChildren

voidDisposeChildren()

Returns:

void

Equals

override boolEquals(objectobj)

Parameters

obj: object

Returns:

override bool

GetStateOfOCG

boolGetStateOfOCG(OptionalContentGroupocg)

Parameters

ocg: OptionalContentGroup

The optional content group whose state will be retrieved.

Returns:

bool

Gets the ON-OFF state for the given optional content group (OCG) in this optional content context.

SetOCGStates

voidSetOCGStates(System.Collections.Generic.IList< OptionalContentGroup >ocgs, System.Collections.Generic.IList< System.Boolean >newStates)

Parameters

ocgs: System.Collections.Generic.IList< OptionalContentGroup >

A list of optional-content groups.

newStates: System.Collections.Generic.IList< System.Boolean >

A list of new OCG states corresponding to the list of OCGs, true for ON and false for OFF. The list must contain as many states as there are non-NULL OCGs in the pdocgs list.

Returns:

void

Sets the ON-OFF states for the given optional-content groups (OCGs) in the given optional-content context. The newStates vector must be large enough to hold as many Boolean values as there are OCGs.

SetStateOfOCG

voidSetStateOfOCG(OptionalContentGroupocg, boolnewValue)

Parameters

ocg: OptionalContentGroup

The optional content group whose state will be set.

newValue: bool

The new ON-OFF state for the optional content group.

Returns:

void

Sets the ON-OFF state for the given optional content group (OCG) in this optional content context.

ToString

override stringToString()

Returns:

override string