pdfSetErrorCbk

Provide a function to be called whenever an error is reported.
void pdfSetErrorCbk(void (*cbk)(void *data, int category, int pos, char *msg), void *cbkData)
This function sets a callback function to be called whenever Xpdf reports an error (or warning).

The callback function receives four arguments:

C:
void xpdfErrorFunc(void *data, int category, int pos, char *msg) { printf("Xpdf error [%d]: %s\n", pos, msg); } ... pdfSetErrorCbk(&xpdfErrorFunc);