Hello.
I'm trying to change the standard viewer to display annotations and links.
I've modified PdfRenderer.GetPageLinks to use iTextSharp to get data from PDF.
The problem is that I have the Rect Coordinates relative to PDF Points.
How con I change (for example) PdfRenderer.OnSetCursor to get the right coordinates in PDF points?
Something like is not working.
var size = TranslateSize(Document.PageSizes[page]); PdfPoint pp = this.PointToPdf(location); Point lc = new Point((int) pp.Location.X, (int) (size.Height - pp.Location.Y)); if (link.Bounds.Contains(lc ))
Hello. I'm trying to change the standard viewer to display annotations and links. I've modified PdfRenderer.GetPageLinks to use iTextSharp to get data from PDF. The problem is that I have the Rect Coordinates relative to PDF Points.
How con I change (for example) PdfRenderer.OnSetCursor to get the right coordinates in PDF points? Something like is not working.
var size = TranslateSize(Document.PageSizes[page]); PdfPoint pp = this.PointToPdf(location); Point lc = new Point((int) pp.Location.X, (int) (size.Height - pp.Location.Y)); if (link.Bounds.Contains(lc ))