ApplyAutoStates(PdfOptionalContentState, PdfOptionalContentEvent, PdfOptionalContentUsageContext) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Applies the auto-state (AS) entries of the state's configuration whose Event is usageEvent: each listed group's usage categories give a recommended state, and a group is ON only when all its recommendations are.

public PdfOptionalContentState ApplyAutoStates(PdfOptionalContentState state, PdfOptionalContentEvent usageEvent, PdfOptionalContentUsageContext context)

Parameters

state
PdfOptionalContentState

The current states.

usageEvent
PdfOptionalContentEvent

View when displaying, Print or Export for the duration of those operations.

context
PdfOptionalContentUsageContext

The external factors: zoom, language, user. A category whose factor is not supplied recommends nothing.

Returns

PdfOptionalContentState
The new states; groups without any recommendation keep theirs.

Remarks

ISO 32000-2 §8.11.4.4 and §8.11.4.5. Categories: View, Print, Export (the usage's state; Print without PrintState leaves the group unchanged), Zoom (ON when min ≤ zoom < max), User (ON on an exact name match), Language (ON on an exact match; else, when no group of the entry matches exactly, ON for partial matches that are Preferred; otherwise OFF).