Class PdfStructureElement
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
AlternateText
Alternate description (/Alt), required for figures by PDF/UA.
public string? AlternateText { get; set; }
Property Value
Dictionary
The underlying structure element dictionary (/Type /StructElem).
public PdfDictionary Dictionary { get; }
Property Value
Language
Natural language of the element (/Lang), e.g. "en-US".
public string? Language { get; set; }
Property Value
Reference
The indirect reference of the structure element dictionary.
public PdfReference Reference { get; }
Property Value
Title
Title of the element (/T).
public string? Title { get; set; }
Property Value
Type
The structure type (/S), e.g. "P", "H1", "Table".
public string Type { get; }
Property Value
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
annotationPdfAnnotationpagePdfPage
AddChild(string, string?)
Creates a child element at the end of this element's children.
public PdfStructureElement AddChild(string type, string? alternateText = null)
Parameters
Returns
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)