I am using c# to create an application that will allow users to view a
pdf document on screen, click on the viewer to get coordinates and add
annotations to the document matching the coordinates.
I have tried a number of different controls but they won't do exactly
what I want. Your control is the closest I have come yet. I have only
one remaining issue:
I have the below code...
Rect myRect = new Rect(100, 200, 100, 200);
Annot link = Annot.CreateText(doc.GetSDFDoc(), myRect, Contents);
0, 0, 0, 0 coordinates seem to be in the bottom left hand corner,
however X and Y on the mousedown event 0, 0 is in the top left so I
need to translate them with a calculation unless there is an event on
your control with calculates the coordinates automatically?
You can use pdfview.ConvScreenPtToPagePt(x, y) to convert a screen
coordinate to PDF page coordinate and pdfview.ConvScreenPtToCanvasPt(x,
y) to go in the other direction. In PDFView class there are also some
other methods that you may find useful (all methods start with Conv???).