This question does not contain any direct reference to TeX; however, I came across the problem while working with
pdflatex, specifically when including
eps output into a
My problem is: Some graphics elements are not displayed in Acrobat Reader. Text is shown fine, and whether elements are displayed or not depends on the export routine and it's size. It does not seem to be a cropping issue. I do not see that problem in other viewers. So I will try the solution from Certain EPS files don't convert with epstopdf, but ...
... my question is, why does that happen anyway? Is that a bug in Acrobat Reader? In
epstopdf? In MATLAB? Or is that tool chain using a feature that I should better avoid because it's known to cause problems?
As I said, I have reduced the problem to one which is independent of
This is how I generate the files in MATLAB, I hope that code is understandable to anyone.
for dim = 32 : 33 im = rand(dim); suf = sprintf('_%d.eps', dim); close all;imagesc(im);axis off;text(0, 0, 'Text'); saveas(gcf, ['saveas' suf]); system(['epstopdf saveas' suf]); close all;imagesc(im);axis off;text(0, 0, 'Text'); print(gcf, ['print-d' suf], '-deps'); system(['epstopdf print-d' suf]); close all;imagesc(im);axis off;text(0, 0, 'Text'); print(gcf, ['print' suf]); system(['epstopdf print' suf]); end
print-d_32.pdf are the files that are displayed wrong. This is what this looks like:
- All eps files look fine in GSview.
- All pdf files look fine in Google Chrome.
print-dfiles look identical everywhere; this is not surprising; it is rather surprising that
- All other (non-
33pdf files look fine in Acrobat Reader.
print_32pdf file looks fine in Acrobat Reader (but that ugly border...).
- All other (non-
32pdf files are missing the image. The text is at in the expected position.
32eps files, the image data is stored as a "pattern".
33eps files, the image data is stored as a java.awt.image.BufferedImage.
GSView 5.0 GPL Ghostscript 9.20 (2016-09-26) MATLAB Version: 18.104.22.1681655 (R2016b) Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 14393) Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode MATLAB's Ghostscript: It seems that MATLAB does not ship with Ghostscript any longer. From pdf files saved with MATLAB, I find this: Apache FOP Version 2.2.0-SNAPSHOT: PDFDocumentGraphics2D I cannot see if this is used to generate eps output, too. C:\>which epstopdf /Program Files/MiKTeX 2.9/miktex/bin/x64/epstopdf C:\>epstopdf --version MiKTeX EPS-to-PDF Converter 2.9.6200 (MiKTeX 2.9.6210 64-bit) From EPS files, which are converted using this tool: MiKTeX GPL Ghostscript 9.19 Adobe Acrobat Reader DC 2015.023.20056 Chrome Version 55.0.2883.87 m (64-bit)
print_32.epsit looks a little strange, even though I cannot pinpoint what it is about it.