pdf.js analog for Word Documents

I doubt it. Behind pdf.js stands Mozilla, so it isn't a weekend project.

There are options to let LibreOffice run in the browser, but I have no first-hand experience with it. Apparently, some cloud projects like NextCloud use it, though.

Then you have Google Docs to import the Word file and let it be displayed there, but there is no way to embed that easily or even host the code yourself. (Also, as I understand it, there are transformations to the Word file on the server involved.)

And after all, if you compare the PDF spec with the OpenXML (aka .docx) spec, it becomes quite clear, that a fully compliant viewer will be a complex beast, to say the least.


I just found out ViewerJS, but it only supports OpenDocument formats. It's not what you were looking for, but may be worth a shot, specially if you can find a way to convert odt to doc (this question might help).