I want to load pdf from url and I'm using PDFViewer library for this. But, it is showing blank when opening my app. :( I want your help.
This is my code:
PDFView pdfView = findViewById(R.id.pdfView);
pdfView.fromUri(Uri.parse("https://firebasestorage.googleapis.com/v0/b/pdff-69823.appspot.com/o/ehp1.pdf?alt=media&token=9bb1792e-0787-461c-a6a8-1be6724be93f")).load();
And, this is my XML for this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.github.barteksc.pdfviewer.PDFView
android:id="@+id/pdfView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
And, I'm using this dependency:
implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'