How do I embed fonts in an existing PDF?
This may not be the answer you are looking for (since you want to get your problems solved programmatically, not by an external tool). But you can use Ghostscript commandline to embed missing fonts in retrospect to PDFs which have not embedded them: gs \ -sFONTPATH=/path/to/fonts:/another/dir/with/more/fonts \ -o output-pdf-with-embedded-fonts.pdf \ -sDEVICE=pdfwrite \ -dPDFSETTINGS=/prepress \ input-pdf-where-some-fonts-are-not-embedded.pdf … Read more