http://colinm.org/tips/latex
In practice, the command to embed fonts is:
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=figures/Mprime-new.pdf -f figures/Mprime.pdfand it works perfectly.
7 comments:
This hasn't been working quite perfectly for me. It damages some of my figures (colored circles become filled dots) and it makes links that are marked non-visible visible.
So it's not quite perfect in all cases, and I'm still looking for a better way to embed them fonts!
Actually, here's a tweak that works a little better for me:
pdftops paper.pdf
Followed by:
ps2pdf -dSAFER -dNOPLATFONTS -sPAPERSIZE=letter -dEmbedAllFonts=true -dPDFSETTINGS=/prepress paper.ps paper.pdf
At a first glance, the main differences are the options -dPDFSETTINGS=/prepress instead of /printer that according to the documentation shouldn't do anything particularly differentb apart for changing the colour conversion strategy.
It is anyway worth trying to change that into /prepress in my command, because I guess the process should be equivalent for everything else (my command forces some thing, like the compatibility level on the pdf, that are guaranteed anyway by the /prepress and /printer settings).
/prepress is a red herring. I use it to ensure that any rasterized elements are at the highest resolution.
The critical difference is converting to postscript first. ghostscript's pdf to pdf translator doesn't seem to be able to perfectly interpret the PDF graphical bits correctly. pdftops is a tool from poppler (or xpdf) that does a correct job of rendering pdf as postscript. And of course ghostscript can handle postscript input like a champ.
ah right, I was confusing with pdf2ps, which is the gs tool and would just add an additional step to the chain.
Thanks for the hint, then, I'll bookmark this for next time I'll have hard times embedding fonts! :)
That's likely to save the day. Thanks ;)
How we specify Font File or font name to substite for Missing font using Ghostscript.
Post a Comment