Foxit PDF SDK
fsdk.Destination Class Reference

Public Member Functions

def GetBottom ()
 Get bottom position value.
More...
 
def GetDestArray ()
 Get the destination PDF array.
More...
 
def GetLeft ()
 Get left position value.
More...
 
def GetPageIndex (document)
 Get the index of the destination page.
More...
 
def GetRight ()
 Get right position value.
More...
 
def GetTop ()
 Get top position value.
More...
 
def GetZoomFactor ()
 Get zoom factor.
More...
 
def GetZoomMode ()
 Get the zoom mode.
More...
 
def IsEmpty ()
 Check whether current object is empty or not.
More...
 
def IsLeftNull ()
 Check if left value is a null object.
More...
 
def IsTopNull ()
 Check if top value is a null object.
More...
 

Detailed Description

A destination defines a particular view of a PDF document, consisting of the following items:

  • The page of the document to be displayed.
  • The location of the document window on that page.
  • The magnification (zoom) factor to use when displaying the page.

Destinations may be associated with bookmarks, or some types of actions. In each case, the destination specifies the view of the document to be presented when the bookmark item or link annotation is opened or the action is performed.
This class offers functions to create destination objects for different zoom modes, and get destination data.

See also
fsdk.Bookmark
fsdk.GotoAction
fsdk.RemoteGotoAction
fsdk.EmbeddedGotoAction

Member Function Documentation

◆ GetBottom()

def fsdk.Destination.GetBottom ( )

Get bottom position value.

This is only useful when zoom mode is fsdk.DestinationE_ZoomFitRect . For other zoom modes, this function will be 0.0f.

Returns
The bottom position value.

◆ GetDestArray()

def fsdk.Destination.GetDestArray ( )

Get the destination PDF array.

Returns
The destination PDF array.If there is any error, this function will return null.

◆ GetLeft()

def fsdk.Destination.GetLeft ( )

Get left position value.

This is only useful when zoom mode is fsdk.DestinationE_ZoomXYZ , fsdk.DestinationE_ZoomFitVert , fsdk.DestinationE_ZoomFitRect or fsdk.DestinationE_ZoomFitBVert . Specially for fsdk.DestinationE_ZoomXYZ , fsdk.DestinationE_ZoomFitVert and fsdk.DestinationE_ZoomFitBVert , left value may be a null object, which means that just use current left value of application as the destination's left value. For this case, this function will return 0.0f. In order to check if the left value is just 0 or a null object, user is recommended to call function fsdk.Destination.IsLeftNull .
For other zoom modes, this function will return 0.0f.

Returns
The left position value.

◆ GetPageIndex()

def fsdk.Destination.GetPageIndex (   document)

Get the index of the destination page.

Parameters
[in]documentA valid PDF document object.
Returns
The page index, starting from 0. If there is any error, this function will return -1.

◆ GetRight()

def fsdk.Destination.GetRight ( )

Get right position value.

This is only useful when zoom mode is fsdk.DestinationE_ZoomFitRect . For other zoom modes, this function will be 0.0f.

Returns
The right position value.

◆ GetTop()

def fsdk.Destination.GetTop ( )

Get top position value.

This is only useful when zoom mode is fsdk.DestinationE_ZoomXYZ , fsdk.DestinationE_ZoomFitHorz , fsdk.DestinationE_ZoomFitBHorz or fsdk.DestinationE_ZoomFitRect . Specially for fsdk.DestinationE_ZoomXYZ , fsdk.DestinationE_ZoomFitHorz and fsdk.DestinationE_ZoomFitBHorz , top value may be a null object, which means that just use current top value of application as the destination's top value. For this case, this function will return 0.0f. In order to check if the left value is just 0 or a null object, user is recommended to call function fsdk.Destination.IsTopNull .
For other zoom modes, this function will return 0.0f.

Returns
The top position value.

◆ GetZoomFactor()

def fsdk.Destination.GetZoomFactor ( )

Get zoom factor.

This is only useful when zoom mode is fsdk.DestinationE_ZoomXYZ . For fsdk.DestinationE_ZoomXYZ , if the zoom factor is 0, that means just use current zoom factor of application as the destination zoom factor.
For other zoom modes, this function will be 0.0f.

Returns
The zoom factor.

◆ GetZoomMode()

def fsdk.Destination.GetZoomMode ( )

Get the zoom mode.

Returns
Zoom mode value. Please refer to values starting from fsdk.DestinationE_ZoomXYZ and this would be one of these values. If no zoom mode or zoom mode is unknown, this function will return 0.

◆ IsEmpty()

def fsdk.Destination.IsEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ IsLeftNull()

def fsdk.Destination.IsLeftNull ( )

Check if left value is a null object.

This is only useful when zoom mode is fsdk.DestinationE_ZoomXYZ , fsdk.DestinationE_ZoomFitVert or fsdk.DestinationE_ZoomFitBVert . This function can be used to check if the left value is a null object. For other zoom modes, this function will return false.

Returns
true means left value is a null object, and false means left value is not a null object and the left value can be retrieved by function fsdk.Destination.GetLeft .

◆ IsTopNull()

def fsdk.Destination.IsTopNull ( )

Check if top value is a null object.

This is only useful when zoom mode is fsdk.DestinationE_ZoomXYZ , fsdk.DestinationE_ZoomFitHorz , or fsdk.DestinationE_ZoomFitBHorz . This function can be used to check if the top value is a null object. For other zoom modes, this function will return false.

Returns
true means top value is a null object, and false means top value is not a null object and the top value can be retrieved by function fsdk.Destination.GetTop .