我有一个1000页的pdf文件,我正在使用CGContextDrawPDFPage函数绘制它们。但是在第466页,应用程序崩溃了。这是我的页面绘制代码...
NSLog(@"%@",@"Before drawing pdf page.");
CGContextDrawPDFPage(context, page);
NSLog(@"%@",@"After drawing pdf page.");这是控制台输出:
2010-09-15 10:20:15.064 MYAPP[159:207] Before drawing pdf page.
Program received signal: “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")我只在一个特定的页面上得到了这个错误。顺便说一句,在模拟器上它工作得很好。
发布于 2011-02-25 18:40:54
这是因为您的应用程序消耗了大量内存。尝试使用:
CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
CGContextSetRenderingIntent(context, kCGRenderingIntentDefault);
CGContextDrawPDFPage(context, _pdfPageCustom);
UIGraphicsEndPDFContext();https://stackoverflow.com/questions/3715897
复制相似问题