5

I want to create a PDF viewer in Android..

So is it possible to do it? If yes, can anyone suggest me some sample code or guide.

Reno
  • 33,594
  • 11
  • 89
  • 102
Aamirkhan
  • 5,746
  • 10
  • 47
  • 74
  • 1
    Just about anything is "possible" in programming. However, when I checked circa 2000 the PDF specification was already over 1300 pages! :-) I would really start with a search for "android view PDF" and see if any of those products could be leveraged. –  Dec 07 '11 at 07:24
  • 1
    In fact, I searched for those exact terms and found: http://stackoverflow.com/questions/2883355/how-to-render-pdf-in-android/ and http://stackoverflow.com/questions/6079923/open-pdf-in-android-app (and more!). More initial research please! –  Dec 07 '11 at 07:25
  • Do you want to write a PDF Viewer, or start an already installed PDF viewer? – GvS Dec 07 '11 at 10:59

4 Answers4

8

Just go through these links, its about code for reading PDF in android..

EDIT: I think most of these are use JNI(In native load C,C++ library) to render pdf file. So You have to some basic knowledge of how JNI works.

Or If you want to make your own PDF reader then you can use any third party C,C++ library for render PDF file and build a shared library and make a call from your android app (Using JNI) but is to hard work(I know I gone through this process).. :-) All the best..!

user370305
  • 108,599
  • 23
  • 164
  • 151
  • Acyually i had implement Mupdf library .I had download the code of Mupdf website.But when i compile the code I have got a problem while making libmupdf.so file it gives me error while i compiling the code from CMD D:/android-ndk-r8/mupdf-1.0-source/android//jni/mupdf.c:195: error: 'ctm' undecl ared (first use in this function) D:/android-ndk-r8/mupdf-1.0-source/android//jni/mupdf.c:195: error: 'currentMedi abox' undeclared (first use in this function) can u help me to solve this errors. – Nitin May 28 '12 at 13:03
  • @user370305 I m trying to compile vudroid. But when i import .so library in java build path. It starts giving error. Not a valid zip file. If i dont import .so library. All java files give error. Please help – Bhupinder Sep 09 '13 at 06:50
  • `.so` files need to put in under `/libs/arm-eabi` directory. – user370305 Sep 09 '13 at 09:40
0

Yes It's possible. Adobe have made one. Start with open source projects. You can make android port of some C(++) app or Java app.

piotrpo
  • 12,398
  • 7
  • 42
  • 58
  • Thanks for reply.i have downloaded code of java and xml from this link http://vudroid.googlecode.com/svn/trunk/jni/ but i have no idea how to get the jni folder which is located in it.do u have any idea? – Aamirkhan Dec 07 '11 at 07:29
  • hey! i searched and got sample in this link http://vudroid.googlecode.com/svn/trunk/jni/ – Aamirkhan Dec 07 '11 at 07:31
  • sorry i am not getting what you want to say can you explain in detail? – Aamirkhan Dec 07 '11 at 07:40
  • http://tortoisesvn.tigris.org/ – piotrpo Dec 07 '11 at 07:42
  • can you please explain me in some brief what i exactly need to do? – Aamirkhan Dec 07 '11 at 07:48
  • should i download tortoize svn setup from that site?after that what i need to do? – Aamirkhan Dec 07 '11 at 07:51
  • First you need to download that code from googlecode. You can download by using tortoisesvn software. Install it and put that svn checkout url from googlecode into tortoise. It will download you that code. Then compile it using android ndk – Bhupinder Sep 09 '13 at 06:44
0

I am working on pdf project only.download the whole source code from above mentioned links and try it else tel the mail id so that i can send the source codedirectly to you.

user493244
  • 909
  • 7
  • 19
0

Qoppa has a PDF viewer written in Android

mark stephens
  • 3,205
  • 16
  • 19