Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.pdf.annots.Annot Class Reference
Inheritance diagram for foxit.pdf.annots.Annot:

## Public Types
enum | AppearanceType { AppearanceType.e_AppearanceTypeNormal = 0, AppearanceType.e_AppearanceTypeRollover = 1, AppearanceType.e_AppearanceTypeDown = 2 }
| Enumeration for the type of annotation's appearance. More...
enum | Flags { Flags.e_FlagInvisible = 0x0001, Flags.e_FlagHidden = 0x0002, Flags.e_FlagPrint = 0x0004, Flags.e_FlagNoZoom = 0x0008, Flags.e_FlagNoRotate = 0x0010, Flags.e_FlagNoView = 0x0020, Flags.e_FlagReadOnly = 0x0040, Flags.e_FlagLocked = 0x0080, Flags.e_FlagToggleNoView = 0x0100, Flags.e_FlagLockedContents = 0x0200 }
| Enumeration for PDF annotation flags. More...
enum | HighlightingMode { HighlightingMode.e_HighlightingNone = 0, HighlightingMode.e_HighlightingInvert = 1, HighlightingMode.e_HighlightingOutline = 2, HighlightingMode.e_HighlightingPush = 3, HighlightingMode.e_HighlightingToggle = 4 }
| Enumeration for PDF annotation highlighting mode. More...
enum | MKEntry { MKEntry.e_MKEntryRotation = 0, MKEntry.e_MKEntryBorderColor = 1, MKEntry.e_MKEntryBackgroundColor = 2, MKEntry.e_MKEntryNormalCaption = 3, MKEntry.e_MKEntryRolloverCaption = 4, MKEntry.e_MKEntryDownCaption = 5, MKEntry.e_MKEntryNormalIcon = 6, MKEntry.e_MKEntryRolloverIcon = 7, MKEntry.e_MKEntryDownIcon = 8, MKEntry.e_MKEntryIconFit = 9, MKEntry.e_MKEntryIconCaptionRelation = 10 }
| Enumeration for annotation's MK dictionary (an appearance characteristics) entry. More...
enum | MKIconCaptionRelation { MKIconCaptionRelation.e_MKRelationNoIcon = 0, MKIconCaptionRelation.e_MKRelationNoCaption = 1, MKIconCaptionRelation.e_MKRelationCaptionBelowIcon = 2, MKIconCaptionRelation.e_MKRelationCaptionAboveIcon = 3, MKIconCaptionRelation.e_MKRelationCaptionRight = 4, MKIconCaptionRelation.e_MKRelationCaptionLeft = 5, MKIconCaptionRelation.e_MKRelationCaptionOvrlayOnIcon = 6 }
| Enumeration for icon and caption relative position in annotation's MK dictionary. More...
enum | Property { Property.e_PropertyModifiedDate = 0, Property.e_PropertyCreationDate = 1, Property.e_PropertyBorderColor = 2, Property.e_PropertyFillColor = 3 }
| Enumeration for some PDF annotation property. More...
enum | Type { Type.e_UnknownType = 0, Type.e_Note = 1, Type.e_Link = 2, Type.e_FreeText = 3, Type.e_Line = 4, Type.e_Square = 5, Type.e_Circle = 6, Type.e_Polygon = 7, Type.e_PolyLine = 8, Type.e_Highlight = 9, Type.e_Underline = 10, Type.e_Squiggly = 11, Type.e_StrikeOut = 12, Type.e_Stamp = 13, Type.e_Caret = 14, Type.e_Ink = 15, Type.e_PSInk = 16, Type.e_FileAttachment = 17, Type.e_Sound = 18, Type.e_Movie = 19, Type.e_Widget = 20, Type.e_Screen = 21, Type.e_PrinterMark = 22, Type.e_TrapNet = 23, Type.e_Watermark = 24, Type.e_3D = 25, Type.e_Popup = 26, Type.e_Redact = 27, Type.e_RichMedia = 28, Type.e_PagingSeal = 29 }
| Enumeration for PDF annotation type. More...

