Handling Template Files

Template files are used to store capability information for a specific TWAIN source. That way, the next time that TWAIN source is used, the corresponding template file can provide information on the capabilities used previously.

LEADTOOLS provides the following functions for working with template files:

 

Low Level

High Level

When a user acquires one or more images using the L_TwainAcquire function, the capability settings used for the TWAIN source can be saved in a template file. The next time the user wishes to use that TWAIN source he or she can open the template file saved previously, for read access, using L_TwainOpenTemplateFile. The L_TwainGetNumOfCapsInFile function will provide the number of capabilities stored in the template file. This information allows the user to loop through the stored capabilities using the L_TwainGetCapabilityFromFile function. As each capability is obtained, the user can set the capabilities for the TWAIN source using the L_TwainSetCapability function.