This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Android Microsoft Office Library (.doc, .docx, .xls, .ppt, etc.)
I have been searching for an API for android to open and view .doc, .ppt, .docx or .pptx.
I'm sure there should be one as there exist applications that can open these file format. I have found apache POI but it uses java awt which is not a part of android.
Even an API to convert these file format to .pdf will be useful.
There isn't a standard API for opening office files in Android. The applications you've found use an internal API for reading the files. They either do this in the device or they upload the file to a server, which is responsible for parsing the file and convert it to a format that is easier read from the Android client.
You can only do so if your phone comes with an application such as Quickoffice, and in those cases, you will be opening it in that application through your application.
How to render PDF in Android
Android Microsoft Office Library (.doc, .docx, .xls, .ppt, etc.)
Related
This question already has answers here:
Why can't chrome read local html file on android?
(1 answer)
How can I open and view html files stored locally on my Android device in a web browser running outside of my app, preferably using Intent ACTION_VIEW
(1 answer)
How to open HTML files on a SDCard on an Android
(4 answers)
Android - can not access the html file on sdCard [closed]
(7 answers)
Open a downloaded html file with WebView
(1 answer)
Closed 11 months ago.
There are some topics about this question but they are old and I can't believe there isn't a solution for this.
I have made an HTML file and placed it in the Download directory from Android.
When I try to open the file in Chrome, Firefox or Opera I get an error: file:///storage/emulated/0/Download/mysite.html
We are living in 2021 and I can't believe this isn't possible.
Maybe Tasker can help?
3 Options that can work, depending of the content of your file:
You can use a local web server in your Android phone itself. There are many server apps out there in the Play Store, one such app is Simple HTTP Server.
You can put your documents into the folder Android/data/com.android.chrome/files/Download/ in the internal storage. It's absolute path is /storage/emulated/0/Android/data/com.android.chrome/files/Download/ or /sdcard/Android/data/com.android.chrome/files/Download/. This is the location where Chrome stores any downloaded files and therefore, this is the only location where Chrome can access the files. But remember, uninstalling Chrome will delete this directory.
Also you can download a HTML Viewer to open your file.
Is there any opensource sdk which helps to display or render documents {PDF, docx, rtf,doc} files within my android application, without navigating to third party apps. There are tons of question out there both old and new ,most of them pointing towards the priced versions like
Artifex smart office for viewing documents
Aspose for converting file formats
Are there any opensource libs which can be used for this purpose. please guide.
Some say port Apache POI or Docx4j i dont understand how to do it.
If it was for pdf only i would opt PDF viewer. But what about other document types like docx and rtf.
How can we display PDF Files on BB/iOS/Android and Windows phone by using MobileFirst (MobileFirst Studio) ? These PDF actually exists in DB as binary files.
Is there any API given by IBM?
MobileFirst does not (and should not) provide API to display a PDF file.
I am not sure this will possible in BlackBerry, but you can google for BlackBerry API or Cordova API to display it.
As for Windows Phone it seems that if you will provide a direct URL to the PDF file the default PDF reader should be able to display it, according to: Opening a PDF file in Windows Phone - so that means you can use the window.open JS API to open the URL to the PDF file.
I need to download file .docx from url and save it as .doc on external memory on android. I didn't find the way. Can anyone give example of that.
It's impossible to do it without any modification to the file, because .docx and .doc has different structure.
In this way you will need to process the file by yourself on the Android device.
In this way you may find helpful the Apache POI library for Java for working with Microsoft Documents.
Apache POI - HWPF and XWPF - Java API to Handle Microsoft Word Files
This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
How to create pdf files on android
I have a program that asks the user for information, then I need to put this information on a document/contract. I think I would like to create a pdf file with that information using itext (other alternate ways would also be appreciated). Although, I found that the itext version is not built (at least the free version) for android. My only solution is to create a server, send this information to a server that creates the pdf and then sends the pdf back to my phone. I have no idea how to do this. Or if anyone knows how to make an itext version for android.
Welcome to stackoverflow. Search your problem well before reaching out.
If you want to do this on the server you can create a simple PHP script that generates the PDF for you.
Just Google for PHP generate PDF and it will give you a lot of links.
If you want to do the pdf generation on the device you can leverage a java library that does it for you. try this stackoverflow link create pdf files on Android