## Public Member Functions
| Annot (PDFPage page, PDFDictionary annot_dict)
| Constructor, with PDF page and annotation's PDF dictionary. More...
| Annot (Annot annot)
| Constructor, with another annotation object. More...
| Annot ()
| Constructor.
PDFStream | GetAppearanceStream (Annot.AppearanceType type, string appearance_state)
| Get annotation's appearance stream with specified type and state. More...
int | GetBorderColor ()
| Get border color. More...
BorderInfo | GetBorderInfo ()
| Get border information. More...
string | GetContent ()
| Get content. More...
RectI | GetDeviceRect (Matrix2D matrix)
| Get annotation rectangle in device coordinate system. More...
PDFDictionary | GetDict ()
| Get annotation's dictionary object. More...
Matrix2D | GetDisplayMatrix (Matrix2D page_display_matrix)
| Get the display matrix, from PDF coordinate system to targeted device coordinate system. More...
int | GetFlags ()
| Get annotation flags. More...
int | GetIndex ()
| Get the index of current annotation in the page which current annotation belongs to. More...
DateTime | GetModifiedDateTime ()
| Get last modified date time. More...
PDFDictionary | GetOptionalContent ()
| Get the PDF dictionary of annotation's optional content. More...
PDFPage | GetPage ()
| Get the related PDF page. More...
RectF | GetRect ()
| Get rectangle, in PDF coordinate system. More...
Annot.Type | GetType ()
| Get actual annotation type of current annotation. More...
string | GetUniqueID ()
| Get unique ID. More...
bool | HasProperty (Annot.Property property)
| Whether current annotation has the specified annotation's property. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
bool | IsMarkup ()
| Check if current annotation is a markup annotation. More...
bool | Move (RectF rect)
| Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More...
bool | Move (RectF rect, bool is_reset_appearance)
| Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More...
bool | RemoveProperty (Annot.Property property)
| Remove a specified annotation's property. More...
bool | ResetAppearanceStream ()
| Reset appearance stream. More...
bool | ResetAppearanceStream (bool is_generate_new_appearance_obj)
| Reset appearance stream. More...
void | SetBorderColor (int color)
| Set border color. More...
void | SetBorderInfo (BorderInfo border)
| Set border information. More...
void | SetContent (string content)
| Set content. More...
void | SetFlags (int flags)
| Set annotation flags. More...
void | SetModifiedDateTime (DateTime date_time)
| Set last modified date time. More...
void | SetUniqueID (string unique_id)
| Set unique ID. More...

## Detailed Description

An annotation associates an object such as a note, sound, or movie with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard. PDF includes a wide variety of standard annotation types.
Class Annot is the base class for all kinds of PDF annotations. It offers the base functions to get/set annotation's common properties, to move an annotation or reset appearance stream of an annotation. For concrete annotation types, please refer to derived classes. To get the count of annotations or get/add/remove an annotation, please refer to class pdf::PDFPage.
This class object can also be used to construct objects of other classes in order to do some more operation in annotation or access specified information of annotation:

- To access additional actions, please construct an foxit.pdf.actions.AdditionalAction object with annotation object. Only a few types of annotations may have additional action. For more details, please refer to class foxit.pdf.actions.AdditionalAction .

- To search text in annotation, please construct a foxit.pdf.TextSearch object with annotation object. The searching can only support some types of annotations. For more details, please refer to class foxit.pdf.TextSearch .

Note
  Currently, following kind of functions only support note, highlight, underline, strikeout, squiggly, link, square, circle, free text, stamp, caret, ink, line, polygon, polyline, file attachment, pop-up, widget, screen, PSInk, redact annotations:

  - All the "set" functions in class Annot .

  - Functions Annot.Move , Annot.ResetAppearanceStream , Annot.RemoveProperty .

See also
  foxit.pdf.PDFPage
  foxit.pdf.actions.AdditionalAction
  foxit.pdf.TextSearch

## Member Enumeration Documentation

## ◆ AppearanceType

enum foxit.pdf.annots.Annot.AppearanceType
| strong

Enumeration for the type of annotation's appearance.

Values of this enumeration should be used alone.

Enumerator
e_AppearanceTypeNormal | Annotation's normal appearance.
e_AppearanceTypeRollover | Annotation's rollover appearance.
e_AppearanceTypeDown | Annotation's down appearance.

## ◆ Flags

enum foxit.pdf.annots.Annot.Flags
| strong

Enumeration for PDF annotation flags.

Values of this enumeration can be used alone or in combination.

