johnfactotum / foliate-js

Render e-books in the browser
https://johnfactotum.github.io/foliate-js/reader.html
MIT License
318 stars 43 forks source link

Fix bad resolution for pdfs #23

Closed vytorrennan closed 3 months ago

vytorrennan commented 3 months ago

Typical page size in PDF units is 612x792. Most of displays are 110-146 dpi nowadays. and if you want to get a page on your 3008x1692 screen, you will be looking at scale 2.0-5.0 times.

Before: 2024-04-23T07:51:28,013278780+00:00

Afterwards: 2024-04-23T07:50:34,392889898+00:00

johnfactotum commented 3 months ago

I guess I will merge this for now. Long term it would probably be better to use a different renderer for PDF, rather than reusing the one for EPUB.

aehlke commented 2 months ago

@vytorrennan does the quality improve further if multiplied above that factor?

vytorrennan commented 2 months ago

Yes it does, but i imagine that if you go too far it might slow down the rendering a bit