I give pdf files to a print-on-demand house (lulu.com) that is very picky about fonts. They want all fonts embedded, no multiply embedded fonts, and no subsetting. Recent versions of pdftex seem to automatically do all of this except that the pdfs produced do have subsetting. Currently what I'm doing is pdf->pdf filtering through ghostscript like this:
gs -q -dCompatibilityLevel=1.4 -dSubsetFonts=false -dPDFSETTINGS=/printer -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=b.pdf a.pdf -c '.setpdfwrite'
This is slow, and it's also kludgy. Is there a better way to accomplish this?
If this problem can be solved more easily by switching to luatex or xetex, I'm open to that, but I haven't been sure which one to hitch my wagon to, and these are large book projects that may be nontrivial to get working with something other the pdftex.
Best Answer
Many font licenses disallow full font embedding. Assuming you're using only fonts that allow full embedding you can modify the map file (without really modifying it, of course).
It requires some work, but this work is incremental.
Suppose the document is
At the end of the log file you find a list of the used fonts, in this case
lmr10.pfb
:You have also an encoding directive,
With
grep lmr10.pfb $(kpsewhich pdftex.map)
you obtain the following outputso the relevant line is the one starting with
rm-lmr10
. Prepare afullembed.map
file containing the relevant line, but slightly modified as to readIf you're uncertain about what line to include, include all (but change the last
<
into<<
).Add to
fullembed.map
all the font lines you need and then teach pdftex to use it saying in your documentbefore
\begin{document}
. Now the fonts will be fully embedded. Thefullembed.map
can be placed in a directory searched by TeX: the current working directory or, on GNU/Linux systems,~/texmf/fonts/map/pdftex
(create the necessary path).