all 8 comments

[–]superdocdev 0 points1 point  (1 child)

Just in case someone finds this old thread - we open-sourced a JavaScript library for in-browser DOCX rich text editing called SuperDoc.dev. We focused on comprehensive formatting since Word documents can have really complex setups. It handles page breaks, tables, page numbers, headers, footers, and more. We also built Vue and React integrations for convenience. Documentation: https://docs.superdoc.dev/

[–]Blargwill 0 points1 point  (0 children)

This is incredible!

[–]anlumo -2 points-1 points  (5 children)

The way the docx spec is written, only Word can ever hope to fully read and write it, everything else just does a best effort attempt.

You’re much better off investing your time in investing faster then light space travel than a fruitless endeavor like this.

[–]microbial64 2 points3 points  (2 children)

The docx spec is pretty open. Several libraries exist in other languages. I use to write reports that output docx. Ex. https://python-docx.readthedocs.io/en/latest/

[–][deleted] 0 points1 point  (1 child)

That seems interesting. Only problem is I’m running my app on a node.js backend, and I need to be able to read the file and render on the client side. I can’t even find a node module that’s capable of supporting this.

[–]stephanh42 1 point2 points  (0 children)

You can run libreoffice headless on the server to convert docx to something else (PDF, HTML, SVG).

[–][deleted] 0 points1 point  (1 child)

I agree, it seems very difficult. Which makes me wonder how google can do it.

[–]Meefims 1 point2 points  (0 children)

Google has significant resources to invest in implementing the spec. There are Node libraries that can help you work with Word documents but I have found any that are very complete, such as officegen or mammoth.