1

Once you have inspected the screenshots below, you will see that Okular is significantly worse at rendering my two test files than many other well-known viewers. This is unfortunate, because in Kubuntu, Okular is the natural default viewer.

My questions are as follows

  1. Is there anything I can do—e.g. downloading and installing some patches or the like—to improve the rendering in Okular? (The 'Enable Graphics Antialias' and 'Enable Text Antialias' are both already enabled in my Okular.)

  2. Why is Okular so much worse at rendering these test files than the other viewers?


The tests

All the images in this post, for all pdf viewers, were captured using the same size of the capturing region.

In order to see what I am talking about, you may have to click on the images and view them in full resolution.

The first test file

The one-page pdf test file in question can be downloaded here. It was created using xournalpp. Below, I repeat the test with a pdf file created in Inkscape, with similar results.

As I said, he 'Enable Graphics Antialias' and 'Enable Text Antialias' are both enabled in my Okular.

At 75%, the rendering is mostly fine, although you can see that the left side of the gray square is thinner than the other three, which shouldn't be the case. But real problems start happening when we zoom in, below.

enter image description here

As you can see, some of the blue horizontal lines are rendered as significantly thicker than the others.

enter image description here

The problem (for this test file) does not affect any other viewers I've tried.

Evince: enter image description here

Foxit: enter image description here

PDF-XChange Editor (through Wine): enter image description here

Adobe Acrobat Reader DC (through Wine): enter image description here



The second test file

I've tried a different test pdf file, produced in inkscape by copying and pasting the same horizontal line many times (the one-page pdf file in question can be downloaded here.)

While Okular is still the worst offender, most of the other ones are less than perfect, too: if one plays with different zoom levels, eventually one will hit upon a level where the rendring is off. For this particular file, only with the PDF-XChange Editor have I been unable to find a zoom level where the rendering is off.

Okular:

enter image description here

In order to see the imperfections in the rest of these, you really may need to click on the images and view them in full resolution (even if you didn't have to do that for the images above). You should be able to see that some of the lines are rendered thinner than the others.

Evince:

enter image description here

Foxit:

enter image description here

Adobe Acrobat Reader DC:

enter image description here

As I said, I was unable to find any imperfections in PDF-XChange Editor's rendering of this file at any zoom level. But it is possible I haven't tried enough zoom levels.

For what it's worth, though it presumably shouldn't matter, here is my system configuration:
Laptop model: Dell Latitude 7490.
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-48-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8650U CPU @ 1.90GHz (Graphics: Intel UHD Graphics 620 integrated graphics processor)
Memory: 15.5 GiB of RAM

Let me repeat my questions:

  1. Is there anything I can do—e.g. downloading and installing some patches or the like—to improve the rendering in Okular? (The 'Enable Graphics Antialias' and 'Enable Text Antialias' are both already enabled in my Okular.)

  2. Why is Okular so much worse at rendering these test files than the other viewers?

1

Both Okular and Evince use the poppler library to render pdf, but they use different backends which produce different results. To switch the rendering backend in Okular to the one used in Evince you can compile poppler with this patchset.

3
  • Thank you! I will try it, and if it works, I will accept the answer! – linguisticturn Sep 30 '20 at 19:42
  • There seem to be some concerns about that patch; see the reference to 'Paul's patch' here, under History. That page is itself a different patch. Any thoughts on which patch is to be preferred? – linguisticturn Oct 5 '20 at 3:33
  • I never used either, but from what I see you only need patches enabling the Cairo backend and the concerns are about subpixel rendering. If you apply patches selectively either should do. – contemplator Oct 5 '20 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.