0
A
回答
0
首先将当前视图保存为具有这种功能的图像:
How can i create a PDF file programmatically in an iphone application?
:- (void)saveScreenshot:(NSArray*)arguments withDict:(NSDictionary*)options
{
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGRect imageRect = CGRectMake(0, 0, CGRectGetWidth(screenRect), CGRectGetHeight(screenRect));
UIGraphicsBeginImageContext(imageRect.size);
CGContextRef ctx = UIGraphicsGetCurrentContext();
[[UIColor blackColor] set];
CGContextTranslateCTM(ctx, 0, 0);
CGContextFillRect(ctx, imageRect);
[webView.layer renderInContext:ctx];
UIImage *image1 = UIGraphicsGetImageFromCurrentImageContext();
UIImageWriteToSavedPhotosAlbum(image1, nil, nil, nil);
UIGraphicsEndImageContext();
// alert to let us know success. remove this later.
UIAlertView *alert= [[UIAlertView alloc] initWithTitle:nil message:@"Image Saved" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
接着通过在这个问题的StackOverflow以下的方向上的图像转换为PDF
相关问题
- 1. Asp.Net MVC如何让视图生成PDF
- 2. 从当前文档生成pdf
- 3. 如何确定Ipad App分割视图中的当前视图边界?
- 4. 如何从django视图生成报告文件(ODF,PDF)
- 5. iPad - 如何刷新ipad的子视图?
- 6. 如何使当前视图的特定区域成为我的视图?
- 7. 创建1页PDF的iPad屏幕视图 - 如何?
- 8. 将PDF加载到iPad分割视图
- 9. 从表视图中生成PDF时发生的问题
- 10. pdfcrowd.com如何生成pdf
- 11. 如何生成HTML/CSS PDF
- 12. 如何生成适当的MNIST图像?
- 13. 为PDF生成缩略图
- 14. django pdf图像生成
- 15. 动态生成图形PDF?
- 16. 如何使用PHP插入PDF图像(生成PDF)?
- 17. 如何在Crystal Reports显示相当的部分生成的PDF
- 18. 使用当前表单输入在Coldfusion中生成pdf
- 19. 如何解雇我当前视图
- 20. 如何计算在当前视图
- 21. 如何取消当前视图?
- 22. iOS5如何确定当前视图
- 23. 如何使用ipad编程打印来自ipad的pdf /图片
- 24. 如何获得当前的视图ID和以前的视图ID在jsf
- 25. 在uitabbar应用程序中更改当前视图iOS iPad
- 26. iPad的uisplitviewcontroller左视图成为balck
- 27. 如何生成FOS UserBundle视图
- 28. Scala-Play:如何动态生成视图?
- 29. 如何在ASP.NET中生成树视图?
- 30. 如何在界面生成器中获取iPhone而不是iPad视图