Class DefaultAccessibilityProperties
- Direct Known Subclasses:
-
FormDefaultAccessibilityProperties
AccessibilityProperties that preserves specified accessibility properties. Accessibility properties are used to define properties of structure elements in Tagged PDF documents via TagTreePointer API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected List<PdfStructureAttributes>protected Stringprotected Stringprotected PdfNamespaceprotected Stringprotected Stringprotected List<TagTreePointer>protected String -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a newDefaultAccessibilityPropertiesinstance based on structure element role. -
Method Summary
Modifier and TypeMethodDescriptionaddAttributes(int index, PdfStructureAttributes attributes) Adds the attributes to the element with specified index.addAttributes(PdfStructureAttributes attributes) Adds the attributes to the element.addRef(TagTreePointer treePointer) Adds the reference to other tagged element.Clears the list of attributes.Clears the list of references to other tagged elements.Gets the actual text of element.Gets the alternate description of element.Gets the attributes list.Gets the expansion of element.Gets the language identifier of element.Gets the namespace of element.Gets the phoneme of element.Gets the phonetic alphabet of element.Gets the list of references to other tagged elements.getRole()Gets the role of element.byte[]Gets the associated structure element's ID string, if it has one.setActualText(String actualText) Sets the actual text of element.setAlternateDescription(String alternateDescription) Sets the alternate description of element.setExpansion(String expansion) Sets the expansion of element.setLanguage(String language) Sets the language identifier of element.setNamespace(PdfNamespace namespace) Sets the namespace of element.setPhoneme(String phoneme) Sets the phoneme of element.setPhoneticAlphabet(String phoneticAlphabet) Sets the phonetic alphabet of element.Sets the role of element.setStructureElementId(byte[] id) Sets the associated structure element's ID.Methods inherited from class com.itextpdf.kernel.pdf.tagutils.AccessibilityProperties
setStructureElementIdString
-
Field Details
-
role
-
language
-
actualText
-
alternateDescription
-
expansion
-
attributesList
-
phoneme
-
phoneticAlphabet
-
namespace
-
refs
-
-
Constructor Details
-
DefaultAccessibilityProperties
Instantiates a newDefaultAccessibilityPropertiesinstance based on structure element role.- Parameters:
-
role- the structure element role
-
-
Method Details
-
getRole
Description copied from class:AccessibilityPropertiesGets the role of element.See also
StandardRoles.- Overrides:
-
getRolein classAccessibilityProperties - Returns:
- the role
-
setRole
Description copied from class:AccessibilityPropertiesSets the role of element.See also
StandardRoles.Calling this method with a null argument will make the tagging on the associated layout element "neutral". The effect is that all children of the layout element will be tagged as if they were direct children of the parent element.
- Overrides:
-
setRolein classAccessibilityProperties - Parameters:
-
role- the role to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
getLanguage
Description copied from class:AccessibilityPropertiesGets the language identifier of element. Should be in format xy-ZK (for example en-US).For more information see PDF Specification ISO 32000-1 section 14.9.2.
- Overrides:
-
getLanguagein classAccessibilityProperties - Returns:
- the language
-
setLanguage
Description copied from class:AccessibilityPropertiesSets the language identifier of element. Should be in format xy-ZK (for example en-US).For more information see PDF Specification ISO 32000-1 section 14.9.2.
- Overrides:
-
setLanguagein classAccessibilityProperties - Parameters:
-
language- the language to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
getActualText
Description copied from class:AccessibilityPropertiesGets the actual text of element.- Overrides:
-
getActualTextin classAccessibilityProperties - Returns:
- the actual text
-
setActualText
Description copied from class:AccessibilityPropertiesSets the actual text of element.- Overrides:
-
setActualTextin classAccessibilityProperties - Parameters:
-
actualText- the actual text to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
getAlternateDescription
Description copied from class:AccessibilityPropertiesGets the alternate description of element.- Overrides:
-
getAlternateDescriptionin classAccessibilityProperties - Returns:
- the alternate description
-
setAlternateDescription
Description copied from class:AccessibilityPropertiesSets the alternate description of element.- Overrides:
-
setAlternateDescriptionin classAccessibilityProperties - Parameters:
-
alternateDescription- the alternation description to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
getExpansion
Description copied from class:AccessibilityPropertiesGets the expansion of element.Expansion it is the expanded form of an abbreviation of structure element.
- Overrides:
-
getExpansionin classAccessibilityProperties - Returns:
- the expansion
-
setExpansion
Description copied from class:AccessibilityPropertiesSets the expansion of element.Expansion it is the expanded form of an abbreviation of structure element.
- Overrides:
-
setExpansionin classAccessibilityProperties - Parameters:
-
expansion- the expansion to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
addAttributes
Description copied from class:AccessibilityPropertiesAdds the attributes to the element.- Overrides:
-
addAttributesin classAccessibilityProperties - Parameters:
-
attributes- the attributes to be added - Returns:
-
this
AccessibilityPropertiesinstance
-
addAttributes
Description copied from class:AccessibilityPropertiesAdds the attributes to the element with specified index.If an attribute with the same O and NS entries is specified more than once, the later (in array order) entry shall take precedence. For more information see PDF Specification ISO-32000 section 14.7.6.
- Overrides:
-
addAttributesin classAccessibilityProperties - Parameters:
-
index- the attributes index -
attributes- the attributes to be added - Returns:
-
this
AccessibilityPropertiesinstance
-
clearAttributes
Description copied from class:AccessibilityPropertiesClears the list of attributes.- Overrides:
-
clearAttributesin classAccessibilityProperties - Returns:
-
this
AccessibilityPropertiesinstance
-
getAttributesList
Description copied from class:AccessibilityPropertiesGets the attributes list.- Overrides:
-
getAttributesListin classAccessibilityProperties - Returns:
- the attributes list
-
getPhoneme
Description copied from class:AccessibilityPropertiesGets the phoneme of element.For more information see
PdfStructElem.setPhoneme(PdfString).- Overrides:
-
getPhonemein classAccessibilityProperties - Returns:
- the phoneme
-
setPhoneme
Description copied from class:AccessibilityPropertiesSets the phoneme of element.For more information see
PdfStructElem.setPhoneme(PdfString).- Overrides:
-
setPhonemein classAccessibilityProperties - Parameters:
-
phoneme- the phoneme to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
getPhoneticAlphabet
Description copied from class:AccessibilityPropertiesGets the phonetic alphabet of element.For more information see
PdfStructElem.setPhoneticAlphabet(PdfName).- Overrides:
-
getPhoneticAlphabetin classAccessibilityProperties - Returns:
- the phonetic alphabet
-
setPhoneticAlphabet
Description copied from class:AccessibilityPropertiesSets the phonetic alphabet of element.For more information see
PdfStructElem.setPhoneticAlphabet(PdfName).- Overrides:
-
setPhoneticAlphabetin classAccessibilityProperties - Parameters:
-
phoneticAlphabet- the phonetic alphabet to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
getNamespace
Description copied from class:AccessibilityPropertiesGets the namespace of element.- Overrides:
-
getNamespacein classAccessibilityProperties - Returns:
- the namespace
-
setNamespace
Description copied from class:AccessibilityPropertiesSets the namespace of element.- Overrides:
-
setNamespacein classAccessibilityProperties - Parameters:
-
namespace- the namespace to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
addRef
Description copied from class:AccessibilityPropertiesAdds the reference to other tagged element.For more information see
PdfStructElem.addRef(PdfStructElem).- Overrides:
-
addRefin classAccessibilityProperties - Parameters:
-
treePointer- the reference to be set - Returns:
-
this
AccessibilityPropertiesinstance
-
getRefsList
Description copied from class:AccessibilityPropertiesGets the list of references to other tagged elements.For more information see
PdfStructElem.addRef(PdfStructElem).- Overrides:
-
getRefsListin classAccessibilityProperties - Returns:
- the list of references
-
clearRefs
Description copied from class:AccessibilityPropertiesClears the list of references to other tagged elements.For more information see
PdfStructElem.addRef(PdfStructElem).- Overrides:
-
clearRefsin classAccessibilityProperties - Returns:
-
this
AccessibilityPropertiesinstance
-
getStructureElementId
public byte[] getStructureElementId()Gets the associated structure element's ID string, if it has one.See also
PdfStructElem.getStructureElementId().- Overrides:
-
getStructureElementIdin classAccessibilityProperties - Returns:
- the structure element's ID string, or null if there is none
-
setStructureElementId
Sets the associated structure element's ID. Passingnullremoves the ID.- Overrides:
-
setStructureElementIdin classAccessibilityProperties - Parameters:
-
id- the element's ID to be set - Returns:
-
this
AccessibilityPropertiesinstance
-