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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With