Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a pdf file, and I want to know if I can embed/subset all its fonts into PDF file itself? Is there any tool supporting this operation?

share|improve this question
up vote 1 down vote accepted

You can export PDFs from InDesign with the fonts embedded, but that's assuming you have the fonts on your computer and can direct the program to those font files. I'd imagine Acrobat Pro supports this too. I'm not sure about editing the fonts in a PDF file that's already been generated, but if there's any tool that will let you do it, it's probably Acrobat Pro (not to be confused with Acrobat Reader).

share|improve this answer

Ghostscript can do that. One condition though: the font(s) referenced by the original PDF need to be present on the system where you run Ghostscript.

Here is an example command to run on Windows:

gswin32c.exe ^
  -sFONTPATH=c:/windows/fonts;d:/some/dir/with/more/fonts ^ 
  -dCompatibilityLevel=1.4 ^
  -dPDFSETTINGS=/prepress ^
  -dCompressFonts=true ^
  -dSubsetFonts=true ^
  -dBATCH ^
  -sDEVICE=pdfwrite ^
  -sOutputFile=output.pdf ^
  -c ".setpdfwrite <</NeverEmbed [ ]>> setdistillerparams" ^
  -f input.pdf

The resulting output.pdf should have all fonts embedded which input.pdf didn't have. Just make sure that -sFONTPATH=... contains (at least) one directory where the missing fonts are found by the gswin32c command.

share|improve this answer
Isn't there a missing quote in the second to last line? – slhck Apr 13 '15 at 11:34
@slhck: Thanks for spotting the missing quotes. I now added them at the correct location. – Kurt Pfeifle Apr 13 '15 at 14:45
Thanks! Weirdly enough the command worked with the wrongly placed quotes too. – slhck Apr 13 '15 at 14:47
@slhck: On what OS platform did you test this? The -c "...." is to hold a snippet of PostScript code. The quotes are there to work around spaces inside the snippet. That snippet could be divided into two snippets, but then each one should have its own -c and its own quotes, like -c "<< ... >>" -c "setdistillerparams". (So, yes, for the last -c the quotes could go, because the argument setdistillerparams does not include a space...) – Kurt Pfeifle Apr 13 '15 at 14:59
Cygwin with Bash, using the Cygwin GhostScript. Perhaps the last command was just ignored then. – slhck Apr 13 '15 at 15:07

The documentation for your PDF generation tool will explain how to enable embedding of fonts where possible. Be sure to follow the license of all fonts embedded in this manner.

share|improve this answer
PDF is not made by me. I just want to modify it. – user55450 Dec 9 '10 at 9:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.