BeginOptionalContent

Content Streams and Optional Content Groups

Description

Begins an optional-content drawing scope on the selected page. Subsequent drawing commands are marked with the selected optional content group until EndOptionalContent is called

Use this function when only newly drawn commands should belong to the layer. Use SetContentStreamOptional when an existing selected content stream part should be assigned to an optional content group

Syntax

Delphi

Function TPDFlib.BeginOptionalContent(OptionalContentGroupID: Integer): Integer;

ActiveX

Function PDFlib::BeginOptionalContent(OptionalContentGroupID As Long) As Long

DLL

int DLBeginOptionalContent(int InstanceID, int OptionalContentGroupID);

Parameters

OptionalContentGroupIDAn ID returned by the NewOptionalContentGroup, GetOptionalContentGroupID or GetOptionalContentConfigOrderItemID functions

Return values

0The OptionalContentGroupID parameter was not valid or no document was available
1The optional-content drawing scope was opened successfully