PDFStructureElement¶
Namespace: O2S.Components.PDF4NET.LogicalStructure
Defines a structure element.
Inheritance Object → PDFStructureElement
Implements IPDFStructureElement, IPDFStructureElementContent
Remarks
Structure elements are the nodes in a structure tree.
Constructors¶
PDFStructureElement()¶
Initializes a new PDFStructureElement object.
PDFStructureElement(String)¶
Initializes a new PDFStructureElement object.
Parameters
type String
The type of this structure element.
Properties¶
ActualText¶
Gets or sets the actual text of the structure element.
Property Value
String
The text that is an exact replacement for the content enclosed by the structure element and its children.
Remarks
This replacement text (which should apply to as small a piece of content as possible) is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes
AlternateDescription¶
Gets or sets the alternate description of the structure element.
Property Value
String
An alternative description of the structure element and its children in humanreadable form,
which is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes
Attributes¶
Gets or sets the attributes of the structure element.
Property Value
PDFStructureElementAttributeCollection
A collection of PDFStructureElementAttribute objects associated with this structure element.
Children¶
Gets or sets the content of this structure element.
Property Value
IPDFStructureElementContent
The children of this structure element.
Remarks
The value of this entry may be one of the following objects or a collection consisting of one or more of the following objects in any combination:
• Another structure element
• An integer marked-content identifier (PDFMarkedContentSequenceIdentifier) denoting a marked-content sequence
• A marked-content reference (PDFMarkedContentReference) denoting a marked-content sequence
• An object reference (PDFObjectReference) denoting a PDF object
Each of these objects other than the first (the structure element) shall be considered to be a content item.
ClassNames¶
Gets or sets the attributes class names.
Property Value
PDFAttributeClassCollection
A collection of attribute class names associated with this structure element.
CosDictionary¶
Gets the underlying COS object.
Property Value
PDFCosDictionary
A PDFCosDictionary object representing the underlying COS object.
ExpandedForm¶
Gets or sets the expanded form of an abbreviation.
Property Value
String
The expanded form of an abbreviation or an acronym.
GenerateMarkedContentSequence¶
Gets or sets a flag indicating whether this structure element will be associated with a marked content sequence.
Property Value
Boolean
If true, a marked content sequence will be generated in the page content stream when the structure element is used.
Remarks
This property is used only with formatted content and flow documents, to inform the layout engine whether to generate a marked content sequence
or not for an object in the hierarchy.
The PDFCanvas.BeginStructureElement(PDFStructureElement) method ignores the value of this property.
ID¶
Gets or sets the ID of this structure element.
Property Value
String
A string designating this structure element.
Remarks
The string shall be unique among all elements in the document's structure hierarchy.
Language¶
Gets or sets the language of the structure element.
Property Value
String
A language identifier specifying the natural language for all text in the structure element except
where overridden by language specifications for nested structure elements or marked content
Page¶
Gets or sets the PDF page that contains the content of this structure element.
Property Value
PDFPage
The PDFPage on which some or all of the content items designated by the PDFStructureElement.Children property shall be rendered.
Parent¶
Gets the parent of this structure element.
Property Value
PDFStructureElement
A structure element that is the direct parent of this object.
Phoneme¶
Gets or sets the phoneme of the structure element.
Property Value
String
A string that may be used as pronunciation hint.
Remarks
It is an exact replacement for content enclosed by the structure element and its children. The value for this property is to be interpreted based on the PDFStructureElement.PhoneticAlphabet property in effect.
PhoneticAlphabet¶
Gets or sets the phonetic alphabet of the structure element.
Property Value
String
The phonetic alphabet used by a PDFStructureElement.Phoneme property.
Remarks
This property applies to the structure element and its children, except where overridden by a child structure element.
Currently defined values are:
• ipa for the International Phonetic Alphabet by the International Phonetic Association
• x-sampa for Extended Speech Assessment Methods Phonetic Alphabet(X-SAMPA)
• zh-Latn-pinyin for Pinyin Latin romanization(Mandarin)
• zh-Latn-wadegile for Wade-Giles romanization(Mandarin)
References¶
Gets or sets the list of references.
Property Value
PDFStructureElementCollection
A collection containing zero, one or more references to PDFStructureElement objects.
Remarks
This property identifies the structure element or elements to which the item of content, contained within this structure element, refers (e.g.footnotes, endnotes, sidebars, etc.).
Revision¶
Gets or sets the revision of this structure element.
Property Value
Int32
The current revision number of this structure element.
Title¶
Gets or sets the title of the structure element.
Property Value
String
A string representing the structure element in humanreadable form
Remarks
The title should characterise the specific structure element, such as Chapter 1, rather than merely a generic element type, such as Chapter.
Type¶
Gets or sets the type of the structure element.
Property Value
String
A string identifying the nature of the structure element and its role within the document, such as a chapter, paragraph, or footnote.
Remarks
Names of structure element types shall conform to the guidelines described in Annex E, "PDF Name Registry", of PDF specification.
A set of standard structure types is defined as constants in PDFStandardStructureTypes class.
Methods¶
AppendChild(IPDFStructureElementContent)¶
Adds a new child for this structure element.
Parameters
child IPDFStructureElementContent
New child to add.