DynaPDF Manual - Page 724

Previous Page 723   Index   Next Page 725

Function Reference
Page 724 of 787
SetOCGContUsage
Syntax:
LBOOL pdfSetOCGContUsage(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// OCG handle
struct TPDFOCGContUsage* Value) // See below
struct TPDFOCGContUsage
{
UI32
StructSize;
// Must be set to sizeof(TPDFOCGContUsage)
UI32
ExportState;
// 0 = Off, 1 = On, PDF_MAX_INT = not set
const char*
InfoCreatorA;
// CreatorInfo -> The application that created the group
const UI16*
InfoCreatorW;
// CreatorInfo -> The application that created the group
const char*
InfoSubtype;
// CreatorInfo -> A name defining the type of content, e.g.
// Artwork, Technical etc.
const char*
LanguageA;
// A language code as described at SetLanguage()
UI16*
LanguageW;
// A language code as described at SetLanguage()
UI32
LangPreferred;
// 0 = Off, 1 = On, PDF_MAX_INT = not set. The preffered state if
// there is a partial but no exact match of the language id.
TOCPageElement PageElement;
// If the group contains a pagination artefact
UI32
PrintState;
// 0 = Off, 1 = On, PDF_MAX_INT = not set
const char*
PrintSubtype;
// The type of content that is controlled by the OCG, e.g.
// Trapping, PrintersMarks or Watermark.
UI32
UserNamesCount; // The user names can be accessed with GetOCGUsageUserName()
TOCUserType
UserType;
// The user for whom the OCG is primarily intendet
UI32
ViewState;
// 0 = Off, 1 = On, PDF_MAX_INT = not set
float
ZoomMin;
// Minimum zoom factor at which the OCG should be On. -1 = not set
float
ZoomMax;
// Maximum zoom factor at which the OCG should be On. -1 = not set
};
typedef enum
{
utIndividual,
utOrganization,
utTitle,
utNotSet
}TOCUserType;
The function creates or changes the Content Usage dictionary of an OCG. The structure must be
initialzed with InitOCGContUsage() before certain settings of it can be changed. Do not initialize the
structure with memset() since this would cause unexpected results!
Notice:
If no members of the structure were changed after initialization then the Content Usage
dictionary of the OCG will be deleted, if it contained already one. Since a Content Usage
dictionary is required for OCGs which are included in an application event, the OCG will also
be deleted from all application events in which it was included.
The information in this dictionary serves as pure information as long as the OCG is not added to an
application event (see AddOCGToAppEvent() for further information).
 

Previous topic: SetNumberFormat

Next topic: SetOCGState, SetOnErrorProc

Start Chat