DynaPDF Manual - Page 339

Previous Page 338   Index   Next Page 340

Function Reference
Page 339 of 860
DeleteOCGFromAppEvent
Syntax:
LBOOL pdfDeleteOCGFromAppEvent(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// OCG Handle
TOCAppEvent Events,
// Bitmask, one or more events
TOCGUsageCategory Categories, // Bitmask, if DelCategoryOnly is true
LBOOL DelCategoryOnly);
// If true, delete only the category from
// the events
The function deletes an OCG or layer from one or more application events, or it deletes only one or
more categories from an application event in which the OCG was found (if DelCategoryOnly is true).
If DelCategoryOnly is true, and if no more categories are left in the application event, then the event
will be deleted. See also AddOCGToAppEvent() and SetOCGContUsage() for further information.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
DeleteOCGFromDisplayTree
Syntax:
LBOOL pdfDeleteOCGFromDisplayTree(
const PPDF* IPDF, // Instance pointer
UI32 OCGHandle,
// OCG handle
LBOOL Recursive)
// Delete all occurrences?
The function deletes a layer or OCG (Optional Content Group) from the display tree of the currently
active layer configuration.
Notice:
If the PDF file was not imported with ImportPDFFile() the function ImportOCProperties() must
be called in order to import the global Optional Content Properties.
It is also required to load a layer configuration with LoadLayerConfig() before the function can
be called.
The display tree is a linked list that contains UI nodes. UI stands for User Interface. Every node in
this tree can contain an OCG or an array of OCGs with an optional label.
This function can be used to delete an OCG from the display tree without traversing every node of it
with GetOCUINode() beforehand. Therefore, the function is suitable for console applications but
GUI based applications should use DeleteOCUINode() instead. DeleteOCUINode() can also be used
to delete the entire display tree with just one function call.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: DeleteJavaScripts, DeleteNamedDest, DeleteNamedDestByIndex

Next topic: DeleteOCUINode, DeleteOutputIntent