Bug 300604 - Rendering artifacts even after antialiasing disabled
Summary: Rendering artifacts even after antialiasing disabled
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-25 13:30 UTC by Manuel López-Ibáñez
Modified: 2012-07-16 14:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshort: left Adobe Reader, right Okular, both with antialising disabled. (125.44 KB, image/png)
2012-05-25 13:31 UTC, Manuel López-Ibáñez
Details
PDF testcase (73.39 KB, application/pdf)
2012-05-25 13:32 UTC, Manuel López-Ibáñez
Details
Screenshot of disable graphicsantialias (183.14 KB, image/png)
2012-07-01 15:07 UTC, Albert Astals Cid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel López-Ibáñez 2012-05-25 13:30:29 UTC
It is well-known that PDF viewers have problems rendering pdf's produced by R. R developers blame PDF viewers and recommend to disable Antialiasing: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-there-unwanted-borders

However, even after disabling antialiasing. there are rendering artifacts in Okular that are not present in Adobe Reader. See the attached PNG screen capture. The PDF used is also attached.

Reproducible: Always
Comment 1 Manuel López-Ibáñez 2012-05-25 13:31:20 UTC
Created attachment 71358 [details]
screenshort: left Adobe Reader, right Okular, both with antialising disabled.
Comment 2 Manuel López-Ibáñez 2012-05-25 13:32:44 UTC
Created attachment 71359 [details]
PDF testcase
Comment 3 Albert Astals Cid 2012-06-30 14:59:46 UTC
How did you disable antialias?
Comment 4 Manuel López-Ibáñez 2012-06-30 20:47:04 UTC
I followed the instructions given by the R project itself:

http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-there-unwanted-borders

Okular (Linux/KDE)
    There is not an option in the GUI to enable/disable anti-aliasing. From a console command line, use:

              $ kwriteconfig --file okularpartrc --group 'Dlg Performance' \
                             --key TextAntialias Disabled

    Then restart Okular. Change the final word to ‘Enabled’ to restore the original setting. 

(I wouldn't be surprised if the info is outdated.)
Comment 5 Albert Astals Cid 2012-07-01 07:37:43 UTC
Why would you disable text antialias and then complain that there is antialiasing in the graphics?

If you want to disable graphics antialiasing you need to use GraphicsAntialias in that command line instead of TextAntialias

It'd also be cool if you could fix R FAQ

I'm closing this bug because it's basically not right.
Comment 6 Manuel López-Ibáñez 2012-07-01 14:50:40 UTC
Right, that makes sense, but still:

$ kwriteconfig --file okularpartrc --group 'Dlg Performance' --key GraphicsAntialias Disabled

does not seem to have any effect on the test.pdf. It gives exactly the same output shown in the screenshot attached.

Nonetheless, I will try to get the R FAQ fixed.  Thanks for looking at this.

I guess the underlying issue producing the artifacts must be really hard to solve, since not even Adobe Reader gets it 100% right. As a PDF expert, if you have any intuition about what could R do better to reduce the artifacts, I would appreciate your advice.
Comment 7 Albert Astals Cid 2012-07-01 15:07:06 UTC
Created attachment 72259 [details]
Screenshot of disable graphicsantialias

It works for me, make sure you did exactly type this
kwriteconfig --file okularpartrc --group 'Dlg Performance' --key GraphicsAntialias Disabled
Comment 8 Manuel López-Ibáñez 2012-07-16 14:35:59 UTC
OK. I upgraded Okular and the output is exactly as you said! Great! Thanks very much. 
BTW, the R FAQ is fixed.