how to display word document in my html page - html

i want to display the word document in my html page , i am using iframe , embed tags to displaying the
document, it works for pdf but not doc files, can any one please help me regarding this. it is possible or not?
<iframe src="wd-spectools-word-sample-04.doc" style="width:600px; height:500px;" frameborder="0">
</iframe>

<iframe style="width:600px; height:500px;" src="https://docs.google.com/gview?url=http://writing.engr.psu.edu/workbooks/formal_report_template.doc&embedded=true"></iframe>

Related

How to display a PHP site using iframe in Google Site

I'm trying to add an Embed code in my Google Site
In the HTML, I'm trying to use <iframe> to display other sites in .aspx and .php.
<iframe> works totally fine with .aspx site. However, it does not display .php content.
To display .aspx, this is how my <iframe> part code looks like, which works fine.
<iframe
src="https://XXXX.aspx"
frameborder="0"
scrolling="no"
style="overflow:hidden;height:100%;width:100%"
height="100%"
width="100%">
</iframe>
However, when I added a .php site to iframe, it either shown nothing or returned 404 error.
The following was what I tried, and both of them did not work.
This returns a blank page
<iframe
src="https://www.php.net/manual/en/tutorial.firstpage.php"
frameborder="0"
scrolling="no"
style="overflow:hidden;height:100%;width:100%"
height="100%"
width="100%">
</iframe>
AND
This returns a 404 error
<iframe
src=<?php print "https://www.php.net/manual/en/tutorial.firstpage.php" ?>
frameborder="0"
scrolling="no"
style="overflow:hidden;height:100%;width:100%"
height="100%"
width="100%">
</iframe>
Please help!
This problem occurs when you enter wrong address in your Iframe tag.
please check that or tell us that address you want put in iframe.
You can test it out by putting
<!DOCTYPE html>
<html>
<body>
<iframe src="https://www.php.net/manual/en/tutorial.php">
</iframe>
</body>
</html>
into a new html doc and then open with a browser, you will see that
Refused to display 'https://www.php.net/manual/en/tutorial.php' in a
frame because it set 'X-Frame-Options' to 'sameorigin'.
in the broswer's console.
https://stackoverflow.com/a/27359031/8062552

IE11 pdf as iframe src starts download of pdf

I'm trying to embed a PDF file to my bootstrap page and trying to get it to work for IE11.
Now i'm running this simpel code:
<div id="pdf">
<iframe src="/Content/Test.pdf" style="width: 100%; height: 100%;" frameborder="0" scrolling="no">
<p>It appears your web browser doesn't support iframes.</p>
</iframe>
</div>
However when i load the page i get the following dialog.
do you want to open or save
What am i doing wrong?
I think this might be a browser-issue. Sort of protection.

How To Use The Browser To Show ppt / doc / xls / pdf In Firefox /IE /Chrome

On my Html tag , I have one URL (http://infolab.stanford.edu/pub/papers/google.pdf) that wants to open it on browser without download how can I do it , please help me to do this issue?
PS: I have found out the solution with Google API
I have looked for a great and easy way to show *.PPT / *.PDF / *.XLS / *.DOC in Browser, hopefully this method can help everyone who has the same problem like me as following sample code
<iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
<iframe src="http://docs.google.com/gview?url=http://download.ppt-to-dvd.com/tem/wedding2.potx&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
<iframe src="http://docs.google.com/gview?url=http://www.ysnp.gov.tw/upload/%E4%B8%AD%E8%8B%B1%E8%A9%9E%E5%BD%99%E5%B0%8D%E7%85%A7%E8%A1%A8.doc&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
<iframe src="http://docs.google.com/gview?url=http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
hi you can use object element for showing pdf,doc etc. like
<object data="xx.pdf" type="application/pdf">
<embed src="xx.pdf" type="application/pdf" />
</object>
for more info check this link

How to embed Soundcloud in HTML?

I want to embed a sound cloud in my html and below is link of the track file.
https://soundcloud.com/aviciiofficial/preview-avicii-vs-lenny
How to make this display in my webpage like embedding YouTube video?
Open the https://soundcloud.com/aviciiofficial/preview-avicii-vs-lenny link in browser and in page there is a share button, click it and popup will load and in there click embed tab and copy the code
use
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/41395010&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>
do you mean something like this?
<iframe allowtransparency="true" scrolling="no" frameborder="no" src="https://w.soundcloud.com/icon/?url=http%3A%2F%2Fsoundcloud.com%2Faviciiofficial%2Fpreview-avicii-vs-lenny&color=orange_white&size=32" style="width: 32px; height: 32px;"></iframe>
I used this https://soundcloud.com/pages/embed

How do I insert a web page within my web page using frames

I am trying to insert a iframe on my website, http://freefreemarkets.com, that allows me to insert the website showing what I am selling on eBay.
I have never created an iframe before.
<iframe src="http://www.website.com"></iframe>
And you can edit how you want by adding stuff like:
width="400" height="215" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" etc..
You need to use an iframe, by specifying the src attribute:
<iframe src="http://www.example.com"></iframe>
Some websites doesn't support to be embedded in iframe, be careful.