Office-open-xml-viewer: Office XML document viewer that renders to HTML Canvas
Posted by maxloh 2 days ago
Comments
Comment by dmd 2 days ago
Comment by NewsaHackO 2 days ago
Comment by dmd 1 day ago
Comment by whateveracct 2 days ago
Comment by hanzeweiasa 2 days ago
Rendering to HTML Canvas is a pragmatic choice. We work with legal documents daily and the fidelity gap between native Office rendering and HTML-based viewers is one of those "last 10%" problems that takes 90% of the effort. Things like tracked changes formatting, table layout inheritance, and nested content controls rarely render correctly in lightweight viewers.
For document-heavy workflows (legal, compliance, procurement), having a viewer that preserves structural fidelity — especially revision marks and annotations — is table stakes. Most web-based solutions we tested lost formatting on documents with complex nested structures.
Interesting approach. Does the Canvas rendering handle tracked changes and inline comments? That is where most viewers break down.
Comment by maxloh 2 days ago
Google Docs [1] and OnlyOffice [2] also employ the canvas method to render office documents, and have found it reliable and consistent among different browsers.
[1]: https://workspaceupdates.googleblog.com/2021/05/Google-Docs-...
Comment by applfanboysbgon 2 days ago
Comment by bobajeff 2 days ago
Comment by Groxx 2 days ago
Comment by AussieWog93 2 days ago
Comment by Groxx 2 days ago
Comment by gigel82 2 days ago
The slightest misalignment of a paragraph means a line on page 27 of 120 now moved down by 2 pixels, screwing everything else out of alignment. Yes, plenty of companies pay Microsoft 365 subscriptions because of exactly this reason; it sounds ludicrous when you think they could just pay someone to replicate the formatting in a different suite a lot less than the subscription costs, but that's not how it works...
Comment by quag 2 days ago
If Microsoft can’t get consistent rendering of word docs between Word for Windows, Word for macOS and Office 365, I don’t like anyone else’s chances.
Comment by ale42 2 days ago
Comment by maxloh 2 days ago
Comment by gigel82 2 days ago
Of course, that was a decade ago, so who knows.
Comment by jbgt 2 days ago
So the tool is growing and maybe this would be interesting to have as the non LibreOffice dependent viewer...
Comment by rcarmo 2 days ago
Comment by jsmilker 2 days ago
Comment by userbinator 2 days ago
It's 100% hallucinated.
Comment by int0x29 2 days ago
Comment by stuaxo 2 days ago
Comment by wis 2 days ago
docx 458kb raw 217kb gzipped
pptx 574kb raw 253kb gzipped
xslx 601kb raw 269kb gzipped
I expected the Wasm bundles to be large and a lot more bigger than that for some reason.ChatGPT.com can benefit from using this library (or such a library) for rendering a preview of the file in a side panel on the right, instead of just giving me a download link to the outputted/transformed docx/pptx/xslx file.
Comment by lovasoa 2 days ago
Comment by phplovesong 2 days ago
Comment by userbinator 2 days ago
Comment by dizhn 2 days ago
Comment by jstanley 2 days ago
"oh yeah? Show me what you made, you can't, nobody can, it's all just AI psychosis"
"I made a pixel perfect Office document viewer"
"well... I wish you hadn't"
Comment by NetOpWibby 2 days ago
The best developers are lazy.
Comment by StableAlkyne 2 days ago
Comment by llukas 2 days ago
Bit identical/pixel-faithful reproductions are easy to verify…
Comment by applfanboysbgon 2 days ago
Well, yes, because it doesn't work.
> Bit identical/pixel-faithful reproductions are easy to verify…
And yet the prompter put so little effort in they couldn't even verify the software they prompted for does what it's supposed to.
Comment by NewsaHackO 2 days ago
Comment by doubletwoyou 2 days ago
Comment by NewsaHackO 2 days ago
Ironic, that you are agreeing with a post saying they put in little effort for the implementation when you have put in absolutely no effort in saying that it doesn't produce pixel-faithful documents, such as producing a single concrete example.
Comment by gosub100 2 days ago
Comment by isubkhankulov 2 days ago
Comment by cyanydeez 2 days ago
Still, looks pretty; if it actually has proper testing, could close the gap. Code not being the hard part is a major impediment to good software coming out of these things.
Comment by vlmutolo 2 days ago
Does this work in Cloudflare’s workerd environment? Would be nice to have a cheap serverless render -> LLM (GLM-OCR / PaddleOCR) -> Markdown pipeline for the various MS Office formats.
Comment by wmf 2 days ago
Comment by Jaxkr 2 days ago
For PPTX and DOCX, this solution is slightly worse than libreoffice conversion (this does not appear to output highlightable text, while PDF conversion does).
However, the XLSX preview BLEW my mind considering this was AI coded. Really good, even interactive!
Comment by maxloh 2 days ago
Yeah, it does.
https://ooxml.silurus.dev/storybook/?path=/story/docxviewer-...
Comment by watersb 2 days ago
I'm not familiar with this application, so perhaps I'm missing a step, and editing mode.
Comment by Ametrin 2 days ago
Comment by virajk_31 1 day ago
Comment by kevlened 2 days ago
Comment by xuanlin314 2 days ago
Comment by sublinear 2 days ago
Comment by bulder 2 days ago
Comment by maxloh 2 days ago
Comment by nfredericks 2 days ago
Comment by harrisi 2 days ago
Comment by whateveracct 2 days ago
Comment by alex_suzuki 2 days ago
Comment by victorkulla 2 days ago
Comment by AussieWog93 2 days ago
Mention you're the guy who called him an idiot publicly and he'll still be happy to help - guy has the patience of a saint.
Comment by freakynit 2 days ago
Holy cow!!