开发者

Ipad application crashed when invoke CGContextDrawPDFPage

I have a pdf document with 1000 pages and I am drawing them using CGContextDrawPDFPage function. But on page 466 application crashed. Here is my page drawing code...

 NSLog(@"%@",@"Before drawing pdf page.");
 CGContextDrawPDFPage(context, page);      
 NSLog(@"%@",@"After drawing pdf page.");

This is Console output:

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

An I got this error only on a particular page. Btw on a 开发者_高级运维simulator it works fine.


It's because your application consume much memory. Try using:

CGContextSetInterpolationQuality(context, kCGInterpolationHigh); 
CGContextSetRenderingIntent(context, kCGRenderingIntentDefault); 
CGContextDrawPDFPage(context, _pdfPageCustom);              

UIGraphicsEndPDFContext();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