Foxit PDF RDK

Public Member Functions | List of all members
Screen Class Reference
Inheritance diagram for Screen:

## Public Member Functions
| constructor ()
| Constructor.
| constructor (annot)
| Constructor, with parent class object. More...
| GetAction ()
| Get action. More...
| GetBitmap ()
| Get the bitmap from current screen annotation. More...
| GetMKDict ()
| Get the appearance characteristics dictionary (known as "MK" dictionary as well). More...
| GetOpacity ()
| Get opacity value. More...
| GetRotation ()
| Get the rotation of the image used for the appearance of current screen annotation. More...
| GetTitle ()
| Get title of current screen annotation. More...
| RemoveAction ()
| Remove action. More...
| SetAction (action)
| Set action. More...
| SetImage (image, frame_index, compress)
| Set image to current screen annotation, with a specified frame index. More...
| SetMKDict (dict)
| Set the appearance characteristics dictionary (known as "MK" dictionary as well). More...
| SetOpacity (opacity)
| Set opacity value. More...
| SetRotation (rotate)
| Set the rotation of the image used for the appearance of current screen annotation. More...
| SetTitle (title)
| Set title of current screen annotation. More...
Public Member Functions inherited from Annot
| constructor ()
| Constructor.
| constructor (annot)
| Constructor, with another annotation object. More...
| constructor (page, annot_dict)
| Constructor, with PDF page and annotation's PDF dictionary. More...
| GetAppearanceStream (type, appearance_state)
| Get annotation's appearance stream with specified type and state. More...
| GetBorderColor ()
| Get border color. More...
| GetBorderInfo ()
| Get border information. More...
| GetContent ()
| Get content. More...
| GetDeviceRect (matrix)
| Get annotation rectangle in device coordinate system. More...
| GetDict ()
| Get annotation's dictionary object. More...
| GetDisplayMatrix (page_display_matrix)
| Get the display matrix, from PDF coordinate system to targeted device coordinate system. More...
| GetFlags ()
| Get annotation flags. More...
| GetIndex ()
| Get the index of current annotation in the page which current annotation belongs to. More...
| GetModifiedDateTime ()
| Get last modified date time. More...
| GetOptionalContent ()
| Get the PDF dictionary of annotation's optional content. More...
| GetPage ()
| Get the related PDF page. More...
| GetRect ()
| Get rectangle, in PDF coordinate system. More...
| GetType ()
| Get actual annotation type of current annotation. More...
| GetUniqueID ()
| Get unique ID. More...
| HasProperty (property)
| Whether current annotation has the specified annotation's property. More...
| IsEmpty ()
| Check whether current object is empty or not. More...
| IsMarkup ()
| Check if current annotation is a markup annotation. More...
| Move (rect)
| Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More...
| Move (rect, is_reset_appearance)
| Move current annotation to a new position, specified by a new rectangle in PDF coordinate system. More...
| RemoveProperty (property)
| Remove a specified annotation's property. More...
| ResetAppearanceStream ()
| Reset appearance stream. More...
< boolean > | ResetAppearanceStream (is_generate_new_appearance_obj)
| Reset appearance stream. More...
| SetBorderColor (color)
| Set border color. More...
| SetBorderInfo (border)
| Set border information. More...
| SetContent (content)
| Set content. More...
| SetFlags (flags)
| Set annotation flags. More...
| SetModifiedDateTime (date_time)
| Set last modified date time. More...
| SetUniqueID (unique_id)
| Set unique ID. More...
Public Member Functions inherited from NativeObjectWrapper
| constructor (r)
| GetPointerAsNumber ()

