A guide to generate PDF files with all fonts embedded using pdflatex

Version 0.1.1
9/8/2006
Sylvia C Wong

This guide started in May 2005, when my conference paper failed the IEEE PDF eXpress compilance test. The paper needs to pass this test to be included in the conference proceedings and IEEE Xplore. The PDF eXpress web service can generate compliant PDFs from a variety of source format, including Latex (from DVI). However, I use pdflatex to write my papers, and I don't want to switch back to vanilla latex since I have lots of diagrams in PNG and JPEG formats.

This guide explains how to produce a PDF file that embeds all fonts used. (Technically, only the subset of the fonts you actually used are embedded). It assumes you are using pdflatex with teTeX. (Specifically, I use debian, but other Linux distros should be very similar). Vector graphs are generated with xfig and plots are done using gnuplot.

This guide does not cover other IEEE PDF eXpress warnings not related to embedded fonts. For example, graphics resolution problems, or images using zip filters.

To ensure that your PDF file embeds all fonts used, you need to tell

  1. pdflatex to embed fonts used in your latex source file
  2. all software you used to generate PDF diagrams and plots to embed fonts

Latex source file

By default, pdflatex doesn't include fonts in the base 14 set. They are fonts that are normally found in all operating systems, eg Times, Courier. To check if your pdflatex is embedding these fonts, look at the file updmap.cfg (It's at /usr/share/texmf/web2c/updmap.cfg in debian). To make pdflatex (and all TeX) to embed all fonts, run

$ updmap --setoption pdftexDownloadBase14 true
$ updmap --setoption dvipsPreferOutline true
$ updmap --setoption dvipsDownloadBase35 true
$ updmap --setoption dvipdfmDownloadBase14 true

These are options found in my updmap.cfg. Yours might be different. I think only pdftexDowloadBase14 is necessary, but I like to be on the safe side.

PDF graphics

I draw my vector diagrams in xfig and my plots using gnuplot.

xfig

If you use a recent version of xfig, then fonts are automatically embeded when you export to pdf.

gnuplot

According to the gnuplot website, gnuplot 4.0 has a pdf terminal. However, it's missing in my version. To see what's available in your gnuplot, type "set terminal" in the gnuplot interactive shell.

If you use the postscript terminal, and convert the eps to pdf using eps2pdf, the resulting pdf will not have the fonts embedded. At the moment, I'm using the latex terminal instead.

How to check if fonts are embedded?

There must be other ways to do this, but here's two that I know of.
  1. If you are using linux, you should have access to the pdffonts command. On the Mac, install the package xpdf via Fink. Just run
    $ pdffonts mypaper.pdf
  2. Almost everyone should have Adobe's acrobat reader installed. Open your pdf file in acroread and select File->Document Properties. Under the Font tab, you should see a list of fonts. All of them should say "Embedded" or "Embedded Subset". For example, CMSY10 (Embedded Subset). (I'm using acroread 7.0, but the font list has been under document properties for as far as I can remember).

Changelog