iphone - Image drawing on PDF fails to draw image with transformation and outputs wrong -


I have a problem in drawing pictures on PDF. I apply scaling, rotation, move etc. to an image and pull that image onto the PDF. But the drawing is not output properly when I rotate the image, it does not just scales and rotates.

Here, I explain in more detail: I place an image on UIWebView to fix the imitation effect of the image again on the PDF, I draw a picture on the PDF I am on UIWebView while creating PDF

But when I go and prepare PDFs with the modified image, which has implemented a lot of changes, the image scale does not rotate.

Here, img_copyright is a inheriting UIImageView class.

  CGFloat orgY = (newY-whiteSpace) + img_copyright.frame.size.height; CGFloat modY = pic. Size.height-orgY; CGFloat orgX = img_copyright.frame.origin.x-Product_PAGE_PADDING_WIDTH; CGFloat modX = orgX; // To decide where we want to place the image on PDF, here's an image of X, Y. Cgartextact = CGRactamac (MDX, MDV, IMGCCPRF frame size.imd, IMGCCPRFr.Im.High); // Preparing the rectangle in which the image should be prepared CGContextDrawImage (pdfContext, drawRect, [img_copyright.image CGImage]); [IMGCopyright release]; // In fact, image drawing  

But when I see that the PDF image is not well-formed.

What would you suggest, is it a problem based on the image of X, Y? How can we decide where the image should be placed in the PDF, if we do not depend on X, Y? Rotation, scale?

What is the correct method of drawing a picture on PDFs Image during inserting an image on the scroll bar of iWebViewViewView. Http://www.freeimagehosting.net/ ">

Image when I drag the image to PDF. Http://www.freeimagehosting.net/ http://www.freeimagehosting.net/ http: //www.freeimagehosting.net/ http://www.freeimagehosting.net/ http://www.freeimagehosting.net/ ">

/ div>

  CGflot Angle Innerial = -1 * Angle * (M_PI / 180.0); CGAffineTransform transformation = CGFine TransactionIdentity; Transform = cagefine transformamacotation (angle iredia); // transform = CGFINI Transformmacscale (1, -1); // Transform = CGFine Transmake Conversion (0, 80); CGRact rotate per capita = CGRTAPlineEfine Transforms (CGRactackMake (0,0, Itasize.width, imaginesheight), transforms); UIGraphicsBeginImageContext (rotatedRect.size); //[self.view.layer renderIncontext: UIGraphicsGetCurrentContext ()]; CGContextTranslateCTM (UIGraphicsGetCurrentContext (), 0, rotatedRect.size.height); CGContextScaleCTM (UIGraphicsGetCurrentContext (), 1, -1); // CGContextTranslateCTM (UIGraphicsGetCurrentContext (), + (Rotated Rect.size.width / 2), + (rotatedRect.size.height / 2)); CGContextTranslateCTM (UIGraphicsGetCurrentContext (), (rotatedRect.origin.x) * - 1, (rotatedRect.origin.y) * - 1); CGContextRotateCTM (UIGraphicsGetCurrentContext (), Engel Inradien); // CGContextTranslateCTM (UIGraphicsGetCurrentContext (), - (rotatedRect.size.width / 2), - (rotatedRect.size.height / 2)); CGImageRef temp = [Image CGImage]; CGContextDrawImage (UIGraphicsGetCurrentContext (), CGRectMake (0, 0, Image.size.width, Image.size.height), Temporary); // CGContextRotateCTM (UIGraphicsGetCurrentContext (), -GeneralRadian); UIImage * viewImage = UIGraphicsGetImageFromCurrentImageContext (); UIGraphicsEndImageContext (); Return photo;  

Comments

Popular posts from this blog

php - multilevel menu with multilevel array -

c# - TypeConverter in propertygrid only converts from string, not to -

jQuery UI: Datepicker month format -