Re: PDFKit: translate point coordinates from view coordinates into page coordinates

2012-03-27 Thread Antonio Nunes
On 27 Mar 2012, at 12:19, Nick wrote: > I would like to place a PDFAnnotation onto a PDF page in a place where > the user clicked with the mouse. [...] > NSPoint locationInView = [self convertPoint:[theEvent > locationInWindow] fromView:[[self window] contentView]]; You are receiving the event lo

Re: PDFKit: translate point coordinates from view coordinates into page coordinates

2012-03-27 Thread Nick
Hi Alvaro Thank you for the response! Yes, this is it. I just found a sample code PDFKitLinker2, and it showed how to do just what i need. 27 марта 2012 г. 15:05 пользователь Alvaro Costa Neto написал: > Hey Nick, how are you? > > Try to use the PDFView's convertPoint/Rect:to/fromPage: methods

Re: PDFKit: translate point coordinates from view coordinates into page coordinates

2012-03-27 Thread Alvaro Costa Neto
Hey Nick, how are you? Try to use the PDFView's convertPoint/Rect:to/fromPage: methods . The trick is to always remember to use a common ground (the PDF

PDFKit: translate point coordinates from view coordinates into page coordinates

2012-03-27 Thread Nick
Hello I would like to place a PDFAnnotation onto a PDF page in a place where the user clicked with the mouse. Position for PDFAnnotations is specified using "page coordinates". Mouse position - using global coordinates, which can be translated into PDFView coordinates. However, I can't figure out