You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
3.5 KiB
86 lines
3.5 KiB
#include "hpsclfam.gsd" // include the operating script
|
|
|
|
function BOOL IntializeDeviceProperties()
|
|
{
|
|
|
|
if(MODEL == "Hewlett-Packard ScanJet 6100C")
|
|
{
|
|
// Initialize valid resolution array
|
|
LONG ValidResolutions[7];
|
|
ValidResolutions[0] = 75;
|
|
ValidResolutions[1] = 100;
|
|
ValidResolutions[2] = 150;
|
|
ValidResolutions[3] = 200;
|
|
ValidResolutions[4] = 300;
|
|
ValidResolutions[5] = 600;
|
|
ValidResolutions[6] = 1200;
|
|
|
|
DeviceProperty.SetValidList(XRESOLUTION,ValidResolutions);
|
|
DeviceProperty.SetValidList(YRESOLUTION,ValidResolutions);
|
|
DeviceProperty.SetValidRange(XPOSITION,0,2549,2549,1);
|
|
DeviceProperty.SetCurrentValue(XPOSITION,0);
|
|
DeviceProperty.SetValidRange(YPOSITION,0,4199,4199,1);
|
|
DeviceProperty.SetCurrentValue(YPOSITION,0);
|
|
DeviceProperty.SetValidRange(XEXTENT,1,2550,1,1);
|
|
DeviceProperty.SetCurrentValue(XEXTENT,2550);
|
|
DeviceProperty.SetValidRange(YEXTENT,1,4200,1,1);
|
|
DeviceProperty.SetCurrentValue(YEXTENT,4200);
|
|
}
|
|
else
|
|
{
|
|
// Initialize valid resolution array
|
|
LONG ValidResolutions[6];
|
|
ValidResolutions[0] = 75;
|
|
ValidResolutions[1] = 100;
|
|
ValidResolutions[2] = 150;
|
|
ValidResolutions[3] = 200;
|
|
ValidResolutions[4] = 300;
|
|
ValidResolutions[5] = 600;
|
|
|
|
DeviceProperty.SetValidList(XRESOLUTION,ValidResolutions);
|
|
DeviceProperty.SetValidList(YRESOLUTION,ValidResolutions);
|
|
DeviceProperty.SetValidRange(XPOSITION,0,2549,2549,1);
|
|
DeviceProperty.SetCurrentValue(XPOSITION,0);
|
|
DeviceProperty.SetValidRange(YPOSITION,0,3506,3506,1);
|
|
DeviceProperty.SetCurrentValue(YPOSITION,0);
|
|
DeviceProperty.SetValidRange(XEXTENT,1,2550,1,1);
|
|
DeviceProperty.SetCurrentValue(XEXTENT,2550);
|
|
DeviceProperty.SetValidRange(YEXTENT,1,3507,1,1);
|
|
DeviceProperty.SetCurrentValue(YEXTENT,3507);
|
|
}
|
|
|
|
// common property settings
|
|
DeviceProperty.SetCurrentValue(XRESOLUTION, 150);
|
|
DeviceProperty.SetCurrentValue(YRESOLUTION, 150);
|
|
DeviceProperty.SetValidRange(BRIGHTNESS,-127,127,32,1);
|
|
DeviceProperty.SetCurrentValue(BRIGHTNESS,32);
|
|
DeviceProperty.SetValidRange(CONTRAST,-127,127,12,1);
|
|
DeviceProperty.SetCurrentValue(CONTRAST,12);
|
|
|
|
// Initialize valid data type array
|
|
LONG ValidDataTypes[3];
|
|
ValidDataTypes[0] = 0; // WIA_DATA_THRESHOLD
|
|
ValidDataTypes[1] = 2; // WIA_DATA_GRAYSCALE
|
|
ValidDataTypes[2] = 3; // WIA_DATA_COLOR
|
|
|
|
DeviceProperty.SetValidList(DATATYPE,ValidDataTypes)
|
|
DeviceProperty.SetCurrentValue(DATATYPE,2)
|
|
DeviceProperty.SetCurrentValue(BITDEPTH,8)
|
|
DeviceProperty.SetCurrentValue(NEGATIVE,1)
|
|
DeviceProperty.SetCurrentValue(PIXELORDER,0)
|
|
DeviceProperty.SetCurrentValue(PIXELFORMAT,1)
|
|
DeviceProperty.SetCurrentValue(BEDWIDTH,8500)
|
|
DeviceProperty.SetCurrentValue(BEDHEIGHT,11693)
|
|
DeviceProperty.SetCurrentValue(OPTICALX,300)
|
|
DeviceProperty.SetCurrentValue(OPTICALY,300)
|
|
DeviceProperty.SetCurrentValue(ADFSUPPORT,0)
|
|
DeviceProperty.SetCurrentValue(TPASUPPORT,0)
|
|
DeviceProperty.SetCurrentValue(ADFWIDTH,0)
|
|
DeviceProperty.SetCurrentValue(ADFHEIGHT,0)
|
|
DeviceProperty.SetCurrentValue(ADFVJUSTIFY,0)
|
|
DeviceProperty.SetCurrentValue(ADFHJUSTIFY,0)
|
|
DeviceProperty.SetCurrentValue(ADFMAXPAGES,30)
|
|
DeviceProperty.SetCurrentValue(FIRMWAREVER,"1.02a")
|
|
|
|
return TRUE;
|
|
}
|