Is it possible to embed a user-selected Word document in an HTML page?

177 views Asked by At

I have a file input set up such that when a user selects a file for the input, it is embedded in the page. I have this working for PDFs using PDFObject, but the users might also want to select Word files and view them in a similar way. Is there any way to achieve this? I haven't found anything by searching yet.

Clarification: This is intended to work offline, so I don't want to make use of PHP or uploading the file to Google Docs etc. I am looking for a client-side method, similar to PDFObject.

1

There are 1 answers

1
Jonathan Hodgson On

Would the user need to edit the file or just view it? If just viewing, I would suggest converting it to an image / pdf server side.

You could also look at https://crocodoc.com/ which might help although I have never used it.