Enumerator
e_FlagInvisible | Annotation flag: invisible. If set, do not display the annotation if it does not belong to one of the standard annotation types and no annotation handler is available. If clear, display such an non-standard annotation using an appearance stream specified by its appearance dictionary, if any.
e_FlagHidden | Annotation flag: hidden. If set, do not display or print the annotation or allow it to interact with the user, regardless of its annotation type or whether an annotation handler is available.
e_FlagPrint | Annotation flag: print. If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of whether it is displayed on the screen. This can be useful, for example, for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.
e_FlagNoZoom | Annotation flag: no zoom. If set, do not scale the annotation's appearance to match the magnification of the page. The location of the annotation on the page (defined by the upper-left corner of its annotation rectangle) remains fixed, regardless of the page magnification.
e_FlagNoRotate | Annotation flag: no rotate. If set, do not rotate the annotation's appearance to match the rotation of the page. The upper-left corner of the annotation rectangle remains in a fixed location on the page, regardless of the page rotation.
e_FlagNoView | Annotation flag: no view. If set, do not display the annotation on the screen or allow it to interact with the user. The annotation may be printed (depending on the setting of flag foxit.pdf.annots.Annot.Flags.e_FlagPrint ) but should be considered hidden for purposes of on-screen display and user interaction.
e_FlagReadOnly | Annotation flag: read only. If set, do not allow the annotation to interact with the user. The annotation may be displayed or printed (depending on the settings of flags foxit.pdf.annots.Annot.Flags.e_FlagNoView and foxit.pdf.annots.Annot.Flags.e_FlagPrint ) but should not respond to mouse clicks or change its appearance in response to mouse motions. Note This flag is ignored for widget annotations; its function is subsumed by flag foxit.pdf.interform.Field.Flags.e_FlagReadOnly of related form field.
e_FlagLocked | Annotation flag: locked. If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.
e_FlagToggleNoView | Annotation flag: toggle no view. If set, invert the interpretation of the NoView flag for certain events. A typical use is to have an annotation that appears only when a mouse cursor is held over it.
e_FlagLockedContents | Annotation flag: locked contents. If set, do not allow the contents of the annotation to be modified by the user. This flag does not restrict deletion of the annotation or changes to other annotation properties, such as position and size.

## ◆ HighlightingMode

enum foxit.pdf.annots.Annot.HighlightingMode
| strong

Enumeration for PDF annotation highlighting mode.

Values of this enumeration should be used alone.

Enumerator
e_HighlightingNone | Highlighting mode: No highlighting.
e_HighlightingInvert | Highlighting mode: Invert, which is to invert the contents of the annotation rectangle.
e_HighlightingOutline | Highlighting mode: Outline, which is to invert the annotation's border.
e_HighlightingPush | Highlighting mode: Push, which is to display the annotation's down appearance, if any.
e_HighlightingToggle | Highlighting mode: Toggle. This is only useful for widget annotation.

## ◆ MKEntry

enum foxit.pdf.annots.Annot.MKEntry
| strong

Enumeration for annotation's MK dictionary (an appearance characteristics) entry.

Values of this enumeration should be used alone.

Enumerator
e_MKEntryRotation | Rotation entry. "R" in MK dictionary.
e_MKEntryBorderColor | Border color entry. "BC" in MK dictionary.
e_MKEntryBackgroundColor | Background color entry. "BG" in MK dictionary.
e_MKEntryNormalCaption | Normal caption entry. "CA" in MK dictionary. Note Only applicable for widget annotation associated with pushbutton field, check box field or radio button field.
e_MKEntryRolloverCaption | Rollover caption entry. "RC" in MK dictionary. Note Only applicable for widget annotation associated with pushbutton field.
e_MKEntryDownCaption | Down caption (or alternate caption) entry. "AC" in MK dictionary. Note Only applicable for widget annotation associated with pushbutton field.
e_MKEntryNormalIcon | Normal icon entry. "I" in MK dictionary. Note Only applicable for widget annotation associated with pushbutton field.
e_MKEntryRolloverIcon | Rollover icon entry. "RI" in MK dictionary. Note Only applicable for widget annotation associated with pushbutton field.
e_MKEntryDownIcon | Down icon (or alternate icon) entry. "IX" in MK dictionary. Note Only applicable for widget annotation associated with pushbutton field.
e_MKEntryIconFit | Icon fit information entry. "IF" in MK dictionary. Note Only applicable for widget annotation associated with pushbutton field.
e_MKEntryIconCaptionRelation | Icon and caption relation entry. "TP" in MK dictionary. Note Only applicable for widget annotation associated with pushbutton field. This is used to specify where to position the text of widget annotation's mk caption relative to widget annotation's mk icon.

