How to embed (almost) any document to HTML?

Embed document files into html

  • In html i can do this <iframe src="foobar.pdf" style="width:600px; height:600px;" frameborder="0"></iframe> which would allow me to embed a pdf into an html file. What process would i use to embed other doc files into html. (such as .doc and .odt)

  • Answer:

    In principle, you'd use exactly the same procedure. The reason it works so well with PDF is because the vast majority of users have a PDF viewer (probably Adobe's) installed, including the appropriate browser plugin. However, if you specify another document type as the source, your browser probably won't have a plugin available for display and will instead attempt to open the file with an external program (such as Word or OpenLibreOffice) or just prompt to save. Most browsers (with the obvious and notable exception of iOS browsers) also have Flash installed--maybe you can find a Flash-based solution to display these files for you.

user14416 at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.