Ios pdf页面中的图像绘制问题-目标c

Ios pdf页面中的图像绘制问题-目标c,ios,objective-c,ios5,qlpreviewcontroller,Ios,Objective C,Ios5,Qlpreviewcontroller,我现在正在创建pdf,除了图像绘制,其他一切都很好,它只绘制图像的左上角;用额外的缩放。但它在模拟器上工作,代码如下所示 UIImage *plotImage=[[UIImage alloc]initWithContentsOfFile: [localPictureArray objectAtIndex:i]]; [plotImage drawInRect:CGRectMake (kMargin, currentPageY, plotImage.size.width, plotImage

我现在正在创建pdf,除了图像绘制,其他一切都很好,它只绘制图像的左上角;用额外的缩放。但它在模拟器上工作,代码如下所示

UIImage *plotImage=[[UIImage alloc]initWithContentsOfFile:
[localPictureArray objectAtIndex:i]];
    [plotImage drawInRect:CGRectMake
(kMargin, currentPageY, plotImage.size.width, plotImage.size.height)];

既然我是新手,我需要你的宝贵帮助。提前感谢。

问题可能是您的
CGRect
。假设您的x和y页边距正常,您可能有一张图像太大,无法放在页面上(从这些页边距测量)


您需要确定可以向右和向下绘制多远,并相应地缩放图像。(如所述)

谢谢..我认为这将是解决方案,但我如何扩展它。