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
| Method | Description |
|---|---|
| accept | Accepts visitor for annotation processing. |
| changeAfterResize | Update parameters and appearance, according to the matrix transform. |
| createAnnotation | For internal usage only |
| flatten | Places annotation contents directly on the page, annotation object will be removed. |
| getActiveState | Gets current annotation appearance state. |
| getAlignment | ff / * / * Returns name of “checked” state according to existing state names. / * / * / * |
| getAnnotationType | Gets type of annotation. |
| getAppearance | Gets appearance dictionary of the annotation. |
| getAssignedPageIndex | Gets the page index (one-based) where the annotation should appear. |
| getBorder | Gets annotation border characteristics. {@code Border} |
| getCharacteristics | Gets annotation characteristics. |
| getColor | Gets annotation color. |
| getContents | Gets annotation text. |
| getEngineDict | Internal only |
| getEngineObj | For Internal usage only |
| getFlags | Get flags of the annotation. |
| getFullName | Gets full qualified name of the annotation. |
| getHeight | Gets height of the annotation. |
| getHorizontalAlignment_Annotation_New | Gets or sets text alignment for annotation. |
| getModified | Gets date and time when annotation was recently modified. |
| getModifiedInternal | Gets date and time when annotation was recently modified. |
| getName | Gets annotation name on the page. |
| getNormalAppearance | Gets normal appearance. |
| getPage | Gets the page object with which this annotation is associated. |
| getPageIndex | Gets index of page which contains annotation. |
| getPageIndex | Gets index of page which contains annotation. |
| getPdfActions | Gets list of annotation actions. |
| getRect | Gets annotation rectangle. |
| getRectangle | Returns rectangle of annotation taking into consideration page rotation. |
| getStates | Gets appearance dictionary of annotation. |
| getTextHorizontalAlignment | Gets text alignment for annotation. |
| getWidth | Gets width of the annotation. |
| initialize | Instance initialization |
| isUpdateAppearanceOnConvert | If true, annotation appearance will be updated before converting PDF document into image. This allows convert fields correctly but probably demand more time. |
| isUseFontSubset | If this property set to true, fonts will be added to document as subsets. Default value is true. |
| 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 | Set flags of the annotation. |
| setHeight | Sets height 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 | If true, annotation appearance will be updated before converting PDF document into image. This allows convert fields correctly but probably demand more time. |
| setUseFontSubset | If this property set to true, fonts will be added to document as subsets. Default value is true. |
| setWidth | Sets 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:
| Parameter | Type | Description |
|---|---|---|
| considerRotation | If 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:
| Parameter | Type | Description |
|---|---|---|
| value | flags of the annotation @see AnnotationFlags |
setHeight
public void setHeight(double value)
Sets height of the annotation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | height 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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean 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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean value |
setWidth
public void setWidth(double value)
Sets width of the annotation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | width of the annotation. |