CommunityData:Embedding fonts in PDFs

To check to see if a PDF is missing fonts, you can use the program  which comes in the Debian/Ubuntu package   and the Arch Linux package. If you run:

pdffonts foo.pdf

It should tell if you if the font is missing any fonts in that they will have rows with "no" in the column labled "emb".

This bash script will run a magical incantation of ghostscript which will embed fonts:

for file in "$@" do    tmp_file=$(tempfile) output_file=$(echo $file |perl -p -e 's/.pdf$/-embedded_fonts.pdf/') # add fonts to each pdf gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer \ -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true \ -dUseCIEColor=true \ -dEmbedAllFonts=true \ -sOutputFile="$tmp_file" -f "$file" > /dev/null mv "$tmp_file" "$output_file" done
 * 1) !/bin/bash

If you install this on your system (e.g., in  you can then just run it on a file like:

./embed-fonts foo.pdf

This will then create a new file called  in the same directory as the original. You can verify that the fonts are embedded with.