typedef
CosObj
PDSTreeRoot
;
Creates a new StructTreeRoot element.
If PDDocCreateStructTreeRoot() is called on a PDDoc that already has a structure tree root, it returns without modifying the document.
It raises an exception if pdDoc
already has a StructTreeRoot.
void
PDDocCreateStructTreeRoot(
IN
PDDoc
pdDoc
,
OUT
PDSTreeRoot
*
treeRoot
);
pdDoc | IN/OUT The PDDoc for which the StructTreeRoot element is created.
|
treeRoot | IN/OUT (Filled by the method) The newly-created StructTreeRoot element.
|
ASBool
PDDocGetStructTreeRoot(
IN
PDDoc
pdDoc
,
OUT
PDSTreeRoot
*
treeRoot
);
pdDoc | The PDDoc whose root is obtained.
|
treeRoot | (Filled by the method) The structure tree root.
|
void
PDDocRemoveStructTreeRoot(
IN
PDDoc
pdDoc
);
pdDoc | IN/OUT The PDDoc for which the StructTreeRoot element is removed.
|
Creates a PDSClassMap in the specified tree root.
Any previously existing PDSClassMap is unlinked.
This may raise various exceptions.
void
PDSTreeRootCreateClassMap(
IN
PDSTreeRoot
treeRoot
,
OUT
PDSClassMap
*
classMap
);
treeRoot | The structure tree root in which to create a PDSClassMap.
|
classMap | (Filled by the method) The newly created PDSClassMap.
|
Creates and sets the PDSRoleMap of the specified StructTreeRoot element. Any previously existing PDSRoleMap is unlinked.
This may raise various exceptions.
void
PDSTreeRootCreateRoleMap(
IN
PDSTreeRoot
treeRoot
,
OUT
PDSRoleMap
*
roleMap
);
treeRoot | The structure tree root in which to create a PDSRoleMap.
|
roleMap | (Filled by the method) The newly created PDSRoleMap.
|
Gets the PDSClassMap object for the specified structure tree root.
This may throw various exceptions.
ASBool
PDSTreeRootGetClassMap(
IN
PDSTreeRoot
treeRoot
,
OUT
PDSClassMap
*
classMap
);
treeRoot | The structure tree root whose PDSClassMap is obtained.
|
classMap |
ASBool
PDSTreeRootGetElementFromID(
IN
PDSTreeRoot
treeRoot
,
IN
const
char
*
id
,
IN
ASInt32
numChars
,
OUT
PDSElement
*
element
);
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 . |
true
if an element for id
is found, or false
with element undefined if the tree root contains no IDTree value. is raised if the
IDTree value in treeRoot is not a dictionary. |
void
PDSTreeRootGetKid(
IN
PDSTreeRoot
treeRoot
,
IN
ASInt32
index
,
OUT
PDSElement
*
kid
);
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 . |
is raised if an error is found in the PDF file.
|
Gets the number of kids of the structure tree root.
This may throw various exceptions.
ASInt32
PDSTreeRootGetNumKids(
IN
PDSTreeRoot
treeRoot
);
treeRoot | IN/OUT The structure tree root whose number of kids is obtained.
|
Gets the PDSRoleMap object for the specified structure tree root.
This may throw various exceptions.
ASBool
PDSTreeRootGetRoleMap(
IN
PDSTreeRoot
treeRoot
,
OUT
PDSRoleMap
*
roleMap
);
treeRoot | The structure tree root whose PDSRoleMap is obtained.
|
roleMap |
Inserts the specified kid element after the given position as a kid of the specified structure tree root.
This may raise various exceptions.
void
PDSTreeRootInsertKid(
IN
PDSTreeRoot
treeRoot
,
IN
PDSElement
kid
,
IN
ASInt32
insertAfter
);
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. |
Removes the PDSClassMap of the specified structure tree root element. It does nothing if one does not exist.
This may raise various exceptions.
void
PDSTreeRootRemoveClassMap(
IN
PDSTreeRoot
treeRoot
);
treeRoot | The structure tree root whose PDSClassMap is removed.
|
Removes the specified kid element from the specified structure tree root.
This may raise various exceptions.
void
PDSTreeRootRemoveKid(
IN
PDSTreeRoot
treeRoot
,
IN
PDSElement
kid
);
treeRoot | IN/OUT The structure tree root whose kid is removed.
|
kid | IN/OUT The kid to remove.
|
Removes the PDSRoleMap of the specified structure tree root element. It does nothing if one does not exist.
This may raise various exceptions.
void
PDSTreeRootRemoveRoleMap(
IN
PDSTreeRoot
treeRoot
);
treeRoot | The structure tree root whose PDSRoleMap is removed.
|
Replaces structural element oldKid
with element
newKid
as a kid of treeRoot
.
This may raise various exceptions.
void
PDSTreeRootReplaceKid(
IN
PDSTreeRoot
treeRoot
,
IN
PDSElement
oldKid
,
IN
PDSElement
newKid
);
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 . |
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.
void
PDSTreeRootReplaceStreamRef(
PDSTreeRoot
treeRoot
,
CosObj
oldStream
,
CosObj
newStream
);
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 . |