Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pdf viewer library for android

Tags:

android

I know this question has been asked several times but I couldnt find one satisfying answer.My requirement is simple.just to open the pdf docs within my app(android).But I am not able to find a simple way of doing this.either its native c/c++ way or writing your own engine.But isnt there any simple API so that I can include it like a jar and view the pdf?

like image 803
Rradhak Avatar asked Oct 09 '22 16:10

Rradhak


1 Answers

No. There is no API in the Android SDK to natively display PDF.

Solutions I can suggest:

-Use an external application:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
startActivity(intent);

-If your PDF document is accessible online, use the Google Docs Viewer to open your PDF in a WebView:

http://docs.google.com/viewer?url=http://mypdf.pdf
like image 68
Tom Miette Avatar answered Oct 13 '22 10:10

Tom Miette