Can I get the page number and line number in the iPhone?

Is it possible to get the page number and line number of a specific text from a doc / rtf / pdf document in iPhone sdk?

Can the QLPreviewController or UIDocumentmentInteractionController any help?

EDIT:

I am trying to create something like iAnnotate, Sente. An application in which the user can select any text and can add comments to the selected text.

I went through the fastpdfkit api, which seems to be the only api that can be useful.

Can you guys lead me in the right direction.

+4
source share
2 answers

https://github.com/brow/leaves

Follow this link, it will help you to read PDF files, and you will see how I am doing the general page and the current page.

+1
source

If you look at it using PDF, RTF and DOC, it is best to approach it differently, as they are all very different.

Instead, if you are considering attaching comments to a page area, rather than to a specific selection of text, then all you need to know about the document is the page you are looking at. Much easier. Then you can β€œpull out” the user a comment box for the area of ​​this page. Think of them more like sticky notes.

This way you can add comments to images as well as text, and this allows a much more flexible system to support other file formats in the future.

I understand that this is not a direct answer to the question, but thought that it was appropriate enough for publication.

+1
source

Source: https://habr.com/ru/post/1345327/


All Articles