pdfSetRedrawCbk

Set a callback function for window redraws.
void pdfSetRedrawCbk(PDFViewerHandle viewer, void (*cbk)(void *data, HDC dc, int left, int top, int right, int bottom), void *data)
This function sets a callback function that will be called whenever the XpdfViewer window (or a portion of the window) needs to be redrawn.

This can be used to draw arbitrary content on top of the PDF file.

C:
void redrawCbk(void *data, HDC dc, int left, int top, int right, int bottom) { /* use Windows GDI functions to draw in [dc] ... */ } ... pdfSetRedrawCbk(viewer, &redrawCbk, NULL);
pdfGetWindowPageRange