## Additional Inherited Members
Static Public Attributes inherited from Annot
static | e_3D
| Annotation type: 3D annotation. One of standard annotation in <PDF reference 1.7>.
static | e_AppearanceTypeDown
| Annotation's down appearance.
static | e_AppearanceTypeNormal
| Enumeration for the type of annotation's appearance. More...
static | e_AppearanceTypeRollover
| Annotation's rollover appearance.
static | e_Caret
| Annotation type: caret annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Circle
| Annotation type: circle annotation. One of standard annotation in <PDF reference 1.7>.
static | e_FileAttachment
| Annotation type: file attachment annotation. One of standard annotation in <PDF reference 1.7>.
static | e_FlagHidden
| Annotation flag: hidden. More...
static | e_FlagInvisible
| Enumeration for PDF annotation flags. More...
static | e_FlagLocked
| Annotation flag: locked. More...
static | e_FlagLockedContents
| Annotation flag: locked contents. More...
static | e_FlagNoRotate
| Annotation flag: no rotate. More...
static | e_FlagNoView
| Annotation flag: no view. More...
static | e_FlagNoZoom
| Annotation flag: no zoom. More...
static | e_FlagPrint
| Annotation flag: print. More...
static | e_FlagReadOnly
| Annotation flag: read only. More...
static | e_FlagToggleNoView
| Annotation flag: toggle no view. More...
static | e_FreeText
| Annotation type: free text annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Highlight
| Annotation type: highlight annotation. One of standard annotation in <PDF reference 1.7>.
static | e_HighlightingInvert
| Highlighting mode: Invert, which is to invert the contents of the annotation rectangle.
static | e_HighlightingNone
| Enumeration for PDF annotation highlighting mode. More...
static | e_HighlightingOutline
| Highlighting mode: Outline, which is to invert the annotation's border.
static | e_HighlightingPush
| Highlighting mode: Push, which is to display the annotation's down appearance, if any.
static | e_HighlightingToggle
| Highlighting mode: Toggle. This is only useful for widget annotation.
static | e_Ink
| Annotation type: ink annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Line
| Annotation type: line annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Link
| Annotation type: link annotation. One of standard annotation in <PDF reference 1.7>.
static | e_MKEntryBackgroundColor
| Background color entry. "BG" in MK dictionary.
static | e_MKEntryBorderColor
| Border color entry. "BC" in MK dictionary.
static | e_MKEntryDownCaption
| Down caption (or alternate caption) entry. "AC" in MK dictionary. More...
static | e_MKEntryDownIcon
| Down icon (or alternate icon) entry. "IX" in MK dictionary. More...
static | e_MKEntryIconCaptionRelation
| Icon and caption relation entry. "TP" in MK dictionary. More...
static | e_MKEntryIconFit
| Icon fit information entry. "IF" in MK dictionary. More...
static | e_MKEntryNormalCaption
| Normal caption entry. "CA" in MK dictionary. More...
static | e_MKEntryNormalIcon
| Normal icon entry. "I" in MK dictionary. More...
static | e_MKEntryRolloverCaption
| Rollover caption entry. "RC" in MK dictionary. More...
static | e_MKEntryRolloverIcon
| Rollover icon entry. "RI" in MK dictionary. More...
static | e_MKEntryRotation
| Enumeration for annotation's MK dictionary (an appearance characteristics) entry. More...
static | e_MKRelationCaptionAboveIcon
| Caption above the icon.
static | e_MKRelationCaptionBelowIcon
| Caption below the icon.
static | e_MKRelationCaptionLeft
| Caption to the left of the icon.
static | e_MKRelationCaptionOvrlayOnIcon
| Caption overlaid directly on the icon.
static | e_MKRelationCaptionRight
| Caption to the right of the icon.
static | e_MKRelationNoCaption
| No caption; icon only.
static | e_MKRelationNoIcon
| Enumeration for icon and caption relative position in annotation's MK dictionary. More...
static | e_Movie
| Annotation type: movie annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Note
| Annotation type: note annotation, which is just "Text" annotation - one of standard annotation in <PDF reference 1.7>.
static | e_PagingSeal
| Annotation type: paging seal annotation. A Foxit PDF SDK custom annotation type (not a standard annotation type).
static | e_Polygon
| Annotation type: polygon annotation. One of standard annotation in <PDF reference 1.7>.
static | e_PolyLine
| Annotation type: polyline annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Popup
| Annotation type: pop-up annotation. One of standard annotation in <PDF reference 1.7>.
static | e_PrinterMark
| Annotation type: printer's mark annotation. One of standard annotation in <PDF reference 1.7>.
static | e_PropertyBorderColor
| Annotation property: border color. More...
static | e_PropertyCreationDate
| Annotation property: creation date. More...
static | e_PropertyFillColor
| Annotation property: fill color. More...
static | e_PropertyModifiedDate
| Enumeration for some PDF annotation property. More...
static | e_PSInk
| Annotation type: pressure sensitive ink annotation.
static | e_Redact
| Annotation type: redact annotation.
static | e_RichMedia
| Annotation type: rich media annotation.
static | e_Screen
| Annotation type: screen annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Sound
| Annotation type: sound annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Square
| Annotation type: square annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Squiggly
| Annotation type: squiggly annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Stamp
| Annotation type: stamp annotation. One of standard annotation in <PDF reference 1.7>.
static | e_StrikeOut
| Annotation type: strikeout annotation. One of standard annotation in <PDF reference 1.7>.
static | e_TrapNet
| Annotation type: trap network annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Underline
| Annotation type: underline annotation. One of standard annotation in <PDF reference 1.7>.
static | e_UnknownType
| Enumeration for PDF annotation type. More...
static | e_Watermark
| Annotation type: watermark annotation. One of standard annotation in <PDF reference 1.7>.
static | e_Widget
| Annotation type: widget annotation. One of standard annotation in <PDF reference 1.7>. 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 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

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Function Documentation

