How to recognize selected text in image - java

I am using tesseract library of google to convert an image to text. My problem is how to recognise text if I tap and select a part of the image text.

You should have a look at the "OCR Test" app in the play store. The code is available in the description of the app. It implements a Viewfinder that enables you to select a part of a image to apply the OCR.

Related

How to display HTML on EditText?

I am trying to make an Android Application, it is intended to be a notes app, similar to Evernote.
For the ones that have used Evernote (or every other good notes app) you may already know that it allows users to not only save text, but to add images, files, and other formatting features too.
So I came up with the idea of using HTML so the user can attach images and have different text styles (bold, regular, italics, etc...).
The user would select an Image of his files, and the HTML should show it in the EditText itself. Same thing with the Text Style.
Is it possible to achieve this? Would I need to use a library?
EDIT
I followed Lena's answer, and it works fine, but the main problem now is that it does not displays the images properly, whether they are from Internet or from the sd card. I do have Internet permission available and the Write/Read external storage too.
This is my code:
Edit.setText(Html.fromHtml("<strong>IT IS STRONG</strong>" +
"<p>Tiptoe</p>" +
"<img src=\"/sdcard/Pictures/Screenshots/Screenshot_20200204-230814.png\"/>"));
editText.setText(Html.fromHtml(yourHtmlText))

Get icon from Mime type that looks exactly like icon in files app in Android

I want to get the exact same file icon that files app using. I want to get the icon by mime type or extension. Is there any API that returns icon by mime type.
I've tried this solution.
https://stackoverflow.com/a/8248593/7024263
but it returns the icon of an app that handles that kind of files
I want icon like shown in
image
Yes, but only on Android Q and higher: getTypeInfo() on ContentResolver.
With luck, it will be added to ContentResolverCompat.

PDFNet filling the signature fields

I try to use PDFNetAndroid to filling signature fields and i saw some examples that sign these fields by code(not by human).
e.g http://www.pdftron.com/pdfnet/samplecode/DigitalSignaturesTest.java.html
I want in the moment that the client touching the mobile screen on signature field it's opening with window or something and the client drawing on the filed.
Someone know how to do that?
UPDATE: I have pdf file with signature field that i was created by acrobat.
I want to sign on the field in my android device.
enter image description here
Thanks.
PDFNet Android SDK already includes, out of the box, the ability to click on a Signature field and using touch events, draw a signature.
Please download the SDK, run the CompleteReader sample project, and open the getting_started.pdf. Then navigate to page 8 and tap the signature field.
The code/logic for handling this is in the PDFViewCtrlTools project, in particular the lib\src\PDFViewCtrlTools\src\com\pdftron\pdf\tools\DigitalSignature.java file in the SDK. All tools code is provided in the SDK so you can customize to your business needs.
Note, that we also have a show case app, called Xodo, avaiable for free in all mobile stores. This app uses CompleteReader as its foundation.

Convert Webpage Slider to Video

Am Developing the application for convert "Webpage slider images" to Video using Java with Selenium.
Challenge was, I want to "Record the slider as video", it is part of the webpage. How can i record particular web part as video or There is any solution for convert web Element to Video file.
You can achieve it by using getUserMedia() for more info refer
w3.org site at link http://www.w3.org/TR/mediacapture-streams/

Filling out and Saving a PDF on android

so basically what I am attempting to do, is to create a PDF that information can be inputted by the user of that document. and when all the information is entered, be able to click the save button below on the PDF document, and a window prompt open allowing the user to "save as" the document to a certain directory.
I currently have the button working for Windows OS, and the prompt comes up to save as, however when opened on Adobe reader on an android phone and the save button is clicked, nothing happens.. is there a java script code that differs from the Windows version to what android would look like.
If you would consider Xamarin for android app development then you could take a look at the following blog post showing how to create PDF file with arbitrary content on Android and iOS using the same library.

Categories