Namespace: PdfSharp.UniversalAccessibility
Helper class that adds structure to PDF documents.
public class StructureBuilder
Inheritance Object → StructureBuilder
Gets the current structure element.
public PdfStructureElement CurrentStructureElement { get; }
Starts a grouping element.
public void BeginElement(PdfGroupingElementTag tag)
tag PdfGroupingElementTag
The structure type to be created.
Starts a grouping element.
public void BeginGroupingElement(string tag)
tag String
Starts a block-level element.
public void BeginElement(PdfBlockLevelElementTag tag)
tag PdfBlockLevelElementTag
The structure type to be created.
Starts a block-level element.
public void BeginBlockLevelElement(string tag)
tag String
Starts an inline-level element.
public void BeginElement(PdfInlineLevelElementTag tag)
tag PdfInlineLevelElementTag
The structure type to be created.
Starts an inline-level element.
public void BeginInlineLevelElement(string tag)
tag String
Starts an illustration element.
public void BeginElement(PdfIllustrationElementTag tag, string altText, XRect boundingBox)
tag PdfIllustrationElementTag
The structure type to be created.
altText String
The alternative text for this illustration.
boundingBox XRect
The element’s bounding box.
Starts an illustration element.
public void BeginIllustrationElement(string tag, string altText, XRect boundingRect)
tag String
altText String
boundingRect XRect
Starts an artifact.
public void BeginArtifact()
Starts a link element.
public void BeginElement(PdfLinkAnnotation linkAnnotation, string altText)
linkAnnotation PdfLinkAnnotation
The PdfLinkAnnotation this link is using.
altText String
The alternative text for this link.
Ends the current element.
public void End()
Sets the content of the “/Alt” (alternative text) key. Used e. g. for illustrations.
public void SetAltText(string altText)
altText String
The alternative text.
Sets the content of the “/E” (expanded text) key. Used for abbreviations.
public void SetExpandedText(string expandedText)
expandedText String
The expanded text representation of the abbreviation.
Sets the content of the “/Lang” (language) key. The chosen language is used for all children of the current structure element until a child has a new language defined.
public void SetLanguage(string language)
language String
The language of the structure element and its children.
Sets the rowspan of a table cell.
public void SetRowSpan(int rowSpan)
rowSpan Int32
The number of spanning cells.
Sets the colspan of a table cell.
public void SetColSpan(int colSpan)
colSpan Int32
The number of spanning cells.
Starts the marked content. Used for every marked content with an MCID.
internal void BeginMarkedContentInternal(StructureElementItem steItem)
steItem StructureElementItem
The StructureElementItem to create a marked content for.
Ends all open marked contents that have a marked content with id.
public void EndMarkedContentsWithId()
Called when AddPage was issued.
internal void OnAddPage()
Called when DrawString was issued.
internal void OnDrawString()
Called when e.g. DrawEllipse was issued.
internal void OnDraw()