ManticMoo.COM All Articles Jeff's Articles
Jeffrey P. Bigham

Embedding Fonts in PDFs with pdflatex

Jeffrey P. Bigham

Warning: pg_exec(): supplied argument is not a valid PostgreSQL link resource in /home/manticmo/public_html/templates/header.php on line 48

Warning: pg_numrows(): supplied argument is not a valid PostgreSQL result resource in /home/manticmo/public_html/templates/header.php on line 49

Related Ads

If you're preparing a paper for a conference submission or if you just want to ensure that your .pdf looks exactly the same on someone else's computer as it does on yours, then you need to know how to embed the fonts used in your pdf in the file itself. In this article, I'll show you how to do this in Linux and how to verify that you've done it successfully. If you want information about doing this in Windows, check how to embed fonts in pdfs in Windows.

Embedding Fonts in Linux

For Linux users, an invaluable tool is pdffonts which inspects pdf files and reports on the fonts used within them. A sample of what this tool reports is below:


name                                 type         emb sub uni object ID
------------------------------------ ------------ --- --- --- ---------
PNVRRO+NimbusSanL-Bold               Type 1       yes yes no       8  0
PHBHZX+NimbusSanL-Regu               Type 1       yes yes no      11  0
AADTKX+CMSY9                         Type 1       yes yes no      14  0
CDIICF+NimbusRomNo9L-Medi            Type 1       yes yes no      17  0
HBDGDE+CMR9                          Type 1       yes yes no      20  0
KXGHNA+CMBX9                         Type 1       yes yes no      23  0
WHCTGW+NimbusRomNo9L-Regu            Type 1       yes yes no      26  0
CDNGFA+NimbusRomNo9L-ReguItal        Type 1       yes yes no      29  0
VMMAOS+CMR6                          Type 1       yes yes no      32  0
YKAZLU+CMTI9                         Type 1       yes yes no      35  0
WSQBTR+CMTT9                         Type 1       yes yes no      38  0
IWBYHC+CMMI9                         Type 1       yes yes no      73  0
Arial,Bold                           TrueType     yes no  no      76  0
Arial                                TrueType     yes no  no      77  0


As you might have guessed, the most important columns here are name and emb because they let you know which fonts have been embedded in your pdf file.

If your analysis with pdffonts shows that some of your fonts haven't been embedded then you'll need to fix it. If the pdfs were created using pdflatex (or another tool in this family) then the following should direct it to embed all fonts by default:


updmap --edit


This will open a file, which you need to edit. Find the pdftexDownloadBase14 directive and make sure it is true. That is, when you're done, the following line should be in the file:
pdftexDownloadBase14 true
Remove any other references to pdftexDownloadBase14 and save the file.

After you do this, rebuild your pdf file using pdflatex and it should embed all of the fonts for you. Of course, now you know how to check using pdffonts. One trick is that if your pdf file includes any other pdf files as graphics then those files also need to have been built with font embedding turned on. If you happened to use Adobe Acrobat or other Windows tools to create those graphics (as I have often found handy to do) then you'll want to read the companion article all about how to embed fonts in pdfs created in Windows.

Jeffrey P. Bigham
ManticMoo.COM All Articles Jeff's Articles