Class MetadataAnnotation


  • public class MetadataAnnotation
    extends Object
    An element of this type describes an Annotation placed on a page of the document.
    • Constructor Detail

      • MetadataAnnotation

        public MetadataAnnotation()
    • Method Detail

      • getAppearance

        @Nullable
        public @Nullable Object getAppearance()
        Defines a set of attributes concerning the appearance of the annotation.
        Returns:
        appearance
      • setAppearance

        public void setAppearance​(Object appearance)
      • getBorder

        @Nullable
        public @Nullable MetadataBorderStyle getBorder()
        Get border
        Returns:
        border
      • getColor

        @Nullable
        public @Nullable String getColor()
        The main color of visible annotations. The color will be specified as a hexadecimal RGB value with a number sign before it.
        Returns:
        color
      • setColor

        public void setColor​(String color)
      • getContents

        @Nullable
        public @Nullable String getContents()
        The annotation's textual contents or (should an annotation of this type not have such contents) it's description.
        Returns:
        contents
      • setContents

        public void setContents​(String contents)
      • getDrawStyle

        @Nullable
        public @Nullable MetadataDrawStyle getDrawStyle()
        Get drawStyle
        Returns:
        drawStyle
      • getHidden

        @Nullable
        public @Nullable Boolean getHidden()
        If this value is set to true, the annotation will not be shown on the page and will not be printed either.
        Returns:
        hidden
      • setHidden

        public void setHidden​(Boolean hidden)
      • getIconName

        @Nullable
        public @Nullable String getIconName()
        If the annotation selects an icon (Text annotations), this is the name of that icon.
        Returns:
        iconName
      • setIconName

        public void setIconName​(String iconName)
      • getInvisible

        @Nullable
        public @Nullable Boolean getInvisible()
        If this value is set to true, the annotation will be visible on the page only when printed, and provided it is a PDF standard annotation.
        Returns:
        invisible
      • setInvisible

        public void setInvisible​(Boolean invisible)
      • getLine

        @Nullable
        public @Nullable MetadataLine getLine()
        Get line
        Returns:
        line
      • getLocked

        @Nullable
        public @Nullable Boolean getLocked()
        If this value is set to true, the annotation will be locked so that no changes can be made to it.
        Returns:
        locked
      • setLocked

        public void setLocked​(Boolean locked)
      • getMarkup

        @Nullable
        public @Nullable MetadataMarkup getMarkup()
        Get markup
        Returns:
        markup
      • getName

        @Nullable
        public @Nullable String getName()
        The annotation's name. **Important:** This name is optional and in the best case unique in the annotation's page context only. Don't use the name to select an annotation, always prefer selecting objects by object ID, when possible.
        Returns:
        name
      • setName

        public void setName​(String name)
      • getObjectKey

        @Nullable
        public @Nullable String getObjectKey()
        The object ID of the annotation. **Info:** A PDF object ID consists of two numbers, where the first number selects the object's number and the second the \"generation\" of the object. The object ID shall always be unique within the context of the document and can be used to select a specific object.
        Returns:
        objectKey
      • setObjectKey

        public void setObjectKey​(String objectKey)
      • getPage

        @Nullable
        public @Nullable Integer getPage()
        The number of the page the annotation is placed on. minimum: 0
        Returns:
        page
      • setPage

        public void setPage​(Integer page)
      • getPopup

        @Nullable
        public @Nullable MetadataPopup getPopup()
        Get popup
        Returns:
        popup
      • getPositions

        @Nullable
        public @Nullable List<MetadataPositions> getPositions()
        Get positions
        Returns:
        positions
      • getPrintable

        @Nullable
        public @Nullable Boolean getPrintable()
        If this value is set to true, the annotation will be included when the page is printed out.
        Returns:
        printable
      • setPrintable

        public void setPrintable​(Boolean printable)
      • getRotatable

        @Nullable
        public @Nullable Boolean getRotatable()
        If this value is set to true, the annotation shall be rotatable according to the displayed page rotation.
        Returns:
        rotatable
      • setRotatable

        public void setRotatable​(Boolean rotatable)
      • getRotation

        @Nullable
        public @Nullable Integer getRotation()
        The annotation's rotation.
        Returns:
        rotation
      • setRotation

        public void setRotation​(Integer rotation)
      • getSubType

        @Nullable
        public @Nullable String getSubType()
        The type of an annotation is always \"Annot\", this is the sub type of the annotation determining the actual behavior and function of the annotation. (i.e. Text, Link, Widget etc.)
        Returns:
        subType
      • setSubType

        public void setSubType​(String subType)
      • getViewable

        @Nullable
        public @Nullable Boolean getViewable()
        If this value is set to true, the annotation will be shown on the document's page.
        Returns:
        viewable
      • setViewable

        public void setViewable​(Boolean viewable)
      • getWritable

        @Nullable
        public @Nullable Boolean getWritable()
        If this value is set to true, it will be possible to change the annotation's contents later on.
        Returns:
        writable
      • setWritable

        public void setWritable​(Boolean writable)
      • getZoomable

        @Nullable
        public @Nullable Boolean getZoomable()
        If this value is set to true, the annotation will adjust its own zoom factor as required for the page in order to always be clearly readable / recognizable.
        Returns:
        zoomable
      • setZoomable

        public void setZoomable​(Boolean zoomable)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object