pdfSetMidPageChangeCbk

Set a callback function for page changes (in middle of window).
void pdfSetMidPageChangeCbk(PDFViewerHandle viewer, void (*cbk)(void *data, int pageNum), void *data)
This function sets a callback function which will be called whenever the viewer displays a new page.

This callback is useful, for example, to update a "current page number" display in your application.

The page change callback is called whenever the displayed page number changes. This can happen in several ways:

The callback receives two arguments: In continuous mode, this callback is triggered when the page displayed in the middle of the window (i.e., at the vertical center of the window) changes. See pdfSetPageChangeCbk for a callback triggered when the page at the top of the window changes.
C:
void myPageChangeFunc(void *data, int pageNum) { Context *myContext = (Context *)data; /* ... do something with the new page number ... */ } .... pdfSetMidPageChangeCbk(viewer, &myPageChangeFunc, &myContext);
pdfSetPageChangeCbk