Opening PDFs on an Android website without using GoogleDocViewer

How to show pdf on Android webview from url without using GoogleDocViewer?

pdf url needs authentication and the url works fine in the browser, but when I try to open the same URL in the Android web browser, it shows a blank screen.

+8
android pdf android-webview
source share
2 answers

You can use mozilla pdf.js.

An example project on how you do this in Android . An example project made by Butelo .

As the LinX64 user pointed out, this can only be used on android.os.Build.VERSION_CODES.JELLY_BEAN and above.

+3
source share

You should use third-party libraries for these products, in my opinion, the native browser for Android does not support this pdf format.

For example, in order to answer the above users, this is only available on + android.os.Build.VERSION_CODES.JELLY_BEAN

Check this out too:

// The default value is true for the android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1 API level and below, // and false for the android.os.Build.VERSION_CODES.JELLY_BEAN API level and higher.

 if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) 
+1
source share

All Articles