pdf-tools icon indicating copy to clipboard operation
pdf-tools copied to clipboard

Hard-to-read (thin) output on HiDPI (Retina) screens

Open rudolf-adamkovic opened this issue 2 years ago • 6 comments

I noticed that the PDF Tools render slightly thinner (more pale) compared to other the PDF applications I tried or even doc-view-mode.

PDF Tools (worst):

Screen Shot 2022-03-10 at 15 27 05

DocView (better):

Screen Shot 2022-03-10 at 15 35 19

Skim (best):

Screen Shot 2022-03-10 at 15 57 34

Could we somehow fix this? Any pointers? If necessary, I will pay money to fix the problem, for the bug makes my eyes hurt when reading for prolonged periods of time.

edit: added Skim

rudolf-adamkovic avatar Mar 10 '22 14:03 rudolf-adamkovic

Hello @salutis !

I believe you are on a Mac, right?. I have not seen any document rendered better by doc-view than by pdf-view so far. Can you please share this as a sample PDF for me to test with locally? Also, just to double-check, have you added (setq pdf-view-use-scaling t) in your configuration?

vedang avatar Mar 14 '22 09:03 vedang

Hello @vedang!

I believe you are on a Mac, right?

Correct. (For work reasons, not because I want, FYI.)

Can you please share this as a sample PDF for me to test with locally?

Sure! The example above comes from:

https://pluto.huji.ac.il/~msby/StatThink/IntroStat.pdf

Every single PDF renders "thinner", though.

Also, just to double-check, have you added (setq pdf-view-use-scaling t) in your configuration?

Of course!

rudolf-adamkovic avatar Mar 14 '22 19:03 rudolf-adamkovic

I can reproduce this on Mac with the above pdf and three others I tested. I think this is an issue with Poppler (the library pdf-tools uses to render pdfs) as the pdfs look exactly the same in Evince, which also uses Poppler, but look different in viewers not using it. You might therefore have more luck reporting this at https://gitlab.freedesktop.org/poppler/poppler.

The issue has something to do with how fonts are rendered (I found some similar old open issues related to hinting and anti-aliasing; also see this). I think it is mainly a matter of taste – I didn't notice it until seeing your issue and am not sure which I prefer. See this pull request for an option to use MuPDF as a backend. With that one could likely get rendering more like DocView (which uses GhostScript/MuPDF for rendering).

orgtre avatar Jul 28 '22 14:07 orgtre

I'm not having this issue. I've tested this in Big Sur and Monterey, with pdf-view-use-scaling t fonts are crisp, perhaps a bit thinner than in Preview but still high resolution. I'm installing from melpa (currently 20220723.2329), emacs is emacs-plus@28 which has support for svg (not sure if relevant at all).

memeplex avatar Aug 01 '22 02:08 memeplex

Thanks for testing. I think the issue is only the thinness (also for me the resolution is still high). So yeah, arguably not much of an issue at all.

orgtre avatar Aug 04 '22 10:08 orgtre

I've recently returned to Emacs and I'm now having this issue in macOS Sonoma. The rendering is crisp but quite thin, sometimes it's difficult to read (which may not be appreciated in the screenshots). Compare:

pdftools:

image

Preview:

image

memeplex avatar Feb 27 '24 02:02 memeplex