2

Using URL, I am trying to load pdf through AndroidViewLibrary. But throwing error

"java.io.FileNotFoundException: No content provider: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"

Below is my code.

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mBinding = DataBindingUtil.setContentView(this, R.layout.act_pdf_view)
setSupportActionBar(toolbar)

val uri = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"

mBinding.pdfView.fromUri(Uri.parse(uri))
.enableSwipe(true)
.swipeHorizontal(false)
.enableAnnotationRendering(true)
.scrollHandle(DefaultScrollHandle(this))
.load()
}
virusarthak
  • 314
  • 1
  • 3
  • 12
Hardik Patel
  • 91
  • 1
  • 4

0 Answers0