Class DefaultAccessibilityProperties
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
Modifier and TypeFieldDescriptionprotected String
protected String
protected List<PdfStructureAttributes>
protected String
protected String
protected PdfNamespace
protected String
protected String
protected List<TagTreePointer>
protected String
-
Constructor Summary
ConstructorDescriptionInstantiates a newDefaultAccessibilityProperties
instance 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 newDefaultAccessibilityProperties
instance based on structure element role.- Parameters:
-
role
- the structure element role
-
-
Method Details
-
getRole
Description copied from class:AccessibilityProperties
Gets the role of element.See also
StandardRoles
.- Overrides:
-
getRole
in classAccessibilityProperties
- Returns:
- the role
-
setRole
Description copied from class:AccessibilityProperties
Sets 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:
-
setRole
in classAccessibilityProperties
- Parameters:
-
role
- the role to be set - Returns:
-
this
AccessibilityProperties
instance
-
getLanguage
Description copied from class:AccessibilityProperties
Gets 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:
-
getLanguage
in classAccessibilityProperties
- Returns:
- the language
-
setLanguage
Description copied from class:AccessibilityProperties
Sets 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:
-
setLanguage
in classAccessibilityProperties
- Parameters:
-
language
- the language to be set - Returns:
-
this
AccessibilityProperties
instance
-
getActualText
Description copied from class:AccessibilityProperties
Gets the actual text of element.- Overrides:
-
getActualText
in classAccessibilityProperties
- Returns:
- the actual text
-
setActualText
Description copied from class:AccessibilityProperties
Sets the actual text of element.- Overrides:
-
setActualText
in classAccessibilityProperties
- Parameters:
-
actualText
- the actual text to be set - Returns:
-
this
AccessibilityProperties
instance
-
getAlternateDescription
Description copied from class:AccessibilityProperties
Gets the alternate description of element.- Overrides:
-
getAlternateDescription
in classAccessibilityProperties
- Returns:
- the alternate description
-
setAlternateDescription
Description copied from class:AccessibilityProperties
Sets the alternate description of element.- Overrides:
-
setAlternateDescription
in classAccessibilityProperties
- Parameters:
-
alternateDescription
- the alternation description to be set - Returns:
-
this
AccessibilityProperties
instance
-
getExpansion
Description copied from class:AccessibilityProperties
Gets the expansion of element.Expansion it is the expanded form of an abbreviation of structure element.
- Overrides:
-
getExpansion
in classAccessibilityProperties
- Returns:
- the expansion
-
setExpansion
Description copied from class:AccessibilityProperties
Sets the expansion of element.Expansion it is the expanded form of an abbreviation of structure element.
- Overrides:
-
setExpansion
in classAccessibilityProperties
- Parameters:
-
expansion
- the expansion to be set - Returns:
-
this
AccessibilityProperties
instance
-
addAttributes
Description copied from class:AccessibilityProperties
Adds the attributes to the element.- Overrides:
-
addAttributes
in classAccessibilityProperties
- Parameters:
-
attributes
- the attributes to be added - Returns:
-
this
AccessibilityProperties
instance
-
addAttributes
Description copied from class:AccessibilityProperties
Adds 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:
-
addAttributes
in classAccessibilityProperties
- Parameters:
-
index
- the attributes index -
attributes
- the attributes to be added - Returns:
-
this
AccessibilityProperties
instance
-
clearAttributes
Description copied from class:AccessibilityProperties
Clears the list of attributes.- Overrides:
-
clearAttributes
in classAccessibilityProperties
- Returns:
-
this
AccessibilityProperties
instance
-
getAttributesList
Description copied from class:AccessibilityProperties
Gets the attributes list.- Overrides:
-
getAttributesList
in classAccessibilityProperties
- Returns:
- the attributes list
-
getPhoneme
Description copied from class:AccessibilityProperties
Gets the phoneme of element.For more information see
PdfStructElem.setPhoneme(PdfString)
.- Overrides:
-
getPhoneme
in classAccessibilityProperties
- Returns:
- the phoneme
-
setPhoneme
Description copied from class:AccessibilityProperties
Sets the phoneme of element.For more information see
PdfStructElem.setPhoneme(PdfString)
.- Overrides:
-
setPhoneme
in classAccessibilityProperties
- Parameters:
-
phoneme
- the phoneme to be set - Returns:
-
this
AccessibilityProperties
instance
-
getPhoneticAlphabet
Description copied from class:AccessibilityProperties
Gets the phonetic alphabet of element.For more information see
PdfStructElem.setPhoneticAlphabet(PdfName)
.- Overrides:
-
getPhoneticAlphabet
in classAccessibilityProperties
- Returns:
- the phonetic alphabet
-
setPhoneticAlphabet
Description copied from class:AccessibilityProperties
Sets the phonetic alphabet of element.For more information see
PdfStructElem.setPhoneticAlphabet(PdfName)
.- Overrides:
-
setPhoneticAlphabet
in classAccessibilityProperties
- Parameters:
-
phoneticAlphabet
- the phonetic alphabet to be set - Returns:
-
this
AccessibilityProperties
instance
-
getNamespace
Description copied from class:AccessibilityProperties
Gets the namespace of element.- Overrides:
-
getNamespace
in classAccessibilityProperties
- Returns:
- the namespace
-
setNamespace
Description copied from class:AccessibilityProperties
Sets the namespace of element.- Overrides:
-
setNamespace
in classAccessibilityProperties
- Parameters:
-
namespace
- the namespace to be set - Returns:
-
this
AccessibilityProperties
instance
-
addRef
Description copied from class:AccessibilityProperties
Adds the reference to other tagged element.For more information see
PdfStructElem.addRef(PdfStructElem)
.- Overrides:
-
addRef
in classAccessibilityProperties
- Parameters:
-
treePointer
- the reference to be set - Returns:
-
this
AccessibilityProperties
instance
-
getRefsList
Description copied from class:AccessibilityProperties
Gets the list of references to other tagged elements.For more information see
PdfStructElem.addRef(PdfStructElem)
.- Overrides:
-
getRefsList
in classAccessibilityProperties
- Returns:
- the list of references
-
clearRefs
Description copied from class:AccessibilityProperties
Clears the list of references to other tagged elements.For more information see
PdfStructElem.addRef(PdfStructElem)
.- Overrides:
-
clearRefs
in classAccessibilityProperties
- Returns:
-
this
AccessibilityProperties
instance
-
getStructureElementId
public byte[] getStructureElementId()Gets the associated structure element's ID string, if it has one.See also
PdfStructElem.getStructureElementId()
.- Overrides:
-
getStructureElementId
in classAccessibilityProperties
- Returns:
- the structure element's ID string, or null if there is none
-
setStructureElementId
Sets the associated structure element's ID. Passingnull
removes the ID.- Overrides:
-
setStructureElementId
in classAccessibilityProperties
- Parameters:
-
id
- the element's ID to be set - Returns:
-
this
AccessibilityProperties
instance
-