Commit Graph
3 Commits
Author SHA1 Message Date
Lauri Ojansivu 373980ac8a Restore the full-featured DOCX/XLSX/PPTX viewer and native PDF preview
The minimal server-rendered GIF-slideshow document preview (added this week
to cut dependency weight) kept failing with a bare 415 - its own
rasterization dependency chain (pdf-to-img -> pdfjs-dist's optional
@napi-rs/canvas) needed three separate fixes in a single day for a missing
package, a worker path resolved into the wrong bundle directory, and a stale
stored filename, and still left a text-only fallback as the best case for a
PDF.

Restore the previous full-featured viewer instead: office-open-xml-viewer
(MIT, canvas-based, zero runtime dependencies) renders DOCX/XLSX/PPTX
client-side, and PDF goes back to the browser's own native <embed> viewer -
simpler, zero extra dependencies, and gets the browser's own zoom/search/
print for free.

The server-side full-text search this week's change introduced is kept:
server/lib/documentGif.js now does nothing but extract plain text for the
search index (indexDocumentText, triggered in the background from
Attachments.onAfterUpload) - no rendering, no HTML, no page images - so
pdf-to-img and @napi-rs/canvas are dropped entirely (nothing rasterizes a
PDF page server-side any more) while pdfjs-dist stays, now as a direct
dependency, for its text-only extraction. Searching attachment contents from
the card search box keeps working exactly as before.

Thanks to xet7 !
2026-09-10 16:59:42 +03:00
Lauri Ojansivu 818b57421f Generate searchable document previews on the server 2026-09-06 18:35:33 +03:00
Lauri Ojansivu e3588f2a0e Widen card attachment previews.
Thanks to rmb82 and xet7 !

Fixes #6612.
2026-08-18 18:10:47 +03:00