DynaPDF Manual - Page 466

Previous Page 465   Index   Next Page 467

Function Reference
Page 466 of 839
If the OCG is also included in an application event, this is the case if AppEvent is non-zero, then the
Content Usage dictionary is used to control the visibility state of the layer. The member Categories
specifies which categories control the visibility state.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
GetOCGContUsage
Syntax:
LBOOL pdfGetOCGContUsage(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// OCG handle or array index
struct TPDFOCGContUsage* Out) // 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 lang 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 returns the properties of the Content Usage dictionary that is associated with an OCG
or layer. If the OCG is not included in an application event, then the contents in this dictionary
serves as pure information.
If the OCG is included in one or more application events, then these settings control also the
visibility state of the OCG. The function GetOCG() returns the events and categories which control
the layer visibility.
If UserNamesCount is greater zero, the dictionary contains also user names. The user names can be
accessed with GetOCGUsageUserName().
 

Previous topic: GetOCG

Next topic: GetOCGCount, GetOCGUsageUserName, GetOCHandle