TextAnnotation

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.MarkupAnnotation

public final class TextAnnotation extends MarkupAnnotation

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

Constructors

ConstructorDescription
TextAnnotation(IDocument document)Constructor for annotation when used in Generator.
TextAnnotation(Page page, Rectangle rect)Creates new Text annotation on the specified page.
TextAnnotation()Create TextAnnotation instance

Methods

MethodDescription
getOpen()Gets a flag specifying whether the annotation should initially be displayed open.
setOpen(boolean value)Sets a flag specifying whether the annotation should initially be displayed open.
getIcon()Gets an icon to be used in displaying the annotation.
setIcon(int value)Sets an icon to be used in displaying the annotation.
getState()Gets the state to which the original annotation should be set.
setState(int value)Sets the state to which the original annotation should be set.
getAnnotationType()Gets type of annotation.
accept(AnnotationSelector visitor)Accepts visitor object to process the annotation.
getStateModel()Gets state model
changeAfterResize(Matrix transform)Overrides the definition in the base class with an empty body.

TextAnnotation(IDocument document)

public TextAnnotation(IDocument document)

Constructor for annotation when used in Generator.

Parameters:

ParameterTypeDescription
documentIDocumentDocument where text annotation will be created.

TextAnnotation(Page page, Rectangle rect)

public TextAnnotation(Page page, Rectangle rect)

Creates new Text annotation on the specified page.

Parameters:

ParameterTypeDescription
pagePageThe document’s page where annotation should be created.
rectRectangleThe annotation rectangle, defining the location of the annotation on the page.

TextAnnotation()

public TextAnnotation()

Create TextAnnotation instance

getOpen()

public boolean getOpen()

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

Returns: boolean - boolean value

setOpen(boolean value)

public void setOpen(boolean value)

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

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getIcon()

public int getIcon()

Gets an icon to be used in displaying the annotation.

Returns: int - TextIcon value

setIcon(int value)

public void setIcon(int value)

Sets an icon to be used in displaying the annotation.

Parameters:

ParameterTypeDescription
valueintTextIcon value

getState()

public int getState()

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

Returns: int - AnnotationState value

setState(int value)

public void setState(int value)

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

Parameters:

ParameterTypeDescription
valueintAnnotationState value

getAnnotationType()

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: AnnotationType - AnnotationType value

accept(AnnotationSelector visitor)

public void accept(AnnotationSelector visitor)

Accepts visitor object to process the annotation.

Parameters:

ParameterTypeDescription
visitorAnnotationSelectorVisitor object.

getStateModel()

public AnnotationStateModel getStateModel()

Gets state model

Returns: AnnotationStateModel - AnnotationStateModel value

changeAfterResize(Matrix transform)

public void changeAfterResize(Matrix transform)

Overrides the definition in the base class with an empty body.

Parameters:

ParameterTypeDescription
transformMatrixMatrix specifying the transformation.