views:

36

answers:

0

Hi iDevs,

I want to capture PDF pages as Images, To do so i am drawing PDF over UIView using CGContextDrawPDFPage method. then capturing image by implementing following code:

UIGraphicsBeginImageContext(view.bounds.size);
[objPdfPage.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
//Saving this image
[UIImagePNGRepresentation(viewImage) writeToFile:strFilePath atomically:NO];
UIGraphicsEndImageContext();

But saved image look quite blurred than actual PDF page.

Can anyone help me so that i will get sharp-n-clear image of PDF?

Thanks in Advance