We have a little problem with fonts in PDF documents. In order to put the finger on the problem I'd like to inspect, which fonts are actually embedded in the pdf document and which are only referenced. Is there an easy (and cheap as in free) way to do that?
Asked
Active
Viewed 9.9k times
4 Answers
182
pdffonts
command line tool originally from Xpdf, now part of Poppler.
This tool is available in most Linux distributions as part of poppler-utils
package.
Example usage and output:
$ pdffonts some.pdf
name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
BAAAAA+Arial-Black TrueType yes yes yes 53 0
CAAAAA+Tahoma TrueType yes yes yes 28 0
DAAAAA+Wingdings-Regular TrueType yes yes yes 43 0
EAAAAA+Webdings TrueType yes yes yes 38 0
FAAAAA+Arial-BoldMT TrueType yes yes yes 33 0
GAAAAA+Tahoma-Bold TrueType yes yes yes 23 0
HAAAAA+OpenSymbol TrueType yes yes yes 48 0

vartec
- 131,205
- 36
- 218
- 244
-
to avoid linkrot, please include an example and/or some doc. – Jake Berger Jan 28 '14 at 18:49
-
It seems to have been installed by default on my Lubuntu 14.10 installation. – DaAwesomeP Mar 22 '15 at 22:41
-
13For mac users, `brew install poppler` to easily get the `pdffonts` command – Edward Newell Mar 02 '16 at 03:00
-
1In evince document viewer, go to File --> properties --> Fonts tab – Lnux Dec 17 '16 at 05:53
-
Note: on Windows, pdffonts can be installed as part of the Poppler chocolatey package https://chocolatey.org/packages/poppler – Bernard Vander Beken Mar 03 '21 at 09:41
-
Veery late to the party, but is there a way to extract the font size as well in a similar way? – Vegard Gjeldvik Jervell Jan 31 '22 at 13:41
-
`pdffonts file.pdf | cut -d ' ' -f1 | uniq -d` – ahmelq Jul 03 '23 at 14:31
97
Much simpler if you just want to find out the font names: run this from a terminal
strings yourPDFfilepath.pdf | grep FontName

michelem
- 995
- 6
- 2
-
12
-
13Doesn't work for me. (Mac with PDF generated by latex.) `pdffonts` shows two embedded fonts; this shows none. Evidently, this method works some times, but is not reliable. – Mike Apr 22 '13 at 14:49
-
-
@texnic Try this. Right click and open the file in a text editor (e.g. Notepad) and search for FontName. – Kevin Lee Apr 19 '17 at 04:07
-
`FontName` wasn't found in a PDF I just tried. Just looking for `grep -i font` gave : `/BaseFont /Helvetica` – Eric Duminil Jun 29 '21 at 08:46
52
I finally got an example file that actually seems to have fonts embedded.
Using the normal Adobe Reader (or Foxit if you prefer). Select File->Properties on the resulting Dialog choose the Font tab. You will see a list of fonts. The ones that are embedded will state this fact in ( ) behind the font name.

Aaron Digulla
- 321,842
- 108
- 597
- 820

Jens Schauder
- 77,657
- 34
- 181
- 348
-
Does this tab exist in the Mac version? I can't find it, I have a Mac ) : – Derrops Sep 30 '21 at 04:18
5
CAM::PDF has a font reporter, available as a command-line utility or via a library call. If you run "listfont.pl file.pdf" you get output like this:
Page 1:
Name: F1.0
Type: TrueType
BaseFont: NZUXSR+Impact
Encoding: MacRomanEncoding
Widths: yes
Characters: 0-255
Embedded: yes
Name: F2.0
Type: TrueType
BaseFont: XSFKRA+ArialMT
Encoding: MacRomanEncoding
Widths: yes
Characters: 0-255
Embedded: yes

Chris Dolan
- 8,905
- 2
- 35
- 73