pdfSetSelectDoneCbk

Set a callback function for selection.
void pdfSetSelectDoneCbk(PDFViewerHandle viewer, void (*cbk)(void *data), void *data)
This function sets a callback function which is called when the left mouse button is released and the user has just finished selection a region.

The callback function receives one argument, data, which is the values passed as the data argument to pdfSetSelectDoneCbk.

C:
/* zoom to the current selection */ void selectDoneCbk(void *data) { double x0, y0, x1, y1; if (pdfGetCurrentSelection2(viewer, &page, &x0, &y0, &x1, &y1)) { pdfZoomToRect2(viewer, page, x0, y0, x1, y1); } } .... pdfSetSelectDoneCbk(viewer, &selectDoneCbk, NULL);
pdfGetCurrentSelection2
pdfGetSelectedText
pdfCopySelection
pdfEnableSelect