Foxit PDF SDK

Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
FoxitPDFSDKPython2.Destination Class Reference
Inheritance diagram for FoxitPDFSDKPython2.Destination:

## Public Member Functions
def | Destination (other)
| Constructor, with another destination object. More...
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...

## Static Public Member Functions
def | CreateFitBBox (document, page_index)
| Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitBBox . More...
def | CreateFitBHorz (document, page_index, top)
| Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitBHorz . More...
def | CreateFitBVert (document, page_index, left)
| Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitBVert . More...
def | CreateFitHorz (document, page_index, top)
| Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitHorz . More...
def | CreateFitPage (document, page_index)
| Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitPage . More...
def | CreateFitRect (document, page_index, left, bottom, right, top)
| Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitRect . More...
def | CreateFitVert (document, page_index, left)
| Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitVert . More...
def | CreateFromPDFArray (document, pdf_array)
| Create a destination object from an existing destination array. More...
def | CreateXYZ (document, page_index, left, top, zoom_factor)
| Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomXYZ . More...

## Static Public Attributes
| e_ZoomFitBBox = _fsdk.Destination_e_ZoomFitBBox
| Fit the bounding box of page entirely within the display area when display the page. More...
| e_ZoomFitBHorz = _fsdk.Destination_e_ZoomFitBHorz
| Fit the entire width of the page's bounding box within the display area when display the page. More...
| e_ZoomFitBVert = _fsdk.Destination_e_ZoomFitBVert
| Fit the entire height of the page's bounding box within the display area when display the page. More...
| e_ZoomFitHorz = _fsdk.Destination_e_ZoomFitHorz
| Fit the entire width of the page within the display area when display the page. More...
| e_ZoomFitPage = _fsdk.Destination_e_ZoomFitPage
| Fit the entire page within the display area when display the page. More...
| e_ZoomFitRect = _fsdk.Destination_e_ZoomFitRect
| Fit the page content in a specified rectangle entirely within the display area when display the page. More...
| e_ZoomFitVert = _fsdk.Destination_e_ZoomFitVert
| Fit the entire height of the page within the display area when display the page. More...
| e_ZoomXYZ = _fsdk.Destination_e_ZoomXYZ
| Display page with a specified position and a specified zoom factor. 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
  FoxitPDFSDKPython2.Bookmark
  FoxitPDFSDKPython2.GotoAction
  FoxitPDFSDKPython2.RemoteGotoAction
  FoxitPDFSDKPython2.EmbeddedGotoAction

## Constructor & Destructor Documentation

## ◆ Destination()

def FoxitPDFSDKPython2.Destination.Destination | ( |  | other | ) |

Constructor, with another destination object.

Parameters

  [in] | other | Another destination object.

## Member Function Documentation

## ◆ CreateFitBBox()

FoxitPDFSDKPython2.Destination.CreateFitBBox | ( |  | document,
|  |  | page_index
| ) |  |
| static

Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitBBox .

Parameters

  [in] | document | A valid PDF document object.
  [in] | page_index | The index of the destination page in the PDF document.

Returns
  A new destination object.

## ◆ CreateFitBHorz()

FoxitPDFSDKPython2.Destination.CreateFitBHorz | ( |  | document,
|  |  | page_index,
|  |  | top
| ) |  |
| static

Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitBHorz .

Parameters

  [in] | document | A valid PDF document object.
  [in] | page_index | The index of the destination page in the PDF document.
  [in] | top | The vertical coordinate of top edge

Returns
  A new destination object.

## ◆ CreateFitBVert()

FoxitPDFSDKPython2.Destination.CreateFitBVert | ( |  | document,
|  |  | page_index,
|  |  | left
| ) |  |
| static

Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitBVert .

Parameters

  [in] | document | A valid PDF document object.
  [in] | page_index | The index of the destination page in the PDF document.
  [in] | left | Horizontal coordinate of left edge.

Returns
  A new destination object.

## ◆ CreateFitHorz()

FoxitPDFSDKPython2.Destination.CreateFitHorz | ( |  | document,
|  |  | page_index,
|  |  | top
| ) |  |
| static

Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitHorz .

Parameters

  [in] | document | A valid PDF document object.
  [in] | page_index | The index of the destination page in the PDF document.
  [in] | top | Vertical coordinate of top edge.

Returns
  A new destination object.

## ◆ CreateFitPage()

FoxitPDFSDKPython2.Destination.CreateFitPage | ( |  | document,
|  |  | page_index
| ) |  |
| static

Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitPage .

