Foxit PDF SDK

Public Member Functions | List of all members
FSDK.Note Class Reference

## Public Member Functions
| constructor ()
| Constructor.
| constructor (annot)
| Constructor, with parent class object. More...
| GetIconName ()
| Get icon name. More...
| GetOpenStatus ()
| Get open status. More...
| GetReplyTo ()
| Get the markup annotation, which current note annotation is in reply to. More...
| GetState ()
| Get the state. More...
| GetStateModel ()
| Get the state model. More...
| IsStateAnnot ()
| Check if current note annotation is used as a state annotation. More...
| SetIconName (icon_name)
| Set icon name. More...
| SetOpenStatus (status)
| Set open status. More...
| SetState (state)
| Set the state. More...

## Detailed Description

A note annotation (known as "text" annotation in <PDF reference 1.7>) represents a "sticky note" attached to a point in the PDF document. When closed, the annotation appears as an icon; when open, it displays a pop-up window containing the text of the note in a font and size chosen by the viewer application.
A note annotation can also be used as a reply to a markup annotation, or a state annotation:

- When as a reply, the note annotation should not be shown alone but together with other replies in the form of threaded comments. Function FSDK.Note.GetReplyTo can be used to get the markup annotation, to which the note annotation replies.
- When as a state, the note annotation would not be shown alone. Function FSDK.Note.IsStateAnnot can be used to judge if a note annotation is used as a state.

Note annotation is a kind of markup annotation, so class FSDK.Note is derived from class FSDK.Markup. It offers functions to get/set note annotation's properties and reset appearance of a note annotation.

Note
  For a newly created common note annotation, if user calls function FSDK.Annot.ResetAppearanceStream directly without setting any properties, the default appearance will be used:
  border color = 0xFFFFFF00 (yellow), opacity = 1.0, icon name = "Comment".

See also
  FSDK.Markup

## Member Function Documentation

## ◆ constructor()

FSDK.Note.constructor | ( | annot |  | ) |

Constructor, with parent class object.

Parameters

  [in] | annot | Parent class object.

## ◆ GetIconName()

FSDK.Note.GetIconName | ( |  | ) |

Get icon name.

This property has effect on note annotation's appearance. Note annotation has predefined standard icon names:
"Check", "Circle", "Comment", "Cross", "Help", "Insert", "Key", "NewParagraph", "Note", "Paragraph", "RightArrow", "RightPointer", "Star", "UpArrow", "UpLeftArrow".
An empty icon name string means current note annotation would be treated as "Note" icon.

Returns
  Icon name string.

## ◆ GetOpenStatus()

FSDK.Note.GetOpenStatus | ( |  | ) |

Get open status.

Open status is a boolean value that specifies whether a note annotation should initially be displayed open:

- true means the note annotation should be initially be displayed open.
- false means the note annotation should be initially be displayed closed.

Returns
  Open status.

## ◆ GetReplyTo()

FSDK.Note.GetReplyTo | ( |  | ) |

Get the markup annotation, which current note annotation is in reply to.

This function is only useful when current note annotation is used as a reply.

Returns
  A markup annotation object, which current note annotation is in reply to. If the return value of function FSDK.Annot.IsEmpty (inherited from Markup's parent class) for the returned markup annotation object is true, that means current note annotation is not used as a reply.

## ◆ GetState()

FSDK.Note.GetState | ( |  | ) |

Get the state.

This function can only be used when current note annotation is used as a state annotation. Function FSDK.Note.IsStateAnnot can be used to check if current note annotation is used as a state annotation.

Returns
  The state. Please refer to values starting from FSDK.Markup.e_StateMarked and this would be one of these values. If current note annotation is not a state annotation, This function will return 0.

## ◆ GetStateModel()

FSDK.Note.GetStateModel | ( |  | ) |

Get the state model.

This function can only be used when current note annotation is used as a state annotation. Function FSDK.Note.IsStateAnnot can be used to check if current note annotation is used as a state annotation.

Returns
  The state model. If function succeeds, the return value would be FSDK.Markup.e_StateModelMarked or FSDK.Markup.e_StateModelReview.
  If current note annotation is not a state annotation, this function will return 0.

## ◆ IsStateAnnot()

FSDK.Note.IsStateAnnot | ( |  | ) |

Check if current note annotation is used as a state annotation.

Returns
  true means current note annotation is used as a state annotation, while false means current note annotation is just a common note annotation.

## ◆ SetIconName()

FSDK.Note.SetIconName | ( | icon_name |  | ) |

Set icon name.

This property has effect on note annotation's appearance. Note annotation has predefined standard icon names:
"Check", "Circle", "Comment", "Cross", "Help", "Insert", "Key", "NewParagraph", "Note", "Paragraph", "RightArrow", "RightPointer", "Star", "UpArrow", "UpLeftArrow".
An empty icon name string means current note annotation would be treated as "Note" icon.
For a newly created note annotation, if current function is not called, icon name will be "Comment" by default.
If user wants the new icon name has effect on annotation's appearance, please call function FSDK.Annot.ResetAppearanceStream after setting the new icon name.

Parameters

  [in] | icon_name | New icon name string to be set.

Returns
  None.

## ◆ SetOpenStatus()

FSDK.Note.SetOpenStatus | ( | status |  | ) |

Set open status.

Open status is a boolean value that specifies whether a note annotation should initially be displayed open:

- true means the note annotation should be initially be displayed open.
- false means the note annotation should be initially be displayed closed.

Parameters

  [in] | status | The new open status value.

Returns
  None.

## ◆ SetState()

FSDK.Note.SetState | ( | state |  | ) |

Set the state.

This function can only be used when current note annotation is used as a state annotation. Function FSDK.Note.IsStateAnnot can be used to check if current note annotation is used as a state annotation.

Parameters

  [in] | state | New state. It should be one of following values: If state model is FSDK.Markup.e_StateModelMarked, the state should be FSDK.Markup.e_StateMarked or FSDK.Markup.e_StateUnmarked. If state model is FSDK.Markup.e_StateModelReview, the state should be FSDK.Markup.e_StateAccepted, FSDK.Markup.e_StateRejected, FSDK.Markup.e_StateCancelled, FSDK.Markup.e_StateCompleted, FSDK.Markup.e_StateDeferred, FSDK.Markup.e_StateFuture, or FSDK.Markup.e_StateNone. State model can be gotten by function FSDK.Note.GetStateModel.

Returns
  None.