有没有办法将pdf文件嵌入到html5页面? [英] Is there any way to embed a pdf file into an html5 page?

查看:568
本文介绍了有没有办法将pdf文件嵌入到html5页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个用HTML5编码的网页,我希望能够将pdf文件放到此页面上,这样您就可以查看它而无需单击任何链接单独下载它。有人知道怎么做吗?
我希望它能保留pdf文件的文本,图像和布局。如果不是这种情况,我会使用图像。谢谢!

I want to have a web page coded with HTML5, and I want to be able to put a pdf file onto this page so you can view it without having to click on any links to download it separately. Anyone know how to do this? I want it to keep the text, images, and layout of the pdf file also. If that weren't the case I would just use an image. Thanks!

编辑:这有望进入ipad。所以它不会支持adobe。我需要找到一种方法以某种方式使pdf文件显示在html5页面而不使用查看器。我想保留所有层次。它不必在页面上保留pdf文件,我只需要找到一种方法将所有这些图层传输到那里,而不必手动为每个图像,段落等使用div。

This will be hopefully going onto the ipad. So it won't support adobe. I need to just find a way to somehow make the pdf file show up in an html5 page without using a viewer. I want to keep all of its layers. It doesn't have to stay a pdf file when its on the page, I just need to find a way to transfer all of those layers there without having to do this manually with divs for each image, paragraph, etc.

推荐答案

你可以像这样使用embed标签:

You can use the embed tag like this:

<embed src="/path/to/your/file.pdf" />

这篇关于有没有办法将pdf文件嵌入到html5页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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