Class OperationTextAnnotation


  • public class OperationTextAnnotation
    extends Object
    An annotation that adds a note icon to a page.
    • Constructor Detail

      • OperationTextAnnotation

        public OperationTextAnnotation()
    • Method Detail

      • getAppearanceGeneration

        @Nullable
        public @Nullable OperationTextAnnotation.AppearanceGenerationEnum getAppearanceGeneration()
        Determines for which named annotations appearance streams shall be generated. **Important:** Per definition some named annotations are defined as standard names and PDF readers shall provide the means to draw those. * always = An appearance stream shall be prepared for all created named annotations. * never = Don't provide appearance streams and rely on PDF readers to dynamically generate a proper representation of named annotations. * nonStandard = Only provide appearance streams for non-standard annotations.
        Returns:
        appearanceGeneration
      • getColor

        @Nullable
        public @Nullable String getColor()
        The annotation color will change the main color of visible annotations. The color needs to 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()
        This value is used to configure the text content of the annotation, with the way in which it is displayed depending heavily on the specific annotation type (for example, in the case of a text note, this would be the text content of the annotation's popup).
        Returns:
        contents
      • setContents

        public void setContents​(String contents)
      • getCreator

        @Nullable
        public @Nullable String getCreator()
        Used to specify the author of the annotation.
        Returns:
        creator
      • setCreator

        public void setCreator​(String creator)
      • getCustomIconName

        @Nullable
        public @Nullable String getCustomIconName()
        Sets a custom icon name for this annotation. **Important:** This name shall always take precedence over possibly set standard names. (icon)
        Returns:
        customIconName
      • setCustomIconName

        public void setCustomIconName​(String customIconName)
      • 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)
      • getIcon

        @Nullable
        public @Nullable OperationTextAnnotation.IconEnum getIcon()
        Used to specify the icon that should be displayed for the note on the page. The following values are available: * check = The text annotation approves the content. * checkmark = The text annotation adds a gray checkmark to the content. * circle = The text annotation is a comment on the circled content. * comment = The text annotation is a comment to the marked contents. * cross = The text annotation marks the content or crosses it out. * crossHair = The text annotation targets the content in the crosshair. * insert = The text annotation is suggesting inserting some content. * key = The text annotation marks or contains a key content/information. * note = The text annotation is a mere note concerning the marked content. * help = The text annotation provides helpful information concerning the marked content. * newParagraph = The text annotation suggests adding a new Paragraph at a specific point. * paragraph = The text annotation is concerning the whole paragraph. * rightArrow = The text annotation is concerning the content to the right. * rightPointer = The text annotation is concerning the content to the right. * star = The text annotation marks content as especially important. * upArrow = The text annotation is concerning the content at the top. * upLeftArrow = The text annotation is concerning the content at the top left. * unnamed = The text annotation shall not provide a predefined name.
        Returns:
        icon
      • getInitialOpen

        @Nullable
        public @Nullable Boolean getInitialOpen()
        If this value is set to \"true,\" the popup for the corresponding \"note\" annotation will be opened as soon as the corresponding document page is viewed.
        Returns:
        initialOpen
      • setInitialOpen

        public void setInitialOpen​(Boolean initialOpen)
      • getIntents

        @Nullable
        public @Nullable String getIntents()
        Used to set the intention of the annotation. **Important:** The intention of an annotation can directly influence it's behaviour and may serve different purposes for different annotation types. Only set this directly, if you know it is necessary and possible to do so.
        Returns:
        intents
      • setIntents

        public void setIntents​(String intents)
      • 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)
      • 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)
      • getName

        @Nullable
        public @Nullable String getName()
        Used to specify the name of the annotation.
        Returns:
        name
      • setName

        public void setName​(String name)
      • getNormalAppearance

        @Nullable
        public @Nullable OperationAppearanceSource getNormalAppearance()
        Get normalAppearance
        Returns:
        normalAppearance
      • getOpacity

        @Nullable
        public @Nullable Integer getOpacity()
        This percentage value is used to set the annotation's transparency. minimum: 0 maximum: 100
        Returns:
        opacity
      • setOpacity

        public void setOpacity​(Integer opacity)
      • getPage

        @Nullable
        public @Nullable Integer getPage()
        Set the number of the page, the annotation shall be placed on. minimum: 1
        Returns:
        page
      • setPage

        public void setPage​(Integer page)
      • getPosition

        @Nullable
        public @Nullable OperationRectangle getPosition()
        Get position
        Returns:
        position
      • 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)
      • getSubject

        @Nullable
        public @Nullable String getSubject()
        Used to specify the subject of the annotation.
        Returns:
        subject
      • setSubject

        public void setSubject​(String subject)
      • 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