2

I'm (trying) to write a "PDF to plain text parser" and I'm using pdfKitten as an example.

My PDF includes a type1 font included into the "standard 14 fonts". Subsequently the PDF font dictionary does not include keys for "Widths" "FirstChar" "LastChar".

I assume, since it is one of the "standard 14 fonts" (actually 2, Courier and Courier-bold), that the iOS framework contains these metrics somewhere.

How can I access these metrics?

DIJ
  • 347
  • 4
  • 19

1 Answers1

1

The metrics for the standard PDF fonts are usually built in each PDF viewer application. These metrics were made public through the corresponding .afm files, one for each font. They were available for download from Adobe website but now I cannot find the link.
You can get these files from any iText / iTextSharp distribution and I'm sure there are other products that include these files.

iPDFdev
  • 5,229
  • 2
  • 17
  • 18
  • Thank you for your answer, I have found the AFM (Adobe Font Metrics) using this SO post: http://stackoverflow.com/questions/6383511/font-metrics-for-the-base-14-fonts-in-the-pdf-specification – DIJ Sep 19 '12 at 20:32