1
A
回答
1
我认为正常的打印API将使用AirPrint来完成此操作。 http://developer.apple.com/library/IOs/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/Printing/Printing.html
此外,有一个名为Printopia伟大的应用程序,让你的Mac作为一个AirPrint的主机:http://www.ecamm.com/mac/printopia/
+0
非常感谢,它的工作原理。 – 2012-01-18 13:10:10
0
UIPrintInteractionController * PIC = [UIPrintInteractionController sharedPrintController]
如果(PIC & & [UIPrintInteractionController canPrintData:self.myPDFData]){
pic.delegate = self;
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputGeneral;
printInfo.jobName = @"PrintPdf";
printInfo.duplex = UIPrintInfoDuplexLongEdge;
pic.printInfo = printInfo;
pic.showsPageRange = YES;
pic.printingItem = self.myPDFData;
void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) =
^(UIPrintInteractionController *pic, BOOL completed, NSError *error) {
if (!completed && error)
NSLog(@"FAILED! due to error in domain %@ with error code %ld",
error.domain, (long)error.code);
};
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[pic presentFromRect:self.printButton.frame inView:self.view animated:YES completionHandler:^(UIPrintInteractionController *printInteractionController, BOOL completed, NSError *error) {
}];
} else {
[pic presentAnimated:YES completionHandler:completionHandler];
}
}
相关问题
- 1. 如何以编程方式将数据从iPhone/iPad发送到以太网打印机?
- 2. 如何以编程方式从android到wifi打印机发送文件并打印文件?
- 3. 从ipad打印到收据打印机(Epson TM-T88v)thr wifi
- 4. 以编程方式打印到虚拟打印机(XPS)
- 5. 发送数据到Java打印机
- 6. 获取数据发送到打印机
- 7. 以编程方式打印PDF文件 - 指定打印机
- 8. 从CN1打印到Wifi打印机应用程序
- 9. Java打印机:将文档发送到远程打印机
- 10. 发送命令到远程打印机
- 11. 以编程方式将XPS文件打印到物理打印机
- 12. ASP.NET:如何将文件从数据库发送到打印机?
- 13. Android - 以编程方式连接到wifi
- 14. 创建“打印机”以PDF格式打印到SQL数据库
- 15. 发送数据库数据到打印机
- 16. 打印到PDF打印机编程
- 17. 在嵌入式系统中对USB进行编程以将一些数据发送到主机进行打印
- 18. 以编程方式将输入发送到计算机
- 19. Silverlight:以编程方式打印XPS
- 20. 以编程方式打印文档
- 21. 以编程方式打印excel文件
- 22. 以编程方式打印ActiveReports页面
- 23. 以编程方式打印HTML文档
- 24. 以编程方式打印FixedDocument
- 25. 通过PHP网页发送数据到收据打印机
- 26. 以编程方式发送回发
- 27. 如何将Android手机的csv /文本文件发送到wifi打印机?
- 28. 以编程方式打开PDF并以PDF格式打印C#
- 29. 通过wifi从手机发送数据到任何wifi设备(智能开关)
- 30. 如何以编程方式为Windows创建空打印机?
取决于哪个打印机型号,你想工作。 – Raptor 2012-01-06 06:57:36