Hacker News new | ask | show | jobs
by Jaxkr 7 days ago
I literally had to solve the "preview Office files in the browser" problem last week. I couldn't find a decent solution, so I ended up making a endpoint that ran the files through headless libreoffice on the server to convert them to PDF.

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!

1 comments

> ...this does not appear to output highlightable text

Yeah, it does.

https://ooxml.silurus.dev/storybook/?path=/story/docxviewer-...

I can't highlight text in Safari or Firefox on my iPhone (iOS 26.5), at least on that first page.

I'm not familiar with this application, so perhaps I'm missing a step, and editing mode.