【问题标题】:Ipad application crashed when invoke CGContextDrawPDFPage调用 CGContextDrawPDFPage 时 Ipad 应用程序崩溃
【发布时间】:2010-09-15 08:28:41
【问题描述】:

我有一个 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")

我只在特定页面上收到此错误。顺便说一句,在模拟器上它工作正常。

【问题讨论】:

    标签: pdf 2d quartz-graphics


    【解决方案1】:

    这是因为您的应用程序消耗了大量内存。尝试使用:

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

    【讨论】:

      猜你喜欢
      • 2018-04-04
      • 2015-04-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-01
      相关资源
      最近更新 更多