PDFix SDK  6.5.0
PdsStructTree Struct Referenceabstract

PdsStructTree class. More...

Public Member Functions

virtual PdsDictionaryGetObject ()=0
 Gets the dictionary object corresponding to the structure tree. More...
 
virtual PdsClassMapGetClassMap ()=0
 Gets the PdsClassMap object for the specified structure tree root. More...
 
virtual PdsObjectGetKidObject (int index)=0
 
virtual int GetNumKids ()=0
 Gets the number of kids of the structure tree root. More...
 
virtual PdsRoleMapGetRoleMap ()=0
 Gets the PdsRoleMap object for the specified structure tree root. More...
 
virtual PdsStructElementAcquireStructElement (PdsObject *object)=0
 
virtual bool RemoveKid (int index)=0
 Removes the specified kid from the specified structure tree root. More...
 
virtual PdsStructElementCreateStructElement (const wchar_t *type, int index)=0
 
virtual PdfDocGetDoc ()=0
 Return parent PdfDoc object. More...
 
virtual bool UpdateParentTree ()=0
 Create parent tree based on the struct tree. More...
 

Detailed Description

PdsStructTree class.

The root of the structure tree, which is a central repository for information related to a PDF document�s logical structure. There is at most one PDSTreeRoot in each document.

Member Function Documentation

◆ AcquireStructElement()

virtual PdsStructElement* PdsStructTree::AcquireStructElement ( PdsObject object)
pure virtual

Gets a PdsStructElement from a Pds object. The struct elements is cached, so that subsequent calls on the same object return The same PdsStructElement. The PdsStructElement remains in the cache as long as PdsStructTree exists or PdsStructElement::Release was not called. NOTE: After you are done using the structure element, release it using PdsStructElement::Release to release resources.

Parameters
page_numThe page number of the page to get. The first page is 0.
Returns
The requested page.
See also
PdsStructElement::Release

◆ CreateStructElement()

virtual PdsStructElement* PdsStructTree::CreateStructElement ( const wchar_t *  type,
int  index 
)
pure virtual

Creates a new (but empty) PdsStructElement of specific type. CreateStructElement increments an element�s reference count. The element will not be released until the reference count is zero, or the application terminates. NOTE: After you are done using the element, release it using PdsStructElement::Release to release resources.

Parameters
typeThe name representing the element�s type.
indexPosition where the kid is inserted. If element currently has no kids, index is ignored.
Returns
Acquired PdsStructElement.
See also
PdsStructElement::Release

◆ GetClassMap()

virtual PdsClassMap* PdsStructTree::GetClassMap ( )
pure virtual

Gets the PdsClassMap object for the specified structure tree root.

Returns
The class map, if one exists, nullptr otherwise.

◆ GetDoc()

virtual PdfDoc* PdsStructTree::GetDoc ( )
pure virtual

Return parent PdfDoc object.

See also
PdfDoc::GetStructTree
PdfDoc::CreateStructTree

◆ GetKidObject()

virtual PdsObject* PdsStructTree::GetKidObject ( int  index)
pure virtual

Gets the kid's object at an array index in the specified structure tree root. The immediate children of the structure tree root shall be structure elements only.

Parameters
indexIndex of the kid to obtain.
Returns
Pointer to the kid's object at index.
See also
PdsStructTree::AcquireStructElement

◆ GetNumKids()

virtual int PdsStructTree::GetNumKids ( )
pure virtual

Gets the number of kids of the structure tree root.

Parameters
class_nameThe string of a class name for which an associated attribute objects is found.
Returns
The number of kids of the structure tree root.

◆ GetObject()

virtual PdsDictionary* PdsStructTree::GetObject ( )
pure virtual

Gets the dictionary object corresponding to the structure tree.

Returns
The requested dictionary.

◆ GetRoleMap()

virtual PdsRoleMap* PdsStructTree::GetRoleMap ( )
pure virtual

Gets the PdsRoleMap object for the specified structure tree root.

Returns
The role map, if one exists, nullptr otherwise.

◆ RemoveKid()

virtual bool PdsStructTree::RemoveKid ( int  index)
pure virtual

Removes the specified kid from the specified structure tree root.

Parameters
indexThe index of the kid.
Returns
True if successfull, false othervise.

◆ UpdateParentTree()

virtual bool PdsStructTree::UpdateParentTree ( )
pure virtual

Create parent tree based on the struct tree.

Returns
True if successfull, false othervise.