Hoe kan ik een font uit een PDF file halen cq extracten
Inleiding
Hoe kan ik een font uit een PDF file halen? Misschien heeft u het nodig voor een nieuwe PDF of voor andere doeleinden? Er zijn diverse methoden om uw doel te bereiken!
Stappen
Extract fonts uit PDF files: methode I
- Export een PostScript file (by pdf2ps, ghostscript, or AcrobatReader)
- Look for pfa-format type 1 PostScript fonts (they start with %! and end about 50k later with cleartomark); sometimes you may want to look for BeginResource or BeginFont and take anything until the next EndResource
- Save that portion to a file (if the first line is not %! then use an editor to add that line
- Convert this to a pfb, by using free tools such as t1binary
- Warning: you have no .afm (font metric) file, so all kerning is lost, and the fonts are a tad useless. There are free tools to create .afm files without kerning pairs though.
Extracting fonts from PDF files: method II
- Make sure you have Acrobat Reader 3 (not later!!!)
- Open the PDF in Acrobat Reader 3
- While the file is open, look at your temporary file folder (called temp oir tmp on most operating systems--it is /tmp on UNIX/Linux) and look for files like PFB...TMP or with PFB in them. These are the font files
- Copy these files and name them whatever.pfb
- Open the file in a font editor to rename the font and check things. Renaming can also be done if you have the t1binary package: create a pfa format file, open in a conventional text editor, rename the font, and regenerate a pfb format file
- Generate a metrics file (AFM and/or PFM), either through a font editor or by using free tools.
Tips
Handige links
http://cgm.cs.mcgill.ca/~luc/PSpdf.html http://downloadfonts4free.com