edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.86k stars 157 forks source link

consider to swap to mupdfjs ? #2668

Open panaC opened 2 days ago

panaC commented 2 days ago

It seems there is a new lib in the town :) mupdf-js

https://www.mupdf.com/

used in sumatrapdf

danielweck commented 2 days ago

PDF.js may be a slower rendering engine, but it is a mature library, maintained / supported by many developers, with a strong feature set (including text selection + annotations) and a page layout logic that integrates quite well in Thorium. I am not sure that the end-user benefits of a faster / lighter PDF rendering engine outweigh the risk of integration problems when adding WASM in Thorium's Electron stack. By the way, is the WASM library portable (i.e. identical binary) for all supported platforms: Linux, Windows, Mac in Intel and ARM target matrix?

danielweck commented 2 days ago

...perhaps a useful Proof Of Concept would be to reimplement the cover image extractor? Minimum impact, easy to revert if we discover integration problems in one of our production builds for some target platforms?

panaC commented 2 days ago

...perhaps a useful Proof Of Concept would be to reimplement the cover image extractor? Minimum impact, easy to revert if we discover integration problems in one of our production builds for some target platforms?

This is my main target for the moment, indeed

panaC commented 2 days ago

We need to discuss the pros and cons, cost/benefit ratio of pdf-js and mupdf, I think.

At the moment, pdf-js with a large pdf file like Intel x86 manual (5082 pages) is extremely slow and barely usable with the chrome UI. Also the bottom bar (navigation) is broken (https://github.com/edrlab/thorium-reader/issues/1340).

https://github.com/edrlab/thorium-reader/issues/2670