2

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()
}
4

0 に答える 0