Live data from Hacker News

Office-open-xml-viewer: Office XML document viewer that renders to HTML Canvas

github.com

11–20 of 59 posts

Re: Office-open-xml-viewer: Office XML document viewer that renders to HTML Canvas

#11
If someone actually got "pixel-faithful" Office documents rendering correctly, MS would be screwed. That's actually really important for a lot of companies that carry around decades-old templates that never look exactly right in LibreOffice or any other software that attempted to replicate it.

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...

Re: Office-open-xml-viewer: Office XML document viewer that renders to HTML Canvas

#12
Very nice, the rendered demo for all the file types appear to render flawlessly and load instantly on page load, and looking in the DevTools the parsers are split into different Wasm bundles for each file type xslx, docx and pptx:

  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.

Re: Office-open-xml-viewer: Office XML document viewer that renders to HTML Canvas

#13
post #8

Its kind of sad that the first thing in the repo is a mention that no human was involved in the programming.

"LLMs are amazing, I'm so much more productive now" "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"

“If you use LLMs, you’re not a real developer, you’re lazy.”

The best developers are lazy.

Re: Office-open-xml-viewer: Office XML document viewer that renders to HTML Canvas

#15
The post title about it being "pixel-faithful" is a bit strange. I don't see that claim in the repo, and they don't seem to even claim full feature support at the moment. And for the features marked as supported in .pptx's, it does seem that at least slide image backgrounds and bullet point images aren't actually working, and some text objects have inverted text colors. Seems quite far away from being pixel-faithful in fact.

Re: Office-open-xml-viewer: Office XML document viewer that renders to HTML Canvas

#18
post #9

Pretty cool, rendering PowerPoint files to an image is probably the only way for LLMs to make sense of them. 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.

This code creates a JSON intermediate representation that LLMs could probably consume. You might want to simplify it to focus on content and reduce token usage.

Re: Office-open-xml-viewer: Office XML document viewer that renders to HTML Canvas

#20
post #8

Earlier quoted context omitted.

"LLMs are amazing, I'm so much more productive now" "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"

“If you use LLMs, you’re not a real developer, you’re lazy.” The best developers are lazy.

Obligatory: https://xkcd.com/378/
Post reply on HN