Convert doc file to html using Apache Poi - android

I am working on an android application in which i need to convert MS office files to HTML using Apache Poi.
Till now i am able to convert .xlsx to htm using the following project Source-
http://display-msoffice-docs-android-with-apache-poi.googlecode.com/svn/trunk/TestOfficeAndroid/
i can see that there is a WordToHtmlConverter class in org.apache.poi.hwpf.converter package which can convert .doc file in its main method as its main() method takes the input file path and output file path as argument.
But when i invoke the main method of WordToHtmlConverter, it gives classnotfound exception exception for java.rmi.unexpectedexception.
There is no java.rmi.unexpectedexception class for android.
How can i overcome this problem.
Any help or guidance will be appreciated.

Have you tried Docx4j? I don't know if it's the answer for you, because I've only just started working with it. (I came across your question as I was looking on Stackoverflow to see if anyone had been using it to create HTML5, which I think should be fairly easy to do)

Related

How do I use j2objc to convert my android app to ios?

I have been searching for the past days on a tutorial on how to use https://developers.google.com/j2objc/guides/getting-started to convert my Android App (I have the source code) to IOS and I have found nothing.
If I try to convert individual .java files in my project, I get this error:
error: cannot find symbol
in every single file. Obviously, what I have been doing is wrong.
How do I use it?
Thank you

How to extract text from docx files with android

I have tried alot to solve the problem I am getting while using apache poi, but getting errors, each time. Is there any other way to extract text from .docx files or can we able to use javax package in android.
Thanks.
I have found way to extract text from .docx. I have used zipextractor for this

android mupdf, draw figure on the pdf page without using annotaion

How I can draw line or figure on pdf page without using annotation. If mupdf does not have this function then maybe other library you can advise.
Thanks.
Some of the source code files for PDF viewer in Android application. Check the links and try it:
http://code.google.com/p/apv/source/browse/
http://code.google.com/p/android-pdf/
http://code.google.com/p/droidreader/
http://andpdf.sourceforge.net/

epub 3 + android + parser + how to

My next project is writting an Android application that would support reading EPUB version 3 files.
I wont be able to use any libraries (that would support this) since i need to write everything from scratch and i cant find any good "starting point" of how to read epub files, how to show them in webview and so on.
So are there any tutorials or how to parse through this epub 3 format and show them in webview
in android.
Any help would be appreciated.
Thank you
I suggest breaking down the problem into smaller pieces that you can research individually:
EPUB uses zip as its container, so you'll need a way to read zip files. If you can't use a library for this, then you could roll your own unzip code. (Example)
Parsing EPUB. If you can't use a third-party library, then you'll need to read the source code for an EPUB library, learn the algorithm(s), and then implement them yourself. The format is based on XHTML, CSS, etc., and should be straightforward to display in a WebView once you understand the layout of the files.
Display the output in a WebView. You can either point the WebView at a local file or pass the markup for a given page directly using WebView.loadData().

Android native methods called from Java side

How can I get reach to the native methods called from Java side in Android? My problem is specifically related to AudioRecord class in Android Media package. I read the source code of AudioRecord.java. I found out that most of the jobs is performed by native methods, such as:
native_setup(...), native_start(...), native_stop(...), native_read_in_byte_array(...), native_read_in_direct_buffer(...)
I downloaded Android source code but I could not reach these methods. And I don't actually know the way to reach them. I seek for these methods in libraries I found in source code directories, but I couldn't success. If anybody may have an idea, I would be appreciative to hear. Thanks...
I think I found them. After using the Linux command
grep -r "native_read_in_direct_buffer" ./ANDROID_SOURCE/.*
I found the corresponding cpp files.
AudioRecord.cpp is located in: ~/ANDROID_SOURCE/frameworks/av/media/libmedia/ directory,
android_media_AudioRecord.cpp is located in ~/ANDROID_SOURCE/frameworks/base/core/jni directory.
I wanted to share it as a reference to other possible programmers willing to reach the same/similar source files.

Categories

Resources