I think I am going to ask very stupid Question here. In my current project i want to give search feature. I have an big image tutorial with lot of information about on a topic and i want to search feature in the image. Suppose use type like "Apple" it will show the Apple occurred how many times in the image and after clicking on of that the image scroll and go to the position where "Apple" is occurred.
Thanks for reading my stupid question but if it is possible let me know and put some sample code??
Here is a broad overview of the approach I would take:
Find a C/C++ based OCR library
Get it to compile on the iPhone
Create a UI to feed images to the OCR library
Store output of OCR, including words found and their location in the image.
Create a UI to allow users to enter a search.
Search OCR output for matches and highlight the location of matches on the image.
I imagine step 2 is going to be the most difficult. Tesseract may work, it is C++ based but I don't know what dependencies it has.
UPDATE: Someone on GitHub has posted a demo iPhone App that uses Tesseract.
Please try to do use WebView or Core Text to render you tutorial, in which search functionality comes pretty much for free. Use OCR for search is just not practical for your need.
Related
I wanna perform like find differences game in a a flutter app but I did not find any package can help so the idea is that I have two similar images with some differences like removed parts of color change parts and I want to find the exact location of this differences so that I can make it clickable to tell app that user select right difference or not
I will appreciate an help and if there is another idea I will be happy to hear
My goal is to convert a block of text that is on the screen into an image and save it to the user's gallery (or downloads folder, or anywhere on there phone that allows them access to it)
On searching through the many many threads on this subject it seems the best way is to take a screenshot with the "camera".
However, the manual tells me to use Application.CaptureScreenshot but in unity it says that is depreciated.
All i can find on searching for alternatives are paid for assets (seems dodgy for something that should be so simple) and examples of using Application.CaptureScreenshot
ScreenCapture.CaptureScreenshot is what you are looking for now.
With the iOS support for Quartz 2D and its support for the PDF format; should adding a signature image to a pdf be a little easier. I have looked all over and saw people are using the PDFKit, UIView or Core Graphic Library. Which is the easiest and the recommended library for the effort? Also, are there simple examples of the recommend library. When I tried to see how Quartz 2D worked, all I could find are narrative explanations about how it worked and specific method you may use but no complete examples. You know the hello world one. Anyway, I am new to iOS development but been writing code for over 20 years so I might be able to pick this OS up as well.
Can some poor soul have pity on me and please point me in the right direction?
I have done this by loading the old pdf file on view and then add signature on that view and then render the view. check the following post
Add a signature image to a pdf without showing the pdf data to user in iOS
But not able create the pdf which contain existing pdf with signature "without showing on view" .
It's too late to answer this question now. But let me just provide some pointers for people who may bump into this question in future.
This one summarizes PDF handling in iOS pretty well. Good for starters.
http://www.ioslearner.com/generate-pdf-programmatically-iphoneipad/#more-242
This one is also similar, but not very exhaustive. http://www.absoluteripple.com/1/post/2012/03/generating-pdf-in-ios.html
The above links do not talk about handling existing PDFs. I found this stackoverflow answer really useful for that.
Add pdf page to an existing pdf objective-c
Just a note, if you want manipulate existing PDFs, Quartz 2d is the way to go.
Also look at reference pages of CGPDFDocument, CGPDFPage, CGPDFContext and CGContext.
Is it possible to get the page number and line number of particular text from doc/rtf/pdf in iPhone sdk?
Can QLPreviewController or UIDocumentInteractionController be of any help?
EDIT:
I am trying to create something like iAnnotate,Sente. Application where in user will be able to select some text and can add comments for selected text.
I have gone through the fastpdfkit api's which seems the only api which can be of some help.
Can you guys guide me in the right direction.
https://github.com/brow/leaves
Go with this link, it will help you for PDF reader and you can see there how I am doing total page and current page.
If you're looking at doing this with PDF, RTF and DOC it might be best to approach it in a different way as they are all very different formats.
Instead - if you consider attaching comments to an area of the page as opposed to a specific text selection then all you need to know about the document is which page you're looking at. A much easier task. Then you get the user to 'drag out' a comments box for an area of that page. Think of them more like sticky-notes.
This way you can add comments to images as well as text and it allows a much more flexible system for support of other file formats in the future.
I realise this isn't I direct answer to the question, but thought it relevant enough to post.
I had asked a question earlier How to Searching String from PDF using iphone sdk?
I got a answer but that wasn't I was looking for. I am not sure to ask something similar as new question or not.
I am using ios4.2.
I am working on a application which display PDF. I am using Quartz 2D for that. I have gone through apple documentation and googleing of around 4 days I didn't find any thing that suits to me in this case. There are lots of question related to this and almost all answers are redirecting to either
Random Ideas or
FastKit.
Random Ideas don't explain how to highlight a text within the pdf. and FastKit has implementation but no Explaination too. I don't want to use fastkit because It shows its logo. can any one please give me any link which has some libraries or apis or any thing for highlighting text in PDF while I am using Quartz 2D.
Any help will be appreciated.
Thanks In Advance.