PdfStructureTree Class
The structure tree of a tagged document (ISO 32000-2, 14.7 and 14.8): the logical structure of its content, which assistive technologies read, and the parent tree that maps the marked content of the pages back to its elements.
public sealed class PdfStructureTreeRemarks
The tree is created in the document when the first element is added. Each page whose content is tagged gets a /StructParents key, each tagged annotation a /StructParent key; the parent tree, the /MarkInfo entry of the catalog and the tab order of the pages are written when the document is saved, when the tree was changed through this class: a tree that is only read is saved as it is.
Properties
| Name | Description |
|---|---|
| Elements | Gets the elements at the top of the tree. PDF/UA expects one Document element that holds the others. |
| Exists | Gets a value indicating whether the document has a structure tree. |
| RoleMap | Gets the role map (/RoleMap, 14.7.3): the custom structure types of the document mapped to the types they are, such as Heading1 to H1. |
Elements
PdfStructureTree.csGets the elements at the top of the tree. PDF/UA expects one Document element that holds the others.
public IReadOnlyList<PdfStructureElement> Elements { get; }Property value
Exists
PdfStructureTree.csRoleMap
PdfStructureTree.csGets the role map (/RoleMap, 14.7.3): the custom structure types of the document mapped to the types they are, such as Heading1 to H1.
public IReadOnlyDictionary<string, string> RoleMap { get; }Property value
Methods
| Name | Description |
|---|---|
| AddElement(string) | Adds an element at the top of the tree. |
| MapRole(string, string) | Maps a custom structure type to the type it is, in the role map. |
AddElement(string)
PdfStructureTree.csAdds an element at the top of the tree.
public PdfStructureElement AddElement(string type)