0

I have a PDF (generated from PowerPoint) that contains math characters which are not shown when viewing it with the default PDF viewer or Okular (greek letters, square root symbol, ... all appear as blank space). Checking the document properties these fonts are shown:

Fonts (not working)

It must have to do with the Symbol TrueType @ /usr/share/fonts/type1/gsfonts/s050000l.pfb since I have another PDF where this font is missing and all math symbols are shown correctly:

Fonts (working)

So it appears that Ubuntu thinks it knows how to handle that font but it doesn't seem to choose the correct file (?). How can I solve that problem?

ttf-mscorefonts-installer

$ ls /usr/share/fonts/truetype/msttcorefonts
Andale_Mono.ttf              Georgia.ttf
andalemo.ttf                 georgiaz.ttf
arialbd.ttf                  impact.ttf
arialbi.ttf                  Impact.ttf
Arial_Black.ttf              timesbd.ttf
Arial_Bold_Italic.ttf        timesbi.ttf
Arial_Bold.ttf               timesi.ttf
Arial_Italic.ttf             Times_New_Roman_Bold_Italic.ttf
ariali.ttf                   Times_New_Roman_Bold.ttf
arial.ttf                    Times_New_Roman_Italic.ttf
Arial.ttf                    Times_New_Roman.ttf
ariblk.ttf                   times.ttf
comicbd.ttf                  trebucbd.ttf
Comic_Sans_MS_Bold.ttf       trebucbi.ttf
Comic_Sans_MS.ttf            Trebuchet_MS_Bold_Italic.ttf
comic.ttf                    Trebuchet_MS_Bold.ttf
courbd.ttf                   Trebuchet_MS_Italic.ttf
courbi.ttf                   Trebuchet_MS.ttf
Courier_New_Bold_Italic.ttf  trebucit.ttf
Courier_New_Bold.ttf         trebuc.ttf
Courier_New_Italic.ttf       Verdana_Bold_Italic.ttf
Courier_New.ttf              Verdana_Bold.ttf
couri.ttf                    verdanab.ttf
cour.ttf                     Verdana_Italic.ttf
Georgia_Bold_Italic.ttf      verdanai.ttf
Georgia_Bold.ttf             verdana.ttf
georgiab.ttf                 Verdana.ttf
Georgia_Italic.ttf           verdanaz.ttf
georgiai.ttf                 webdings.ttf
georgia.ttf                  Webdings.ttf

pdffonts

$ pdffonts file.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
Arial,Bold                           TrueType          WinAnsi          no  no  no      11  0
Arial                                TrueType          WinAnsi          no  no  no      13  0
ABCDEE+Bookman Old Style,Bold        TrueType          WinAnsi          yes yes no      22  0
Arial                                CID TrueType      Identity-H       yes no  yes     24  0
ABCDEE+Gill Sans MT                  TrueType          WinAnsi          yes yes no      29  0
ABCDEE+Calibri                       TrueType          WinAnsi          yes yes no      31  0
ABCDEE+Cambria Math                  CID TrueType      Identity-H       yes yes yes     33  0
ABCDEE+Calibri,Bold                  TrueType          WinAnsi          yes yes no      38  0
ABCDEE+Gill Sans MT,BoldItalic       TrueType          WinAnsi          yes yes no      40  0
ABCDEE+MS PGothic                    CID TrueType      Identity-H       yes yes yes     55  0
ABCDEE+Wingdings 3                   CID TrueType      Identity-H       yes yes yes     67  0
Symbol                               TrueType          WinAnsi          no  no  no      61  0
Arial,Italic                         TrueType          WinAnsi          no  no  no      63  0
Times New Roman                      TrueType          WinAnsi          no  no  no      65  0
ABCDEE+Gill Sans MT                  CID TrueType      Identity-H       yes yes yes     80  0
ABCDEE+Gill Sans MT,Bold             TrueType          WinAnsi          yes yes no      85  0
Arial                                TrueType          WinAnsi          no  no  no     104  0
Symbol                               TrueType          WinAnsi          no  no  no     124  0
Symbol                               CID TrueType      Identity-H       yes no  yes    126  0
ABCDEE+Bookman Old Style             TrueType          WinAnsi          yes yes no     181  0
ABCDEE+Gill Sans MT,Italic           TrueType          WinAnsi          yes yes no     338  0
ABCEEE+Calibri                       CID TrueType      Identity-H       yes yes yes    353  0
ABCEEE+Calibri,Italic                TrueType          WinAnsi          yes yes no     358  0
ABCEEE+Cambria Math                  TrueType          WinAnsi          yes yes no     366  0