## ◆ MKIconCaptionRelation

enum foxit.pdf.annots.Annot.MKIconCaptionRelation
| strong

Enumeration for icon and caption relative position in annotation's MK dictionary.

Values of this enumeration should be used alone.

Enumerator
e_MKRelationNoIcon | No icon; captin only.
e_MKRelationNoCaption | No caption; icon only.
e_MKRelationCaptionBelowIcon | Caption below the icon.
e_MKRelationCaptionAboveIcon | Caption above the icon.
e_MKRelationCaptionRight | Caption to the right of the icon.
e_MKRelationCaptionLeft | Caption to the left of the icon.
e_MKRelationCaptionOvrlayOnIcon | Caption overlaid directly on the icon.

## ◆ Property

enum foxit.pdf.annots.Annot.Property
| strong

Enumeration for some PDF annotation property.

Values of this enumeration should be used alone.

Enumerator
e_PropertyModifiedDate | Annotation property: modified date.
e_PropertyCreationDate | Annotation property: creation date. Only markup annotations can have creation date property.
e_PropertyBorderColor | Annotation property: border color. Free text annotation can have border color property but not support to remove this property from free text annotation.
e_PropertyFillColor | Annotation property: fill color. Only following types of annotations can have fill color property: square, circle, free text, line, polygon, polyline, redact.

## ◆ Type

enum foxit.pdf.annots.Annot.Type
| strong

Enumeration for PDF annotation type.

Values of this enumeration should be used alone.

Enumerator
e_UnknownType | Annotation type: unknown.
e_Note | Annotation type: note annotation, which is just "Text" annotation - one of standard annotation in <PDF reference 1.7>.
e_Link | Annotation type: link annotation. One of standard annotation in <PDF reference 1.7>.
e_FreeText | Annotation type: free text annotation. One of standard annotation in <PDF reference 1.7>.
e_Line | Annotation type: line annotation. One of standard annotation in <PDF reference 1.7>.
e_Square | Annotation type: square annotation. One of standard annotation in <PDF reference 1.7>.
e_Circle | Annotation type: circle annotation. One of standard annotation in <PDF reference 1.7>.
e_Polygon | Annotation type: polygon annotation. One of standard annotation in <PDF reference 1.7>.
e_PolyLine | Annotation type: polyline annotation. One of standard annotation in <PDF reference 1.7>.
e_Highlight | Annotation type: highlight annotation. One of standard annotation in <PDF reference 1.7>.
e_Underline | Annotation type: underline annotation. One of standard annotation in <PDF reference 1.7>.
e_Squiggly | Annotation type: squiggly annotation. One of standard annotation in <PDF reference 1.7>.
e_StrikeOut | Annotation type: strikeout annotation. One of standard annotation in <PDF reference 1.7>.
e_Stamp | Annotation type: stamp annotation. One of standard annotation in <PDF reference 1.7>.
e_Caret | Annotation type: caret annotation. One of standard annotation in <PDF reference 1.7>.
e_Ink | Annotation type: ink annotation. One of standard annotation in <PDF reference 1.7>.
e_PSInk | Annotation type: pressure sensitive ink annotation.
e_FileAttachment | Annotation type: file attachment annotation. One of standard annotation in <PDF reference 1.7>.
e_Sound | Annotation type: sound annotation. One of standard annotation in <PDF reference 1.7>.
e_Movie | Annotation type: movie annotation. One of standard annotation in <PDF reference 1.7>.
e_Widget | Annotation type: widget annotation. One of standard annotation in <PDF reference 1.7>. Note Foxit PDF SDK treats widget annotation as form control.
e_Screen | Annotation type: screen annotation. One of standard annotation in <PDF reference 1.7>.
e_PrinterMark | Annotation type: printer's mark annotation. One of standard annotation in <PDF reference 1.7>.
e_TrapNet | Annotation type: trap network annotation. One of standard annotation in <PDF reference 1.7>.
e_Watermark | Annotation type: watermark annotation. One of standard annotation in <PDF reference 1.7>.
e_3D | Annotation type: 3D annotation. One of standard annotation in <PDF reference 1.7>.
e_Popup | Annotation type: pop-up annotation. One of standard annotation in <PDF reference 1.7>.
e_Redact | Annotation type: redact annotation.
e_RichMedia | Annotation type: rich media annotation.
e_PagingSeal | Annotation type: paging seal annotation. A Foxit PDF SDK custom annotation type (not a standard annotation type).

