I'm making an app that takes NSData
(of a file) and displays it in a WebView
(with the appropriate mime type). I would also like to use a printer/scanner to insert the data. How can I get the scanner to work with my app? I've down a lot of research, but there doesn't seem to be much internet resource. I think I would need an IKScannerDeviceView
, but I'm not sure. I would like to just connect to a scanner, scan a document in it, then get the scanned document and save it as an NSData
object. Is there any way to do this? I would really like some help, and please don't hate on me if I'm missing something obvious. I'm a noob (FYI).
Asked
Active
Viewed 84 times
0
-
Seems pretty straightforward? Set the transfer mode to `IKScannerDeviceViewTransferModeMemoryBased`, implement the delegate and [this](https://developer.apple.com/library/mac/documentation/Quartz/Reference/IKScannerDeviceViewDelegate_Protocol/index.html#//apple_ref/occ/intfm/IKScannerDeviceViewDelegate/scannerDeviceView:didScanToURL:fileData:error:) method and you should be good to go. At least that's what I'm gathering from the docs, what exactly doesn't work? – JustSid May 15 '15 at 02:13
-
You can get available scanners via the `ICDeviceBrowser` class if that is the issue, `ICDeviceLocationTypeMaskLocal | ICDeviceLocationTypeMaskRemote | ICDeviceTypeMaskScanner` would be an appropriate mask to fetch scanners. – JustSid May 15 '15 at 02:15