title: UIGraphicsGetCurrentContext seems to return nil
body: <p>I'm trying to convert individual PDF pages into PNGs here, and it's worked perfectly until UIGraphicsGetCurrentContext suddenly started returning nil.</p>
  
  <p>I'm trying to retrace my steps here, but I'm not quite sure that I know at which point this happened. My frame is not 0, which I see might create this problem, but other than that everything "looks" correct.</p>
  
  <p>Here's the beginning of my code.</p>
  
  <pre><code>_pdf = CGPDFDocumentCreateWithURL((__bridge CFURLRef)_pdfFileUrl);
  CGPDFPageRef myPageRef = CGPDFDocumentGetPage(_pdf, pageNumber);
  CGRect aRect = CGPDFPageGetBoxRect(myPageRef, kCGPDFCropBox);
  CGRect bRect = CGRectMake(0, 0, height / (aRect.size.height / aRect.size.width), height);
  UIGraphicsBeginImageContext(bRect.size);
  CGContextRef context = UIGraphicsGetCurrentContext();
  CGContextSaveGState(context);
  </code></pre>
  
  <p>Anybody have any idea what else might be causing the nil context?</p>