在app
中,本地下载好的pdf文件
打开预览,用的是第三方pdf阅读软件(PDFReader
),由于pdf
文件过大,导致打开的时候,程序崩溃:
CGContextDrawPDFPage(context, _PDFPageRef); // Render the PDF page into the context
解决办法:
// 在上句之前加上 防止崩溃
CGContextSetRenderingIntent(context, kCGRenderingIntentDefault);
CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
CGContextDrawPDFPage(context, _PDFPageRef); // Render the PDF page into the context
网友评论