Class AccessibilityProperties

    • Constructor Detail

      • AccessibilityProperties

        public AccessibilityProperties()
    • Method Detail

      • getRole

        public java.lang.String getRole()
        Gets the role of element.

        See also StandardRoles.

        Returns:
        the role
      • setRole

        public AccessibilityProperties setRole​(java.lang.String role)
        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.

        Parameters:
        role - the role to be set
        Returns:
        this AccessibilityProperties instance
      • getLanguage

        public java.lang.String getLanguage()
        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.

        Returns:
        the language
      • setLanguage

        public AccessibilityProperties setLanguage​(java.lang.String language)
        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.

        Parameters:
        language - the language to be set
        Returns:
        this AccessibilityProperties instance
      • getActualText

        public java.lang.String getActualText()
        Gets the actual text of element.
        Returns:
        the actual text
      • getAlternateDescription

        public java.lang.String getAlternateDescription()
        Gets the alternate description of element.
        Returns:
        the alternate description
      • setAlternateDescription

        public AccessibilityProperties setAlternateDescription​(java.lang.String alternateDescription)
        Sets the alternate description of element.
        Parameters:
        alternateDescription - the alternation description to be set
        Returns:
        this AccessibilityProperties instance
      • getExpansion

        public java.lang.String getExpansion()
        Gets the expansion of element.

        Expansion it is the expanded form of an abbreviation of structure element.

        Returns:
        the expansion
      • setExpansion

        public AccessibilityProperties setExpansion​(java.lang.String expansion)
        Sets the expansion of element.

        Expansion it is the expanded form of an abbreviation of structure element.

        Parameters:
        expansion - the expansion to be set
        Returns:
        this AccessibilityProperties instance
      • getNamespace

        public PdfNamespace getNamespace()
        Gets the namespace of element.
        Returns:
        the namespace
      • addAttributes

        public AccessibilityProperties addAttributes​(int index,
                                                     PdfStructureAttributes attributes)
        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.

        Parameters:
        index - the attributes index
        attributes - the attributes to be added
        Returns:
        this AccessibilityProperties instance
      • getAttributesList

        public java.util.List<PdfStructureAttributes> getAttributesList()
        Gets the attributes list.
        Returns:
        the attributes list
      • getStructureElementId

        public byte[] getStructureElementId()
        Gets the associated structure element's ID string, if it has one.

        See also PdfStructElem.getStructureElementId().

        Returns:
        the structure element's ID string, or null if there is none