Skip to content

# PDFStructureTree

Namespace: O2S.Components.PDF4NET.LogicalStructure

Defines the logical structure of a document as a hierarchy of PDFStructureElement objects.

    public class PDFStructureTree

Inheritance Object → PDFStructureTree

## Constructors

### PDFStructureTree()

Initializes a new PDFStructureTree object.

    public PDFStructureTree()

## Properties

### AttributeClassMap

Gets or sets the attributes class map.

    public PDFAttributeClassMap AttributeClassMap { get; set; }

Property Value

PDFAttributeClassMap
A PDFAttributeClassMap object that maps names to attribute objects.

### IdentifierMap

Gets or sets the identifiers map.

    public PDFIdMap IdentifierMap { get; set; }

Property Value

PDFIdMap
A PDFIdMap object that maps identifiers to structure elements.

Remarks

If the PDFStructureElement.ID property is set on a PDFStructureElement object, then a PDFIdMap must be created and the PDFStructureElement.ID must be mapped to the corresponding PDFStructureElement object.

### RoleMap

Gets or sets the roles map.

    public PDFRoleMap RoleMap { get; set; }

Property Value

PDFRoleMap
A PDFRoleMap object that maps structure types used in this document to their approximate equivalents in the set of standard structure types.

### StructureElements

Gets or sets the child or children structure elements.

    public IPDFStructureElement StructureElements { get; set; }

Property Value

IPDFStructureElement
A root structure element or a collection of structure elements representing the roots of the structure tree.

## Methods

### MapObjectReference(PDFImage, PDFStructureElement)

Adds a mapping between an image and a structure element.

    public void MapObjectReference(PDFImage image, PDFStructureElement structureElement)

Parameters

`image` PDFImage
The image that acts as a content item for the structure element.

`structureElement` PDFStructureElement
The structure element that has a PDFObjectReference as children, object reference that points to the image.

Remarks

This method needs to be called when a structure element uses an entire PDF object as content item through a PDFObjectReference.

### MapObjectReference(PDFFormXObject, PDFStructureElement)

Adds a mapping between a form XObject and a structure element.

    public void MapObjectReference(PDFFormXObject formXObject, PDFStructureElement structureElement)

Parameters

`formXObject` PDFFormXObject
The form XObject that acts as a content item for the structure element.

`structureElement` PDFStructureElement
The structure element that has a PDFObjectReference as children, object reference that points to the form XObject.

Remarks

This method needs to be called when a structure element uses an entire PDF object as content item through a PDFObjectReference.

### MapObjectReference(PDFAnnotation, PDFStructureElement)

Adds a mapping between an annotation and a structure element.

    public void MapObjectReference(PDFAnnotation annotation, PDFStructureElement structureElement)

Parameters

`annotation` PDFAnnotation
The annotation that acts as a content item for the structure element.

`structureElement` PDFStructureElement
The structure element that has a PDFObjectReference as child, object reference that points to the annotation.

Remarks

This method needs to be called when a structure element uses an entire PDF object, such as an annotation, as content item through a PDFObjectReference.