2
我有一种方法,我将PDF绘制到位图。 偶尔我看到此错误日志中的实际设备上运行时,它(未仿真器):<Error>:FT_Select_Charmap失败:错误6
<Error>: FT_Select_Charmap failed: error 6
误差以标记线(#11)产生:
NSURL *url = [NSURL fileURLWithPath:pdfFilePath];
CGPDFDocumentRef documentRef = CGPDFDocumentCreateWithURL((CFURLRef)url);
CGPDFPageRef pageRef = CGPDFDocumentGetPage(documentRef, 1);
UIGraphicsBeginImageContext(frame.size);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(ctx, 1.0, 1.0, 1.0, 1.0);
CGContextFillRect(ctx, CGContextGetClipBoundingBox(ctx));
CGContextTranslateCTM(ctx, 0.0, frame.size.height);
CGContextScaleCTM(ctx, 1.0, -1.0);
CGContextConcatCTM(ctx, CGPDFPageGetDrawingTransform(pageRef, kCGPDFCropBox, frame, 0, true));
CGContextDrawPDFPage(ctx, pageRef); // ERROR HERE
UIImage *pdfImage = UIGraphicsGetImageFromCurrentImageContext(); // Is this retained???
UIGraphicsPopContext();
CGPDFDocumentRelease(documentRef);
你有没有想过这个? – 2011-01-24 23:04:04
有趣的是,我刚刚得到了这个(运行4.3.2模拟器,虽然我已经在一个单独的目录中安装了5.0 beta 5 sdk,但我使用scode-select将它们分开):':ITVSLW + Wingdings2:FT_Select_Charmap失败:错误38.注意 - 当这种情况发生时,我的代码没有使用任何CGGraphicContexts;它或多或少都是核心数据。 –
2011-08-10 19:04:28
你是如何解决这个问题的?我面临着同样的问题。 – iOSDev 2013-03-07 05:33:37