pdfSetGDIOverlayCbk
Set a function to be called at the end of each page.
void pdfSetGDIOverlayCbk(PDFHandle pdf,
void (*cbk)(void *data, HDC dc, int pageNum,
int pageWidth, int pageHeight, int hDPI, int vDPI),
void *cbkData)
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:
data
: thecbkData
value that was passed topdfSetGDIOverlayCbk
dc
: a Windows device context handlepageNum
: the current page numberpageWidth, pageHeight
: the size of the page (printable area), in device pixelshDPI, vDPI
: the horizontal and vertical resolution, in dots per inch, of the output device.
pdfPrintForceGDI
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 */
...
}
...
pdfSetGDIOverlayCbk(pdf, &overlayCallback, NULL);