1

This question already has an answer here:

I have a pdf image (density plot)

enter image description here

If I open it with some pdf viewer (I have tested Max OSX preview, Acrobat reader) the figure looks fine, without white lines. However, after compiling the TeX with pdf-latex, then white lines appear if I open de file with Skim or Preview programs and the white lines are there, but they do not appear when I open it with Acrobat reader.

Does anyone know how to remove the white lines in the pdf output for any pdf viewer?

Thank you very much for the help

marked as duplicate by user36296, Stefan Pinnow, Phelype Oleinik, Troy, Mensch Apr 10 '18 at 17:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Do the white lines appear when opening the original image in preview and zooming out until you have the same size as the image appears in the larger TeX pdf? – Tiuri Aug 10 '17 at 14:36
  • If I zoom-in the PDF with Preview or Skim they tend to disappear. After zoom-out to the original pdf size, the lines return. How could I fix this? – user1993416 Aug 10 '17 at 14:50
  • 1
    That was not my: Please open the original image and zoom out until it has the same size as it has, when you open the larger PDF and have the white lines appearing. What do you see? – Tiuri Aug 10 '17 at 14:51
  • Yes, with the original image, if I zoom-out the lines appear again. How should I fix this? – user1993416 Aug 10 '17 at 14:54
  • 2
    You see: The white lines have nothing to do with LaTeX, since they appear also before you compile the image within a .tex file. This is solely an artifact of the image and the limited capability of the PDF viewers to display scaled-down highly complex images. – Tiuri Aug 10 '17 at 14:56
1

This should really be a comment but I haven't the required reputation yet. This is an artifact of the original image as Tiuri has helped you discover. I have had similar problems when I created pdf's using Matlab (see here). In my case:

These white lines are the polygons defining the shaded areas which have invisible edges, and don't quite overlap (according to here). The problem is caused by the pdf viewer itself which tries to smooth the lines displayed on the screen (according to here)

Provided you have a similar problem to what I encountered you can avoid this in Acrobat Reader (see here) by fiddling with some settings, I cannot comment for Preview or Skim. If you are the one who generated the original pdf, using Matlab or whatever software which is creating the problem, I would recommend either saving as a .png or moving to another language like python. If I am completely off the ball let me know and I will delete this answer.

  • you are right. Acrobat displays the image well, not the rest of viewers. Thanks – user1993416 Aug 10 '17 at 16:41

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