## ◆ constructor()

Screen.constructor | ( | annot |  | ) |

Constructor, with parent class object.

Parameters

  [in] | annot | Parent class object.

## ◆ GetAction()

Screen.GetAction | ( |  | ) |

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 AdditionalAction for more details.

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

## ◆ GetBitmap()

Screen.GetBitmap | ( |  | ) |

Get the bitmap from current screen annotation.

Returns
  A bitmap object. If the return value of function Bitmap.IsEmpty for the returned bitmap object is true, that means current screen annotation has no bitmap.

## ◆ GetMKDict()

Screen.GetMKDict | ( |  | ) |

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 PDFObject.Release (inherited from 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()

Screen.GetOpacity | ( |  | ) |

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()

Screen.GetRotation | ( |  | ) |

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 e_Rotation0 and this would be one of these values.

## ◆ GetTitle()

Screen.GetTitle | ( |  | ) |

Get title of current screen annotation.

Returns
  The title string.

## ◆ RemoveAction()

Screen.RemoveAction | ( |  | ) |

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 AdditionalAction for more details.

Returns
  true means success, while false means failure.

## ◆ SetAction()

Screen.SetAction | ( | action |  | ) |

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 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: Action.e_TypeGoto, Action.e_TypeURI, Action.e_TypeJavaScript, Action.e_TypeNamed, Action.e_TypeGoToR, Action.e_TypeGoToE, Action.e_TypeSubmitForm, Action.e_TypeResetForm, Action.e_TypeHide, Action.e_TypeLaunch, Action.e_TypeImportData, Action.e_TypeRendition.

Returns
  None.

## ◆ SetImage()

Screen.SetImage | ( | image | ,
|  | frame_index | ,
|  | compress |
| ) |  |

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 Image.e_Unknown.
  [in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function 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()

Screen.SetMKDict | ( | dict |  | ) |

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()

Screen.SetOpacity | ( | opacity |  | ) |

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()

Screen.SetRotation | ( | rotate |  | ) |

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 e_Rotation0 and this should be one of these values except e_RotationUnknown.

Returns
  None.

## ◆ SetTitle()

Screen.SetTitle | ( | title |  | ) |

Set title of current screen annotation.

Parameters

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

Returns
  None.