Debenu Quick PDF logo

SetOptionalContentConfigState

Content Streams and Optional Content Groups

Version history

This function was introduced in Quick PDF Library version 8.12.

Description

This function is used to set the state of an optional content group as defined by the specified optional content configuration dictionary.

All optional content configuration dictionaries have a base state (either ON, OFF or Unchanged) and two membership arrays called /ON and /OFF.

A reference to the optional content group is added to the appropriate /ON or /OFF array (or removed from either array) depending on the value of the base state.

A particular optional content group can only be set to Unchanged if the base state of the optional content configuration dictionary is Unchanged.

The base state of the default optional content configuration dictionary (accessed by setting OptionalContentConfigID to 1) is always ON, so optional content groups in this configuration dictionary can only be set to ON or OFF.

Syntax

Delphi

function TDebenuPDFLibrary1511.SetOptionalContentConfigState(
  OptionalContentConfigID, OptionalContentGroupID, NewState: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1511.PDFLibrary::SetOptionalContentConfigState(
  OptionalContentConfigID As Long, OptionalContentGroupID As Long,
  NewState As Long) As Long

DLL

int DPLSetOptionalContentConfigState(int InstanceID, int OptionalContentConfigID,
  int OptionalContentGroupID, int NewState)

Parameters

OptionalContentConfigID The first default optional content configuration dictionary has an ID of 1. Higher numbers are used for other optional content configuration dictionaries.
OptionalContentGroupID An ID returned by the NewOptionalContentGroup, GetOptionalContentGroupID or GetOptionalContentConfigOrderItemID functions
NewState Specifies the state that the optional content group in this configuration dictionary should be set to:
1 = Set to ON
2 = Set to OFF
3 = Set to unchanged (if possible)

Return values

0 The state could not be set
1 The state was set successfully

Copyright © 2014 Debenu. All rights reserved. AboutContactBlogNewsletterSupport