iOS PDF解析类型1字体指标 [英] iOS PDF parsing Type 1 Fonts metrics

查看:94
本文介绍了iOS PDF解析类型1字体指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我(正在尝试)编写"PDF到纯文本解析器",并且我以pdfKitten为例.

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

我的PDF包括标准14字体"中包含的type1字体.随后,PDF字体字典不包含宽度","FirstChar","LastChar"的键.

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".

我认为,因为它是标准的14种字体"之一(实际上是2,Courier和Courier-bold),所以iOS框架在某处包含了这些指标.

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.

如何访问这些指标?

推荐答案

通常在每个PDF查看器应用程序中建立标准PDF字体的度量.这些指标通过相应的.afm文件公开,每种字体一个.它们可以从Adobe网站下载,但是现在找不到链接.
您可以从任何iText/iTextSharp发行版中获取这些文件,并且我确定还有其他产品包含这些文件.

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.

这篇关于iOS PDF解析类型1字体指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