pdfSetPrintStatusCbk
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:
data
: thedata
value that was passed topdfSetPrintStatusCbk
nextPage
: the next page to be printedfirstPage
: the first page in the print joblastPage
: the last page in the print job
C:
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);