Search for a word in a PDF on iPad - iphone

I use CGPDFDocumentRef control to view pdf file in iPad. I want to add search capability and highlight the results. Any suggestions on how I can do so? In addition, I would like to know if there there a way to zoom in and out using a multi-touch?

following sample has most of the features you need.
https://github.com/mobfarm/FastPdfKit

Related

Is there a way to use PDFKit to only display selected part of a pdf?

I am trying to create a program that displays pdfs in chunks. So if you have a 100 page pdf and you only want to display the first chapter you could code something for only showing pages 1 - 10. I've searched around and as it stands it seems this is the best way to display pdfs. The problem is this loads the entire pdf at once in a reader. Going through the documentation now and I can't find anyway to selectively display the pdf. is there a way to selectively display pdf text using pdfkit? or will I have to use some other library for that?
I also see there's a tabViewStyle(.page) I can use to get a paged reader view in swiftui but I'd prefer not to have to format and prettify the text if possible.
I'm not opposed to using 3rd party libraries I just don't want to have to deal with formatting text or whatever. thanks!

How to select text in DTAttributedTextView?

I'm using DTCoreText DTAttributedTextView in my app to highlight the urls in my text. My other criteria is to be able to select by tapping and holding similar to UITextView. However, DTAttributedTextView doesn't seem to to use a UITextView as a placeholder. Anybody has an idea how I can achieve this?
Thanks
That's a feature that's only available via the paid version of DTCoreText.
from the github page
This is useful for drawing simple rich text like any HTML document without having to use a UIWebView. For text selection and highlighting (as you might need for an Editor or Reader) there is the commercial DTRichTextEditor component which can be purchased in the Cocoanetics Parts Store.

Highlighting a string in a pdf iphone

I'm developing a book app.My client has provided all the contents of pdf.
I have already implemented all the contents of pdf to book.
But he wanted to highlight a text in that pdf.
The user would like the text to allow for highlighting (like if you're reading a paper book).
Is this possible? Can anyone help me on this, please?
Thanks in advance.
Theoretically yes.. depends on a bit hacking and other things, for example fonts used in the PDF. Have a look at PdfKitten, their demo project can find text in a PDF and highlight it. That should give you a first pointer on how to highlight. If you want to the user to highlight with the touches you would need to be able to transform locations of touches into the PDF to determine where exactly the user touched, but it should be possible.

How to Searching String from PDF using iphone sdk?

I am trying to create a PDF Reader application allow user to search string from the PDF. The very simple idea for displaying the PDF in webView but I don't know whether I can perform search in the PDF displayed in UIWebView or not?
If this is possible then please provide me any good tutorial for this. If not then I am using CGPDFDocumentRef and other classes of CoreGraphics. I am done with displaying PDF on a UIView without having UIWebView. I am unable to Zoom yet but it is displaying. Now for searching I have used this tutorial. http://www.random-ideas.net/posts/42. I am able to search and getting a bool value for string is available or not. but I am not getting how to highlight search text in PDF.
Please help me if it is possible with any one, UIWebView or the way I am doing using CoreGraphics.
Thanks.

iPhone - view PDF like in iBooks

I have question about view for displaying multipage PDFs in my app. I have found solutions with webview but they lack ability to zoom and scroll between pages horizontally. Also found solutions using Quartz2D but the same problem as above.
Is there any way to present PDF like in iBooks? You can pinch-i/out zoom, list between pages horizontally. And also how to do taht with single PDF file, not split PDF to pages.
Thanks a lot.
Update: 04 Feb 2012
Check out this project, it's opensource and very well made:
Project:
http://www.vfr.org/
Source:
https://github.com/vfr/Reader
I can't give you the answer, but i can redirect you to a example project that is able to load and render a multipage pdf page by page.
To be honest this application it's manly on the iBook curl effect (forget it, it's a private API, no way) but inside there is a class that render on a view a pdf page, I'm sure that if you play a little with that code, CGAffineTransformMakeScale, CGAffineTransformMakeTranslation and touch control you will be able to obtain that effect.
Link to the project:
http://blog.steventroughtonsmith.com/2010/02/apples-ibooks-dynamic-page-curl.html
Checkout this sample code from Apple:
http://developer.apple.com/library/ios/samplecode/ZoomingPDFViewer/Introduction/Intro.html
It tells you how to efficiently display and zoom PDF documents.
For paging, see this link:
http://www.random-ideas.net/posts/42
Between the two of those you should be all set.