continue
I am having an issue regarding rotation of a pdf document in ipad. Have tried a lot using the following code, please have a look at it:
-(void) MyDrawPDFPageInRect:(CGContextRef)context :(CGPDFPageRef)page :(CGPDFBox)box :(CGRect)rect :(int)rotation :(bool)preserveAspectRatio
{
CGAffineTransform m;
m = CGPDFPageGetDrawingTransform (page, box, rect, rotation, preserveAspectRatio);
CGContextSaveGState (context);
CGContextConcatCTM (context, m);
CGRect pageframe = CGPDFPageGetBoxRect (page, box);
CGContextClipToRect (context,pageframe);
CGContextDrawPDFPage (context, page);
CGContextRestoreGState (context);
}
The code above is rotating the pdf but pdf size goes on diminishing with further rotation.
I think there is some problem in my code. So please give me some solution as i need to submit this app ASAP.
Regards
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CGRect mediaBox = CGPDFPageGetCropBox(page, kCGPDFCropBox)
上面的东西需要旋转。
无论如何谢谢...
CGRect mediaBox = CGPDFPageGetCropBox(page, kCGPDFCropBox)
The above thing needs to be rotated.
Thanks anyways...