Recently I updated my lubuntu version from 16.04 to 18.04 and since then I have had issues displaying certain symbols pdf plots (using evince
). The pdf file I am trying to display is the following:
https://www.dropbox.com/s/mc2wp2y8q2af1vj/stupidPlot.pdf?dl=0
On my screen it appears as in the following screenshot:
while it should appear as follows:
So the greek symbols delta, gamma and capital delta are not displayed as expected. After some searching I suppose it must be related to the fact that the fonts are not embedded in the pdf file I am trying to read (though I am not sure, so correct me if this is not the case). pdffonts
gives the following output:
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
Times-Italic Type 1 WinAnsi no no no 7 0
Times-Bold Type 1 WinAnsi no no no 8 0
Times-BoldItalic Type 1 WinAnsi no no no 9 0
Helvetica Type 1 WinAnsi no no no 10 0
Helvetica-Oblique Type 1 WinAnsi no no no 11 0
Helvetica-Bold Type 1 WinAnsi no no no 12 0
Helvetica-BoldOblique Type 1 WinAnsi no no no 13 0
Courier Type 1 WinAnsi no no no 14 0
Courier-Oblique Type 1 WinAnsi no no no 15 0
Courier-Bold Type 1 WinAnsi no no no 16 0
Courier-BoldOblique Type 1 WinAnsi no no no 17 0
Symbol Type 1 Symbol no no no 18 0
Times-Roman Type 1 WinAnsi no no no 19 0
ZapfDingbats Type 1 ZapfDingbats no no no 20 0
Symbol Type 1 Symbol no no no 21 0
I tried to fix it using the suggestion given on: https://stackoverflow.com/questions/10277418/the-pdf-viewer-evince-on-linux-can-not-display-some-math-symbols-correctly to run GhostScript as follows:
gs -o gs-repaired---stupidPlot.pdf -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite stupidPlot.pdf
which does not seem to work and gives the error:
**** Error: Encountered 'obj' while expecting 'endobj'.
Treating this as a missing 'endobj', output may be incorrect.
**** Error: Encountered 'obj' while expecting 'endobj'.
Treating this as a missing 'endobj', output may be incorrect.
Processing pages 1 through 1.
Page 1
Loading NimbusSans-Regular font from /usr/share/ghostscript/9.26/Resource/Font/NimbusSans-Regular... 5086732 3571608 2679472 1286852 4 done.
Loading StandardSymbolsPS font from /usr/share/ghostscript/9.26/Resource/Font/StandardSymbolsPS... 5119500 3664456 2699672 1302649 4 done.
**** This file had errors that were repaired or ignored.
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
**** The rendered output from this file may be incorrect.
Moreover I have to produce many (tens of) thousands of pdf plots, so it would be preferable not to have to embed fonts in them in order to display them correctly.
So I wonder if anyone knows what might have changed when updating from lubuntu 16.04 to 18.04 (in 16.04 the plots were always correctly displayed), and how I could correctly display the pdf's in evince
, preferably without having to embed the fonts in the pdf.
I also tried using xpdf
and okular
as alternatives to evince
, but they displayed the symbols wrongly in the same manner.
lubuntu-desktop
package is installed.fonts-opensymbol
package installed, and it ought to do it. Can't explain why Evince fails to find it.\delta
(see image). Along with GIMP andpdf2svg
. But Acroread,pdf2htmlEX
andpdf2ps
shows ∆. What is interesting the LibreOffice Draw can't import this pdf-file. So I suspect that PDF producer "ROOT Version 6.10/09" is buggy. I do not know how ROOT works, but consider to use LaTeX notation for greek symbols instead of Unicode (if you doing so).