I am working on an app in which I have pdf images that contain have text, I need to highlight the text on which user long pressed by his finger, as in pdf reader like repligo and others.I searched a lot but didn't find any relevant way to do it.
Can someone will share the idea to do it or it maybe more helpful if someone can explain via some code or example.
My Friend.
Even I am also thinking about the same kind of situation. According to me, It can only be done if u know the pixel values of the text . I mean from where it start and at which pixel it ends. Then you have to make a Database for the entire pdf like the Quran Android Application on Market. They simply recognize the device before sending the data from server to client. '
Suppose u r using tablet, then tablet specific pixels are there n if you are using Mobile Device, Then device specific coordinates will come in form of database which can easily be matched by touch.
Then u can easily find which word or paragraph is going to be selected . Then u can do the selection part by using the object of Path in Canvas.
Thank You
Related
Wondering if anyone can help me out here. I have an input on a webpage that should only allow document files (not images). I have the "accept" parameter like so:
accept=".txt,.rtf,.pdf,.doc,.docx,.zip"
However it seems that on mobile phones (have tested multiple iOS devices and Android) it gives the user the ability to take a photo or upload.
Does anyone know a surefire way to prevent these options from showing? Typically iOS/Android have mechanisms that will respect the functionality of the HTML (like changing the keyboard for an input type number vs text), but here it seems like it doesn't care that I am trying to limit the file type.
In my case, the server will catch it and reject the image if they do upload it, but I'd really like them not to even get to that step by hiding that option.
On iOS, I'd like it to just say "browse", and on Android I'd like it to just say "Documents".
I realize my options are probably incredibly limited here, but I just wanted to know if I'm being stupid and if anyone had run into this issue with uploading files on mobile devices.
Thanks in advance, everyone!
I'm a novice, and i'm using gomobile to create an app. I would like to add an image and link a phone number to that image. Any tips on how to do to? I don't write code, but if examples are provided I might be able to figure it out? Thanks!
You can link a button to a image and on the button u can write phone number which u can get using gettext func in java
This is a concept problem.
I see many text file viewer in android market. They are able to open a txt file with thousand of words. The viewer shows the text content in hundred of pages, and allow go back to previous page, go to next page, etc.
My problem is, as the length of word are different. If you want to go to page 50, do you have to start from page 1 and check how many words is needed to fit in page 1 to page 49, then you know the first English word in page 50?
And when you go back one page, you don't know the first word of page 49. Again, how can I find it out efficiently?
Thank you.
If you don't have experience with text viewers, the best approach is webView based application. You can easily add some HTML/CSS to the text and pass it to web view. WebKit will do all the job. For example, hyphenation. Doing it yourself is kinda tricky, specially for multiple languages. WebKit can do it for your.
Speaking about your concept without WebKit - is it important to let user to change font? If yes, you should re-parse document on every changing, I guess. Anyway, the easiest way is to use percentage and show not exact page, but place that is very near. For example, you can find out the size of one page in pro-cents of the document and use it to get needed portions to show.
Good luck in your research!
I am working on an android application in which I have to perform OCR from an Image. For example if I have drawing of building, user clicks on a particular area on the image (like Kitchen or Parking lot), after that click I want the location name/number where the user have clicked. This number will be present in that location.
in the given image if i click on Lecture Room part then the application must detect the area where I have clicked and give me the name (i.e. Lecture Room) for further queries..
Please help me out. I have tested many applications but most of them detects words not the drawing images.
Edit
It is just like HTML Image Maping
Interesting project, I've been developing an Android app with OCR and I included useful information and a code example in the next post, have a look at it and if you have any question, just ping me:
https://solidgeargroup.com/ocr-on-android
I'd say that you need to work on how you have abstracted your problem, if the goal of the application is to read any image file and extract all the text from it in order to make it searchable, you've got quite a project ahead of you.
However, if your goal is to make a finite number of maps clickable, I'd say that you should create a table of all the known locations in each image and then save the coordinate where the user clicked. That way you can look up that coordinate in your table of known locations and present the corresponding room to the user. A room could for instance be defined by the coordinates of its northwest corner and its southeast corner. Determining whether or not a coordinate is within those boundaries is trivial.
If your application really requires OCR you are in a world of trouble I'm afraid.
Edit: minor mistakes edited out.
I would like to write an application that would run initially on a Motorola Droid. The application would retrieve row(s) from a database and display some textual data from the rows as well as an image associated with the record that will be stored on the SD card.
I really think that the results would be best displayed in a fashion similar to the Calendar app that ships with the Droid - that is the data and associated image will scrollable left and right by dragging the current "page".
I assume that some of you will know how this is implemented - I dont' seem to be able to ask the right question when searching. Any help would be appreciated.
Is this the Calendar app you are referring to? Looking through the source might help.