Forum moved here!

Home / White lines through colored backgrounds in Sumatra

stevebhg

When I open pdf’s I’ve created in Libre Office the solid color background has 1 pixel white lines between every line of text or just solid background. The lines don’t show up in the original nor if Chrome opens the pdf or if FoxitReader opens it. This happens on every pdf I create. Here are both Sumatra and Foxit opening the same file


Obviously it can be opened without the lines – any ideas to get Sumatra to NOT show them?
Thank you very much.

GitHubRulesOK

Its one of two observed Anti-Alias issues in the way the MuPDF engine is affected. Here is an extreme case where the tone is built with variable boundaries and MuPDf can compensate.

Those often look like colourless edges of objects (e.g. cells in a spreadsheet or more often can be tonal boundaries in a gradient).
I know its not a help to suggest using other software, but just to show that for me the output of normal cells from excel does not exhibit such a problem, just some tonal gradient boundaries may cause the blocks to show up.

Without a source document (and its generating software) its difficult to say what could improve the output but SumatraPDF does not have any user setting to compensate, so only compiling the SumatraPDF source with different AA settings could make any difference to those boundaries.

Russ

I thought I would do a little testing. In both LibreDraw and LibrePresent, I can create documents with both solid and gradient backgrounds and they all display perfectly in Sumatra. However, in LibrePresent, if I use a predefined style that has a gradient background, I get the effect shown above.

So, if you’re creating your own slides in LibrePresent, AND you want a gradient background, AND you want to use Sumatra to display them, I would suggest skipping the predefined styles and set your own background. My $.02. YMMV.

Russ

stevebhg

Thank you very much, both of you!
This is helpful… it’s comforting to know I’m not doing anything wrong.
I’ll see what I can do in Libre Office for AA.

Just for the record, I’m creating in Libre Office Writer and doing it all on my own – no presets.
I get the lines with solid colors and gradients.

Russ

Interesting… I just did another quick test in Writer (version 6.2) using one of the default gradients and I did get a subtle banding effect in Sumatra, but no white lines. Curiously, Writer displayed that same banding. Using a solid background, however, worked just fine. Good luck with your project.

GitHubRulesOK

Thanks for your observations,
and just for the record My suggestion to use other software settings does not remove the issue that boundaries will often show up in SumatraPDF compared to MuPDF, where you can press a key to toggle Anti-Alias, thus for this issue, MuPDF can do better.
The only way to totally avoid the vector boundary rendering would be to include those contents as background raster images, and even then I think there is still an open MuPDF problem
For the record ONE such bug reported is 702074 – Bad rendering of a gradient
However in similar cases the MuPDF suggestion is to add an allowance for altering AA within SumatraPDF own customisation.