LayerPDSEdit_Layer
ObjectPDSTreeRoot

All logical structure information is in the structure tree, and the PDSTreeRoot is its root. There is at most one PDSTreeRoot in each document.



Typedef Summary
 Typedef
 PDSTreeRoot
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.
Method Summary
 Method
 
void PDSTreeRootCreateClassMap(INPDSTreeRoot treeRoot, OUTPDSClassMap* classMap)
Creates a PDSClassMap in the specified tree root.
 
void PDSTreeRootCreateRoleMap(INPDSTreeRoot treeRoot, OUTPDSRoleMap* roleMap)
Creates and sets the PDSRoleMap of the specified StructTreeRoot element. Any previously existing PDSRoleMap is unlinked.
 
ASBool PDSTreeRootGetClassMap(INPDSTreeRoot treeRoot, OUTPDSClassMap* classMap)
Gets the PDSClassMap object for the specified structure tree root.
 
ASBool PDSTreeRootGetElementFromID(INPDSTreeRoot treeRoot, IN const char* id, INASInt32 numChars, OUTPDSElement* element)
Gets the element associated with the given ID, if any.
 
void PDSTreeRootGetKid(INPDSTreeRoot treeRoot, INASInt32 index, OUTPDSElement* kid)
Gets the kid at an array index in the specified structure tree root.
 
Gets the number of kids of the structure tree root.
 
ASBool PDSTreeRootGetRoleMap(INPDSTreeRoot treeRoot, OUTPDSRoleMap* roleMap)
Gets the PDSRoleMap object for the specified structure tree root.
 
void PDSTreeRootInsertKid(INPDSTreeRoot treeRoot, INPDSElement kid, INASInt32 insertAfter)
Inserts the specified kid element after the given position as a kid of the specified structure tree root.
 
Removes the PDSClassMap of the specified structure tree root element. It does nothing if one does not exist.
 
Removes the specified kid element from the specified structure tree root.
 
Removes the PDSRoleMap of the specified structure tree root element. It does nothing if one does not exist.
 
void PDSTreeRootReplaceKid(INPDSTreeRoot treeRoot, INPDSElement oldKid, INPDSElement newKid)
Replaces structural element oldKid with element newKid as a kid of treeRoot.
 
void PDSTreeRootReplaceStreamRef(PDSTreeRoot treeRoot, CosObj oldStream, CosObj newStream)
Updates the stream entries (Stm) in marked content reference dictionaries to reference a new Cos stream object. It replaces references to the old stream with refererences to the new stream.

Typedefs Detail
PDSTreeRoot 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef CosObj PDSTreeRoot;

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.

See Also


File: PDSExpT.h
Line: 95



Method Detail
PDSTreeRootCreateClassMap()
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootCreateClassMap(INPDSTreeRoot treeRoot, OUTPDSClassMap* classMap)

Creates a PDSClassMap in the specified tree root.

Any previously existing PDSClassMap is unlinked.

This may raise various exceptions.

Parameters

treeRoot — 

The structure tree root in which to create a PDSClassMap.

 
classMap — 

(Filled by the method) The newly created PDSClassMap.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 183
PDSTreeRootCreateRoleMap() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootCreateRoleMap(INPDSTreeRoot treeRoot, OUTPDSRoleMap* roleMap)

Creates and sets the PDSRoleMap of the specified StructTreeRoot element. Any previously existing PDSRoleMap is unlinked.

This may raise various exceptions.

Parameters

treeRoot — 

The structure tree root in which to create a PDSRoleMap.

 
roleMap — 

(Filled by the method) The newly created PDSRoleMap.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 150
PDSTreeRootGetClassMap() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDSTreeRootGetClassMap(INPDSTreeRoot treeRoot, OUTPDSClassMap* classMap)

Gets the PDSClassMap object for the specified structure tree root.

This may throw various exceptions.

Parameters

treeRoot — 

The structure tree root whose PDSClassMap is obtained.

 
classMap — 

(Filled by the method) A pointer to a location in which to return the class map, if one exists. Set it to CosNull if there is no class map. If a NULL pointer is passed, no retrieval will take place.

Returns

true if there is a class map, false otherwise.

See Also

Since

PI_PDS_READ_VERSION >= 0x00040000

File: PDSReadProcs.h
Line: 126
PDSTreeRootGetElementFromID() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDSTreeRootGetElementFromID(INPDSTreeRoot treeRoot, IN const char* id, INASInt32 numChars, OUTPDSElement* element)

Gets the element associated with the given ID, if any.

Parameters

treeRoot — 

The structure tree root in which to search for id.

 
id — 

A pointer to a buffer containing the ID to search for.

 
numChars — 

The number of characters in id.

 
element — 

(Filled by the method) The element corresponding to id. It is undefined if no element has the specified id.

Returns