Parameters

  [in] | document | A valid PDF document object.
  [in] | page_index | The index of the destination page in the PDF document.

Returns
  A new destination object.

## ◆ CreateFitRect()

FoxitPDFSDKPython2.Destination.CreateFitRect | ( |  | document,
|  |  | page_index,
|  |  | left,
|  |  | bottom,
|  |  | right,
|  |  | top
| ) |  |
| static

Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitRect .

Parameters

  [in] | document | A valid PDF document object.
  [in] | page_index | The index of the destination page in the PDF document.
  [in] | left | The coordinate left of a rectangle.
  [in] | bottom | The coordinate bottom of a rectangle.
  [in] | right | The coordinate right of a rectangle.
  [in] | top | The coordinate top of a rectangle.

Returns
  A new destination object.

## ◆ CreateFitVert()

FoxitPDFSDKPython2.Destination.CreateFitVert | ( |  | document,
|  |  | page_index,
|  |  | left
| ) |  |
| static

Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomFitVert .

Parameters

  [in] | document | A valid PDF document object.
  [in] | page_index | The index of the destination page in the PDF document.
  [in] | left | Horizontal coordinate of left edge.

Returns
  A new destination object.

## ◆ CreateFromPDFArray()

FoxitPDFSDKPython2.Destination.CreateFromPDFArray | ( |  | document,
|  |  | pdf_array
| ) |  |
| static

Create a destination object from an existing destination array.

Parameters

  [in] | document | A valid PDF document object.
  [in] | pdf_array | A destination PDF array. This PDF array can be retrieved from a FoxitPDFSDKPython2.PDFNameTree in type FoxitPDFSDKPython2.PDFNameTree.e_Dests .

Returns
  A new destination object.

## ◆ CreateXYZ()

FoxitPDFSDKPython2.Destination.CreateXYZ | ( |  | document,
|  |  | page_index,
|  |  | left,
|  |  | top,
|  |  | zoom_factor
| ) |  |
| static

Create a destination object for zoom mode FoxitPDFSDKPython2.Destination.e_ZoomXYZ .

Parameters

  [in] | document | A valid PDF document object.
  [in] | page_index | The index of the destination page in the PDF document.
  [in] | left | Horizontal coordinate value of a position as page's left-top position.
  [in] | top | Vertical coordinate value of a position as page's left-top position.
  [in] | zoom_factor | Zoom factor value.

Returns
  A new destination object.

## ◆ GetBottom()

def FoxitPDFSDKPython2.Destination.GetBottom | ( |  | ) |

Get bottom position value.

This is only useful when zoom mode is FoxitPDFSDKPython2.Destination.e_ZoomFitRect . For other zoom modes, this function will be 0.0f.

Returns
  The bottom position value.

## ◆ GetDestArray()

def FoxitPDFSDKPython2.Destination.GetDestArray | ( |  | ) |

Get the destination PDF array.

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

## ◆ GetLeft()

def FoxitPDFSDKPython2.Destination.GetLeft | ( |  | ) |

Get left position value.

This is only useful when zoom mode is FoxitPDFSDKPython2.Destination.e_ZoomXYZ , FoxitPDFSDKPython2.Destination.e_ZoomFitVert , FoxitPDFSDKPython2.Destination.e_ZoomFitRect or FoxitPDFSDKPython2.Destination.e_ZoomFitBVert . Specially for FoxitPDFSDKPython2.Destination.e_ZoomXYZ , FoxitPDFSDKPython2.Destination.e_ZoomFitVert and FoxitPDFSDKPython2.Destination.e_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 FoxitPDFSDKPython2.Destination.IsLeftNull .
For other zoom modes, this function will return 0.0f.

Returns
  The left position value.

## ◆ GetPageIndex()

def FoxitPDFSDKPython2.Destination.GetPageIndex | ( |  | document | ) |

Get the index of the destination page.

Parameters

  [in] | document | A valid PDF document object.

Returns
  The page index, starting from 0. If there is any error, this function will return -1.

## ◆ GetRight()

def FoxitPDFSDKPython2.Destination.GetRight | ( |  | ) |

Get right position value.

This is only useful when zoom mode is FoxitPDFSDKPython2.Destination.e_ZoomFitRect . For other zoom modes, this function will be 0.0f.

Returns
  The right position value.

## ◆ GetTop()

def FoxitPDFSDKPython2.Destination.GetTop | ( |  | ) |

