com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class FreeTextAnnotation

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


    public final class FreeTextAnnotation
    extends MarkupAnnotation

    Represents a free text annotation that displays text directly on the page. Unlike an ordinary text annotation, a free text annotation has no open or closed state; instead of being displayed in a pop-up window, the text is always visible.

    • Constructor Detail

      • FreeTextAnnotation

        public FreeTextAnnotation(IDocument document,
                                  DefaultAppearance appearance)

        Constructor to use with Generator.

        Parameters:
        document - Document where annotation will be created.
        appearance - Default Appearance
      • FreeTextAnnotation

        public FreeTextAnnotation(Page page,
                                  Rectangle rect,
                                  DefaultAppearance appearance)

        Creates new FreeText 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.
        appearance - The default appearance string to be used in formatting the text.
    • Method Detail

      • getStartingStyle

        public int getStartingStyle()

        Gets line ending style for line starting point.

        Returns:
        LineEnding value
        See Also:
        LineEnding
      • setStartingStyle

        public void setStartingStyle(int value)

        Sets line ending style for line starting point.

        Parameters:
        value - LineEnding value
        See Also:
        LineEnding
      • getEndingStyle

        public int getEndingStyle()

        Gets line ending style for line ending point.

        Returns:
        LineEnding value
        See Also:
        LineEnding
      • setEndingStyle

        public void setEndingStyle(int value)

        Sets line ending style for line ending point.

        Parameters:
        value - LineEnding value
        See Also:
        LineEnding
      • getJustification

        public int getJustification()

        Gets a code specifying the form of quadding (justification) to be used in displaying the annotation's text.

        Returns:
        int value
        See Also:
        Justification
      • setJustification

        public void setJustification(int value)

        Sets a code specifying the form of quadding (justification) to be used in displaying the annotation's text.

        Parameters:
        value - int value
        See Also:
        Justification
      • accept

        public void accept(AnnotationSelector visitor)

        Accepts visitor object to process the annotation.

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

        public String getDefaultAppearance()

        Gets the default appearance string to be used in formatting the text.

        Returns:
        String value
      • setDefaultAppearance

        public void setDefaultAppearance(String value)

        Sets the default appearance string to be used in formatting the text.

        Parameters:
        value - String value
      • getDefaultAppearanceObject

        public DefaultAppearance getDefaultAppearanceObject()

        Object which represents default appearance of FreeText annotation.

        Returns:
        DefaultAppearance object
      • getIntent

        public int getIntent()

        Gets the intent of the free text annotation.

        Returns:
        int value
        See Also:
        FreeTextIntent
      • setIntent

        public void setIntent(int value)

        Sets the intent of the free text annotation.

        Parameters:
        value - int value
        See Also:
        FreeTextIntent
      • getDefaultStyle

        public String getDefaultStyle()

        Gets a default style string.

        Returns:
        String value
      • setDefaultStyle

        public void setDefaultStyle(String value)

        Sets a default style string.

        Parameters:
        value - String value
      • getTextStyle

        public TextStyle getTextStyle()

        Gets or sets style of the text in appearance. when text style is changed, text appearance is updated.

        Returns:
        TextStyle value
      • setTextStyle

        public void setTextStyle(TextStyle value)

        Sets style of the text in appearance. when text style is changed, text appearance is updated.

        Parameters:
        value - TextStyle object
      • getRotate

        public int getRotate()

        Angle of annotation rotation.

        Returns:
        Rotation element
        See Also:
        Rotation
      • setRotate

        public void setRotate(int value)

        Angle of annotation rotation.

        Parameters:
        value - Rotation element
        See Also:
        Rotation
      • getAnnotationType

        public int getAnnotationType()

        Gets type of annotation.

        Specified by:
        getAnnotationType in class Annotation
        Returns:
        int value
        See Also:
        AnnotationType