0
UIPrintInteractionController使用要打印的數據。如果要從imageview打印圖像,它會給我一些警告。我想從imageview中使用圖像,而不是從resources.I想知道如何從圖像中獲取數據ImageView的從imageview打印圖像
UIPrintInteractionController *printController = [UIPrintInteractionController sharedPrintController];
NSData * datatobeprinted [NSData dataWithContentsOfFile:imageView.image];
if(printController && [UIPrintInteractionController canPrintData:imageView.image]) {
printController.delegate = self;
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
printInfo.outputType = UIPrintInfoOutputGeneral;
printInfo.jobName = [path lastPathComponent];
printInfo.duplex = UIPrintInfoDuplexLongEdge;
printController.printInfo = printInfo;
printController.showsPageRange = YES;
[printController setPrintingItem:datatobeprinted];
}
你可以得到它像UIImage * image = imageView.image.But之後,你想用它在哪裏? – Madhumitha 2012-07-10 08:53:26