如何在没有安装插件的情况下向用户的浏览器显示pdf文件 [英] How to show pdf files to user's browser,in the case of no plugin is installed

查看:66
本文介绍了如何在没有安装插件的情况下向用户的浏览器显示pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在用户浏览器中显示pdf文档.如果没有安装插件.在这种情况下,pdf 的 google api 有用吗?

how can we show pdf document in users browser.In the case the plugin is not installed. Is google api for pdf is usefull in this case?

推荐答案

Google 提供了一个工具来做到这一点:

Google provides a tool to do this:

  • 选项 1 - 为您的用户生成链接:

  • Option 1 - Generate your users a link:

https://docs.google.com/viewer?url=my_domain.com/my_pdf.pdf

选项 2 - 嵌入到页面中,以便用户留在您的网站上:

Option 2 - Embed into page so that users stay on your site:

<iframe src="https://docs.google.com/viewer?url=my_domain.com/my_pdf.pdf&embedded=true">

这篇关于如何在没有安装插件的情况下向用户的浏览器显示pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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