Foxit PDF SDK
fsdk.Screen Class Reference

Public Member Functions

def GetAction ()
 Get action.
More...
 
def GetBitmap ()
 Get the bitmap from current screen annotation.
More...
 
def GetMKDict ()
 Get the appearance characteristics dictionary (known as "MK" dictionary as well).
More...
 
def GetOpacity ()
 Get opacity value.
More...
 
def GetRotation ()
 Get the rotation of the image used for the appearance of current screen annotation.
More...
 
def GetTitle ()
 Get title of current screen annotation.
More...
 
def RemoveAction ()
 Remove action.
More...
 
def SetAction (action)
 Set action.
More...
 
def SetImage (image, frame_index, compress)
 Set image to current screen annotation, with a specified frame index.
More...
 
def SetMKDict (dict)
 Set the appearance characteristics dictionary (known as "MK" dictionary as well).
More...
 
def SetOpacity (opacity)
 Set opacity value.
More...
 
def SetRotation (rotate)
 Set the rotation of the image used for the appearance of current screen annotation.
More...
 
def SetTitle (title)
 Set title of current screen annotation.
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 fsdk.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

Member Function Documentation

◆ GetAction()

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

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

◆ GetBitmap()

def fsdk.Screen.GetBitmap ( )

Get the bitmap from current screen annotation.

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

◆ GetMKDict()

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

def fsdk.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()

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

◆ GetTitle()

def fsdk.Screen.GetTitle ( )

Get title of current screen annotation.

Returns
The title string.

◆ RemoveAction()

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

Returns
true means success, while false means failure.

◆ SetAction()

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

Parameters
[in]actionNew action to be set. It should be valid. Currently only support following types as the new action:
fsdk.ActionE_TypeGoto , fsdk.ActionE_TypeURI , fsdk.ActionE_TypeJavaScript , fsdk.ActionE_TypeNamed , fsdk.ActionE_TypeGoToR , fsdk.ActionE_TypeGoToE , fsdk.ActionE_TypeSubmitForm , fsdk.ActionE_TypeResetForm , fsdk.ActionE_TypeHide , fsdk.ActionE_TypeLaunch , fsdk.ActionE_TypeImportData , fsdk.ActionE_TypeRendition .
Returns
None.

◆ SetImage()

def fsdk.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 fsdk.Annot.ResetAppearanceStream after this function.

Parameters
[in]imageAn 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 fsdk.ImageE_Unknown .
[in]frame_indexFrame index. Valid range: from 0 to (count-1). count is returned by function fsdk.Image.GetFrameCount .
[in]compressCompress algorithm type used to compress image data. Currently, it only supports 2 valid value:
  • 0: no compress.
  • 1: do default compress.

Returns
None.

◆ SetMKDict()

def fsdk.Screen.SetMKDict (   dict)

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

Parameters
[in]dictA 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()

def fsdk.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 fsdk.Annot.ResetAppearanceStream after this function.

Parameters
[in]opacityThe new opacity value. Valid range: 0.0 to 1.0 . 0.0 means full transparency and 1.0 means full opaque.
Returns
None.

◆ SetRotation()

def fsdk.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 fsdk.Annot.ResetAppearanceStream after this function.

Parameters
[in]rotateRotation value. Please refer to values starting from fsdk.E_Rotation0 and this should be one of these values except fsdk.E_RotationUnknown .
Returns
None.

◆ SetTitle()

def fsdk.Screen.SetTitle (   title)

Set title of current screen annotation.

Parameters
[in]titleThe title string to be set.
Returns
None.