pdfSetPrintGDIOverlayCbk

Set a function to be called at the end of each printed page.
void pdfSetPrintGDIOverlayCbk(PDFViewerHandle viewer, void (*cbk)(void *data, HDC dc, int pageNum, int pageWidth, int pageHeight, int hDPI, int vDPI), void *data)
This function sets a callback function to be called at the end of each printed page. The callback can use standard Windows GDI calls to add arbitrary overlays to the printed output.

The callback will be called with the following arguments:

The GDI overlay callback is only called in GDI mode (i.e., for non-PostScript printers, or if pdfSetPrintForceGDI has been called).
C:
void overlayCallback(void *data, HDC dc, int pageNum, int pageWidth, int pageHeight, int hDPI, int vDPI) { /* draw overlay content using the HDC handle, dc */ ... } ... pdfSetPrintGDIOverlayCbk(viewer, &overlayCallback, NULL);
pdfAddPrintOverlayText