Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider to swap to mupdfjs ? #2668

Open
panaC opened this issue Nov 19, 2024 · 4 comments
Open

consider to swap to mupdfjs ? #2668

panaC opened this issue Nov 19, 2024 · 4 comments

Comments

@panaC
Copy link
Member

panaC commented Nov 19, 2024

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

  • wasm
  • c library well supported
  • no need to web render pdf to get the cover img
  • fast
  • no viewer built-in, we have to create one specific to our needs

https://www.mupdf.com/

used in sumatrapdf

@danielweck
Copy link
Member

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
Copy link
Member

...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
Copy link
Member Author

panaC commented Nov 19, 2024

...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
Copy link
Member Author

panaC commented Nov 19, 2024

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 (#1340).

#2670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants