2

I have one PDF and I am trying to scan PDF using CGPDFScanner. While scanning the pdf, when the word "file" is encountered, the CGPDFStringGetBytePtr API returns "\x02le". PDF is having Type1 font and no ToUnicodeMapping(CMap). Encoding dictionary is not present in the PDF hence using NSUTF8String encoding. However I have tried with all NSMacOSRomanStringEncoding, NSASCIIStringEncoding but had no luck. What can be the problem?

Thanks.

4

1 回答 1

2

代码 \x02 对应于 'fi' 字符串。'fi' 序列是使用连字绘制的,这就是为什么你只有一个字符代码。
代码和字符串的对应是在字体编码中完成的。字体编码包含一个 /Differences 数组,它指定代码 \x02 和序列 'fi' 之间的映射

于 2015-05-08T14:23:40.983 回答