I am working on an android app that required a native pdf viewer. I have looked around this site but the only solution i have found seems to be utilizing Google Docs inside a webview. This approach is not acceptable for my application for various reasons set by client requirements. Neither is it possible for me to use a third-party pdf viewer that gets launched from my application once the user selects the pdf button. So, is there a native library i can use in my app to display a pdf (with no bells and whistles) without leaving my application or using the google docs approach?
Asked
Active
Viewed 716 times
0
-
1I disagree with marking this as "duplicate" because the referenced answers are several years old and new and better solutions may have arisen since then. Furthermore if you actually read the referenced answers you can see that all the proposed solutions *at that time* were problematic and tricky. The poster said he looked around this site so we may assume that those answers were not suitable for his needs. – user316117 Jun 07 '13 at 15:54
-
Yep that is exactly it... The answeres in the other linked questions above are at least 2 years out of date... which in android terms might as well be a decade. The mods clearly havent read them or even bothered to verify if this was a duplicate – John Baum Jun 07 '13 at 18:17
1 Answers
0
You can use itext library It has methods for rendering a pdf to a Bitmap. According to that site there is an Android version with a smaller footprint.
BUT
If you do that, you should also add a "share" functionality where they can open the pdf in their favorite viewer. Use the PackageManager
to accomplish this.

Tom Fobear
- 6,729
- 7
- 42
- 74