tags:

views:

2986

answers:

6

We have a little problem with fonts in PDF documents. In order to put the finger on the problem I'd like to inspect, which fonts are actually embedded in the pdf document and which are only referenced. Is there an easy (and cheap as in free) way to do that?

+1  A: 

Try Foxit PDF Reader. You can display the list of fonts used in the "File" menu with the item "Properties...".

Aaron Digulla
Wow this Foxit PDF Reader wants to put all kinds of stuff on my machine.
Jens Schauder
:P Yeah, sorry for that. It's a nice tool but the "additional cool stuff" it brings along isn't :(
Aaron Digulla
+1  A: 

using the free iText (or iTextSharp if you're on .NET) you can write a utility that will extract for you this information using the BaseFont.GetDocumentFonts method.

Read this link for the code

Conrad
+3  A: 

pdffonts command line tool from Xpdf

vartec
+1  A: 

I finally got an example file that actually seems to have fonts embedded.

Using the normal Adobe Reader (or Foxit if you prefer). Select File->Properties on the resulting Dialog choose the Font tab. You will see a list of fonts. The ones that are embedded will state this fact in ( ) behind the font name.

Jens Schauder
+1  A: 

CAM::PDF has a font reporter, available as a command-line utility or via a library call. If you run "listfont.pl file.pdf" you get output like this:

Page 1:
  Name: F1.0
    Type: TrueType
    BaseFont: NZUXSR+Impact
    Encoding: MacRomanEncoding
    Widths: yes
      Characters: 0-255
    Embedded: yes
  Name: F2.0
    Type: TrueType
    BaseFont: XSFKRA+ArialMT
    Encoding: MacRomanEncoding
    Widths: yes
      Characters: 0-255
    Embedded: yes
Chris Dolan
A: 

You can extract font from PDF using Online Font Converter: http://onlinefontconverter.com/extract_font_from_pdf.php

Stefan