title: UIGraphicsGetCurrentContext and UIScrollView
body: <p>I'm trying to save all of the contents of a UIScrollView to a .pdf.  I found some tutorials for saving the current view, and they all rely on creating a CGContextRef using <code>UIGraphicsGetCurrentContext()</code>.  Right now, I capture my view with just</p>
  
  <pre><code>CGContextRef context = UIGraphicsGetCurrentContext();
  [myView.layer renderInContext:context];
  </code></pre>
  
  <p>And that works fine for a plain UIView.  However, when I try to pass a UIScrollView as <code>myView</code>, it passes the visible part of the UIScrollView fine, but anything offscreen is just white space.  <strong>Is there a way I can expand <code>context</code> somehow to get all of the content in my UIScrollView, and not just what is currently visible?</strong>  I suspect that I can't use <code>UIGraphicsGetCurrentContext()</code> for a UIScrollView, but I don't know what to use instead, and <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html" rel="nofollow">the Apple docs</a> on this aren't really very helpful.</p>