pdfGetCurrentSelection2
Get the current selection.
int pdfGetCurrentSelection2(PDFViewerHandle viewer, int *page,
double *x0, double *y0, double *x1, double *y1)
If there is a currently active selection, this function
sets
*page
to its page number, *x0, *y0
to
its upper-left corner, *x1, *y1
to its lower-right
corner, and returns 1. If there is no selection, this function
returns 0.
The coordinates of the upper-left and lower-right corners are in the
PDF file coordinate space - they are not screen pixel
coordinates. This means that changes in zoom or rotation will not
affect the rectangle described by specific values of the four
coordinates. See the pdfConvertPDFToWindowCoords2
for conversion
to window coordinates.
C:
int ok;
int page;
double x0, y0, x1, y1;
ok = pdfGetCurrentSelection2(viewer, &page, &x0, &y0, &x1, &y1);
if (ok) {
/* do something with the selection... */
}