Foxit PDF SDK
fsdk.Link Class Reference

Public Member Functions

def ExecuteJavaScriptAction (javascript_action)
 Execute the JavaScript action associated with the link annotation. More...
 
def GetAction ()
 Get action. More...
 
def GetHighlightingMode ()
 Get highlighting mode. More...
 
def GetQuadPoints ()
 Get quadrilaterals. More...
 
def RemoveAction ()
 Remove action. More...
 
def SetAction (action)
 Set action. More...
 
def SetHighlightingMode (mode)
 Set highlighting mode. More...
 
def SetQuadPoints (quad_points_array)
 Set quadrilaterals. More...
 

Detailed Description

A link annotation represents an action to be performed.
Class fsdk.Link is derived from Annot , and offers functions to get/set link annotation's properties and reset appearance stream of a link annotation.

Note
For a newly created link annotation, if user calls function fsdk.Annot.ResetAppearanceStream directly without setting any other properties, the default appearance will be used:
border width = 1.0, border style = fsdk.BorderInfoE_Solid , border color = 0xFFFF0000 (red), opacity = 1.0, highlighting mode = fsdk.AnnotE_HighlightingNone .
See also
Annot

Member Function Documentation

◆ ExecuteJavaScriptAction()

def fsdk.Link.ExecuteJavaScriptAction (   javascript_action)

Execute the JavaScript action associated with the link annotation.

Parameters
Theexecuted javascript action and it should be belong to current annotation. It will execute the main JavaScript action if the value is empty.
Returns
true means success, while false means failure.

◆ GetAction()

def fsdk.Link.GetAction ( )

Get action.

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.

◆ GetHighlightingMode()

def fsdk.Link.GetHighlightingMode ( )

Get highlighting mode.

Returns
Highlighting mode value. Please refer to values starting from fsdk.AnnotE_HighlightingNone and this would be one of these values except fsdk.AnnotE_HighlightingToggle . -1 means no highlighting mode value is found.

◆ GetQuadPoints()

def fsdk.Link.GetQuadPoints ( )

Get quadrilaterals.

The order of points in a quadrilateral should be:

  • The first point is the point in left-top corner of the quadrilateral.

  • The second point is the point in right-top corner of the quadrilateral.

  • The third point is the point in left-bottom corner of the quadrilateral.

  • The fourth point is the point in right-bottom corner of the quadrilateral.

Returns
A quadrilateral points array that receives the quadrilaterals value.

◆ RemoveAction()

def fsdk.Link.RemoveAction ( )

Remove action.

Returns
true means success, while false means failure.

◆ SetAction()

def fsdk.Link.SetAction (   action)

◆ SetHighlightingMode()

def fsdk.Link.SetHighlightingMode (   mode)

Set highlighting mode.

Parameters
[in]modeNew highlighting mode value. Please refer to values starting from fsdk.AnnotE_HighlightingNone and this should be one of these values except fsdk.AnnotE_HighlightingToggle .
Returns
None.

◆ SetQuadPoints()

def fsdk.Link.SetQuadPoints (   quad_points_array)

Set quadrilaterals.

This property has effect on the link annotation's appearance.The order of points in a quadrilateral should be :

  • The first point is the point in left-top corner of the quadrilateral.

  • The second point is the point in right-top corner of the quadrilateral.

  • The third point is the point in left-bottom corner of the quadrilateral.

  • The fourth point is the point in right-bottom corner of the quadrilateral.

If user wants the new quadrilaterals has effect on annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after setting quadrilaterals.

Parameters
[in]quad_points_arrayA valid array of quadrilaterals. It should not be an empty array.
Returns
None.