如何嵌入可在所有Web和移动浏览器中工作的PDF [英] How to embed PDFs that work in all web and mobile browsers

查看:366
本文介绍了如何嵌入可在所有Web和移动浏览器中工作的PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户要求我创建一个包含PDF的页面。我使用了Embed,Iframe标签,它在Mozilla中工作,但在IE和Mobile浏览器中无法使用。



我知道所有浏览器都会直接阅读.pdf,但我希望它被嵌入。



有什么办法?

请帮助我。

解决方案

如果您在网页上提供了PDF的链接,任何浏览器都可以下载该文件,然后用户可以在他选择的PDF查看器。

如果您想将PDF文档嵌入到网页中,则浏览器需要安装PDF插件。所有浏览器都可能不是这种情况。仅当PDF查看器应用程序的插件已在浏览器中注册时才会显示PDF。



嵌入PDF文档的另一种方式是使用服务器端组件将PDF呈现为普通的HTML网页元素。 Google拥有嵌入式PDF查看器

Google文档提供了一个
的未公开功能,可让您
在网页中嵌入PDF文件和PowerPoint
演示文稿。文件
不必上传到Google
文件,但它们需要在线提供


My client asked me to create a page which contains PDF. I used Embed, Iframe tags, it worked in Mozilla but did not work in IE and Mobile browser.

I know that all browsers will read .pdf directly but I want it to be embed.

Is there any way?

Please help me..

解决方案

If you give a link to the PDF on the web page, any browser will be able to download the file and then the user can open it in a PDF viewer of his choice.

If you want to embed the PDF document in a web page, then the browser needs to have a PDF plugin installed. This may not be the case with all browsers. The PDF will be displayed only if the PDF viewer application's plugin is registered with the browser.

The other way of embedding the PDF document is to use a server-side component that renders the PDF as ordinary HTML web page elements. Google has an embeddable PDF viewer.

Google Docs offers an undocumented feature that lets you embed PDF files and PowerPoint presentations in a web page. The files don't have to be uploaded to Google Docs, but they need to be available online.

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

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