Set a function to be called periodically while printing.
void pdfSetPrintStatusCbk(PDFViewerHandle viewer, void (*cbk)(void *data, int nextPage, int firstPage, int lastPage), void *data)
This function sets a callback function to be called before each page is spooled, and after the last page is spooled. It is typically used to update a print status dialog or similar.

The callback will be called with the following arguments:

void printStatusCbk(void *data, int nextPage, int firstPage, int lastPage) { if (nextPage <= lastPage) { /* about to print [nextPage] of [firstPage]..[lastPage] */ } else { /* all done printing */ } } ... pdfSetPrintStatusCbk(viewer, &printStatusCbk, NULL);