public abstract class Annotation extends BaseParagraph
Class representing annotation object.
Modifier and Type | Field and Description |
---|---|
boolean |
_disableUpdateAppearance
For Internal usage only
|
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(AnnotationSelector visitor)
Accepts visitor for annotation processing.
|
static Annotation |
createAnnotation(com.aspose.pdf.engine.data.IPdfObject annotEngineObj,
Page page)
For internal usage only
Initializes annotation from PDF object which describes the annotation.
|
void |
flatten()
Places annotation contents directly on the page, annotation object will be removed.
|
String |
getActiveState()
Gets current annotation appearance state.
|
int |
getAlignment()
Deprecated.
Use TextHorizontalAlignment property
|
abstract int |
getAnnotationType()
Gets type of annotation.
|
AppearanceDictionary |
getAppearance()
Gets appearance dictionary of the annotation.
|
Border |
getBorder()
Gets annotation border characteristics.
|
Characteristics |
getCharacteristics()
Gets annotation characteristics.
|
Color |
getColor()
Gets annotation color.
|
String |
getContents()
Gets annotation text.
|
com.aspose.pdf.engine.data.IPdfDictionary |
getEngineDict()
Internal only
|
com.aspose.pdf.engine.data.IPdfObject |
getEngineObj()
For Internal usage only
|
int |
getFlags()
Get flags of the annotation.
|
String |
getFullName()
Gets full qualified name of the annotation.
|
double |
getHeight()
Gets height of the annotation.
|
int |
getHorizontalAlignment_Annotation_New()
Deprecated.
Use TextHorizontalAlignment property
|
Date |
getModified()
Gets date and time when annotation was recently modified.
|
com.aspose.ms.System.DateTime |
getModifiedInternal()
Gets date and time when annotation was recently modified.
|
String |
getName()
Gets annotation name on the page.
|
XForm |
getNormalAppearance()
Gets normal appearance.
|
Page |
getPage()
Gets the page object with which this annotation is associated.
|
int |
getPageIndex()
Gets index of page which contains annotation.
|
int |
getPageIndex(Annotation annotation)
Gets index of page which contains annotation.
|
PdfActionCollection |
getPdfActions()
Gets list of annotation actions.
|
Rectangle |
getRect()
Gets annotation rectangle.
|
Rectangle |
getRectangle(boolean considerRotation)
Returns rectangle of annotation taking into consideration page rotation.
|
AppearanceDictionary |
getStates()
Gets appearance dictionary of annotation.
|
int |
getTextHorizontalAlignment()
Gets text alignment for annotation.
|
double |
getWidth()
Gets width of the annotation.
|
void |
initialize(IDocument doc)
Instance initialization
|
static boolean |
isUpdateAppearanceOnConvert()
If true, annotation appearance will be updated before converting PF document into image.
|
static boolean |
isUseFontSubset()
If this property set to true, fonts will be added to document as subsets.
|
void |
setActiveState(String value)
Sets current annotation appearance state.
|
void |
setAlignment(int value)
Deprecated.
Use TextHorizontalAlignment property
|
void |
setBorder(Border value)
Sets annotation border characteristics.
|
void |
setColor(Color value)
Sets annotation color.
|
void |
setContents(String value)
Sets annotation text.
|
void |
setFlags(int value)
Set flags of the annotation.
|
void |
setHeight(double value)
Sets height of the annotation.
|
void |
setHorizontalAlignment_Annotation_New(int value)
Deprecated.
Use TextHorizontalAlignment property
|
void |
setModified(Date value)
Sets date and time when annotation was recently modified.
|
void |
setModifiedInternal(com.aspose.ms.System.DateTime value)
Sets date and time when annotation was recently modified.
|
void |
setName(String value)
Sets annotation name on the page.
|
void |
setRect(Rectangle value)
Sets annotation rectangle.
|
void |
setStructParent(int value) |
void |
setTextHorizontalAlignment(int value)
Sets text alignmennt for annotation.
|
static void |
setUpdateAppearanceOnConvert(boolean value)
If true, annotation appearance will be updated before converting PF document into image.
|
static void |
setUseFontSubset(boolean value)
If this property set to true, fonts will be added to document as subsets.
|
void |
setWidth(double value)
Sets width of the annotation.
|
deepClone, getHorizontalAlignment, getHyperlink, getMargin, getVerticalAlignment, getZIndex, isFirstParagraphInColumn, isInLineParagraph, isInNewPage, isKeptWithNext, setFirstParagraphInColumn, setHorizontalAlignment, setHyperlink, setInLineParagraph, setInNewPage, setKeptWithNext, setMargin, setVerticalAlignment, setZIndex
public boolean _disableUpdateAppearance
public void initialize(IDocument doc)
doc
- IDocument objectpublic com.aspose.pdf.engine.data.IPdfObject getEngineObj()
public com.aspose.pdf.engine.data.IPdfDictionary getEngineDict()
Internal only
public final void setStructParent(int value)
public static boolean isUpdateAppearanceOnConvert()
If true, annotation appearance will be updated before converting PF document into image. This allows convert fields correctly but probably demand more time.
public static void setUpdateAppearanceOnConvert(boolean value)
If true, annotation appearance will be updated before converting PF document into image. This allows convert fields correctly but probably demand more time.
value
- boolean valuepublic static boolean isUseFontSubset()
If this property set to true, fonts will be added to document as subsets. Default value is true.
public static void setUseFontSubset(boolean value)
If this property set to true, fonts will be added to document as subsets. Default value is true.
value
- boolean valuepublic XForm getNormalAppearance()
Gets normal appearance.
public int getFlags()
Get flags of the annotation.
AnnotationFlags
public void setFlags(int value)
Set flags of the annotation.
value
- flags of the annotationAnnotationFlags
public Page getPage()
Gets the page object with which this annotation is associated.
public abstract int getAnnotationType()
Gets type of annotation.
AnnotationType
public double getWidth()
Gets width of the annotation.
public void setWidth(double value)
Sets width of the annotation.
value
- width of the annotation.public PdfActionCollection getPdfActions()
Gets list of annotation actions.
public double getHeight()
Gets height of the annotation.
public void setHeight(double value)
Sets height of the annotation.
value
- height of the annotationpublic Rectangle getRect()
Gets annotation rectangle.
public void setRect(Rectangle value)
Sets annotation rectangle.
value
- Rectangle valuepublic Rectangle getRectangle(boolean considerRotation)
Returns rectangle of annotation taking into consideration page rotation.
considerRotation
- If true, page rotation is taken into consideration.public String getContents()
Gets annotation text.
public void setContents(String value)
Sets annotation text.
value
- String valuepublic String getName()
Gets annotation name on the page.
public void setName(String value)
Sets annotation name on the page.
value
- String valuepublic com.aspose.ms.System.DateTime getModifiedInternal()
Gets date and time when annotation was recently modified.
public Date getModified()
Gets date and time when annotation was recently modified.
public void setModifiedInternal(com.aspose.ms.System.DateTime value)
Sets date and time when annotation was recently modified.
value
- DateTime objectpublic void setModified(Date value)
Sets date and time when annotation was recently modified.
value
- Date objectpublic Color getColor()
Gets annotation color.
public void setColor(Color value)
Sets annotation color.
value
- Color valuepublic Border getBorder()
Gets annotation border characteristics. Border
public void setBorder(Border value)
Sets annotation border characteristics. Border
value
- Border valuepublic String getActiveState()
Gets current annotation appearance state.
public void setActiveState(String value)
Sets current annotation appearance state.
value
- String valuepublic Characteristics getCharacteristics()
Gets annotation characteristics.
public AppearanceDictionary getStates()
Gets appearance dictionary of annotation.
@Deprecated public int getAlignment()
Annotation alignment. This property is obsolete. Use getHorizontalAlignment_Annotation_New instead.
TextAlignment
@Deprecated public void setAlignment(int value)
Annotation alignment. This property is obsolete. Use getHorizontalAlignment_Annotation_New instead.
value
- TextAlignment elementTextAlignment
@Deprecated public final int getHorizontalAlignment_Annotation_New()
Gets or sets text alignment for annotation.
HorizontalAlignment
@Deprecated public final void setHorizontalAlignment_Annotation_New(int value)
Gets or sets text alignment for annotation.
value
- text alignmennt for annotation.HorizontalAlignment
public int getTextHorizontalAlignment()
Gets text alignment for annotation.
HorizontalAlignment
public void setTextHorizontalAlignment(int value)
Sets text alignmennt for annotation.
value
- text alignmennt for annotation.HorizontalAlignment
public static Annotation createAnnotation(com.aspose.pdf.engine.data.IPdfObject annotEngineObj, Page page)
Initializes annotation from PDF object which describes the annotation.
annotEngineObj
- PDF object describing annotationpage
- Page objectpublic abstract void accept(AnnotationSelector visitor)
Accepts visitor for annotation processing.
visitor
- AnnotationSelector object.public void flatten()
Places annotation contents directly on the page, annotation object will be removed.
public String getFullName()
Gets full qualified name of the annotation.
public AppearanceDictionary getAppearance()
Gets appearance dictionary of the annotation.
public int getPageIndex()
Gets index of page which contains annotation.
public int getPageIndex(Annotation annotation)
Gets index of page which contains annotation.
annotation
- Annotation object