how to read a pdf file inside an application? - android

I am working on an application in which i have to read downloaded pdf file inside my application without using any external application.
By googling i found that there is one library named iText which is open Source but the problem is i don't know how to use this library inside my application to read the pdf. So can you please provide me any sample code by which i can understand how to use this library..
Thanks to all..

you have to add the pdf library.
There is already a library and some more.
https://github.com/jblough/Android-Pdf-Viewer-Library
You should read the readme there is everything explained you need.
Hope could helpya
:)

I had used VuDroid it uses NDK and you can find source here
There are other libraries as well that you can use ...just google it. But it worked for me successfully.

Related

How to open documents located in Local Storage in android using WebView?

I have a doc/ppt/xls file located in my sd card. I want to open it without any third party app (i.e within my app itself) using webview. Though I am able to open documents by embedding it in google docs url like -
http://docs.google.com/gview?embedded=true&url=[filelinkHere]
But how to open a file located in internal or external storage in webview ?
Also, Suggest me any third party ALL-IN-ONE library for android to view all types of documents. I have tried ASPOS but it has few unresolved bugs and APACHE-POI is difficult to use.
I had the same issue few days ago .
i found Android PdfViewer best to view PDF files and Android PdfMyXml best to create pdf files in android.
For working with Word and Excel as a most reliable answer I suggest you to take a look at OliveDocLibrary .
If your documents are in cloud so there is an alternative way to display docx,pptx,pdf and such formats with a combination of Webview and googleDoc.
You might find other possible solutions in server-side machines or maybe a creative way!
Hope it help
You can integrate some library project to your project with which you can open the pdf file inside your app.
Reference :
https://github.com/tekinarslan/AndroidPdfViewer
https://github.com/JoanZapata/android-pdfview

Read the contents of the PDF file onto a webView

In my project I have to load the contents of a PDF located in the assets folder onto a WebView.Can It be achieved directly just by reading the contents onto a WebView.. I googled a lot and I found that i need to use third party PDF readers to achieve the same?
If so, Plz give me the links of the source of the PDF reader of GITHUB. Am not able to find it..
If you load pdf inside the webview, unicode text type or images wont be visible. So you want
to go for OCR tool.
Use set of libraries and sdk
This might help you
http://www.qoppa.com/android/pdfsdk/
http://code.google.com/p/droidreader/
mupdf is the best library in terms of performance and all i have found till now, you can also use it in your application.
But it needs knowledge of ndk.
Click here for more description

Opening pdf in Android using ANDPDF jar extremely slow

I am using this https://github.com/jblough/Android-Pdf-Viewer-Library - Basically a wrapped jar for the andpdf viewer for Android. I am not able to open a single pdf even though I 've followed the activity creation instructions to the letter.It alsways shows pdf loading. It is the only one I can use since it is under LGPL and I have to incorporate it in my proprietary project. The other ones I ve found either use MuPDF which is under GPL or use itext and only can be used to create PDF's. I've raised this issue on both andpdf and the wrapper sites but havent received responses.Has anyone solved this performance issue wrt ANDPDF. OR has anyone used a jar under LGPL to open pdf's in android?
For the andpdf jar - I am passing the path to the file as a URI to the function in the Jar.
Figured it out - Actually I was passing the file Name to the wrong activity - It has to be passed to the activity in the Jar and not to the locally created activity

How to read/edit a .DOCX file in android SD Card using OpenXML4J or DOCX4J

I read in some blog post that OpenXML4J have a Android Library for reading .DOCX file in Android and with help of that we can easily edit, read and create DOCX format.
My questions are:
Is it possible?
Using same code as I use in OpenXML4J will create DOCX? Is there a library in DocX4j for android?
From my experience I am pretty sure this should be all possible. And you do not need an android specific jar a regular one works fine since its the same java working on it

How to code for reading pdf file in android?

How to code for reading a pdf file in android? i want to build an app like RepliGo reader. So, Please enlighten me to read pdf by using android sdk or ndk.
Learn Java
Download the SDK with Eclipse
Work through some tutorials to get a flavour of programming on Android
Have a look at this tutorial on reading pdfs in Java
Write your app!

Categories

Resources