Get top position value.

This is only useful when zoom mode is FoxitPDFSDKPython2.Destination.e_ZoomXYZ , FoxitPDFSDKPython2.Destination.e_ZoomFitHorz , FoxitPDFSDKPython2.Destination.e_ZoomFitBHorz or FoxitPDFSDKPython2.Destination.e_ZoomFitRect . Specially for FoxitPDFSDKPython2.Destination.e_ZoomXYZ , FoxitPDFSDKPython2.Destination.e_ZoomFitHorz and FoxitPDFSDKPython2.Destination.e_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 FoxitPDFSDKPython2.Destination.IsTopNull .
For other zoom modes, this function will return 0.0f.

Returns
  The top position value.

## ◆ GetZoomFactor()

def FoxitPDFSDKPython2.Destination.GetZoomFactor | ( |  | ) |

Get zoom factor.

This is only useful when zoom mode is FoxitPDFSDKPython2.Destination.e_ZoomXYZ . For FoxitPDFSDKPython2.Destination.e_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 FoxitPDFSDKPython2.Destination.GetZoomMode | ( |  | ) |

Get the zoom mode.

Returns
  Zoom mode value. Please refer to values starting from FoxitPDFSDKPython2.Destination.e_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 FoxitPDFSDKPython2.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 FoxitPDFSDKPython2.Destination.IsLeftNull | ( |  | ) |

Check if left value is a null object.

This is only useful when zoom mode is FoxitPDFSDKPython2.Destination.e_ZoomXYZ , FoxitPDFSDKPython2.Destination.e_ZoomFitVert or FoxitPDFSDKPython2.Destination.e_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 FoxitPDFSDKPython2.Destination.GetLeft .

## ◆ IsTopNull()

def FoxitPDFSDKPython2.Destination.IsTopNull | ( |  | ) |

Check if top value is a null object.

This is only useful when zoom mode is FoxitPDFSDKPython2.Destination.e_ZoomXYZ , FoxitPDFSDKPython2.Destination.e_ZoomFitHorz , or FoxitPDFSDKPython2.Destination.e_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 FoxitPDFSDKPython2.Destination.GetTop .

## Member Data Documentation

## ◆ e_ZoomFitBBox

FoxitPDFSDKPython2.Destination.e_ZoomFitBBox = _fsdk.Destination_e_ZoomFitBBox
| static

Fit the bounding box of page entirely within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit its bounding box entirely within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the bounding box within the display area in the other dimension.

## ◆ e_ZoomFitBHorz

FoxitPDFSDKPython2.Destination.e_ZoomFitBHorz = _fsdk.Destination_e_ZoomFitBHorz
| static

Fit the entire width of the page's bounding box within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire width of the page's bounding box within the display area.

## ◆ e_ZoomFitBVert

FoxitPDFSDKPython2.Destination.e_ZoomFitBVert = _fsdk.Destination_e_ZoomFitBVert
| static

Fit the entire height of the page's bounding box within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire height of the page's bounding box within the display area.

## ◆ e_ZoomFitHorz

FoxitPDFSDKPython2.Destination.e_ZoomFitHorz = _fsdk.Destination_e_ZoomFitHorz
| static

Fit the entire width of the page within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire width of the page within the display area.

## ◆ e_ZoomFitPage

FoxitPDFSDKPython2.Destination.e_ZoomFitPage = _fsdk.Destination_e_ZoomFitPage
| static

Fit the entire page within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire page within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.

## ◆ e_ZoomFitRect

FoxitPDFSDKPython2.Destination.e_ZoomFitRect = _fsdk.Destination_e_ZoomFitRect
| static

Fit the page content in a specified rectangle entirely within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the page content in the specified rectangle entirely within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the rectangle within the display area in the other dimension.

## ◆ e_ZoomFitVert

FoxitPDFSDKPython2.Destination.e_ZoomFitVert = _fsdk.Destination_e_ZoomFitVert
| static

Fit the entire height of the page within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire height of the page within the display area.

## ◆ e_ZoomXYZ

FoxitPDFSDKPython2.Destination.e_ZoomXYZ = _fsdk.Destination_e_ZoomXYZ
| static

Display page with a specified position and a specified zoom factor.

If this is used, that means the specified position of the page will be treated as the left-top position when the page is rendered and this position should be at the upper-left corner of the display area. Contents of the page should be magnified by the specified zoom factor.