73

In Acrobat Reader I can go to File > Properties to see all the metadata for the open PDF file: the program that created the document, author information, embedded fonts, etc.

OS X's Preview can also display metadata, albeit a more limited subset (under Tools > Show Inspector). However, you can't see embedded font information with Preview.

Is there a way in OS X (preferably with Preview, and not with Acrobat) to see what fonts are embedded in a PDF file?

Andrew
  • 2,389
  • 5
  • 27
  • 28
  • 1
    You may want to see this question: http://stackoverflow.com/questions/614619/how-to-find-out-which-fonts-are-referenced-and-which-are-embedded-in-a-pdf-docum (answer from michelem) – Simon A. Eugster Jun 01 '12 at 07:36

2 Answers2

93

Run either command from the terminal or command-line.

MacOS

strings /path/to/document.pdf | grep -i FontName

Note: MacOS might require you to install the command-line tools first.

Windows

findstr FontName C:\path\to\document.pdf
Redandwhite
  • 3,744
  • 5
  • 32
  • 34
  • 5
    This doesn't work for me on OSX 10.8.4; nothing matches `FontName` in the output of `strings`... – John J. Camilleri Aug 05 '13 at 09:19
  • @JohnJ.Camilleri try `strings /path/to/document.pdf | grep fontname` – Baub Nov 13 '14 at 18:33
  • 5
    @James that works but only sometimes; Specifically, it doesn't seem to work with PDFs created with pdflatex. – John J. Camilleri Nov 14 '14 at 06:44
  • Didn't work well for me either (on mac). On linux, pdffonts was so nice. – Stephen Nov 18 '14 at 17:02
  • One other argument I would add after grep would be "-i". So the command would be: `strings /path/to/document.pdf | grep -i fontname`. This argument ignores any specific casing and catches variants such as fontName FontName fontname FontName and so on. – Ariel Jan 23 '15 at 22:30
  • 4
    `strings` doesn't work for me on OS X 10.10.5 (even with the ignore case flag) - however `pdffonts` (see other answer) is perfect. – William Turrell Sep 03 '15 at 08:26
  • I think if the PDF is compressed then the string could be mangled beyond recognition – YudhiWidyatama Feb 05 '17 at 09:46
  • 1
    I want to confirm that it worked fine in macOS Sierra 10.12.6. I will suggest simplifying pdf name. I tried `strings ABC.pdf | grep FontName` – Vikram Singh Saini Sep 19 '17 at 07:08
  • This doesn't work for me either, but [Lri's answer](https://superuser.com/a/628624/114642) does. That should be the accepted answer. – orome Feb 14 '21 at 15:54
88

You can also use pdffonts, which can be installed with brew install poppler or brew install xpdf.

$ pdffonts file.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
GFEDCB+MyriadSet-Medium              CID TrueType      Identity-H       yes yes yes    304  0
GFEDCB+MyriadSet-Bold                CID TrueType      Identity-H       yes yes yes    310  0
GFEDCB+MyriadSet-MediumItalic        CID TrueType      Identity-H       yes yes yes    659  0
GFEDCB+Menlo-Regular                 CID TrueType      Identity-H       yes yes yes    664  0
ZapfDingbats                         Type 1            Custom           no  no  yes    665  0
ZapfDingbats                         Type 1            Custom           no  no  yes    666  0
Lri
  • 40,894
  • 7
  • 119
  • 157
  • 5
    Thanks. You only need the `popper` bottle. – NVaughan Jul 05 '16 at 21:46
  • 1
    Also via macports "sudo port install poppler". – Neal Young Sep 24 '18 at 15:56
  • How does one make sense of font names such as "XSVTJR+CMSS12"? – David J. Jan 21 '19 at 23:03
  • @DavidJ.: That looks like a subset font. `CMSS12` is likely the true PostScript name of the original font, while `XSVTJR+` is added to the beginning of the name to assure this particular subset of `CMSS12` has a name that's unique to all other possible subsets. You can see this same behavior is reflected in Lri's output above (the `GFEDCB+` prefix is used for several embedded subset fonts). – NSGod Oct 12 '19 at 20:16
  • On Linux, the package is usually called `poppler-utils` or `poppler_utils`. – kirelagin Dec 31 '21 at 20:16