'MVC - View word document in iframe window
I have iframe tag in MVC razor file. I am able to load text, pdf files in iframe. here, iframe source is nothing but blob path. here blob is nothing but data from azure blob storage. but I am not able to see word document after rendering is complete , iframe shows blank.
below is iframe window-
<iframe id="frm" src="<blob path>"></iframe>
is iframe compatible with word document? if not, what are other ways we can show word document file in an MVC application.
Solution 1:[1]
Hi there you can use Google Document viewer for this like below :
<iframe src="https://docs.google.com/gview?url=http://remote.url.tld/path/to/document.doc&embedded=true"></iframe>
or Office 365 viewer :
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=http://remote.url.tld/path/to/document.doc' width='1366px' height='623px' frameborder='0'>This is an embedded <a target='_blank' href='http://office.com'>Microsoft Office</a> document, powered by <a target='_blank' href='http://office.com/webapps'>Office Online</a>.</iframe>
Regards
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alexandre Castro |
