I am new to ipad application development. I am rendering a pdf book using CGPDFDocumentRef in the iPad. I am able to render the pdf properly which is coming in the centre of the page. Its leaving small length of white space on all the sides. I am trying to scale that image which we are getting in centre to fit the page exactly...can any one help me out how to make that fit into the ipad screen size?
myPageRef = CGPDFDocumentGetPage(myDocumentRef, pageNo);
CGContextTranslateCTM(ctx,0 , layer.bounds.size.height);
CGContextScaleCTM(ctx, 1.0,-1.0);
CGContextConcatCTM(ctx, CGPDFPageGetDrawingTransform(myPageRef,kCGPDFCropBox , layer.bounds, 0, true));
CGContextSetInterpolationQuality(ctx, kCGInterpolationHigh);
CGContextSetRenderingIntent(ctx, kCGRenderingIntentDefault);
CGContextDrawPDFPage(ctx, myPageRef);
By using this code, I am getting the pdf document in center, now please help me out how to fit it to the page????
Thank you,
Raju