Foxit PDF RDK

Public Member Functions | List of all members
FoxitPDFViewCtrl.IPageEventListener Class Reference

## Public Member Functions
| onPageChanged (oldPageIndex, curPageIndex)
| onPageInvisible (index)
| onPageJumped ()
| onPageMoved (success, index, dstIndex)
| onPagesInserted (success, dstIndex, pageRanges[])
| onPagesRemoved (success, pageIndexes[])
| onPagesRotated (success, pageIndexes[], rotation)
| onPagesWillInsert (dstIndex, pageRanges[])
| onPagesWillRemove (pageIndexes[])
| onPagesWillRotate (pageIndexes[], rotation)
| onPageSwiped (oldPageIndex, curPageIndex)
| onPageVisible (index)
| onPageWillMove (index, dstIndex)

## Detailed Description

The interface for page event listener.

Note: Currently, this interface does not support xfa documents.

## Member Function Documentation

## ◆ onPageChanged()

FoxitPDFViewCtrl.IPageEventListener.onPageChanged | ( | oldPageIndex | ,
|  | curPageIndex |
| ) |  |

Triggered when current page is changed.

Parameters

  oldPageIndex | Old page index. Valid range: from 0 to (`count`-1). `count` is the page count.
  curPageIndex | Current page index. Valid range: from 0 to (`count`-1). `count` is the page count.

## ◆ onPageInvisible()

FoxitPDFViewCtrl.IPageEventListener.onPageInvisible | ( | index |  | ) |

Triggered when the page becomes invisible.

Parameters

  index | Page index. Valid range: from 0 to (`count`-1). `count` is the page count.

## ◆ onPageJumped()

FoxitPDFViewCtrl.IPageEventListener.onPageJumped | ( |  | ) |

Triggered when function PDFViewCtrlModel.gotoPage(number) or PDFViewCtrlModel.gotoPage(number, number, number) is called.

## ◆ onPageMoved()

FoxitPDFViewCtrl.IPageEventListener.onPageMoved | ( | success | ,
|  | index | ,
|  | dstIndex |
| ) |  |

Triggered when function

Parameters

  success | `true` means success, while `false` means failure.
  index | The original index of page which has be moved.
  dstIndex | The destination index.

See also
  PDFViewCtrlModel.movePage(int, int) is called.

## ◆ onPagesInserted()

FoxitPDFViewCtrl.IPageEventListener.onPagesInserted | ( | success | ,
|  | dstIndex | ,
|  | pageRanges | []
| ) |  |

Triggered when function

Parameters

  success | `true` means success, while `false` means failure.
  dstIndex | A page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dstIndex is less than 0, the imported pages will be inserted to the first. If parameter dstIndex is equal to or larger than current page count, the imported pages will be inserted to the end.
  pageRanges | An integer array which contains the page ranges of source PDF document, to be imported. In this array, 2 numbers are a pair: the first integer is the starting page index, and the second integer is the page count. This parameter is not `null`, it should contains at least 2 numbers, and the count of elements should be a multiples of 2.

See also
  PDFViewCtrlModel.rotatePages(number[], number) is called.

## ◆ onPagesRemoved()

FoxitPDFViewCtrl.IPageEventListener.onPagesRemoved | ( | success | ,
|  | pageIndexes | []
| ) |  |

Triggered when function

Parameters

  success | `true` means success, while `false` means failure.
  pageIndexes | An integer array specify which pages have be removed.

See also
  PDFViewCtrlModel.removePages(int[])} is called.

## ◆ onPagesRotated()

FoxitPDFViewCtrl.IPageEventListener.onPagesRotated | ( | success | ,
|  | pageIndexes | [],
|  | rotation |
| ) |  |

Triggered when function

Parameters

  success | `true` means success, while `false` means failure.
  pageIndexes | An integer array specify which pages have be rotated.
  rotation | The destination rotation value. Please refer to values starting from FoxitRDKNative.common.e_Rotation0 and this should be one of these values.

See also
  PDFViewCtrlModel.rotatePages(int[], int) is called.

## ◆ onPagesWillInsert()

FoxitPDFViewCtrl.IPageEventListener.onPagesWillInsert | ( | dstIndex | ,
|  | pageRanges | []
| ) |  |

Triggered when insert some pages.

Parameters

  dstIndex | A page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dstIndex is less than 0, the imported pages will be inserted to the first. If parameter dstIndex is equal to or larger than current page count, the imported pages will be inserted to the end.
  pageRanges | An integer array which contains the page ranges of source PDF document, to be imported. In this array, 2 numbers are a pair: the first integer is the starting page index, and the second integer is the page count. If this parameter is set to `null`, all pages in the source document will be imported. If this parameter is not `null`, it should contains at least 2 numbers, and the count of elements should be a multiples of 2.

## ◆ onPagesWillRemove()

FoxitPDFViewCtrl.IPageEventListener.onPagesWillRemove | ( | pageIndexes | [] | ) |

Triggered when pages will be removed.

Parameters

  pageIndexes | An integer array specify which pages will be removed.

## ◆ onPagesWillRotate()

FoxitPDFViewCtrl.IPageEventListener.onPagesWillRotate | ( | pageIndexes | [],
|  | rotation |
| ) |  |

Triggered when pages will be rotated.

Parameters

  pageIndexes | An integer array specify which pages will be rotated.
  rotation | New page rotation value. Please refer to values starting from FoxitRDKNative.common.e_Rotation0 and this should be one of these values.

## ◆ onPageSwiped()

FoxitPDFViewCtrl.IPageEventListener.onPageSwiped | ( | oldPageIndex | ,
|  | curPageIndex |
| ) |  |

Triggered when current page is swiped, and on the continuous page mode this method will never be called.

Parameters

  oldPageIndex | Old page index. Valid range: from 0 to (`count`-1). `count` is the page count.
  curPageIndex | Current page index. Valid range: from 0 to (`count`-1). `count` is the page count.

## ◆ onPageVisible()

FoxitPDFViewCtrl.IPageEventListener.onPageVisible | ( | index |  | ) |

Triggered when the page becomes visible.

Parameters

  index | Page index. Valid range: from 0 to (`count`-1). `count` is the page count.

## ◆ onPageWillMove()

FoxitPDFViewCtrl.IPageEventListener.onPageWillMove | ( | index | ,
|  | dstIndex |
| ) |  |

Triggered when page will be moved.

Parameters

  index | The index of page which will be moved.
  dstIndex | The destination index.