Product Version: 9.0.1
How do I get coordinates on Annotations from pdf for iOS?
I am using this PDFTron SDK in the ios app.
I am adding some Annotations like some text and signature.
Once I add annotation, I need the coordinates of the annotations which I added on the pdf. How I can get the co-ordinates?
I am using Swift Language for iOS Development.
Hello, I’m Ron, an automated tech support bot
While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:
Thank you for getting in touch with us about this.
Are you able to share some more information about how you’re opening and displaying PDFs in your app?
If you are using the
PTDocumentController then one option would be to subclass this component and override its implementation of the
PTToolManagerDelegate protocol method
toolManager:annotationAdded:onPageNumber: in your subclass.
You could then get the annotation’s rect in PDF page co-ordinates using the getRect API call, or to get the annot’s rect in screen co-ordinates you could use the PTPDFViewCtrl method, getScreenRect(for annot: page_num:). The PTDocumentController.
An overview of the different co-ordinate systems is available here.
Please let us know if that works for you.