PdfStructureElement Class
An element of the structure tree of a tagged document (ISO 32000-2, 14.7.2): a paragraph, a heading, a figure, a table... Its content is the marked content the content builder tags with it (PdfContentBuilder.BeginStructureElement), its annotations and its child elements.
public sealed class PdfStructureElementProperties
| Name | Description |
|---|---|
| ActualText | Gets or sets the replacement text (/ActualText): the text the content of the element shows, such as the letters of a drawn initial. |
| AlternateDescription | Gets or sets the alternate description (/Alt): the text that replaces a figure or a formula for the readers that cannot show it. |
| Children | Gets the child elements. |
| Dictionary | Gets the dictionary of the element. |
| Expansion | Gets or sets the expansion of an abbreviation or an acronym (/E). |
| Language | Gets or sets the language of the content of the element (/Lang), a BCP 47 tag such as en-US, when it is not the language of the document. |
| Title | Gets or sets the title of the element (/T). |
| Type | Gets the structure type (/S): a standard type such as P, H1 or Figure, or a type of the role map. |
ActualText
PdfStructureElement.csAlternateDescription
PdfStructureElement.csChildren
PdfStructureElement.csDictionary
PdfStructureElement.csExpansion
PdfStructureElement.csLanguage
PdfStructureElement.csMethods
| Name | Description |
|---|---|
| AddAnnotation(PdfAnnotation) | Adds an annotation of a page to the content of the element (an object reference, 14.7.5.3): a link of the text of the element, for instance. |
| AddElement(string) | Adds a child element. |
AddAnnotation(PdfAnnotation)
PdfStructureElement.csAdds an annotation of a page to the content of the element (an object reference, 14.7.5.3): a link of the text of the element, for instance.
public void AddAnnotation(PdfAnnotation annotation)Parameters
annotationPdfAnnotation- The annotation.
Exceptions
ArgumentException- The annotation is not on a page of the document.
AddElement(string)
PdfStructureElement.csAdds a child element.
public PdfStructureElement AddElement(string type)Parameters
typestring- The structure type: a standard type such as
P,H1,FigureorTable, or a type ofPdfStructureTree.RoleMap.
Returns
PdfStructureElement The element.