title: How do I create transformed image in PDF from a UIView?
body: <p>I'm using below code to create <code>PDF</code> from a <code>UIView</code> which already has subviews. I'm getting all subviews and redrawing in pdf context. But I'm not able to transform <code>UIImageView</code>. Below is my code</p>
  
  <pre><code>NSMutableData *pdfData = [NSMutableData data];
  CGRect pageFrame = CGRectMake(0, 0, aView.frame.size.width, aView.frame.size.height);
  UIGraphicsBeginPDFContextToData(pdfData, CGRectZero, nil);
  UIGraphicsBeginPDFPageWithInfo(pageFrame, nil);
  if([view isKindOfClass:[UIImageView class]]) {
      UIImageView *imgv = (UIImageView *)view;
      [imgv.image  drawInRect:CGRectMake(view.frame.origin.x + imgv.frame.origin.x, view.frame.origin.y + imgv.frame.origin.y, imgv.frame.size.width, imgv.frame.size.height)];
  }
  UIGraphicsEndPDFContext();
  </code></pre>
  
  <p>Even though image is rotated in my <code>UIView</code> but pdf showing no rotation. How do I transform it to 90 degree in <code>pdf</code> context?</p>