Table of Contents

Class PdfStructureElement

Namespace
MiPdf.Tagging
Assembly
MiPdf.dll

An element of the logical structure tree (tagged PDF). Content on pages is linked to an element by drawing it between BeginTag(PdfStructureElement) and EndTag().

public sealed class PdfStructureElement
Inheritance
PdfStructureElement
Inherited Members

Properties

ActualText

Replacement text (/ActualText), e.g. for ligatures or text drawn as graphics.

public string? ActualText { get; set; }

Property Value

string

AlternateText

Alternate description (/Alt), required for figures by PDF/UA.

public string? AlternateText { get; set; }

Property Value

string

Dictionary

The underlying structure element dictionary (/Type /StructElem).

public PdfDictionary Dictionary { get; }

Property Value

PdfDictionary

Language

Natural language of the element (/Lang), e.g. "en-US".

public string? Language { get; set; }

Property Value

string

Reference

The indirect reference of the structure element dictionary.

public PdfReference Reference { get; }

Property Value

PdfReference

Title

Title of the element (/T).

public string? Title { get; set; }

Property Value

string

Type

The structure type (/S), e.g. "P", "H1", "Table".

public string Type { get; }

Property Value

string

Methods

AddAnnotation(PdfAnnotation, PdfPage)

Links an annotation (link, widget, ...) to this element via an object reference (OBJR).

public void AddAnnotation(PdfAnnotation annotation, PdfPage page)

Parameters

annotation PdfAnnotation
page PdfPage

AddChild(string, string?)

Creates a child element at the end of this element's children.

public PdfStructureElement AddChild(string type, string? alternateText = null)

Parameters

type string
alternateText string

Returns

PdfStructureElement

SetAttribute(string, string, PdfObject)

Sets a structure attribute, e.g. SetAttribute("Table", "Scope", PdfName.Get("Column")).

public PdfStructureElement SetAttribute(string owner, string key, PdfObject value)

Parameters

owner string
key string
value PdfObject

Returns

PdfStructureElement