Set a callback function for clicks on hyperlinks.
void pdfSetLinkClickCbk(PDFViewerHandle viewer, void (*cbk)(void *data, char *linkType, char *dest, int page), void *data)
This function sets a callback function which will be called when the user clicks on a hyperlink.

The callback will be called even if hyperlinks are disabled (see pdfEnableHyperlinks). However, if XpdfViewer's internal mouse handling is disabled (e.g., by use of pdfSetMouseDownCbk or any of the other mouse callbacks), the link click callback will not be called if there is a current selection. In general, your mouse down callback should clear any custom selection.

This callback can be used to do processing on hyperlinks, for example, to disallow following of certain types of links.

The callback receives four arguments:

The link types are as follows:
void linkClickCbk(void *data, char *linkType, char *dest, int page) { Context *myContext = (Context *)data; if (!strcmp(linkType, "goto")) { .... } else .... } .... pdfSetLinkClickCbk(viewer, &linkClickCbk, &myContext);