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
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
PdfLinkAnnotationThe PdfLinkAnnotation this link is using.
altText
stringThe alternative text for this link.
BeginElement(PdfBlockLevelElementTag)
Starts a block-level element.
public void BeginElement(PdfBlockLevelElementTag tag)
Parameters
tag
PdfBlockLevelElementTagThe structure type to be created.
BeginElement(PdfGroupingElementTag)
Starts a grouping element.
public void BeginElement(PdfGroupingElementTag tag)
Parameters
tag
PdfGroupingElementTagThe structure type to be created.
BeginElement(PdfIllustrationElementTag, string, XRect)
Starts an illustration element.
public void BeginElement(PdfIllustrationElementTag tag, string altText, XRect boundingBox)
Parameters
tag
PdfIllustrationElementTagThe structure type to be created.
altText
stringThe alternative text for this illustration.
boundingBox
XRectThe element’s bounding box.
BeginElement(PdfInlineLevelElementTag)
Starts an inline-level element.
public void BeginElement(PdfInlineLevelElementTag tag)
Parameters
tag
PdfInlineLevelElementTagThe 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
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
stringThe alternative text.
SetColSpan(int)
Sets the colspan of a table cell.
public void SetColSpan(int colSpan)
Parameters
colSpan
intThe 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
stringThe 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
stringThe language of the structure element and its children.
SetRowSpan(int)
Sets the rowspan of a table cell.
public void SetRowSpan(int rowSpan)
Parameters
rowSpan
intThe number of spanning cells.