I have a PDF file that I want to draw in outline form. I want to draw the first several pages on the document each in their own UIImage to use on a button so that when clic
Take a look at my code for a PDF image slicer on github:
http://github.com/luciuskwok/Maps-Slicer
There should be enough memory on the device that a 13 MB allocation isn't going to kill the app. Are you draining the autorelease pool each time you render a PDF? You might also want to cache the rendering into a UIImage so that it doesn't have to render it every time it's displayed.
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