简体   繁体   English

使用WebView Android打开位于本地网络中的PDF

[英]Open a PDF located in a local network with a WebView Android

I am trying to open a PDF in a WebView. 我正在尝试在WebView中打开PDF。 The problem is that the PDF is located on a server in the local network. 问题是PDF位于本地网络中的服务器上。 Should I first download the PDF to the device and then try and open if from there, or is there a workaround which would not involve me downloading the PDF to the device? 我是否应该先将PDF下载到设备上,然后再尝试从那里打开,或者是否有不涉及我将PDF下载到设备上的解决方法?

I had to save the PDF on the sd card in the device form the server. 我必须将PDF保存在服务器上的SD卡中。 Once I did this I was able to launch a PDF viewer from my application. 完成此操作后,便可以从我的应用程序启动PDF查看器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM