我是 ipad 应用程序开发的新手。我在 iPad 中使用 CGPDFDocumentRef 呈现 pdf 书。我能够正确呈现页面中心的 pdf。它在四周留下一小段空白。我正在尝试缩放我们在中心获得的图像以完全适合页面...有人可以帮我解决如何使其适合 ipad 屏幕尺寸吗?
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);
通过使用此代码,我得到了中心的 pdf 文档,现在请帮助我如何将其适应页面????
谢谢你,
拉朱