Html 在网页中嵌入 Powerpoint
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7101080/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Embed a Powerpoint in a Web Page
提问by Snowy Coder Girl
Is there any way to embed a PowerPoint slide show in an HTML page using just the standard tags etc? I tried using a iframe, but that just results in the PowerPoint being downloaded.
有什么方法可以仅使用标准标签等在 HTML 页面中嵌入 PowerPoint 幻灯片吗?我尝试使用 iframe,但这只会导致 PowerPoint 被下载。
<iframe src="Chapter1.pptx">Your browser does not support.</iframe>
I am looking for a way to show the slide show using only standard stuff. I realize I could use google docs or flash or something, but I'd rather have a simple implementation.
我正在寻找一种仅使用标准内容来显示幻灯片的方法。我意识到我可以使用 google docs 或 flash 或其他东西,但我宁愿有一个简单的实现。
Does the web just not know how to process a PowerPoint presentation?
网络是否只是不知道如何处理 PowerPoint 演示文稿?
采纳答案by Snowy Coder Girl
I have decided to take a hack route and upload the powerpoint onto YouTube and then just include the youtube video in the iframe.
我决定采取黑客路线并将powerpoint上传到YouTube,然后将youtube视频包含在iframe中。
<iframe height="375" width="600" src="http://www.youtube.com/embed/assignedId"></iframe>
I know, it's cheap, but it's also easy.
我知道,它很便宜,但也很容易。
EDIT
编辑
I eventually checked my page as XHTML Strict, which does not support the <iframe>
tag. So I used the object
tag instead.
我最终将我的页面检查为 XHTML Strict,它不支持该<iframe>
标记。所以我改用了object
标签。
<object data="http://www.youtube.com/embed/assignedId">
回答by Shane
Plain and simple...this is the best method to embed any Microsoft or Adobe file into a HTML website.
简单明了……这是将任何 Microsoft 或 Adobe 文件嵌入 HTML 网站的最佳方法。
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[https://www.your_website/file_name.pptx]' width='100%' height='600px' frameborder='0'>
回答by bnp887
Just to update this question - as there is a new way to embed Powerpoints in a web page. If you have an account on OneDrive, do the following using Powerpoint Online (accessing Powerpoint via the browser) to embed a Powerpoint:
只是为了更新这个问题 - 因为有一种在网页中嵌入 Powerpoints 的新方法。如果您有OneDrive帐户,请使用 Powerpoint Online(通过浏览器访问 Powerpoint)执行以下操作以嵌入 Powerpoint:
- Click 'File', then 'Share', then 'Embed'
- Click the 'Generate' button to generate HTML code to be embedded
- Copy the 'Embed Code' and paste it in the HTML of a website
- 单击“文件”,然后单击“共享”,然后单击“嵌入”
- 单击“生成”按钮生成要嵌入的 HTML 代码
- 复制“嵌入代码”并将其粘贴到网站的 HTML 中
回答by numbers1311407
Web browsers don't understand power point, but there are solutions besides Flash.
Web 浏览器不了解 Power Point,但除了 Flash 之外还有其他解决方案。
You could export it to HTML or a PDF. Or you could also upload to site like slideshareand make use of their players which are built for this problem.
您可以将其导出为 HTML 或 PDF。或者您也可以上传到诸如slideshare 之类的网站,并利用他们为这个问题构建的播放器。
回答by Carlos Soto Johnson
Use Microsoft skydrive, upload your power point to this site and use this code
使用 Microsoft skydrive,将您的电源点上传到此站点并使用此代码
where
在哪里
http://skydrive.live.com/redir.aspx?cid=20f065afc1acdb2e&page=view&resid=20F065AFC1ACDB2E!723&parid=20F065AFC1ACDB2E!719is the URL of the powerpoint file.
You have to replace SD20F065AFC1ACDB2E!723 for your own string of the corresponding URL
您必须将 SD20F065AFC1ACDB2E!723 替换为您自己的相应 URL 字符串
回答by taotao.li
回答by Aba
I was able to do this by saving the PPT as an mp4 (Save As > MPEG-4 Video (*.mp4)) and then using the video tag.
我能够通过将 PPT 保存为 mp4(另存为 > MPEG-4 视频 (*.mp4))然后使用视频标签来做到这一点。
<video controls autoplay preload="none" style="width:1000px;">
<source src="/_dev/power_point/m11983.mp4" type="video/mp4" />
<p>Your browser does not support HTML5 Video.</p>
</video>
回答by nurealam siddiq
Upload a PowerPoint document on your Google Drive and then 'Share' it with everyone (make it public): Sharing your pptx doc
在您的 Google Drive 上上传 PowerPoint 文档,然后与所有人“共享”(公开): 共享您的 pptx 文档
Then, go to File > Publish to the web > hit the publish button.
然后,转到文件 > 发布到网络 > 点击发布按钮。
Go to Embed and copy the embed code and paste it to your web page
转到嵌入并复制嵌入代码并将其粘贴到您的网页
回答by Sumit Kathayat
Works Best for me.
最适合我。
Enter link to PPT fileNote:This link should be publicly Accessible
Click on Create URL.
Paste this link to any webpage or as iframe src attribute.
输入 PPT 文件链接注意:此链接应公开访问
单击创建 URL。
将此链接粘贴到任何网页或作为 iframe src 属性。
You are all set!! :)
你都准备好了!!:)
回答by SumitK
I tried answer posted by Shane, which looks exactly right and how MS used to have PPT viewing online earlier but it didn't worked for me. After doing some research I found out that the link has changed a bit.
我尝试了 Shane 发布的答案,看起来完全正确,以及 MS 之前如何在线查看 PPT,但它对我不起作用。在做了一些研究之后,我发现链接发生了一些变化。
So use: https://view.officeapps.live.com/op/view.aspxinstead ofhttps://view.officeapps.live.com/op/embed.aspx
所以使用: https://view.officeapps.live.com/op/ view.aspx代替https://view.officeapps.live.com/op/ embed.aspx
Example:
例子:
<iframe src='https://view.officeapps.live.com/op/view.aspx?src=[https://www.your_website/file_name.pptx]' width='100%' height='600px' frameborder='0'>
Note: Link to PPT need to be publicly accessible.
注意:PPT 链接需要公开访问。