首页 > 解决方案 > 如何在webview的html页面中下载pdf

问题描述

我在服务器上有一个 forms.html 文件。它显示了要下载的 pdf 的链接。当我单击浏览器上的链接时,它会毫无问题地下载。但是当我尝试在应用程序中下载它时,什么也没有发生。如何在 webview 的 html 页面中下载链接上的 pdf?

html代码

   <a href="somepdfurl" class="external"><img src="formlar/'.$resim.'" alt="" title="" /></a>

网页浏览

<WebView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/web"

    ></WebView>

标签: androidhtmlwebview

解决方案


推荐阅读