How to manage custom DS data?

Scenario

Sometimes you might need to

  • Change multiple pre-scan settings at once
  • Make sure all clients with the same scanners are scanning documents with the same settings

In such cases, the custom DS data (CDD) can be very useful. Basically, CDD can be seen as the summary of all the settings for a data source (scanner driver) and it can be saved and passed around. To enable this useful feature, we have two methods implemented in the SDK: SetCustomDSDataEx and GetCustomDSDataEx.

To use this feature, the typical steps are

  1. Show the scanner's User Interface and change all the settings necessary
  2. Perform a scan and remember the CDD in the callback for the event OnPostAllTransfers
  3. As the CDD saved by the method GetCustomDSDataEx is a base64-encoded string, you can save it somewhere (the database on the server, for instance), or pass it around to other users.
  4. In the future, when you or any other user who need to scan with the same settings on the same device, you can hide its own Interface and simply use the method SetCustomDSDataEx to pass the CDD to the device.

A working sample can be found here.