In Iphone you can open pdf and other file format using WebView. so, why android is not having similar functionality, for online mode we can use
"http://docs.google.com/gview?embedded=true&url= "
but in offline mode(without the internet access) how u'r going to do.
-- so, any how you are going to manage for pdf. file also then how you are going to target for other file format. It's really a biggest issue... I am struck with these things and aspect better solution. Thank you.
There are no JAR's that I'm aware of at the moment, but there is a project here that allows you to view PDF's, maybe you wanna give that a try?!
In Android the only way is using Intent and set the setContentType for the particular file format which will redirect to the number of application support the file format.
Related
I'm using justinMind and I get .vp file.I am able to convert it in .html file but how can I convert it in .xml or .apk?I have tried to convert .html to .xml by using .tidy but It doesn't give me proper layout in my androidstudio.
I don't know this SDK, but from I quick search, I found this post on there forum :
https://www.justinmind.com/community/topic/can-justmind-export-the-prototype-directly-to-the-android-studio-project
For long term save, here is the two post :
Question : I can use the software for simple designing and prototyping. It will reduce the app build time if there is a way to export the files as an android studio project. Is this possible?
Answer
Hi there,
Unfortunately that is not possible. However, you can utilize the
generated CSS and Javascript, which may help reduce app build time.
Best,
Danielle
So you need to use the generetad HTML/Javascript/Css files with a WebView. So no, you can't create a project, only the HTML files.
I need to convert this PDF into a spreadsheet that looks something like THIS. But when I copy and paste all the text from the PDF (CTRL+A), the layers are in some weird unpredictable order and looks like THIS.
Is there anyway to copy and paste the text in some kind of predictable way so I can turn it into the spreadsheet I linked to? (I should mention that I'm making an android app, so id prefer the solution to be inside an Android Studio Project, but that might not be necessary)
Any suggestions are appreciated, thanks.
I've build an application that uses Tesseract (V3.03 rc1) to identify some specific text strings. These are, unfortunately, printed on a custom font that requires that I build my own traineddata file. I've built the application on both iOS (using https://github.com/gali8/Tesseract-OCR-iOS for inspiration) and Android (using https://github.com/rmtheis/tess-two/ for inspiration as well).
The workflow for both platforms is as follows:
I select a bounding box on the preview screen for where I can crop out the relevant text, and crop the image accordingly.
I use OpenCV to get a binary image (using OpenCV's adaptive threshold function with the same parameters for both platforms)
I pass this binary image to Tesseract. Both platforms (Android and iOS) use the same traineddata file.
And yet, iOS recognizes the text strings perfectly, while Android keeps misidentifying certain characters (6s for Ss, As for Hs).
On both platforms, I use the same white list string, I disable load_type_dawg and load_system_dawg, and also choose to save the blob choices.
Has anyone encountered this kind of situation before? Am I missing a setting on Android that's automatically handled in iOS? Is there something particular about Android that hasn't crossed my mind?
Any thoughts or advice would be greatly appreciated!
So, after a lot of work, I found out what was wrong with my Android application (thankfully, it wasn't an issue with Tesseract at all). As I'm more familiar with iOS apps than Android, I wasn't sure how I could load the traineddata file onto the application without requiring the user to have the file loaded on their external storage device. I found inspiration in this project (http://www.codeproject.com/Tips/840623/Android-Character-Recognition), as they autoload the trained data file.
However, I misunderstood how it worked. I originally thought that the TessDataManager did a file lookup on the project's local tesseract/tessdata folder in order to get the trained data file (as I do this also on iOS). However, that's not what it does. It, rather, checks the internal file structure (data/data/projectname/files/tesseract/tessdata/traineddatafilegoeshere) to see if the file exists and if it doesn't, it copies over the trained data file it keeps in the Resources/Raw directory. In my case, it defaulted to the eng file, so it never read my custom font file.
Hopefully this helps someone else having similar issues. Thanks to Robin and RmTheis for all of your help!
I am new to Android. I want to know whether it is possible to read data from MS Excel file without using any jar files in android?
If it's possible then what's the best approach to do it .
Yes and no.
It's entirely possible to code a complete Excel API to read (and write) an Excel file. But that takes time and a lot of energy, as these formats are huge and complicated. You are practically mirroring the functions of Apache POI or JExcelApi. And these projects are huge.
As I don't know your reason for not using an external library (like an .jar) to read Excel, my answer is: Yes it's possible. Read the excel specification and implement an library to read this format. But practically: Don't do it and use the libraries from above. This will preserve you from a lot of pain.
Is there a definitive method of creating either a PDF or a MS Word Doc file within the app and email it immediately (and possibly, also store it).
I have been trying for quite some time and have found out the JAVA libraries: apwlibrary and iText. But both of them dont provide any tutorials of sorts.
Could anyone point me in the right direction?
EDIT: Come to think of it, is could an online PDF generator be used, first by sending the data to the service, then retrieve the result and save it on the phone?
I would recommend apache fop http://xmlgraphics.apache.org/fop/
you can use standard FOP to generate pdf.
Unless it is a core feature of your device to create a pdf file I would suggest not to do it yourself. Adding PDF creation is going to be quite a lot of work potentially depending on your performance needs. Java libraries will be easier to add but less performant. Native libraries combined with Java will be more hazzle to maintain build and bug fixing wise.
If you just need to email some information why dont you create a message text in html and use a intent to email it with the build in email program instead? Or if you want you could e.g. put the PDF generation on a server and just email a link..
I'm working right now with JasperReports, an open source library to create reports in Java and export them to PDF, DOC, XLS... Using it in conjunction with iReport to create a group of templates makes it really easy to create files filled with content from different types of sources (I'm using JavaBeans).
If you don't like the idea of having static templates (That's a bit annoying depending on your needs), you can always take a look at DynamicJasper (The examples on the website are great).
Good Luck!
I have used Apache POI. It seemed to work well. http://poi.apache.org/
This actually, http://poi.apache.org/hwpf/