Generating a TWAIN Debug Log

 

To help troubleshooting problems with various scanners and applications, the BiTwain.dll/ocx has a debug log feature that can be turned on using an INI file. The generated log file includes information about the set capabilities, and the communication between the scanner driver, the BiTwain.dll and the application. To turn on the logging, create a file with the name BiTwain.ini in the directory where the BiTwain.dll is located. Add the following lines to the created file:

 

[Twain]

Debug Log=C:\temp\BiTwain.log

 

Replace “C:\temp\BiTwain.log” with any path you would like to use as the log file path. Make sure the specified directory exists and the user running the application has permissions to write into the directory.

 

If the BiTwain.ini file already exists, add the “Debug Log=C:\temp\BiTwain.log” line to the existing [Twain] section in the file. Make sure the [Twain] section or the “Debug Log=” key is not duplicated in the file.

 

To turn off the debug logging, remove the “Debug Log=” key from the BiTwain.ini file, or delete the BiTwain.ini file completely.

 

The application must be restarted after changing the logging settings.