In AX 2009, I need to use the printer-scanner to scan documents.
How can I send command to scan document via dynamics AX?
Need some sample code, please.
If I produce some sample code, can you develop that into a solution?
I have found the easiest way to scan from within AX is to use WIA, or more specifically the WIA automation interface built into Windows. While there are some difference between versions of Windows (the most annoying being that duplex acquire is broken in WIA automation on Windows 7 and that it will never be fixed), it is the smallest amount of code that produces a reliable solution.
TWAIN by comparison requires heavy state management, and often is far less reliable especially between different pieces of hardware. TWAIN drivers are notoriously terrible on their support of the standard, and are almost universally buggy.
If you can get Windows to acquire an in-memory image of a document, then writing that to document handling (DocuRef/DocuValue) record is pretty easy.
If you take this approach, the result can be a very slick "one click" scanning solution that attaches the scanned image directly to whatever record you are focused on.
If you send me an e-mail address (by private conversation here on the Community website), I'll send you some projects by XPO to get you a leg up. Most of the stuff I have available at my fingertips is not suitable for public posting.
I have seen something on WIA.
but this is the only thing, and something that is not run on computer (windows 8, I persume).
Is there any changes between versions - I didn't find much information about that, and don't know if there are some hotfix or documents about.