How do I use the PDFViewer.jar library in android?

5.6k views Asked by At

I am trying to use the PDFViewer.jar library to read pdf into my application android pdf reader.

I wonder how to use to read pdf form the resources in asset folder. it required to "PATH TO PDF GOES HERE"

Intent intent = new Intent(this, YourPdfViewerActivity.class);
intent.putExtra(PdfViewerActivity.EXTRA_PDFFILENAME, "PATH TO PDF GOES HERE");
startActivity(intent);`
2

There are 2 answers

0
Sk Saad Al Mahmud On
0
learner On

Yes path is required

Intent intent = new Intent(this, YourPdfViewerActivity.class);
             intent.putExtra(PdfViewerActivity.EXTRA_PDFFILENAME, "file:///android_asset/pdf_name.pdf");
             startActivity(intent);