## Constructor & Destructor Documentation

## ◆ Annot() [1/2]

foxit.pdf.annots.Annot.Annot | ( | PDFPage | page,
|  | PDFDictionary | annot_dict
| ) |  |
| inline

Constructor, with PDF page and annotation's PDF dictionary.

Parameters

  [in] | page | A valid PDF page.
  [in] | annot_dict | An annotation's PDF dictionary. It should represent an annotation and should be in the PDF page specified by parameter page.

## ◆ Annot() [2/2]

foxit.pdf.annots.Annot.Annot | ( | Annot | annot | ) |
| inline

Constructor, with another annotation object.

Parameters

  [in] | annot | Another annotation object.

## Member Function Documentation

## ◆ GetAppearanceStream()

PDFStream foxit.pdf.annots.Annot.GetAppearanceStream | ( | Annot.AppearanceType | type,
|  | string | appearance_state
| ) |  |
| inline

Get annotation's appearance stream with specified type and state.

For more details, please refer to "AP" and "AS" entries in "TABLE 8.15 Entries common to all annotation dictionaries" in <PDF reference 1.7>.

Parameters

  [in] | type | Type of annotation's appearance. Please refer to values starting from foxit.pdf.annots.Annot.AppearanceType.e_AppearanceTypeNormal and this should be one of these values.
  [in] | appearance_state | Annotation's appearance state, which is used to select the applicable appearance stream from an appearance sub-dictionary. If this is an empty string, Foxit PDF SDK will choose the appearance state specified by the "AS" (Appearance State) entry in the annotation dictionary.

Returns
  The specified annotation's appearance stream. If there is no entry which related to appearance or any error occurs, this function will return null.

## ◆ GetBorderColor()

int foxit.pdf.annots.Annot.GetBorderColor | ( |  | ) |
| inline

Get border color.

This property has effect on annotation's appearance.

Returns
  The border color. Format: 0xRRGGBB. If no border color can be found, 0x000000 will be returned.

## ◆ GetBorderInfo()

BorderInfo foxit.pdf.annots.Annot.GetBorderInfo | ( |  | ) |
| inline

Get border information.

This property has effect on annotation's appearance. For an annotation which does not have border information, the default border information will be returned:
border width = 1, border style = foxit.pdf.annots.BorderInfo.Style.e_Solid , border cloud intensity = 0, border dash phase = 0, border dashes array is an empty array. Attention: among supported annotation types (please refer to "Note" comment part of class Annot ), this property will not have effect on appearance of these annotations: note, highlight, underline, strikeout, squiggly, stamp, caret, popup, file attachment, PSInk, redact. For ink annotation, only border width will have effect on ink annotation's appearance.

Returns
  A border information object that received the border information. If not find any border information, the default border information will be returned as described in "Details" part.

## ◆ GetContent()

string foxit.pdf.annots.Annot.GetContent | ( |  | ) |
| inline

Get content.

Returns
  Content string.

## ◆ GetDeviceRect()

RectI foxit.pdf.annots.Annot.GetDeviceRect | ( | Matrix2D | matrix | ) |
| inline

Get annotation rectangle in device coordinate system.

This is a useful function to get the device rectangle of an annotation, but not support pop-up annotation.
For the rectangle conversion, the result rectangle is always "normalized", which is using device coordinate system: left is always smaller than right, and top is always smaller than bottom.

Parameters

  [in] | matrix | A matrix used to transform from PDF coordinate system to device coordinate system. Usually, this is returned by function pdf.PDFPage.GetDisplayMatrix and also used for rendering.

Returns
  The annotation rectangle in device coordinate system. If there is no rectangle information, a RectI object with all 0 values would be returned.

## ◆ GetDict()

PDFDictionary foxit.pdf.annots.Annot.GetDict | ( |  | ) |
| inline

Get annotation's dictionary object.

Returns
  Annotation's dictionary. If there is any error, this function will return null.

## ◆ GetDisplayMatrix()

Matrix2D foxit.pdf.annots.Annot.GetDisplayMatrix | ( | Matrix2D | page_display_matrix | ) |
| inline

Get the display matrix, from PDF coordinate system to targeted device coordinate system.

