0

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.

elichad
  • 1
  • 3
  • You probably can do it using Google Docs: https://support.google.com/docs/answer/37579?co=GENIE.Platform%3DDesktop&hl=en – Arthur Aug 21 '17 at 09:09
  • I think the question has already been asked : https://stackoverflow.com/questions/5565759/how-to-embed-a-document-in-html-page – Alexandre Thyvador Aug 21 '17 at 09:09
  • Sorry, I should have clarified, this is intended to work offline, so we don't want to make use of PHP or uploading the file to Google Docs etc. It should be done client-side if possible. I'll add this to the question. – elichad Aug 21 '17 at 09:31

1 Answers1

0

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.

Jonathan Hodgson
  • 343
  • 1
  • 10
  • This is intended to work offline, so I am searching for a client-side solution if possible. I've added a clarification to the question. – elichad Aug 21 '17 at 09:34