Annotation

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

All Implemented Interfaces: com.aspose.ms.System.ICloneable

public abstract class Annotation extends BaseParagraph

Class representing an annotation object.

Methods

MethodDescription
acceptAccepts visitor for annotation processing.
changeAfterResizeUpdate parameters and appearance, according to the matrix transform.
createAnnotationFor internal usage only
flattenPlaces annotation contents directly on the page, annotation object will be removed.
getActiveStateGets current annotation appearance state.
getAlignmentff / * / * Returns name of “checked” state according to existing state names. / * / * / *
getAnnotationTypeGets type of annotation.
getAppearanceGets appearance dictionary of the annotation.
getAssignedPageIndexGets the page index (one-based) where the annotation should appear.
getBorderGets annotation border characteristics. {@code Border}
getCharacteristicsGets annotation characteristics.
getColorGets annotation color.
getContentsGets annotation text.
getEngineDictInternal only
getEngineObjFor Internal usage only
getFlagsGet flags of the annotation.
getFullNameGets full qualified name of the annotation.
getHeightGets height of the annotation.
getHorizontalAlignment_Annotation_NewGets or sets text alignment for annotation.
getModifiedGets date and time when annotation was recently modified.
getModifiedInternalGets date and time when annotation was recently modified.
getNameGets annotation name on the page.
getNormalAppearanceGets normal appearance.
getPageGets the page object with which this annotation is associated.
getPageIndexGets index of page which contains annotation.
getPageIndexGets index of page which contains annotation.
getPdfActionsGets list of annotation actions.
getRectGets annotation rectangle.
getRectangleReturns rectangle of annotation taking into consideration page rotation.
getStatesGets appearance dictionary of annotation.
getTextHorizontalAlignmentGets text alignment for annotation.
getWidthGets width of the annotation.
initializeInstance initialization
isUpdateAppearanceOnConvertIf true, annotation appearance will be updated before converting PDF document into image. This allows convert fields correctly but probably demand more time.
isUseFontSubsetIf this property set to true, fonts will be added to document as subsets. Default value is true.
setActiveStateSets current annotation appearance state.
setAlignmentAnnotation alignment. This property is obsolete. Use getHorizontalAlignment_Annotation_New instead.
setAssignedPageIndexSets the page index (one-based) where the annotation should appear.
setBorderSets annotation border characteristics. {@code Border}
setColorSets annotation color.
setContentsSets annotation text.
setFlagsSet flags of the annotation.
setHeightSets height of the annotation.
setHorizontalAlignment_Annotation_NewGets or sets text alignment for annotation.
setModifiedSets date and time when annotation was recently modified.
setModifiedInternalSets date and time when annotation was recently modified.
setNameSets annotation name on the page.
setRectSets annotation rectangle.
setTextHorizontalAlignmentSets text alignmennt for annotation.
setUpdateAppearanceOnConvertIf true, annotation appearance will be updated before converting PDF document into image. This allows convert fields correctly but probably demand more time.
setUseFontSubsetIf this property set to true, fonts will be added to document as subsets. Default value is true.
setWidthSets width of the annotation.

accept

Accepts visitor for annotation processing.

changeAfterResize

Update parameters and appearance, according to the matrix transform.

createAnnotation

For internal usage only

flatten

public void flatten()

Places annotation contents directly on the page, annotation object will be removed.

getActiveState

public String getActiveState()

Gets current annotation appearance state.

Returns: String value

getAlignment

@Deprecated public TextAlignment getAlignment()

ff / * / * Returns name of “checked” state according to existing state names. / * / * / *

Returns: String value /

getAnnotationType

public abstract AnnotationType getAnnotationType()

Gets type of annotation.

Returns: int value @see AnnotationType

getAppearance

public AppearanceDictionary getAppearance()

Gets appearance dictionary of the annotation.

Returns: AppearanceDictionary object

getAssignedPageIndex

public final com.aspose.ms.System.Nullable< Integer > getAssignedPageIndex()

Gets the page index (one-based) where the annotation should appear.

Returns: the page index (one-based) where the annotation should appear.

getBorder

public Border getBorder()

Gets annotation border characteristics. {@code Border}

Returns: Border object

getCharacteristics

public Characteristics getCharacteristics()

Gets annotation characteristics.

Returns: Characteristics object

getColor

public Color getColor()

Gets annotation color.

Returns: Color object

getContents

public String getContents()

Gets annotation text.

Returns: String value

getEngineDict

