com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class TextAnnotation

  • All Implemented Interfaces:
    com.aspose.ms.System.ICloneable, com.aspose.pdf.engine.ITitledAnnotation


    public final class TextAnnotation
    extends MarkupAnnotation

    Represents a text annotation that is a "sticky note" attached to a point in the PDF document.

    • Constructor Detail

      • TextAnnotation

        public TextAnnotation(IDocument document)

        Constructor for annotation when used in Generator.

        Parameters:
        document - Document where text annotation will be created.
      • TextAnnotation

        public TextAnnotation(Page page,
                      Rectangle rect)

        Creates new Text annotation on the specified page.

        Parameters:
        page - The document's page where annotation should be created.
        rect - The annotation rectangle, defining the location of the annotation on the page.
      • TextAnnotation

        public TextAnnotation()
        Create TextAnnotation instance
    • Method Detail

      • getOpen

        public boolean getOpen()

        Gets a flag specifying whether the annotation should initially be displayed open.

        Returns:
        boolean value
      • setOpen

        public void setOpen(boolean value)

        Sets a flag specifying whether the annotation should initially be displayed open.

        Parameters:
        value - boolean value
      • getIcon

        public int getIcon()

        Gets an icon to be used in displaying the annotation.

        Returns:
        TextIcon value
        See Also:
        TextIcon
      • setIcon

        public void setIcon(int value)

        Sets an icon to be used in displaying the annotation.

        Parameters:
        value - TextIcon value
        See Also:
        TextIcon
      • getState

        public int getState()

        Gets the state to which the original annotation should be set.

        Returns:
        AnnotationState value
        See Also:
        AnnotationState
      • setState

        public void setState(int value)

        Sets the state to which the original annotation should be set.

        Parameters:
        value - AnnotationState value
        See Also:
        AnnotationState
      • getAnnotationType

        public int getAnnotationType()

        Gets type of annotation.

        Specified by:
        getAnnotationType in class Annotation
        Returns:
        AnnotationType value
        See Also:
        AnnotationState
      • accept

        public void accept(AnnotationSelector visitor)

        Accepts visitor object to process the annotation.

        Specified by:
        accept in class Annotation
        Parameters:
        visitor - Visitor object.
      • getStateModel

        public int getStateModel()

        Gets state model

        Returns:
        AnnotationStateModel value
        See Also:
        AnnotationStateModel