Class StructureBuilder
- Namespace
- PdfSharp.UniversalAccessibility
- Assembly
- PdfSharp-gdi.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
tagstring
BeginElement(PdfLinkAnnotation, string)
Starts a link element.
public void BeginElement(PdfLinkAnnotation linkAnnotation, string altText)
Parameters
linkAnnotationPdfLinkAnnotationThe PdfLinkAnnotation this link is using.
altTextstringThe alternative text for this link.
BeginElement(PdfBlockLevelElementTag)
Starts a block-level element.
public void BeginElement(PdfBlockLevelElementTag tag)
Parameters
tagPdfBlockLevelElementTagThe structure type to be created.
BeginElement(PdfGroupingElementTag)
Starts a grouping element.
public void BeginElement(PdfGroupingElementTag tag)
Parameters
tagPdfGroupingElementTagThe structure type to be created.
BeginElement(PdfIllustrationElementTag, string, XRect)
Starts an illustration element.
public void BeginElement(PdfIllustrationElementTag tag, string altText, XRect boundingBox)
Parameters
tagPdfIllustrationElementTagThe structure type to be created.
altTextstringThe alternative text for this illustration.
boundingBoxXRectThe element’s bounding box.
BeginElement(PdfInlineLevelElementTag)
Starts an inline-level element.
public void BeginElement(PdfInlineLevelElementTag tag)
Parameters
tagPdfInlineLevelElementTagThe structure type to be created.
BeginGroupingElement(string)
Starts a grouping element.
public void BeginGroupingElement(string tag)
Parameters
tagstring
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
tagstring
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
altTextstringThe alternative text.
SetColSpan(int)
Sets the colspan of a table cell.
public void SetColSpan(int colSpan)
Parameters
colSpanintThe number of spanning cells.
SetExpandedText(string)
Sets the content of the "/E" (expanded text) key. Used for abbreviations.
public void SetExpandedText(string expandedText)
Parameters
expandedTextstringThe 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
languagestringThe language of the structure element and its children.
SetRowSpan(int)
Sets the rowspan of a table cell.
public void SetRowSpan(int rowSpan)
Parameters
rowSpanintThe number of spanning cells.