public com.aspose.pdf.engine.data.IPdfDictionary getEngineDict()

Internal only

Returns: IPdfDictionary object

getEngineObj

public com.aspose.pdf.engine.data.IPdfObject getEngineObj()

For Internal usage only

Returns: Internal onject

getFlags

public int getFlags()

Get flags of the annotation.

Returns: Flags of the annotation @see AnnotationFlags

getFullName

public String getFullName()

Gets full qualified name of the annotation.

Returns: String value

getHeight

public double getHeight()

Gets height of the annotation.

Returns: height of the annotation

getHorizontalAlignment_Annotation_New

@Deprecated public final HorizontalAlignment getHorizontalAlignment_Annotation_New()

Gets or sets text alignment for annotation.

Returns: text alignment for annotation. @see HorizontalAlignment @deprecated Use TextHorizontalAlignment property

getModified

public Date getModified()

Gets date and time when annotation was recently modified.

Returns: date and time when annotation was recently modified.

getModifiedInternal

public com.aspose.ms.System.DateTime getModifiedInternal()

Gets date and time when annotation was recently modified.

Returns: DateTime object

getName

public String getName()

Gets annotation name on the page.

Returns: String value

getNormalAppearance

public XForm getNormalAppearance()

Gets normal appearance.

Returns: XForm object

getPage

public Page getPage()

Gets the page object with which this annotation is associated.

Returns: Page object

getPageIndex

public int getPageIndex()

Gets index of page which contains annotation.

Returns: int value

getPageIndex

Gets index of page which contains annotation.

Returns: int value

getPdfActions

public PdfActionCollection getPdfActions()

Gets list of annotation actions.

Returns: PdfActionCollection instance

getRect

public Rectangle getRect()

Gets annotation rectangle.

Returns: Rectangle object

getRectangle

public Rectangle getRectangle(boolean considerRotation)

Returns rectangle of annotation taking into consideration page rotation.

Parameters:

ParameterTypeDescription
considerRotationIf true, page rotation is taken into consideration.

Returns: Rectangle object

getStates

public AppearanceDictionary getStates()

Gets appearance dictionary of annotation.

Returns: AppearanceDictionary object

getTextHorizontalAlignment

public HorizontalAlignment getTextHorizontalAlignment()

Gets text alignment for annotation.

Returns: text alignment for annotation. @see HorizontalAlignment

getWidth

public double getWidth()

Gets width of the annotation.

Returns: double value, width of the annotation.

initialize

Instance initialization

isUpdateAppearanceOnConvert

public static boolean isUpdateAppearanceOnConvert()

If true, annotation appearance will be updated before converting PDF document into image. This allows convert fields correctly but probably demand more time.

Returns: boolean value

isUseFontSubset

public static boolean isUseFontSubset()

If this property set to true, fonts will be added to document as subsets. Default value is true.

Returns: boolean value

setActiveState

Sets current annotation appearance state.

setAlignment

Annotation alignment. This property is obsolete. Use getHorizontalAlignment_Annotation_New instead.

setAssignedPageIndex

Sets the page index (one-based) where the annotation should appear.

setBorder

Sets annotation border characteristics. {@code Border}

setColor

Sets annotation color.

setContents

Sets annotation text.

setFlags

public void setFlags(int value)

Set flags of the annotation.

Parameters:

ParameterTypeDescription
valueflags of the annotation @see AnnotationFlags

setHeight

public void setHeight(double value)

Sets height of the annotation.

Parameters:

ParameterTypeDescription
valueheight of the annotation

setHorizontalAlignment_Annotation_New

Gets or sets text alignment for annotation.

setModified

Sets date and time when annotation was recently modified.

setModifiedInternal

Sets date and time when annotation was recently modified.

setName

Sets annotation name on the page.

setRect

Sets annotation rectangle.

setTextHorizontalAlignment

Sets text alignmennt for annotation.

setUpdateAppearanceOnConvert

public static void setUpdateAppearanceOnConvert(boolean value)

If true, annotation appearance will be updated before converting PDF document into image. This allows convert fields correctly but probably demand more time.

Parameters:

ParameterTypeDescription
valueboolean value

setUseFontSubset

public static void setUseFontSubset(boolean value)

If this property set to true, fonts will be added to document as subsets. Default value is true.

Parameters:

ParameterTypeDescription
valueboolean value

setWidth

public void setWidth(double value)

Sets width of the annotation.

Parameters:

ParameterTypeDescription
valuewidth of the annotation.