CGContextDrawPDFPage taking up large amounts of memory

Try to add :

CGContextSetInterpolationQuality(g, kCGInterpolationHigh);
CGContextSetRenderingIntent(g, kCGRenderingIntentDefault); 

before :

CGContextDrawPDFPage(g, m_page);

I had a similar issue and adding the 2 function call above resulted in the rendering using 5x less memory. Might be a bug in the CGContextXXX drawing functions

Leave a Comment