打开web视图里面的PDF文件。 [英] Open a pdf file inside a webview.

查看:361
本文介绍了打开web视图里面的PDF文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序在那里我已经是一个web视图里呈现的网页按钮。

I have an app where I've button on a webpage that is rendered inside a webview.

现在就点击按钮,一个PDF文件被下载,然后在相同的需要同样的WebView里面被打开。

Now on click of button , a pdf file gets downloaded , and the same would then need to be opened inside the same webview.

推荐答案

附加下载监听到网上查看和更改URL,如下:

attach a download listener to the web view and change the url as follows..

"http://docs.google.com/gview?embedded=true&url=http://www.abc.com/xxxxxyyyyyxz.pdf"

这是用来打开PDF链接而无需下载...

it's a link used to open pdf without downloading it...

我希望它解决您的问题。

I hope it solves your problem..

这篇关于打开web视图里面的PDF文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