Using gs conversion, embedding fonts

$ gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dEmbedAllFonts=true -sOutputFile=output.pdf -f input.pdf
GPL Ghostscript 9.26 (2018-11-20)
Copyright (C) 2018 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 45.
Page 1
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Querying operating system for font files...
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Loading Arial-BoldMT font from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf... 5438668 3948958 8313792 3755578 4 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 5438668 3951548 8868760 4454385 4 done.
Page 2
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 6453740 5062228 5195728 3745161 4 done.
Page 3
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 7020308 5614217 4598072 3190520 4 done.
Loading StandardSymbolsPS font from /usr/share/ghostscript/9.26/Resource/Font/StandardSymbolsPS... 7081292 5679471 4781816 3370698 4 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 7098252 5691978 5314260 3859544 4 done.
Substituting font Times-Roman for Times New Roman.
Loading NimbusRoman-Regular font from /usr/share/ghostscript/9.26/Resource/Font/NimbusRoman-Regular... 7252796 5899262 5374860 3912605 4 done.
Page 4
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 6611260 4833245 3319604 1949433 4 done.
Substituting font Times-Roman for Times New Roman.
Page 5
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 6949372 5365174 3675396 2276187 4 done.
Substituting font Times-Roman for Times New Roman.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 6949756 5398682 4641112 3174936 4 done.
Page 6
Page 7
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 7865308 6343710 4006404 2599211 4 done.
Substituting font Times-Roman for Times New Roman.
Page 8
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 8342900 6810545 4239736 2830396 4 done.
Substituting font Times-Roman for Times New Roman.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 8410908 6871209 5009468 3534500 4 done.
Page 9
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 9031540 7489505 4504912 3077262 4 done.
Page 10
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 9530484 7987495 4548096 3120991 4 done.
Substituting font Times-Roman for Times New Roman.
Page 11
Page 12
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 10806660 9233027 4998584 3541002 4 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 10854852 9294651 5714772 4207457 4 done.
Substituting font Times-Roman for Times New Roman.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Loading Arial-BoldMT font from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf... 10874668 9301875 6778920 5207917 4 done.
Page 13
Substituting font Times-Roman for Times New Roman.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 11393812 9807435 5199732 3724211 4 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Loading Arial-BoldMT font from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf... 11414396 9836851 6076592 4544609 4 done.
Page 14
Substituting font Times-Roman for Times New Roman.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 11892372 10304203 5312212 3838195 4 done.
Page 15
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 12949044 11347939 5199476 3735796 4 done.
Page 16
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 13733300 12123407 5243096 3784092 4 done.
Page 17
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 5948100 4103896 6659512 3938938 4 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Loading Arial-BoldMT font from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf... 6952068 5218616 7605152 4812056 4 done.
Page 18
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 7336452 5714809 4622308 3089517 4 done.
Substituting font Times-Roman for Times New Roman.
Page 19
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 7672644 6161827 4672896 3190509 4 done.
Substituting font Times-Roman for Times New Roman.
Page 20
Substituting font Times-Roman for Times New Roman.
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 8211604 6693185 4734356 3268746 4 done.
Page 21
Page 22
Page 23
Page 24
Page 25
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 12232444 10680036 5259124 3793189 4 done.
Substituting font Times-Roman for Times New Roman.
Page 26
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 12709652 11139380 5035716 3580478 4 done.
Substituting font Times-Roman for Times New Roman.
Page 27
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 13357788 11769684 6405532 4914193 4 done.
Page 28
Page 29
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 6285828 4550537 4884908 3405562 4 done.
Substituting font Times-Roman for Times New Roman.
Page 30
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 6622020 5000459 4955696 3473463 4 done.
Substituting font Times-Roman for Times New Roman.
Page 31
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 7040164 5516803 5611720 4187589 4 done.
Substituting font Times-Roman for Times New Roman.
Page 32
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-ItalicMT.
Can't find (or can't open) font file Arial-ItalicMT.
Loading Arial-ItalicMT font from /usr/share/fonts/truetype/msttcorefonts/ariali.ttf... 7558540 6021845 5023300 3599125 4 done.
Substituting font Times-Roman for Times New Roman.
Page 33
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 8015164 6460885 5146956 3688352 4 done.
Page 34
Page 35
Page 36
Page 37
Page 38
Page 39
Page 40
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Loading Arial-BoldMT font from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf... 11547020 9925465 8016724 6474207 4 done.
Page 41
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 12720380 11089561 5897352 4412661 4 done.
Page 42
Page 43
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/Arial-BoldMT.
Can't find (or can't open) font file Arial-BoldMT.
Loading Arial-BoldMT font from /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf... 7216412 5360220 7719020 4704158 4 done.
Page 44
Can't find (or can't open) font file /usr/share/ghostscript/9.26/Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/msttcorefonts/Arial.ttf... 7553372 5820641 6214884 4791301 4 done.
Page 45
$
$ pdffonts output.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
KZAQPI+Arial,Bold                    TrueType          WinAnsi          yes yes yes     16  0
QMEKPQ+Arial                         TrueType          WinAnsi          yes yes yes     18  0
ENEBGM+CambriaMath                   CID TrueType      Identity-H       yes yes yes     41  0
ATUGBJ+Arial                         CID TrueType      Identity-H       yes yes yes     33  0
MHWCPM+Calibri,Bold                  TrueType          WinAnsi          yes yes yes     44  0
SGLZZU+GillSansMT                    TrueType          WinAnsi          yes yes yes     36  0
EBSAOM+BookmanOldStyle,Bold          TrueType          WinAnsi          yes yes yes     31  0
THBHHD+Calibri                       TrueType          WinAnsi          yes yes yes     38  0
GAXEYX+GillSansMT,BoldItalic         TrueType          WinAnsi          yes yes yes     46  0
MCKUPH+Wingdings3                    CID TrueType      Identity-H       yes yes yes     75  0
ZGYPCK+MSPGothic                     CID TrueType      Identity-H       yes yes yes     64  0
UOXGIT+Arial,Italic                  TrueType          WinAnsi          yes yes yes     67  0
TVYJGE+Times-Roman                   Type 1C           WinAnsi          yes yes no      69  0
MGUXLU+Symbol                        Type 1C           Custom           yes yes yes     71  0
IZAYRH+GillSansMT                    CID TrueType      Identity-H       yes yes yes     99  0
XGDJKG+GillSansMT,Bold               TrueType          WinAnsi          yes yes yes    102  0
PSMPSV+Symbol                        CID TrueType      Identity-H       yes yes yes    156  0
DDKYDF+BookmanOldStyle               TrueType          WinAnsi          yes yes yes    241  0
VKBFRW+GillSansMT,Italic             TrueType          WinAnsi          yes yes yes    430  0
CQFOQR+Calibri                       CID TrueType      Identity-H       yes yes yes    461  0
UFTZDQ+Calibri,Italic                TrueType          WinAnsi          yes yes yes    464  0
ZCJRTV+CambriaMath                   TrueType          WinAnsi          yes yes yes    475  0

Ubuntu 16.04 LTS

9
  • Can you run the command pdffonts <pdf-file-name> and add the results of that command to your question? Feb 19, 2019 at 14:48
  • @CharlesGreen I added the output, thanks for taking a look.
    – a_guest
    Feb 19, 2019 at 15:00
  • K - I'm not an expert (at anything), but I'll write a short answer that I'm cribbing from elsewhere, to attempt to embed the fonts into the PDF Feb 19, 2019 at 15:04
  • @a_guest Are you still having this problem? Can you provide a sample pdf?
    – xiota
    Nov 2, 2020 at 2:25
  • @xiota Unfortunately I cannot share this PDF in public. Since I'm not using Windows I also cannot reproduce such a PDF myself. However I suppose that some special MS font was used in the PowerPoint and then it got exported without embedding the fonts (and they are missing on Ubuntu).
    – a_guest
    Nov 23, 2020 at 9:48

1 Answer 1

0

It appears that some of the fonts are not embedded into the PDF file, but we can fix that with the following command:

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dEmbedAllFonts=true -sOutputFile=<my_file_embedded>.pdf -f <my_file>.pdf

This will take your input "my_file.pdf" and read through it looking for the fonts, embedding them as required and write the output to "my_file_embedded.pdf'

3
  • Unfortunately this didn't work. gs complained about missing fonts and also substituted others. There seems to be a problem with several *MT fonts (perhaps "MathType" ?) which are apparently not installed by ttf-mscorefonts-installer. I added the output of gs and a following pdffonts to my question.
    – a_guest
    Feb 19, 2019 at 15:23
  • @a_guest This doesn't work because you don't have the fonts to embed. But if you had the fonts, you wouldn't need to embed them.
    – xiota
    Nov 2, 2020 at 2:32
  • @a_guest Font names sometimes have letters in them to acknowledge the original font producer. MT is Monotype. L is Linotype. There are others, but those are the main ones.
    – xiota
    Nov 2, 2020 at 2:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .