Foxit PDF SDK

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

## Public Member Functions
| Screen ()
| Constructor.
| Screen (Annot annot)
| Constructor, with parent class object. More...
Action | GetAction ()
| Get action. More...
Bitmap | GetBitmap ()
| Get the bitmap from current screen annotation. More...
PDFDictionary | GetMKDict ()
| Get the appearance characteristics dictionary (known as "MK" dictionary as well). More...
float | GetOpacity ()
| Get opacity value. More...
Rotation | GetRotation ()
| Get the rotation of the image used for the appearance of current screen annotation. More...
string | GetTitle ()
| Get title of current screen annotation. More...
void | RemoveAction ()
| Remove action. More...
void | SetAction (Action action)
| Set action. More...
void | SetImage (Image image, int frame_index, int compress)
| Set image to current screen annotation, with a specified frame index. More...
void | SetMKDict (PDFDictionary dict)
| Set the appearance characteristics dictionary (known as "MK" dictionary as well). More...
void | SetOpacity (float opacity)
| Set opacity value. More...
void | SetRotation (Rotation rotate)
| Set the rotation of the image used for the appearance of current screen annotation. More...
void | SetTitle (string title)
| Set title of current screen annotation. More...
Public Member Functions inherited from foxit.pdf.annots.Annot
| 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...

## Additional Inherited Members
Public Types inherited from foxit.pdf.annots.Annot
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...

## Detailed Description

A screen annotation specifies a region of a page upon which media clips may be played. It also serves as an object from which actions can be triggered. Usually, rendition action is set to a screen annotation in order that the screen annotation can be used to play media clip.
Class foxit.pdf.annots.Screen is derived from Annot , and offers functions to get/set link annotation's properties and reset appearance stream of a screen annotation. Appearance stream of a screen annotation is used for printing (if possible) and when the related media clip is not being played.

Note
  For a newly created screen annotation, it has no border information and no border color.

See also
  Annot

## Constructor & Destructor Documentation

## ◆ Screen()

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

Constructor, with parent class object.

Parameters

  [in] | annot | Parent class object.

## Member Function Documentation

## ◆ GetAction()

Action foxit.pdf.annots.Screen.GetAction | ( |  | ) |
| inline

Get action.

This function cannot be used to get action which is used as additional action. If user wants to get any additional action, please refer to class foxit.pdf.actions.AdditionalAction for more details.

Returns
  An action object that receives the action data. If the return value of function actions.Action.IsEmpty for the returned action object is true, that means no action.

## ◆ GetBitmap()

Bitmap foxit.pdf.annots.Screen.GetBitmap | ( |  | ) |
| inline

Get the bitmap from current screen annotation.

Returns
  A bitmap object. If this function return null, that means current screen annotation has no bitmap.

## ◆ GetMKDict()

PDFDictionary foxit.pdf.annots.Screen.GetMKDict | ( |  | ) |
| inline

Get the appearance characteristics dictionary (known as "MK" dictionary as well).

If this dictionary is not set to a screen annotation (including current one), please call function objects.PDFObject.Release (inherited from foxit.pdf.objects.PDFDictionary 's parent class) to release it.

Returns
  A PDF dictionary that represents the "MK" dictionary. If there is no "MK" entry or any error occurs, this function will return null.

## ◆ GetOpacity()

float foxit.pdf.annots.Screen.GetOpacity | ( |  | ) |
| inline

Get opacity value.

This property has effect on annotation's appearance.

Returns
  The opacity value. Valid range: 0.0 to 1.0. 0.0 means full transparency and 1.0 means full opaque.

## ◆ GetRotation()

Rotation foxit.pdf.annots.Screen.GetRotation | ( |  | ) |
| inline

Get the rotation of the image used for the appearance of current screen annotation.

Returns
  Rotation value of the image. Please refer to values starting from foxit.common.Rotation.e_Rotation0 and this would be one of these values.

## ◆ GetTitle()

string foxit.pdf.annots.Screen.GetTitle | ( |  | ) |
| inline

Get title of current screen annotation.

Returns
  The title string.

## ◆ RemoveAction()

void foxit.pdf.annots.Screen.RemoveAction | ( |  | ) |
| inline

Remove action.

This function cannot be used to remove action which is used as additional action. If user wants to remove any additional action, please refer to class foxit.pdf.actions.AdditionalAction for more details.

Returns
  true means success, while false means failure.

## ◆ SetAction()

void foxit.pdf.annots.Screen.SetAction | ( | Action | action | ) |
| inline

Set action.

This function cannot be used to set action which is used as additional action. If user wants to set any additional action, please refer to class foxit.pdf.actions.AdditionalAction for more details.

Parameters

  [in] | action | New action to be set. It should be valid. Currently only support following types as the new action: foxit.pdf.actions.Action.Type.e_TypeGoto , foxit.pdf.actions.Action.Type.e_TypeURI , foxit.pdf.actions.Action.Type.e_TypeJavaScript , foxit.pdf.actions.Action.Type.e_TypeNamed , foxit.pdf.actions.Action.Type.e_TypeGoToR , foxit.pdf.actions.Action.Type.e_TypeGoToE , foxit.pdf.actions.Action.Type.e_TypeSubmitForm , foxit.pdf.actions.Action.Type.e_TypeResetForm , foxit.pdf.actions.Action.Type.e_TypeHide , foxit.pdf.actions.Action.Type.e_TypeLaunch , foxit.pdf.actions.Action.Type.e_TypeImportData , foxit.pdf.actions.Action.Type.e_TypeRendition .

Returns
  None.

## ◆ SetImage()

void foxit.pdf.annots.Screen.SetImage | ( | Image | image,
|  | int | frame_index,
|  | int | compress
| ) |  |
| inline

Set image to current screen annotation, with a specified frame index.

Input image may contain multiple frames, and only one frame of the image can be set to current stamp annotation.
If user wants the effect to be shown in annotation's appearance, please call function Annot.ResetAppearanceStream after this function.

Parameters

  [in] | image | An image. One of its frames will be set to current stamp. This image contains at least one frame and the image type should not be foxit.common.Image.Type.e_Unknown .
  [in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function common.Image.GetFrameCount .
  [in] | compress | Compress algorithm type used to compress image data. Currently, it only supports 2 valid value: 0: no compress. 1: do default compress.

Returns
  None.

## ◆ SetMKDict()

void foxit.pdf.annots.Screen.SetMKDict | ( | PDFDictionary | dict | ) |
| inline

Set the appearance characteristics dictionary (known as "MK" dictionary as well).

Parameters

  [in] | dict | A PDF dictionary that represents the new "MK" dictionary to be set. User should not release this dictionary after setting it to a screen annotation.

## ◆ SetOpacity()

void foxit.pdf.annots.Screen.SetOpacity | ( | float | opacity | ) |
| inline

Set opacity value.

This property has effect on annotation's appearance. If user wants the effect to be shown in annotation's appearance, please call function Annot.ResetAppearanceStream after this function.

Parameters

  [in] | opacity | The new opacity value. Valid range: 0.0 to 1.0 . 0.0 means full transparency and 1.0 means full opaque.

Returns
  None.

## ◆ SetRotation()

void foxit.pdf.annots.Screen.SetRotation | ( | Rotation | rotate | ) |
| inline

Set the rotation of the image used for the appearance of current screen annotation.

This property has effect on annotation's appearance. If user wants the effect to be shown in annotation's appearance, please call function Annot.ResetAppearanceStream after this function.

Parameters

  [in] | rotate | Rotation value. Please refer to values starting from foxit.common.Rotation.e_Rotation0 and this should be one of these values except foxit.common.Rotation.e_RotationUnknown .

Returns
  None.

## ◆ SetTitle()

void foxit.pdf.annots.Screen.SetTitle | ( | string | title | ) |
| inline

Set title of current screen annotation.

Parameters

  [in] | title | The title string to be set.

Returns
  None.