Display matrix of current annotation can be used with annotation's rectangle to calculate the real area of annotation in target device coordinate system.

Parameters

  [in] | page_display_matrix | The transformation matrix. Usually this is returned by function PDFPage.GetDisplayMatrix .

Returns
  The display matrix of current annotation.

## ◆ GetFlags()

int foxit.pdf.annots.Annot.GetFlags | ( |  | ) |
| inline

Get annotation flags.

Returns
  The annotation flags. Please refer to values starting from foxit.pdf.annots.Annot.Flags.e_FlagInvisible and this would be one or a combination of these values. 0 means no annotation flag.

## ◆ GetIndex()

int foxit.pdf.annots.Annot.GetIndex | ( |  | ) |
| inline

Get the index of current annotation in the page which current annotation belongs to.

Returns
  The index value, starting from 0.

## ◆ GetModifiedDateTime()

DateTime foxit.pdf.annots.Annot.GetModifiedDateTime | ( |  | ) |
| inline

Get last modified date time.

Returns
  A date and time object that receives the last modified date time. If there is no modified date time information, a date and time object with all 0 values would be returned.

## ◆ GetOptionalContent()

PDFDictionary foxit.pdf.annots.Annot.GetOptionalContent | ( |  | ) |
| inline

Get the PDF dictionary of annotation's optional content.

Returns
  The PDF dictionary of annotation's optional content. If there is no "OC" entry or any error occurs, this function will return null.

## ◆ GetPage()

PDFPage foxit.pdf.annots.Annot.GetPage | ( |  | ) |
| inline

Get the related PDF page.

Returns
  A PDF page object which is the related PDF page.

## ◆ GetRect()

RectF foxit.pdf.annots.Annot.GetRect | ( |  | ) |
| inline

Get rectangle, in PDF coordinate system.

Returns
  The annotation rectangle. If there is no rectangle information, a RectF object with all 0 values would be returned.

## ◆ GetType()

Annot.Type foxit.pdf.annots.Annot.GetType | ( |  | ) |
| inline

Get actual annotation type of current annotation.

Returns
  Annotation type. Please refer to values starting from foxit.pdf.annots.Annot.Type.e_Note and this would be one of these values.

## ◆ GetUniqueID()

string foxit.pdf.annots.Annot.GetUniqueID | ( |  | ) |
| inline

Get unique ID.

Returns
  Unique ID string.

## ◆ HasProperty()

bool foxit.pdf.annots.Annot.HasProperty | ( | Annot.Property | property | ) |
| inline

Whether current annotation has the specified annotation's property.

Parameters

  [in] | property | Property name. Please refer to values starting from foxit.pdf.annots.Annot.Property.e_PropertyModifiedDate and this should be one of these values.

Returns
  true means current annotation has the specified property, while false means current annotation does not have the specified property.

## ◆ IsEmpty()

bool foxit.pdf.annots.Annot.IsEmpty | ( |  | ) |
| inline

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ IsMarkup()

bool foxit.pdf.annots.Annot.IsMarkup | ( |  | ) |
| inline

Check if current annotation is a markup annotation.

Returns
  true means current annotation is a markup annotation, while false means current annotation is not a markup annotation.

## ◆ Move() [1/2]

bool foxit.pdf.annots.Annot.Move | ( | RectF | rect | ) |
| inline

Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.

Parameters

  [in] | rect | New rectangle to specify the new position where current annotation is to be moved to. It should be valid in [PDF coordinate system] (foxit.pdf.PDFPage).

Returns
  true means success, while false means failure.

## ◆ Move() [2/2]

bool foxit.pdf.annots.Annot.Move | ( | RectF | rect,
|  | bool | is_reset_appearance
| ) |  |
| inline

Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.

Parameters

  [in] | rect | New rectangle to specify the new position where current annotation is to be moved to. It should be valid in [PDF coordinate system] (foxit.pdf.PDFPage).
  [in] | is_reset_appearance | A boolean value specifies whether to reset annotation's appearance after moving.

Returns
  true means success, while false means failure.

## ◆ RemoveProperty()

bool foxit.pdf.annots.Annot.RemoveProperty | ( | Annot.Property | property | ) |
| inline

Remove a specified annotation's property.

This function can be used to remove some optional properties of an annotation. When appearance related property is removed successfully, such as foxit.pdf.annots.Annot.Property.e_PropertyBorderColor and foxit.pdf.annots.Annot.Property.e_PropertyFillColor , user should call function Annot.ResetAppearanceStream to make effect on annotation's appearance.

