Search

Atalasoft Knowledge Base

HOWTO: Imprinting on the Kodak i1420/i1440 with DotTwain

Administrator
DotTwain

Note: This article is known to be accurate with the Kodak i1420/i1440 v9.68 TWAIN driver, which is the current latest release at the time of writing. However, custom capabilities vary between scanners and can vary between driver versions. Test all code thoroughly to make sure it works for your specific application. Be aware that this article is discussing specifications and functionality in a product Atalasoft has no control over and that can change without our knowledge.

This guide also assumes you have a working scanning project. If you do not I would suggest using the acquisition demo (source available through our Sample applications at https://www.atalasoft.com/Support/Sample-Applications#tabs-2 )

Do not try accessing any of these capabilities until after selecting and opening your scanner, ex:

if (this.device.TryOpen())
{
	... code here...
}

Once you've done that, you can go ahead and use these values.Set them anywhere before you call

this.device.Acquire();
//To start, make sure you've enabled the printer:
this.device.Controller.SetCapabilityValue(DeviceCapability.CAP_PRINTERENABLED, true); 

//For the i1420/i1440 it's only ImprinterEndorserType.ImprinterBottomAfter,
//but probably better to ask. Any scanners that don't support this will throw an exception here.
ImprinterEndorserType[] supportedPrinters = this.device.GetSupportedPrinters();

//I'm going to assume here that it only supports 1 or we want the first supported printer
this.device.Controller.SetCapabilityValue(DeviceCapability.CAP_PRINTER, (int)supportedPrinters[0]);  

/* Cap 0x8009 - Printing order
    * This is the interesting one. This maps to the list in the UI that chooses    * what you want to print in what order.
    * It's a 40 character string, left-to-right, with each entry being one of the supported values.
    * I'm going to use the same terminology as the UI when possible 
    * "F" = Date
    * "T" = Time
    * "C" = Counter
    * "S" = Message
    * "B" = Space (single white space)
    * "Z" = Nothing
    */

//Note, if you do not set this in your application or in the scanner UI nothing will print.
//This controls what available values are printed!
//This just prints a single given string (message)
this.device.Controller.SetCapabilityValue((DeviceCapability)0x8009, "SZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ");

//This prints Date (blank space) Time (blank space) Counter

/*
	this.device.Controller.SetCapabilityValue((DeviceCapability)0x8009, "FBTBCZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"); 
 */

/* Date Values - Print value "F"
    * Date and Time both use the read-only DeviceCapability.CAP_TIMEDATE by default.
    *
    * 0x8033 - Date format
    *  0 - MMDDYYYY
    *  1 - DDMMYYYY
    *  2 - YYYYMMDD
    *  
    * 0x801C - Date separator
    *  0 - None
    *  1 - Slash /
    *  2 - Hypen -
    *  3 - Period .
    *  4 - Space ( )
    * 
    * 0x80BC - Specific date string
    *  "" literally a string that gets printed when the "F" value is specified.
    */

//Let's print ISO 8601 dates, although you should use whatever makes sense for your process.
this.device.Controller.SetCapabilityValue((DeviceCapability)0x8033, 2);

//We'll use a hypen to separate
this.device.Controller.SetCapabilityValue((DeviceCapability)0x801C, 2); 
 
/* Time Values - Print value "T"
    * Date and Time both use the read-only DeviceCapability.CAP_TIMEDATE by default.
    *
    * 0x80BD - Specific time string
    *  "" literally a string that gets printed when the "T" value is specified.
    */
 
/* Counter Values - Print value "C"
    * 
    * CAP_PRINTERINDEX - Start value for counter
    *  0 is default
    * 
    * 0x801A - Display leading zeros
    *  0 - Yes, display all leading zeros  (000042)
    *  1 - Replace them with spaces        (    42)
    *  2 - Don't display                   (42)
    *  
    * 0x801B - Padding character length
    *  9 is default
    */
 
//We're going to start it at 42 (just to demonstrate picking up where an old job left off.)
this.device.Controller.SetCapabilityValue(DeviceCapability.CAP_PRINTERINDEX, 42);

//But only have a 6 character number (000042)
this.device.Controller.SetCapabilityValue((DeviceCapability)0x801B, 6); 
 
/* Message Values - Print value "S"
    * 
    * CAP_PRINTERSUFFIX - Message string
    *  "" literally a string that gets printed when the "S" value is specified.
 */
//Our string to print
this.device.Controller.SetCapabilityValue(DeviceCapability.CAP_PRINTERSUFFIX, "Batch - Run - ETC");

Q10370 - HOWTO: Imprinting on the Kodak i1420/i1440 with DotTwain

Details
Last Modified: 6 Years Ago
Last Modified By: Administrator
Type: HOWTO
Article not rated yet.
Article has been viewed 735 times.
Options
Also In This Category