如何支持PDF浏览所有移动浏览器? [英] How to support PDF viewing for all mobile browser?

查看:123
本文介绍了如何支持PDF浏览所有移动浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用

<object>

嵌入在我的网站的PDF文件。例如。

to embed a pdf file on my website. e.g.

<object data="abc.pdf" type="application/pdf">
    <embed src="abc.pdf" type="application/pdf" />
</object>

它适用于所有桌面浏览器,但我的Andr​​oid设备上,它不显示任何东西。除了使用谷歌的PDF查看器(因为它向下大幅级的PDF质量),还有什么办法来支持所有iOS / Android设备浏览器?或者说,什么是处理这种情况的最好方法?由于有很多的浏览器,我怎样才能将其重定向到浏览器的PDF格式的插件下载页面,或者我应该只是告诉他们一个吗? (减用户友好的)。谢谢

It works on all desktop browser, but on my android device, it does not show anything. Besides using the google pdf viewer (since it down-grade dramatically the pdf quality), are there any way to support all ios / android device browser? Or, what is the best way to handle this situation? Since there are lots of browser , How can I redirect them to the browser's pdf plugin download page , or should I just tell them to get one ? (Less user friendly). Thanks

推荐答案

最好的办法是太只需添加一个链接 abc.pdf 它将在一个开放新标签。
这将最适合手机浏览器,而不是embeding或实施插件。

The best way is just too just add a link to the abc.pdf it will open on a new tab. This would work best for mobile browser rather than embeding or implementing plugins.

<a href="abc.pdf" target="_blank">ABC PDF file</a>

这篇关于如何支持PDF浏览所有移动浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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