11

I want to build a PDF reader/viewer that could be used in my Android application, but I can't use Google docs to read my content. I can't use any PDF reader already installed in my device. It should be within my app and do not expose my secure content over the Internet.

What could I possibly use? Do I have to use the Android native dev kit to create my own viewer?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
user983947
  • 135
  • 1
  • 2
  • 11

5 Answers5

6

I'd recommend considering MuPDF which has already been ported for use on Android several times without reliance on Java. MuPDF is optimized for lightweight on-screen PDF rendering, making it perfect for mobile use.

Please note that MuPDF and all the derived projects are not suitable for the commercial use and you should consider alternatives if you are not developing an open source GPL project.

userx
  • 3,769
  • 1
  • 23
  • 33
  • Thanx...:-) actually i also Googled the same but was little confused, how to use MuPdf – user983947 Feb 21 '12 at 06:20
  • u 9, dat is why i asked in my ques..whether i hv to use android ndk...coz i believe- to use MuPdf, we have use Android Ndk – user983947 Feb 21 '12 at 06:24
  • Yes you must know how to do work in with NDK, for apv. And you have second option there andpdf, if you don't any mess up with NDK. But andpdf is slow then apv. – Yuvi Feb 21 '12 at 09:44
0

You will need pdf parsing libraries in JAVA... Parse the document, and display content in android. Below are some useful links :

http://java-source.net/open-source/pdf-libraries

http://itextpdf.com/

http://itextpdf.com/examples/iia.php?id=275

Advanced PDF parser for Java

Community
  • 1
  • 1
viv
  • 6,158
  • 6
  • 39
  • 54
0

There is an api in java, not sure if it is supported in android, but if possible. You can use iText Api to read and write pdf documents in your application, and it does not require a pdf viewer is installed on the device.

jeet
  • 29,001
  • 6
  • 52
  • 53
0

There are opensource code available code.google.com/p/apv , andpdf.sourceforge.net/

You have to integrate this in your app there is no other direct way for do that.

Yuvi
  • 1,344
  • 4
  • 24
  • 46
  • Who says there is no other direct way? My dear, there is a way by using [**mupdf library**](http://code.google.com/p/mupdf-android/) – Paresh Mayani Feb 21 '12 at 10:38
  • Ok tell me the any API provided by Android itself to view and manipulate pdf document ;) – Yuvi Feb 21 '12 at 10:41
-1

I think you can use iText library to read the PDF in android.

Here are the few links for that

How to read a pdf using itext library in android

Not able to run simple program of iText library in android

Community
  • 1
  • 1
Sankar
  • 1,685
  • 2
  • 16
  • 27