使用URL,我正在尝试通过AndroidViewLibrary加载pdf。 但是抛出错误
“ java.io.FileNotFoundException:无内容提供者:https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf”
下面是我的代码。
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()
}