pdfConvertWindowToPDFCoords2

Convert PDF coordinates to window coordinates.
void pdfConvertWindowToPDFCoords2(PDFViewerHandle viewer, int winX, int winY, int *page, double *pdfX, double *pdfY)
XpdfViewer functions deal with two different coordinate spaces. In the window coordinate space, (0,0) is the upper-left corner of the window, and the units are pixels. In the PDF coordinate space, the origin is determined by the PDF file (and may even change from page to page), and the units are points (1 point = 1/72 inch).

This function converts a point from window coordinates (winX, winY) to PDF coordinates (returned in *page, *pdfX, *pdfY).

C:
int page, winX, winY; double pdfX, pdfY; winX = ...; winY = ...; pdfConvertWindowToPDFCoords2(viewer, winX, winY, &page, &pdfX, &pdfY);
pdfConvertPDFToWindowCoords2