I have a PDF with Type 3 font embedded. How can I convert this Type 3 font t开发者_如何学编程o Type 1 font?
It's been many years since this was asked, but I'm posting for anyone else that ran into this problem (like me). The best solution is to regenerate the PDF with settings to avoid type 3 fonts. For example, if you make your figures with matplotlib, then you can follow the instructions here: http://phyletica.org/matplotlib-fonts/
If it is not possible to regenerate the PDF or would require too much time, I also found that the using convert
(found in imagemagick
) can help. As others have stated, you may lose information, but this will work in most cases: convert example.pdf example.pdf
You may not be able to; Type 3 fonts can contain any PostScript; Type 1 fonts can only contain a restricted subset.
Other answers suggest re-generating from source files to output Type 1 instead of Type 3 fonts. This is probably the best solution when feasible, but there are situations where it may be impossible (eg. if the source files or generation program are unavailable for any reason). Allow me to offer an alternate approach..
How to "convert away" Type 3 fonts
I was able to "convert away" the Type 3 fonts in a PDF figure by opening the file in Adobe Acrobat Pro, and then printing the file to Adobe PDF (a virtual printer provided by Adobe Distiller, part of the Professional suite). I'm using the Adobe Pro suite version 11 (ca 2012), but newer versions presumably can do the same. This action sounds circular, but what it actually does is gives you the opportunity to force rendering of fonts into a new PDF.
The default output settings in my version were sufficient to generate a PDF that was visually indistinguishable from the source PDF, but where all the Type 3 fonts were rendered directly as vector graphics (ie the output PDF contains NO font usage of any kind). The Acrobat print dialog (at least in my Windows version) also has both "Properties" and "Advanced" buttons where one can make all sorts of highly detailed adjustments to the output. These include things like the list of Type 1 fonts to embed (and the settings for partial embedding), output compatibility (I used Acrobat 6 / PDF 1.5), optional image downsampling, etc.
Note this procedure will probably result in a significantly larger PDF output file. In my case the offending text using Type 3 fonts was just a few dozen labels on a quarter-page figure, and the PDF file size grew by about 2x during this conversion; however the absolute size remained under 50kB, so the expansion did not matter for my purposes. For a larger document or one with more text using Type 3 fonts, the expansion might be more pronounced, so YMMV.
精彩评论