com.foxit.sdk.PDFViewCtrl.IPageEventListener Interface Reference

Public Member Functions

void onPageChanged (int oldPageIndex, int curPageIndex)
 
void onPageInvisible (int index)
 
void onPageJumped ()
 
void onPageMoved (boolean success, int index, int dstIndex)
 
void onPagesInserted (boolean success, int dstIndex, int[] pageRanges)
 
void onPagesRemoved (boolean success, int[] pageIndexes)
 
void onPagesRotated (boolean success, int[] pageIndexes, int rotation)
 
void onPagesWillInsert (int dstIndex, int[] pageRanges)
 
void onPagesWillRemove (int[] pageIndexes)
 
void onPagesWillRotate (int[] pageIndexes, int rotation)
 
void onPageVisible (int index)
 
void onPageWillMove (int index, int dstIndex)
 

Detailed Description

The interface for page event listener.

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

Member Function Documentation

◆ onPageChanged()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPageChanged ( int  oldPageIndex,
int  curPageIndex 
)

Triggered when current page is changed.

Parameters
oldPageIndexOld page index. Valid range: from 0 to (count-1). count is the page count.
curPageIndexCurrent page index. Valid range: from 0 to (count-1). count is the page count.

◆ onPageInvisible()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPageInvisible ( int  index)

Triggered when the page becomes invisible.

Parameters
indexPage index. Valid range: from 0 to (count-1). count is the page count.

◆ onPageJumped()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPageJumped ( )

◆ onPageMoved()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPageMoved ( boolean  success,
int  index,
int  dstIndex 
)

Triggered when function

See also
PDFViewCtrl::movePage(int, int) is called.
Parameters
successtrue means success, while false means failure.
indexThe original index of page which has be moved.
dstIndexThe destination index.

◆ onPagesInserted()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPagesInserted ( boolean  success,
int  dstIndex,
int []  pageRanges 
)

Triggered when function

See also
com.foxit.sdk.PDFViewCtrl::rotatePages(int[], int) is called.
Parameters
successtrue means success, while false means failure.
dstIndexA 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.
pageRangesAn 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.

◆ onPagesRemoved()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPagesRemoved ( boolean  success,
int []  pageIndexes 
)

Triggered when function

See also
com.foxit.sdk.PDFViewCtrl::removePages(int[])} is called.
Parameters
successtrue means success, while false means failure.
pageIndexesAn integer array specify which pages have be removed.

◆ onPagesRotated()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPagesRotated ( boolean  success,
int []  pageIndexes,
int  rotation 
)

Triggered when function

See also
com.foxit.sdk.PDFViewCtrl::rotatePages(int[], int) is called.
Parameters
successtrue means success, while false means failure.
pageIndexesAn integer array specify which pages have be rotated.
rotationThe destination rotation value. Please refer to Constants.e_rotationXXX values and this should be one of these values.

◆ onPagesWillInsert()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPagesWillInsert ( int  dstIndex,
int []  pageRanges 
)

Triggered when insert some pages.

Parameters
dstIndexA 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.
pageRangesAn 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()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPagesWillRemove ( int []  pageIndexes)

Triggered when pages will be removed.

Parameters
pageIndexesAn integer array specify which pages will be removed.

◆ onPagesWillRotate()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPagesWillRotate ( int []  pageIndexes,
int  rotation 
)

Triggered when pages will be rotated.

Parameters
pageIndexesAn integer array specify which pages will be rotated.
rotationNew page rotation value. Please refer to Constants.e_rotationXXX values and this should be one of these values.

◆ onPageVisible()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPageVisible ( int  index)

Triggered when the page becomes visible.

Parameters
indexPage index. Valid range: from 0 to (count-1). count is the page count.

◆ onPageWillMove()

void com.foxit.sdk.PDFViewCtrl.IPageEventListener.onPageWillMove ( int  index,
int  dstIndex 
)

Triggered when page will be moved.

Parameters
indexThe index of page which will be moved.
dstIndexThe destination index.