要查看网页阅览PDF文件 [英] To view pdf file in web view
问题描述
下面是我的问题: - 我在文件中folder.I在我的应用程序很多PDF文件需要时,用户点击另一个Web视图的超链接,显示他们在Web视图
Here is my question:- I have many pdf files in my application in files folder.I want to display them on web view when user clicks on its hyperlink from another web view.
这是我有一个网络视图,它动态地从存储在资产folder.In的HTML模板生成一个HTML页面有我们的PDF文件的一个超链接对应于数据displayed.When用户点击超链接我要在显示它网络view.Can没有可能?
That is I have one web view which dynamically generates a html page from html template stored in asset folder.In that there we have one hyperlink of pdf file corresponding to data displayed.When user clicks on hyperlink I want to display it in web view.Can it be possible?
请回复。 在此先感谢。
Please reply. Thanks in Advance.
推荐答案
我想对你来说最好的方法是使用谷歌文档。 您可以在您的应用程序的PDF查看器实施一>从谷歌文档。
I think the best way for you is using Google Docs. You can implement in your application Pdf-viewer from Google Docs.
只要把你的HTML页面下code:
Just put in your html page following code:
<iframe src="http://docs.google.com/gview?url=http://YOUR-URL&embedded=true" width="500" height="250"></iframe>
您可以捕捉用户点击并重定向用户到专门的页面与谷歌文档的PDF查看器
You can catch user click and redirect user to special page with Google Docs Pdf-viewer
这篇关于要查看网页阅览PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!