SetAnnotOptional

Annotations and hotspot links, Content Streams and Optional Content Groups

Description

Adds an annotation to the specified optional content group.

This allows the annotation to be made visible or hidden using the layers functionality within the PDF viewer.

Syntax

Delphi

function TPDFlib.SetAnnotOptional(Index, OptionalContentGroupID: Integer): Integer;

ActiveX

Function PDFlib::SetAnnotOptional(Index As Long, OptionalContentGroupID As Long) As Long

DLL

int DLSetAnnotOptional(int InstanceID, int Index, int OptionalContentGroupID);

Parameters

IndexThe index of the annotation. The first annotation on the page has an index of 1.
OptionalContentGroupIDAn ID returned by the NewOptionalContentGroup, GetOptionalContentGroupID or GetOptionalContentConfigOrderItemID functions

Return values

0The annotation could not be added to the specified optional content group
1Success