What is TWAIN on Macintosh today?

I am currently working on a project where we want to interact with TWAIN scanners on both PC (Windows) and Macintosh.

On Windows, we basically have everything squared, and the code successfully works with the vast majority of scanners.

On Mac OS X, we also have everything that works, and with the main scanner, which we used to develop the application with the work perfectly, but we do not have much luck with other scanners. As a by-product of the development of this project, we have many scanners from different manufacturers with which to test. The results vary greatly:

  • The scanner we used for development works fine on Mac OS X, like on Windows. Ironically, this scanner is the cheapest and crappiest scanner (in terms of speed) we have ever encountered, but it was a dream to work with.
  • Another scanner works fine - until the second or third scan, after which the application crashes without a clear indication of what happened (we get EXEC_BAD_ACCESS from the debugger)
  • The other scanner does not seem to have TWAIN support on Mac OS X (there are no data sources in the Image Capture / TWAIN Data Sources folder), although it does have TWAIN support on Windows.
  • Another scanner has a common data source, which, I believe, should cover all possible scanners of this manufacturer, but when we try to initiate our own scan (which is a requirement for all TWAIN data sources), we do not get any results, In addition, trying install a second scanner from this manufacturer, all this and you need to manually remove everything from this company.
  • Another scanner has a TWAIN data source, which seems to be specific to the manufacturer, but also cannot initiate its own scanning (but scanning using its own graphical interface, which is incompatible with our projects).

So I'm not sure where to go with this. I’m still digging in the code to find out that if something we’re doing wrong, but when checking for compliance with the TWAIN standard it really looks like we are doing everything right, but we become very hit - skip the results on most scanners we are testing.

Also, in the new Cocoa / Carbon Events model, this is an additional look at the β€œcallback” function that is supposed to be used in TWAIN data sources for Mac OS X, and I don’t see it called from most of these data sources / drivers.

So, all this makes me wonder - is it that we are just doing something wrong or is TWAIN simply not supported properly on the whole Macintosh?

I really do not see much information about TWAIN on Macintosh online - a random sporadic request at twainforum.org tends to go unanswered. Windows also has the name WIA - Windows Image Acquisition - and on the Windows side we also include this as an option. Is there anything else on the Mac that we should investigate instead of or in addition to TWAIN?

+4
source share
2 answers

You can try ImageCaptureCore.framework. But you need to make sure that the scanners of the company / model to which you provide the solution support ImageCapture. If any vendor provided support, then the ImageCapture module will be present at the location "/ Library / Image Capture / Devices". You can also check the plists inside the modules for supported models.

Hope this helps :-)

+3
source

All Articles