Is it possible to extract fonts that are embedded in a PDF file to an external ttf file using some utility or script?
If the fonts that are embedded (or not
It's a late answer but I found a way to do this using freely available windows programs. Won't require scripting or compiling or cygwin. It's a few steps but not as bad as it looks.
Install mupdf link - http://mupdf.googlecode.com/files/mupdf-0.8.15-windows.zip and copy your pdf to mupdf's installation folder. Let's say it's called whatever.pdf.
Open a dos/command prompt. Navigate to your mupdf install folder. example: cd C:\Program Files\mupdf ...If that goes smoothly, your prompt should now look like this: C:\Program Files\mupdf> Now type the following command: pdfextract whatever.pdf
Afterwards, within the mupdf program folder, you'll have one or more font files. They'll have names like ABCDEF+Fontname-12.cff ...Right now they're in the unusable .cff format but we'll fix that. I recommend renaming this to something less awkward... for example whatever.cff
More DOS, sorry. You need a tool called cfftot1.exe. Here's a link: ftp://tug.org/texlive/Contents/live/bin/win32/cfftot1.exe ...Copy it to your mupdf folder. Then type this: cfftot1 whatever.cff whatever.pfb
You now have an almost usable font file called whatever.pfb. I say 'almost' because usually PFB font files also come with a 2nd file, a PFM file which contains spacing information. Without this file the font won't install and the spacing will be screwed up. But the font will still open in font editors like fontlab. You can save the font from there to TTF or OTF. You can also try fixing the spacing yourself.
If you don't have a font editor, you can use crossfont. Crossfont can take the PFB and generate the necessary PFM file so you can at least install and use the font. link - http://crossfont.en.softonic.com/
That's it.