true if an element for id is found, or false with element undefined if the tree root contains no IDTree value.

See Also

Exceptions

pdsErrWrongTypeParameter is raised if id is NULL or numChars is zero or less.
pdsErrWrongTypeEntry is raised if the IDTree value in treeRoot is not a dictionary.

Since

PI_PDS_READ_VERSION >= 0x00040000

File: PDSReadProcs.h
Line: 149
PDSTreeRootGetKid() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootGetKid(INPDSTreeRoot treeRoot, INASInt32 index, OUTPDSElement* kid)

Gets the kid at an array index in the specified structure tree root.

Parameters

treeRoot — 

The structure tree root whose kid is obtained.

 
index — 

The index of the kid to obtain.

 
kid — 

(Filled by the method) A pointer to the kid at index.

See Also

Exceptions

pdsErrBadPDF is raised if an error is found in the PDF file.

Since

PI_PDS_READ_VERSION >= 0x00040000

File: PDSReadProcs.h
Line: 90
PDSTreeRootGetNumKids() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDSTreeRootGetNumKids(INPDSTreeRoot treeRoot)

Gets the number of kids of the structure tree root.

This may throw various exceptions.

Parameters

treeRoot — 

IN/OUT The structure tree root whose number of kids is obtained.

Returns

The number of kids of the structure tree root.

See Also

Since

PI_PDS_READ_VERSION >= 0x00040000

File: PDSReadProcs.h
Line: 73
PDSTreeRootGetRoleMap() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDSTreeRootGetRoleMap(INPDSTreeRoot treeRoot, OUTPDSRoleMap* roleMap)

Gets the PDSRoleMap object for the specified structure tree root.

This may throw various exceptions.

Parameters

treeRoot — 

The structure tree root whose PDSRoleMap is obtained.

 
roleMap — 

(Filled by the method) A pointer to a location in which to return the role map, if one exists. Set it to CosNull if there is no role map. If a NULL pointer is passed, no retrieval will take place.

Returns

true if there is a role map, false otherwise.

See Also

Since

PI_PDS_READ_VERSION >= 0x00040000

File: PDSReadProcs.h
Line: 108
PDSTreeRootInsertKid() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootInsertKid(INPDSTreeRoot treeRoot, INPDSElement kid, INASInt32 insertAfter)

Inserts the specified kid element after the given position as a kid of the specified structure tree root.

This may raise various exceptions.

Parameters

treeRoot — 

IN/OUT The structure tree root in which a kid is inserted.

 
kid — 

IN/OUT The kid to insert.

 
insertAfter — 

IN/OUT The position after which the kid is inserted. If element currently has no kids, insertAfter is ignored.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 100
PDSTreeRootRemoveClassMap() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootRemoveClassMap(INPDSTreeRoot treeRoot)

Removes the PDSClassMap of the specified structure tree root element. It does nothing if one does not exist.

This may raise various exceptions.

Parameters

treeRoot — 

The structure tree root whose PDSClassMap is removed.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 197
PDSTreeRootRemoveKid() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootRemoveKid(INPDSTreeRoot treeRoot, INPDSElement kid)

Removes the specified kid element from the specified structure tree root.

This may raise various exceptions.

Parameters

treeRoot — 

IN/OUT The structure tree root whose kid is removed.

 
kid — 

IN/OUT The kid to remove.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 117
PDSTreeRootRemoveRoleMap() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootRemoveRoleMap(INPDSTreeRoot treeRoot)

Removes the PDSRoleMap of the specified structure tree root element. It does nothing if one does not exist.

This may raise various exceptions.

Parameters

treeRoot — 

The structure tree root whose PDSRoleMap is removed.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 165
PDSTreeRootReplaceKid() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootReplaceKid(INPDSTreeRoot treeRoot, INPDSElement oldKid, INPDSElement newKid)

Replaces structural element oldKid with element newKid as a kid of treeRoot.

This may raise various exceptions.

Parameters

treeRoot — 

IN/OUT The structure tree root whose kid is replaced.

 
oldKid — 

IN/OUT The kid to replace.

 
newKid — 

IN/OUT The kid that is replacing oldKid.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 134
PDSTreeRootReplaceStreamRef() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDSTreeRootReplaceStreamRef(PDSTreeRoot treeRoot, CosObj oldStream, CosObj newStream)

Updates the stream entries (Stm) in marked content reference dictionaries to reference a new Cos stream object. It replaces references to the old stream with refererences to the new stream.

This may raise various exceptions.

Parameters

treeRoot — 

The structure tree root in which stream references are updated.

 
oldStream — 

The stream reference to replace.

 
newStream — 

The stream reference that is replacing oldStream.

Since

PI_PDS_WRITE_VERSION >= 0x00060000

File: PDSWriteProcs.h
Line: 885