Table of Contents

Class StructureBuilder

Namespace
PdfSharp.UniversalAccessibility
Assembly
PdfSharp.dll

Helper class that adds structure to PDF documents.

public class StructureBuilder
Inheritance
StructureBuilder
Inherited Members

Properties

CurrentStructureElement

Gets the current structure element.

public PdfStructureElement CurrentStructureElement { get; }

Property Value

PdfStructureElement

Methods

BeginArtifact()

Starts an artifact.

public void BeginArtifact()

BeginBlockLevelElement(string)

Starts a block-level element.

public void BeginBlockLevelElement(string tag)

Parameters

tag string

BeginElement(PdfLinkAnnotation, string)

Starts a link element.

public void BeginElement(PdfLinkAnnotation linkAnnotation, string altText)

Parameters

linkAnnotation PdfLinkAnnotation

The PdfLinkAnnotation this link is using.

altText string

The alternative text for this link.

BeginElement(PdfBlockLevelElementTag)

Starts a block-level element.

public void BeginElement(PdfBlockLevelElementTag tag)

Parameters

tag PdfBlockLevelElementTag

The structure type to be created.

BeginElement(PdfGroupingElementTag)

Starts a grouping element.

public void BeginElement(PdfGroupingElementTag tag)

Parameters

tag PdfGroupingElementTag

The structure type to be created.

BeginElement(PdfIllustrationElementTag, string, XRect)

Starts an illustration element.

public void BeginElement(PdfIllustrationElementTag tag, string altText, XRect boundingBox)

Parameters

tag PdfIllustrationElementTag

The structure type to be created.

altText string

The alternative text for this illustration.

boundingBox XRect

The element’s bounding box.

BeginElement(PdfInlineLevelElementTag)

Starts an inline-level element.

public void BeginElement(PdfInlineLevelElementTag tag)

Parameters

tag PdfInlineLevelElementTag

The structure type to be created.

BeginGroupingElement(string)

Starts a grouping element.

public void BeginGroupingElement(string tag)

Parameters

tag string

BeginIllustrationElement(string, string, XRect)

Starts an illustration element.

public void BeginIllustrationElement(string tag, string altText, XRect boundingRect)

Parameters

tag string
altText string
boundingRect XRect

BeginInlineLevelElement(string)

Starts an inline-level element.

public void BeginInlineLevelElement(string tag)

Parameters

tag string

End()

Ends the current element.

public void End()

EndMarkedContentsWithId()

Ends all open marked contents that have a marked content with ID.

public void EndMarkedContentsWithId()

SetAltText(string)

Sets the content of the "/Alt" (alternative text) key. Used e.g. for illustrations.

public void SetAltText(string altText)

Parameters

altText string

The alternative text.

SetColSpan(int)

Sets the colspan of a table cell.

public void SetColSpan(int colSpan)

Parameters

colSpan int

The number of spanning cells.

SetExpandedText(string)

Sets the content of the "/E" (expanded text) key. Used for abbreviations.

public void SetExpandedText(string expandedText)

Parameters

expandedText string

The expanded text representation of the abbreviation.

SetLanguage(string)

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)

Parameters

language string

The language of the structure element and its children.

SetRowSpan(int)

Sets the rowspan of a table cell.

public void SetRowSpan(int rowSpan)

Parameters

rowSpan int

The number of spanning cells.