Parameters

  [in] | property | Property name. Please refer to values starting from foxit.pdf.annots.Annot.Property.e_PropertyModifiedDate and this should be one of these values.

Returns
  true means remove the specified property successfully, or current annotation supports the property but does not have the property.
  false means current annotation does not support to have the specified property, or current annotation cannot be removed specified property.

## ◆ ResetAppearanceStream() [1/2]

bool foxit.pdf.annots.Annot.ResetAppearanceStream | ( |  | ) |
| inline

Reset appearance stream.

Annotation's appearance is stored as stream in PDF document. Any appearance-related property can be changed through the corresponding setting functions. For this change to take effect, this function should be called to update the annotation's appearance.
Please check "Note" part in the comment of class Annot to see which types of annotations can be reset appearance by current function and also check comment in classes of these annotations to see if any property is required before resetting appearance stream.

Returns
  true means success, while false means failure.

## ◆ ResetAppearanceStream() [2/2]

bool foxit.pdf.annots.Annot.ResetAppearanceStream | ( | bool | is_generate_new_appearance_obj | ) |
| inline

Reset appearance stream.

Annotation's appearance is stored as stream in PDF document. Any appearance-related property can be changed through the corresponding setting functions. For this change to take effect, this function should be called to update the annotation's appearance.
Please check "Note" part in the comment of class Annot to see which types of annotations can be reset appearance by current function and also check comment in classes of these annotations to see if any property is required before resetting appearance stream.

Parameters

  [in] | is_generate_new_appearance_obj | true means to generate a new appearance object to reset the appearance of the current annotation, while false means to reset the appearance of annotations that share this appearance stream. The parameter has only effect on widget annotation's appearance.

Returns
  true means success, while false means failure.

## ◆ SetBorderColor()

void foxit.pdf.annots.Annot.SetBorderColor | ( | int | color | ) |
| inline

Set border color.

This property has effect on annotation's appearance. If user wants the new border color has effect on annotation's appearance, please call function Annot.ResetAppearanceStream after setting the new border color.

Parameters

  [in] | color | New border color to be set. Format: 0xRRGGBB.

Returns
  None.

## ◆ SetBorderInfo()

void foxit.pdf.annots.Annot.SetBorderInfo | ( | BorderInfo | border | ) |
| inline

Set border information.

This property has effect on annotation's appearance. If user wants the new border information has effect on annotation's appearance, please call function Annot.ResetAppearanceStream after setting the new border information.
Attention: among supported annotation types (please refer to "Note" comment part of class Annot ), this property will not have effect on appearance of these annotations: note, highlight, underline, strikeout, squiggly, stamp, caret, popup, file attachment, PSInk, redact. For ink annotation, only border width will have effect on ink annotation's appearance.

Parameters

  [in] | border | New border information to be set. It should be a valid border information object. If any value of parameter border is invalid, this function will fail to set new border information to current annotation.

Returns
  None.

## ◆ SetContent()

void foxit.pdf.annots.Annot.SetContent | ( | string | content | ) |
| inline

Set content.

For free text annotation and line annotation (which has enabled caption), they would show content in their appearance. So for these kinds of annotations, this property would have effect on annotation's appearance. If user wants the effect to be shown in the appearance of these kind of annotations, please call function Annot.ResetAppearanceStream after setting new content.

Parameters

  [in] | content | New content string to be set.

Returns
  None.

## ◆ SetFlags()

void foxit.pdf.annots.Annot.SetFlags | ( | int | flags | ) |
| inline

Set annotation flags.

Parameters

  [in] | flags | The annotation flags. It could be 0, or one or a combination of values starting from foxit.pdf.annots.Annot.Flags.e_FlagInvisible .

Returns
  None.

## ◆ SetModifiedDateTime()

void foxit.pdf.annots.Annot.SetModifiedDateTime | ( | DateTime | date_time | ) |
| inline

Set last modified date time.

Parameters

  [in] | date_time | The data time to be set. It should contain valid date time data.

Returns
  None.

## ◆ SetUniqueID()

void foxit.pdf.annots.Annot.SetUniqueID | ( | string | unique_id | ) |
| inline

Set unique ID.

Parameters

  [in] | unique_id | New unique ID string to be set.

Returns
  None.