RecAPI
|
This is the Scanner API of the KernelAPI. The Scanning Module is supported on: Windows. More...
Defines | |
#define | AUTOBRIGHTNESS SPEC_VAL |
Specifies automatic brightness control. | |
#define | RSDPP_TOLERANCE 120 |
Tolerance of standard paper sizes. | |
#define | SPEC_VAL ((UINT)INT_MAX) |
Special value (e.g. auto-brightness) | |
#define | INV_SPECID ((UINT)-1) |
Invalid specification ID. | |
#define | LAST_SPECID ((UINT)-2) |
Most recently used specification ID. | |
Typedefs | |
typedef enum RSDAF | RSDAF |
Application flags. | |
typedef enum RSDWZ | RSDWZ |
Wizard flags. | |
typedef enum RSDUI | RSDUI |
Display the driver's UI (G/S) | |
typedef enum RSDST | RSDST |
Start mode (G/S) | |
typedef enum RSDPS | RSDPS |
Paper source (G/S) | |
typedef enum RSDDX | RSDDX |
Duplex scanning (G/S) | |
typedef enum RSDDF | RSDDF |
Double feed detection. | |
typedef enum RSDRS | RSDRS |
Resolution (appropriate values) (G/S) | |
typedef enum RSDOR | RSDOR |
Orientation (G/S) | |
typedef enum RSDII | RSDII |
Image interpretation (G/S) | |
typedef enum RSDCI | RSDCI |
Color interpretation (G/S) | |
typedef enum RSDHT | RSDHT |
Halftone patterns (G) | |
typedef enum RSDLC | RSDLC |
Lamp or filter color (G/S) | |
typedef enum RSDCM | RSDCM |
Compression (G/S) | |
typedef enum RSDFS | RSDFS |
File types for scanning to/from file (G/S) | |
typedef enum RSDIN | RSDIN |
Indication during scanning (G/S) | |
typedef enum RSDAD | RSDAD |
Adjustable parameters (G) | |
typedef enum RSDAS | RSDAS |
ADF/transparency adapter status (G) | |
typedef enum RSDPP | RSDPP |
Standard paper sizes. | |
typedef enum RSDPO | RSDPO |
Orientation of paper. | |
Enumerations | |
enum | RSDAF { RSDAF_CHECKADF = 0x0001, RSDAF_SETUITOPMOST = 0x0002, RSDAF_PALETTESUPPORT = 0x0004, RSDAF_COMPRESSEDIMAGES = 0x0008, RSDAF_IMAGEFILES = 0x0010 } |
Application flags. More... | |
enum | RSDWZ { RSDWZ_TOPMOST = 0x0001, RSDWZ_SILENT = 0x0002, RSDWZ_SILENT_FORCED = 0x0004, RSDWZ_NOSAFEMODE = 0x0008, RSDWZ_STISELECT = 0x0010, RSDWZ_NOHINTEDITOR = 0x0020, RSDWZ_NOTESTS = 0x0040, RSDWZ_BASICTEST = 0x0080, RSDWZ_ADDITIONALTESTS = 0x0100, RSDWZ_SET_DEFAULT = 0x0200, RSDWZ_DONTSAVE_INIFILE = 0x0400, RSDWZ_SAVE_RSDII = 0x0800, RSDWZ_REMOTE = 0x1000, RSDWZ_OLD_WIZARD = 0x80000000 } |
Wizard flags. More... | |
enum | RSDUI { RSDUI_API = 0x0001, RSDUI_BASIC = 0x0002, RSDUI_ADVANCED = 0x0004, RSDUI_EXTENDED = 0x0008, RSDUI_AREA = 0x0010, RSDUI_CONFIG = 0x0040, RSDUI_ABOUT = 0x0080, RSDUI_KEEP = 0x0100, RSDUI_ONSCREEN = 0x0200, RSDUI_PENDING = 0x0400, RSDUI_CAP = 0x01FF } |
Display the driver's UI (G/S) More... | |
enum | RSDST { RSDST_IMMEDIATE = 0x0001, RSDST_UI_ALWAYS = 0x0010, RSDST_UI_SHOW = 0x0010, RSDST_UI_NEVER = 0x0020, RSDST_UI_HIDE = 0x0020, RSDST_UI_ONCE = 0x0040, RSDST_UI_KEEP = 0x0080 , RSDST_CAP = 0x0001, RSDST_CAPUI = 0x00F0 } |
Start mode (G/S) More... | |
enum | RSDPS { RSDPS_CAMERA = 0x0000, RSDPS_FLATBED = 0x0001, RSDPS_SHEETFEED = 0x0002, RSDPS_ADF_AUTO = 0x0004, RSDPS_TRANSP_AUTO = 0x0008, RSDPS_ADF = 0x0010, RSDPS_TRANSP = 0x0020, RSDPS_FLATBED_SPLIT = 0x20000, RSDPS_ADF_AUTOLOAD = 0x0100, RSDPS_ADF_SCANAHEAD = 0x0200, RSDPS_ADF_SCANAHEAD_PAUSE = 0x10000, RSDPS_ADF_REVERSEORDER = 0x0400, RSDPS_ADF_JOBSEPARATOR = 0x0800, RSDPS_ADFSTAT_AFTERSCAN = 0x1000, RSDPS_ADF_PRELOAD = 0x2000, RSDPS_ADF_UNLOAD = 0x4000, RSDPS_ADF_RELOAD = 0x8000, RSDPS_CAP = 0x003F, RSDPS_CAPAD = 0x0014, RSDPS_CAPTR = 0x0028, RSDPS_CAPLD = 0x0300, RSDPS_ACT = 0xE000 } |
Paper source (G/S) More... | |
enum | RSDDX { RSDDX_SINGLE = 0x0001, RSDDX_SIMPLEX = 0x0001, RSDDX_DUPLEX_PAGE = 0x0002, RSDDX_DUPLEX_BOOK = 0x0004, RSDDX_DUPLEX_FLIP_BOOK = 0x0010, RSDDX_DUPLEX_FLIP_TABLET = 0x0020, RSDDX_DUPLEX_MERGE = 0x0100, RSDDX_DUPLEX_MERGE_BOOK = 0x0100, RSDDX_DUPLEX_MERGE_TABLET = 0x0200, RSDDX_CAP = 0x0007, RSDDX_CAPFL = 0x0031, RSDDX_CAPMG = 0x0301, RSDDX_CAPALL = 0x0337 } |
Duplex scanning (G/S) More... | |
enum | RSDDF { RSDDF_NONE = 0x00000000, RSDDF_LENGTH_LOW = 0x00010000, RSDDF_LENGTH_NORMAL = 0x00020000, RSDDF_LENGTH_HIGH = 0x00040000, RSDDF_LENGTH_VALUE = 0x00080000, RSDDF_THICKNESS_LOW = 0x00100000, RSDDF_THICKNESS_NORMAL = 0x00200000, RSDDF_THICKNESS_HIGH = 0x00400000, RSDDF_THICKNESS_VALUE = 0x00800000, RSDDF_CAP = 0x00FF0000, RSDDF_CAPL = 0x000F0000, RSDDF_CAPT = 0x00F00000, RSDDF_VAL = 0x0000FFFF } |
Double feed detection. More... | |
enum | RSDRS { RSDRS_75 = 0x00000001, RSDRS_100 = 0x00000002, RSDRS_150 = 0x00000004, RSDRS_200 = 0x00000008, RSDRS_240 = 0x00000010, RSDRS_300 = 0x00000020, RSDRS_400 = 0x00000040, RSDRS_500 = 0x00000080, RSDRS_600 = 0x00000100, RSDRS_800 = 0x00000200, RSDRS_1200 = 0x00000400, RSDRS_1600 = 0x00000800, RSDRS_2400 = 0x00001000, RSDRS_3200 = 0x00002000, RSDRS_4800 = 0x00004000, RSDRS_6400 = 0x00008000, RSDRS_9600 = 0x00010000, RSDRS_CAP = 0x0001FFFF } |
Resolution (appropriate values) (G/S) More... | |
enum | RSDOR { RSDOR_NORMAL = 0x0001, RSDOR_MIRROR = 0x0002, RSDOR_ROTATE90 = 0x0004, RSDOR_ROTATE180 = 0x0008, RSDOR_ROTATE270 = 0x0010, RSDOR_AUTO = 0x0020, RSDOR_CAPROT = 0x001D, RSDOR_CAP = 0x003F } |
Orientation (G/S) More... | |
enum | RSDII { RSDII_BW = 0x0001, RSDII_HT = 0x0002, RSDII_GRAY4 = 0x0004, RSDII_GRAY8 = 0x0008, RSDII_COLOR1 = 0x0010, RSDII_COLORHT = 0x0020, RSDII_COLOR4 = 0x0040, RSDII_COLOR8 = 0x0080 , RSDII_PACKED = 0x1000, RSDII_BYTES = 0x2000, RSDII_LINES = 0x4000, RSDII_PAGES = 0x8000, RSDII_CAP = 0x01FF, RSDII_CAPPIX = 0xF000 } |
Image interpretation (G/S) More... | |
enum | RSDCI { RSDCI_BLACK0 = 0x0001, RSDCI_WHITE0 = 0x0002, RSDCI_MSBFIRST = 0x0004, RSDCI_LSBFIRST = 0x0008, RSDCI_RGB = 0x0010, RSDCI_CMY = 0x0020, RSDCI_CMYK = 0x0040, RSDCI_YUV = 0x0080, RSDCI_YUVK = 0x0100, RSDCI_CIEXYZ = 0x0200, RSDCI_PALETTE = 0x0400, RSDCI_CAPBW = 0x0003, RSDCI_CAPML = 0x000C, RSDCI_CAP = 0x07F0 } |
Color interpretation (G/S) More... | |
enum | RSDHT { RSDHT_NONE = 0x0000, RSDHT_SIZE = 0x000F, RSDHT_ERRDIFF = 0x0010, RSDHT_BAYER = 0x0020, RSDHT_SPIRAL = 0x0040, RSDHT_FATTING = 0x0080, RSDHT_HORIZONTAL = 0x0100, RSDHT_VERTICAL = 0x0200, RSDHT_DIAGONAL = 0x0400, RSDHT_NETSCREEN = 0x0800 } |
Halftone patterns (G) More... | |
enum | RSDLC { RSDLC_WHITE = 0x0001, RSDLC_RED = 0x0002, RSDLC_GREEN = 0x0004, RSDLC_BLUE = 0x0008, RSDLC_CYAN = 0x0010, RSDLC_MAGENTA = 0x0020, RSDLC_YELLOW = 0x0040, RSDLC_CAP = 0x007F } |
Lamp or filter color (G/S) More... | |
enum | RSDCM { RSDCM_NO = 0x00000000, RSDCM_RAW = 0x00000001, RSDCM_PACKBITS = 0x00000002, RSDCM_CCITTG31DNE = 0x00000004, RSDCM_CCITTG31D = 0x00000008, RSDCM_CCITTG32D = 0x00000010, RSDCM_CCITTG4 = 0x00000020, RSDCM_LZW = 0x00000040, RSDCM_JPEG = 0x00000080, RSDCM_ZIP = 0x00000100, RSDCM_PCX = 0x00000200, RSDCM_BMP = 0x00000400, RSDCM_RLE4 = 0x00000800, RSDCM_RLE8 = 0x00001000, RSDCM_BITFIELDS = 0x00002000, RSDCM_JBIG = 0x00008000, RSDCM_GIF = 0x00010000, RSDCM_PICT = 0x00020000, RSDCM_PNG = 0x00200000, RSDCM_JPEG2000 = 0x02000000 , RSDCM_FILE = 0x80000000, RSDCM_CAP = 0x0223FFFF, RSDCM_BW = 0x0023877F, RSDCM_GRAY4 = 0x00238F43, RSDCM_GRAY8 = 0x022317C3, RSDCM_COLOR1 = 0x00000000, RSDCM_COLOR4 = 0x00000000, RSDCM_COLOR8 = 0x022327C3 } |
Compression (G/S) More... | |
enum | RSDFS { RSDFS_NO = 0x00000000, RSDFS_TIFF = 0x00000001, RSDFS_TIFF_PACKBITS = 0x00000002, RSDFS_TIFF_G31DNE = 0x00000004, RSDFS_TIFF_G31D = 0x00000008, RSDFS_TIFF_G32D = 0x00000010, RSDFS_TIFF_G4 = 0x00000020, RSDFS_TIFF_LZW = 0x00000040, RSDFS_TIFF_JPEG = 0x00000080, RSDFS_TIFF_ZIP = 0x00000100, RSDFS_PCX = 0x00000200, RSDFS_BMP = 0x00000400, RSDFS_BMP_RLE4 = 0x00000800, RSDFS_BMP_RLE8 = 0x00001000, RSDFS_JPEG = 0x00002000, RSDFS_WMF = 0x00004000, RSDFS_JBIG = 0x00008000, RSDFS_GIF = 0x00010000, RSDFS_PICT = 0x00020000, RSDFS_XBM = 0x00040000, RSDFS_JFIF = 0x00080000, RSDFS_FPX = 0x00100000, RSDFS_PNG = 0x00200000, RSDFS_SPIFF = 0x00400000, RSDFS_EXIF = 0x00800000, RSDFS_DCX = 0x01000000, RSDFS_JPEG2000 = 0x02000000, RSDFS_PDF = 0x04000000, RSDFS_EMF = 0x08000000, RSDFS_MULTIPAGE = 0x40000000, RSDFS_READ = 0x80000000, RSDFS_CAP = 0xCFFFFFFF, RSDFS_CAPMULTI = 0x050001FF, RSDFS_BW = 0x4DE7C77F, RSDFS_GRAY4 = 0x4DE3CF43, RSDFS_GRAY8 = 0x4FFB77C3, RSDFS_COLOR1 = 0x00000000, RSDFS_COLOR4 = 0x00000000, RSDFS_COLOR8 = 0x4FFB67C3 } |
File types for scanning to/from file (G/S) More... | |
enum | RSDIN { RSDIN_NO = 0x0000, RSDIN_PROGRESS = 0x0001, RSDIN_IMAGE = 0x0002, RSDIN_CAP = 0x0003, RSDIN_MIN_LINE = 0x0000, RSDIN_MIN_64K = 0x0100, RSDIN_MIN_IMG = 0x0200, RSDIN_MIN = 0x0300, RSDIN_OPT_LINE = 0x0000, RSDIN_OPT_64K = 0x0400, RSDIN_OPT_IMG = 0x0800, RSDIN_OPT = 0x0C00, RSDIN_TIMEOUT = 0x1000 } |
Indication during scanning (G/S) More... | |
enum | RSDAD { RSDAD_RESOLUTION = 0x0001, RSDAD_PAPERSIZE = 0x0002, RSDAD_AUTOPAPERSIZE = 0x0004, RSDAD_MARGINS = 0x0008, RSDAD_BRIGHTNESS = 0x0010, RSDAD_AUTOBRIGHTNESS = 0x0020, RSDAD_CONTRAST = 0x0040, RSDAD_AUTOCONTRAST = 0x0080, RSDAD_MIDTONE = 0x0100 , RSDAD_LAMPCOLOR = 0x0400, RSDAD_SCAN2FILEONLY = 0x0800, RSDAD_UI_SHOW = 0x1000, RSDAD_UI_HIDE = 0x2000, RSDAD_SCANPARAMFILE = 0x4000, RSDAD_IMPRINTER = 0x8000 } |
Adjustable parameters (G) More... | |
enum | RSDAS { , RSDAS_ADF_EMPTY, RSDAS_ADF_READY, RSDAS_ADF_JOBSEPARATOR, RSDAS_BACKSIDE_READY, RSDAS_TRANSP_NOTREADY, RSDAS_TRANSP_READY, RSDAS_NOTCONNECTED, RSDAS_COVEROPEN, RSDAS_ADF_PAPERJAM, RSDAS_ADF_DOUBLEFEED, RSDAS_ADF_BOTHLOADED, RSDAS_SPLIT_READY } |
ADF/transparency adapter status (G) More... | |
enum | RSDPP { , RSDPP_AUTO = -3, RSDPP_CUSTOM = -2, RSDPP_SCNMAX = -1, RSDPP_A0 = 0, RSDPP_A1, RSDPP_A2, RSDPP_A3, RSDPP_A4, RSDPP_A5, RSDPP_A6, RSDPP_A7, RSDPP_A8, RSDPP_B0, RSDPP_B1, RSDPP_B2, RSDPP_B3, RSDPP_B4, RSDPP_B5, RSDPP_B6, RSDPP_B7, RSDPP_B8, RSDPP_C0, RSDPP_C1, RSDPP_C2, RSDPP_C3, RSDPP_C4, RSDPP_C5, RSDPP_C6, RSDPP_C7, RSDPP_C8, RSDPP_C65, RSDPP_C76, RSDPP_DL, RSDPP_B0JIS, RSDPP_B1JIS, RSDPP_B2JIS, RSDPP_B3JIS, RSDPP_B4JIS, RSDPP_B5JIS, RSDPP_B6JIS, RSDPP_B7JIS, RSDPP_B8JIS, RSDPP_A, RSDPP_B, RSDPP_C, RSDPP_D, RSDPP_E, RSDPP_STATEMENT, RSDPP_INVOICE, RSDPP_EXECUTIVE, RSDPP_LETTER, RSDPP_FOLIO, RSDPP_LEGAL, RSDPP_LEDGER, RSDPP_TABLOID, RSDPP_DLETTER, RSDPP_PERSONAL, RSDPP_MONARCH, RSDPP_COM9, RSDPP_COM10, RSDPP_COM11, RSDPP_COM12, RSDPP_COM14, RSDPP_COUPON, RSDPP_USBCARD, RSDPP_BCARD, RSDPP_JBCARD, RSDPP_USCHECK, RSDPP_PCHECK, RSDPP_BCHECK } |
Standard paper sizes. More... | |
enum | RSDPO { RSDPO_PORTRAIT = 1, RSDPO_LANDSCAPE = 2 } |
Orientation of paper. More... | |
Functions | |
RECERR RECAPIKRN | kRecScanInit (HWND hWnd, LPCTSTR pScanIni, int iIniLoc, LPCTSTR pISISCustID) |
Initializing the scanning subsystem. | |
RECERR RECAPIKRN | kRecScanQuit (void) |
Closing the scanning subsystem. | |
RECERR RECAPIKRN | kRecScannerWizard (HWND hWnd, LPCTSTR pProduct) |
Opening Scanner Wizard. | |
RECERR RECAPIKRN | kRecScannerWizardByName (HWND hWnd, LPCTSTR pScanner, LPCTSTR pProduct, INTBOOL bSilent) |
Opening the Scanner Wizard for a given scanner. | |
RECERR RECAPIKRN | kRecGetAllScanners (int *pNum, LPCTSTR *pScanners) |
Getting all available scanners. | |
RECERR RECAPIKRN | kRecGetScanners (int sid, int *pNum, LPCTSTR *pScanners) |
Getting all initialized scanners. | |
RECERR RECAPIKRN | kRecDeleteScannerNames (LPCTSTR pScanners) |
Deleting scanner name buffer. | |
RECERR RECAPIKRN | kRecSetScannerSelected (int sid, LPCTSTR pScanner, LPINTBOOL pCallWiz) |
Selecting a scanner. | |
RECERR RECAPIKRN | kRecGetScannerSelected (int sid, LPCTSTR *pScanner) |
Getting the current scanner. | |
RECERR RECAPIKRN | kRecGetScanner (int sid, LPCTSTR *pScanner) |
Getting the installed scanner. | |
RECERR RECAPIKRN | kRecGetScannerManufacturer (int sid, LPTSTR pManufacturer, size_t iSize) |
Getting scanner manufacturer. | |
RECERR RECAPIKRN | kRecGetScannerModel (int sid, LPTSTR pModel, size_t iSize) |
Getting scanner model. | |
RECERR RECAPIKRN | kRecGetScannerVersion (int sid, LPTSTR pVersion, size_t buflen) |
Getting scanner version. | |
RECERR RECAPIKRN | kRecReserveScanner (int sid) |
Reserving the selected scanner. | |
RECERR RECAPIKRN | kRecReleaseScanner (int sid) |
Releasing a reserved scanner. | |
RECERR RECAPIKRN | kRecCheckScannerInterface (int sid) |
Checking availability of the interface of the selected scanner. | |
RECERR RECAPIKRN | kRecCheckScannerReady (int sid) |
Checking readiness of the selected scanner. | |
RECERR RECAPIKRN | kRecResetScanner (int sid) |
Resetting the selected scanner. | |
RECERR RECAPIKRN | kRecSetScanDefaults (int sid) |
Setting scanner parameters to default. | |
RECERR RECAPIKRN | kRecSetScanParamsBySettings (int sid) |
Sending the setting values to the scanning subsystem. | |
RECERR RECAPIKRN | kRecGetScanStartModeCapa (int sid, RSDST *pStart) |
Getting starting mode capabilities. | |
RECERR RECAPIKRN | kRecSetScanStartMode (int sid, RSDST Start) |
Setting starting mode. | |
RECERR RECAPIKRN | kRecGetScanStartMode (int sid, RSDST *pStart) |
Getting starting mode. | |
RECERR RECAPIKRN | kRecGetScanPaperSourceCapa (int sid, RSDPS *pSource) |
Getting paper source capabilities. | |
RECERR RECAPIKRN | kRecSetScanPaperSource (int sid, RSDPS PaperSource) |
Setting paper source. | |
RECERR RECAPIKRN | kRecGetScanPaperSource (int sid, RSDPS *pSource) |
Getting paper source. | |
RECERR RECAPIKRN | kRecScanPreloadADF (int sid) |
Preloading the ADF. | |
RECERR RECAPIKRN | kRecScanUnloadADF (int sid) |
Unloading the ADF. | |
RECERR RECAPIKRN | kRecScanReloadADF (int sid) |
Reloading the ADF. | |
RECERR RECAPIKRN | kRecGetScanDuplexCapa (int sid, RSDDX *pDuplex) |
Getting duplex scanning capabilities. | |
RECERR RECAPIKRN | kRecSetScanDuplex (int sid, RSDDX Duplex) |
Setting duplex scanning mode. | |
RECERR RECAPIKRN | kRecGetScanDuplex (int sid, RSDDX *pDuplex) |
Getting duplex scanning mode. | |
RECERR RECAPIKRN | kRecGetScanResolutionCapa (int sid, RSDRS *pResolCapa) |
Getting resolution capabilities. | |
RECERR RECAPIKRN | kRecSetScanResolution (int sid, UINT Resolution) |
Setting resolution. | |
RECERR RECAPIKRN | kRecGetScanResolution (int sid, UINT *pResolution) |
Getting resolution. | |
RECERR RECAPIKRN | kRecGetScanStandardPaperSize (RSDPP Paper, LPSIZE pSize) |
Getting standard paper size. | |
RECERR RECAPIKRN | kRecGetScannerSize (int sid, LPSIZE pSize) |
Getting maximum scanning area size. | |
RECERR RECAPIKRN | kRecGetScannerFlatbedSize (int sid, LPSIZE pSize) |
Getting flat-bed size. | |
RECERR RECAPIKRN | kRecGetScannerADFSize (int sid, LPSIZE pSize) |
getting ADF size | |
RECERR RECAPIKRN | kRecGetScannerTransparencySize (int sid, LPSIZE pSize) |
Getting transparency unit size. | |
RECERR RECAPIKRN | kRecGetPaperSizesSupported (int sid, size_t *pSize, RSDPP *PaperSizes, RSDPO *Orientations, RSDPS PaperSource) |
Retrieving a list of standard paper sizes supported by the scanner. | |
RECERR RECAPIKRN | kRecIsScanPaperSizeSupported (int sid, RSDPP PaperSize, INTBOOL Portrait, RSDPS PaperSource, LPINTBOOL pSupp) |
Checking paper size support. | |
RECERR RECAPIKRN | kRecSetScanPaperSize (int sid, LPCSIZE pPaperSize) |
Setting paper size. | |
RECERR RECAPIKRN | kRecGetScanPaperSize (int sid, LPSIZE pPaperSize) |
Getting paper size. | |
RECERR RECAPIKRN | kRecSetScanArea (int sid, LPCRECT pRect) |
Setting scanning area. | |
RECERR RECAPIKRN | kRecGetScanArea (int sid, LPRECT pRect) |
Getting scanning area. | |
RECERR RECAPIKRN | kRecGetScanOrientationCapa (int sid, RSDOR *pOrientation) |
Getting orientation capabilities. | |
RECERR RECAPIKRN | kRecSetScanOrientation (int sid, RSDOR Orientation) |
Setting orientation. | |
RECERR RECAPIKRN | kRecGetScanOrientation (int sid, RSDOR *pOrientation) |
Getting orientation. | |
RECERR RECAPIKRN | kRecGetScanAutoBrightnessCapa (int sid, LPINTBOOL bAuto) |
Getting automatic brightness control capability. | |
RECERR RECAPIKRN | kRecGetScanBrightnessMaxVal (int sid, UINT *pBrMax) |
Getting number of brightness steps. | |
RECERR RECAPIKRN | kRecGetScanBrightnessDefVal (int sid, UINT *pBrDef) |
Getting default brightness. | |
RECERR RECAPIKRN | kRecSetScanBrightnessVal (int sid, UINT Brightness) |
Setting brightness. | |
RECERR RECAPIKRN | kRecGetScanBrightnessVal (int sid, UINT *pBrightness) |
Getting brightness. | |
RECERR RECAPIKRN | kRecSetScanBrightness (int sid, UINT Brightness) |
Setting brightness in %. | |
RECERR RECAPIKRN | kRecGetScanBrightness (int sid, UINT *pBrightness) |
Getting brightness in %. | |
RECERR RECAPIKRN | kRecGetScanContrastMaxVal (int sid, UINT *pCrMax) |
Getting number of contrast steps. | |
RECERR RECAPIKRN | kRecGetScanContrastDefVal (int sid, UINT *pCrDef) |
Getting default of contrast. | |
RECERR RECAPIKRN | kRecSetScanContrastVal (int sid, UINT Contrast) |
Setting contrast. | |
RECERR RECAPIKRN | kRecGetScanContrastVal (int sid, UINT *pContrast) |
Getting contrast. | |
RECERR RECAPIKRN | kRecSetScanContrast (int sid, UINT Contrast) |
Setting contrast in %. | |
RECERR RECAPIKRN | kRecGetScanContrast (int sid, UINT *pContrast) |
Getting contrast in %. | |
RECERR RECAPIKRN | kRecGetScanBitsPerSampleCapa (int sid, RSDII *pBps) |
Getting scanning mode capabilities. | |
RECERR RECAPIKRN | kRecSetScanBitsPerSample (int sid, RSDII Bps) |
Setting scanning mode. | |
RECERR RECAPIKRN | kRecGetScanBitsPerSample (int sid, RSDII *pBps) |
Getting scanning mode. | |
RECERR RECAPIKRN | kRecGetScanDropoutCapa (int sid, RSDLC *pColor) |
Getting dropout color capabilities. | |
RECERR RECAPIKRN | kRecSetScanDropout (int sid, RSDLC Color) |
Setting dropout color. | |
RECERR RECAPIKRN | kRecGetScanDropout (int sid, RSDLC *pColor) |
Getting dropout color. | |
RECERR RECAPIKRN | kRecGetScanAdjustCapa (int sid, RSDAD *pAdjust) |
Getting adjustable capabilities. | |
RECERR RECAPIKRN | kRecGetScanADF (int sid, RSDAS *pAdf) |
Getting ADF status. | |
RECERR RECAPIKRN | kRecSetScanErrorMode (int sid, INTBOOL Ignore) |
Setting error mode. | |
RECERR RECAPIKRN | kRecGetScanErrorMode (int sid, INTBOOL *pIgnore) |
Getting error mode. | |
RECERR RECAPIKRN | kRecSetScanParamSource (int sid, INTBOOL FromScanner) |
Setting the source of parameters. | |
RECERR RECAPIKRN | kRecGetScanParamSource (int sid, INTBOOL *pFromScanner) |
Getting the source of parameters. | |
RECERR RECAPIKRN | kRecScanPage (int sid, LPCTSTR pImgFile, IMF_FORMAT ImgFileFormat) |
Scanning a page. | |
RECERR RECAPIKRN | kRecScanPages (int sid, LPCTSTR pImgFile, IMF_FORMAT ImgFileFormat, LPONETOUCH_CB pCallBack, void *pContext) |
Scanning pages. | |
Location of the scanner initialization file | |
See kRecScanInit. | |
#define | SCINI_APPDATA 0 |
In the user's data folder of the application. | |
#define | SCINI_COMMAPPDATA 1 |
In the common data folder of the application. | |
#define | SCINI_INSTALL 2 |
Among executable binaries in the install folder. | |
#define | SCINI_CURRENT 3 |
In the current working folder. | |
#define | SCINI_ROAMINGAPPDATA 4 |
In the user's roaming data folder of the application. |
This is the Scanner API of the KernelAPI. The Scanning Module is supported on: Windows.
When scanning is required, the Engine's scanning subsystem must be initialized separately. The reason for this additional initialization is that the scanning subsystem can work on its own without the recognition or other non-essential modules. It supports a wide selection of scanner models through TWAIN or WIA.
There is no point in initializing the scanning subsystem if there is no working scanner connected to the computer.
Preparing the scanning subsystem for scanning requires the following steps:
Note that the Scanner Setup Wizard resides in a DLL, though it can also be launched through the SCANNERWIZARD.EXE executable. For the command-line options of this executable, launch it as follows:
SCANNERWIZARD.EXE /?
The Scanner Setup Wizard supports a wide range of popular scanner models. For a list of the extensively tested supported scanners, please visit http://support.nuance.com/compatibility page. Of course, if your hardware is not listed you may still be able to use it with your CSDK, because this is not a full listing. You can update your scanning system through the Wizard by downloading a hint file from the Internet.
To initiate a scanning session, call the initializing kRecScanInit
function, to terminate the running of the scanning subsystem call the kRecScanQuit function. The first parameter of the kRecScanInit function must contain the window handle of the main window of the integrating application. For details, code sample and backward compatibility, see the notes in kRecScanInit.
Both the Scanner Setup Wizard and the entire scanning subsystem can be distributed along with your integrating application. For further information, see the topic Distributing applications in the General Information help system.
After having initialized the scanning subsystem and adjusting particular scanning parameters (if required), the application uses the function kRecLoadImg with the special HIMGFILE value IMGF_SCANNER. Of course, this special handle requires neither opening (kRecOpenImgFile
) nor closing (kRecCloseImgFile
). The Engine causes the scanner to scan the page (or part of it) and loads the image from the scanner into an HPAGE.
Since scanner models differ in capabilities and in possible parameter values, before you modify a parameter, you can retrieve the settings supported by the given scanner and the range of each of the settings. For example, you can retrieve the supported resolutions, whether the scanner supports color scanning, dropout colors or what the size of the maximum scanning area is (e.g. kRecGetScanBitsPerSampleCapa or kRecGetScanResolutionCapa). Once the application is aware of the scanning capabilities of the installed scanner driver/type, the application can adjust or learn the current scanning parameter settings by accessing the kRecSetScan*
and kRecGetScan*
functions, respectively.
One of the most important settings specifies what kind of image the scanner must provide, i.e. whether the image output from the scanner should be B/W, grayscale or color. This setting can be specified through the kRecSetScanBitsPerSample function.
The brightness and the contrast parameters can be set either relatively as percentages, or by using the scanner’s native values. To work with native values, the maximum setting values for the given scanner model can be acquired with the functions kRecGetScanBrightnessMaxVal and kRecGetScanContrastMaxVal. Since a few scanners do not support brightness/contrast settings, these two functions can also be used for checking these scanner capabilities.
To set the absolute parameter values, use the kRecSetScanBrightnessVal and kRecSetScanContrastVal functions. To set the percentage values, use kRecSetScanBrightness and kRecSetScanContrast.
The settings of the Scanning Module may be adjusted through the Settings Manager Module as well. All previously selected scanners and the currently selected one have an individual setting subtree under the node Scanners
. For example, the scanner XXX
has the subtree Scanners.XXX^
(the string XXX^
is created from XXX
and may differ from XXX
in some special character, below we refer the sign ^
to the name of the node created from the real name of the scanner). These settings can be adjusted directly through the Settings Manager Module or settings for the currently selected scanner can be adjusted indirectly through the functions kRecSetScan*
. For example, the brightness can be accessed through Scanners.XXX^.Brightness
or kRecSetScanBrightness.
Another way to use the settings of the selected scanner is the symbolic link setting Kernel.Scanner
. This setting contains the name of the root node of the selected scanner (see kRecSetScannerSelected). Furthermore, this is the root of the setting subtree made up of reference settings pointing onto the proper settings of the selected scanner. In detail, if the selected scanner is the XXX
, the above-mentioned setting Scanners.XXX^.Brightness
can be accessed also through Kernel.Scanner.Brightness
. Using this reference or the function kRecSetScanBrightness
is recommended rather than the direct way, because if the selected scanner is changed say to YYY
they will access the setting Scanners.YYY^.Brightness
as expected. See also the description of Symbolic links.
Because these reference settings may refer to different real settings at different times, there is no point in saving their values. Instead of this, the values of the real settings should be saved/loaded.
The function kRecSetScannerSelected modifies the value of the settings Kernel.Scanner
, Kernel.Scanner.Name
, Scanners
and builds up the setting subtree of the currently selected scanner (if it does not exist yet), which will be under the Scanners
node. The value of Kernel.Scanner
will be the name of the node of the selected scanner (e.g. Scanners.XXX^
). The value of Kernel.Scanner.Name
and Scanners
will be the real name (i.e. XXX
) of the selected scanner. Thus, it does make sense to save the value of the setting Scanners
, and after a load, passing its value to kRecSetScannerSelected for selecting the same scanner that was used at saving.
I.e. the function kRecSetScannerSelected
requires the real name of the scanner!
kRecSetScan*) sets the same new value both in the setting and in the scanning system.
See also
.Settings of the Scanner Module
Example
Simplified scanner interaction (see also Sample 21)
int sid = 0; RECERR rc; HWND hwnd; HPAGE hPage; RSDAS adf; RSDLC colorcapa; RSDII bpscapa; // Preferred settings for scanning: RSDLC dropout_color = RSDLC_RED; RSDII bps = RSDII_GRAY8; BOOL bNativeUIEnabled = FALSE; . . . rc = kRecScanInit(hwnd, NULL, SCINI_APPDATA, NULL); rc = kRecSetScannerSelected( sid, NULL, NULL ); . . . rc = kRecGetScanBitsPerSampleCapa(sid, &bpscapa); if (bpscapa == 0) { bNativeUIEnabled = TRUE; // The scanner's native UI is enabled. // Could not determine the scanner's capability } else { bps = (bpscapa & bps) ? RSDII_GRAY8 : RSDII_BW; } rc = kRecSetScanBitsPerSample(sid, bps); if (!bNativeUIEnabled) { rc = kRecGetScanDropoutCapa(sid, &colorcapa); if (colorcapa & dropout_color) { rc = kRecSetScanDropout(sid, dropout_color); printf("Dropout scanning will be used"); } } do { rc = kRecLoadImg(sid, IMGF_SCANNER, &hPage, 0); . . . // the image is processed here . . . rc = kRecFreeImg(hPage); rc = kRecGetScanADF(sid, &adf); } while (adf == RSDAS_ADF_READY || adf == RSDAS_BACKSIDE_READY); . . . rc = kRecScanQuit(); . . .
The program fragment above retrieves the scanner's scanning mode and dropout color capabilities and, if available, specifies RED as the dropout color. The actual scanning happens during the kRecLoadImg call. The kRecGetScanADF call in the do-while-loop is used to learn whether the Automatic Document Feeder (ADF) contains further pages or is empty.
IMPORTANT: During scanning the integrating application should disable all functionalities that can interfere with the scanning. For example, the application should not allow the user to terminate it by any means.
The whole scanning module is now thread safe, so it is possible to initiate two scanning processes in parallel, using two scanners. Calls from two different threads to a single scanner are queued.
Settings of the Scanning Module
Standard paper sizes
Application flags.
Color interpretation (G/S)
RSDCI_BLACK0
and RSDCI_WHITE0
,RSDCI_MSBFIRST
and RSDCI_LSBFIRST
,RSDCI_RGB
to RSDCI_PALETTE
.RSDPS_CAP...
Compression (G/S)
Double feed detection.
Some scanners are able to detect if the ADF fed two pages at once. There are two methods to detect this situation: by length and by thickness. The return status of the scanning function may reflect this kind of error.
Duplex scanning (G/S)
RSDDX_SINGLE
or RSDDX_SIMPLEX
(these are synonyms),RSDDX_DUPLEX_PAGE
and RSDDX_DUPLEX_BOOK
,RSDDX_DUPLEX_FLIP_BOOK
and RSDDX_DUPLEX_FLIP_TABLET
,RSDDX_DUPLEX_MERGE_BOOK
and RSDDX_DUPLEX_MERGE_TABLET
.RSDDX_CAP...
. File types for scanning to/from file (G/S)
Image interpretation (G/S)
RSDII_BW
to RSDII_COLOR8
,RSDII_PACKED
to RSDII_PAGES
.RSDII_CAP...
Standard paper sizes.
RSDPP_A0
to RSDPP_C8
,RSDPP_...JIS
,RSDPP_A
to RSDPP_E
,RSDPP_STATEMENT
to RSDPP_DLETTER
,RSDPP_PERSONAL
to RSDPP_COM14
,RSDPP_COUPON
to RSDPP_BCHECK
. Paper source (G/S)
RSDPS_CAMERA
to RSDPS_TRANSP
,RSDPS_FLATBED_SPLIT
,RSDPS_ADF_AUTOLOAD
to RSDPS_ADFSTAT_AFTERSCAN
,RSDPS_ADF_PRELOAD
to RSDPS_ADF_RELOAD
.RSDPS_CAP...
and RSDPS_ACT
. Start mode (G/S)
RSDST_IMMEDIATE
,RSDST_UI_...
RSDST_CAP...
Wizard flags.
enum RSDAD |
Adjustable parameters (G)
enum RSDAF |
Application flags.
enum RSDAS |
ADF/transparency adapter status (G)
enum RSDCI |
Color interpretation (G/S)
RSDCI_BLACK0
and RSDCI_WHITE0
,RSDCI_MSBFIRST
and RSDCI_LSBFIRST
,RSDCI_RGB
to RSDCI_PALETTE
.RSDPS_CAP...
enum RSDCM |
Compression (G/S)
enum RSDDF |
Double feed detection.
Some scanners are able to detect if the ADF fed two pages at once. There are two methods to detect this situation: by length and by thickness. The return status of the scanning function may reflect this kind of error.
enum RSDDX |
Duplex scanning (G/S)
RSDDX_SINGLE
or RSDDX_SIMPLEX
(these are synonyms),RSDDX_DUPLEX_PAGE
and RSDDX_DUPLEX_BOOK
,RSDDX_DUPLEX_FLIP_BOOK
and RSDDX_DUPLEX_FLIP_TABLET
,RSDDX_DUPLEX_MERGE_BOOK
and RSDDX_DUPLEX_MERGE_TABLET
.RSDDX_CAP...
. enum RSDFS |
File types for scanning to/from file (G/S)
enum RSDHT |
enum RSDII |
Image interpretation (G/S)
RSDII_BW
to RSDII_COLOR8
,RSDII_PACKED
to RSDII_PAGES
.RSDII_CAP...
enum RSDIN |
Indication during scanning (G/S)
enum RSDLC |
Lamp or filter color (G/S)
enum RSDOR |
enum RSDPO |
enum RSDPP |
Standard paper sizes.
RSDPP_A0
to RSDPP_C8
,RSDPP_...JIS
,RSDPP_A
to RSDPP_E
,RSDPP_STATEMENT
to RSDPP_DLETTER
,RSDPP_PERSONAL
to RSDPP_COM14
,RSDPP_COUPON
to RSDPP_BCHECK
. enum RSDPS |
Paper source (G/S)
RSDPS_CAMERA
to RSDPS_TRANSP
,RSDPS_FLATBED_SPLIT
,RSDPS_ADF_AUTOLOAD
to RSDPS_ADFSTAT_AFTERSCAN
,RSDPS_ADF_PRELOAD
to RSDPS_ADF_RELOAD
.RSDPS_CAP...
and RSDPS_ACT
. enum RSDRS |
Resolution (appropriate values) (G/S)
enum RSDST |
Start mode (G/S)
RSDST_IMMEDIATE
,RSDST_UI_...
RSDST_CAP...
enum RSDUI |
Display the driver's UI (G/S)
enum RSDWZ |
Wizard flags.
RECERR RECAPIKRN kRecCheckScannerInterface | ( | int | sid | ) |
Checking availability of the interface of the selected scanner.
Checks the interface of the currently selected scanner if it is available and ready to communicate with the application.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecCheckScannerInterface(int sid);
RECERR RECAPIKRN kRecCheckScannerReady | ( | int | sid | ) |
Checking readiness of the selected scanner.
Checks if the currently selected scanner is ready to scan.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecCheckScannerReady(int sid);
RECERR RECAPIKRN kRecDeleteScannerNames | ( | LPCTSTR | pScanners | ) |
Deleting scanner name buffer.
Deallocates the buffer retrieved by kRecGetAllScanners and kRecGetScanners.
[in] | pScanners | Pointer retrieved by functions kRecGetAllScanners and kRecGetScanners . |
RECERR |
RECERR RECAPIKRN kRecGetAllScanners | ( | int * | pNum, |
LPCTSTR * | pScanners | ||
) |
Getting all available scanners.
Returns the names of all available scanner models.
[out] | pNum | Pointer to an int variable which will receive the number of available scanner models. |
[out] | pScanners | Pointer to a LPCSTR variable which will receive the list of names of available scanner models. The returned list of names consists of one or more null-terminated strings, the last string is followed by a second null character. Each string contains the manufacturer and the name of the scanner model separated by a space character. |
RECERR |
RECERR kRecGetAllScanners(out string[] pScanners);
RECERR RECAPIKRN kRecGetPaperSizesSupported | ( | int | sid, |
size_t * | pSize, | ||
RSDPP * | PaperSizes, | ||
RSDPO * | Orientations, | ||
RSDPS | PaperSource | ||
) |
Retrieving a list of standard paper sizes supported by the scanner.
The kRecGetPaperSizesSupported function is used to inquire a list of standard paper sizes supported by the scanner.
[in] | sid | Settings Collection ID. |
[in,out] | pSize | Maximal number of standard paper sizes. If the pointed value is zero it will be filled with the number of paper sizes supported by the scanner. |
[out] | PaperSizes | Array to store standard paper sizes. |
[out] | Orientations | Array to store orientation of papers. |
[in] | PaperSource | Paper source of interest. Possible values: RSDPS_FLATBED, RSDPS_SHEETFEED, RSDPS_ADF_AUTO, RSDPS_ADF, RSDPS_TRANSP |
RECERR |
RECERR kRecGetScannerSizesSupported(int sid, ref uint pSize, RSDPP[] PaperSizes, RSDPO[] Orientations, RSDPS PaperSource); // or when pSize is NULL in C/C++ RECERR kRecGetScannerSizesSupported(int sid, RSDPP[] PaperSizes, RSDPO[] Orientations, RSDPS PaperSource); // or when the User wants arrays to be created inside RECERR kRecGetScannerSizesSupported(int sid, out RSDPP[] PaperSizes, out RSDPO[] Orientations, RSDPS PaperSource);
Getting ADF status.
The kRecGetScanADF function is used to inquire the current status of the Automatic Document Feeder (ADF) and the Transparency Adapter of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pAdf | Pointer to a variable to get the status information |
RECERR |
RECERR kRecGetScanADF(int sid, out RSDAS pAdf);
Getting adjustable capabilities.
The kRecGetScanAdjustCapa function is used to inquire the adjustable capabilities of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pAdjust | Pointer to a variable to get the adjustable capabilities. The returned value is a binary ORed combination of the values above. |
RECERR |
RECERR kRecGetScanAdjustCapa(int sid, out RSDAD pAdjust);
RECERR RECAPIKRN kRecGetScanArea | ( | int | sid, |
LPRECT | pRect | ||
) |
Getting scanning area.
The kRecGetScanArea function is used to inquire the dimensions of the scanning area of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pRect | Pointer to the structure of the dimensions. The fields of pRect are as follows:
|
RECERR |
RECERR kRecGetScanArea(int sid, out RECT pRect);
RECERR RECAPIKRN kRecGetScanAutoBrightnessCapa | ( | int | sid, |
LPINTBOOL | bAuto | ||
) |
Getting automatic brightness control capability.
The kRecGetScanAutoBrightnessCapa function is used to inquire whether either the currently selected scanner itself or its associated software has a built-in automatic brightness control capability.
[in] | sid | Settings Collection ID. |
[out] | bAuto | Pointer to a Boolean variable to hold the presence/absence status of the automatic brightness control capability. |
RECERR |
RECERR kRecGetScanAutoBrightnessCapa(int sid, out bool bAuto);
Getting scanning mode.
The kRecGetScanBitsPerSample function is used to inquire the scanning mode of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pBps | Pointer to a variable to get the current scanning mode setting |
RECERR |
RECERR kRecGetScanBitsPerSample(int sid, out RSDII pBps);
Getting scanning mode capabilities.
The kRecGetScanBitsPerSampleCapa function is used to inquire the scanning mode capabilities of the currently selected scanner. Most scanners support all four scanning modes below, however, some scanner models cannot support one or more of these scanning modes.
[in] | sid | Settings Collection ID. |
[out] | pBps | Pointer to a variable to get the scanning mode capabilities. The returned value is a binary ORed combination of the values above. |
RECERR |
RECERR kRecGetScanBitsPerSampleCapa(int sid, out RSDII pBps);
RECERR RECAPIKRN kRecGetScanBrightness | ( | int | sid, |
UINT * | pBrightness | ||
) |
Getting brightness in %.
The kRecGetScanBrightness function is used to inquire the brightness of subsequent scanning(s) of the currently selected scanner as a percentage. If the returned value is AUTOBRIGHTNESS it means that the automatic brightness control has been set.
[in] | sid | Settings Collection ID. |
[out] | pBrightness | Pointer to a variable to get the current brightness setting. |
RECERR |
RECERR kRecGetScanBrightness(int sid, out uint pBrightness);
RECERR RECAPIKRN kRecGetScanBrightnessDefVal | ( | int | sid, |
UINT * | pBrDef | ||
) |
Getting default brightness.
The kRecGetScanBrightnessDefVal function is used to inquire the default brightness value of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pBrDef | Pointer to a variable to get the default brightness value. This is not always the half of the value returned by kRecGetScanBrightnessMaxVal. |
RECERR |
RECERR kRecGetScanBrightnessDefVal(int sid, out uint pBrDef);
RECERR RECAPIKRN kRecGetScanBrightnessMaxVal | ( | int | sid, |
UINT * | pBrMax | ||
) |
Getting number of brightness steps.
The kRecGetScanBrightnessMaxVal function is used to inquire the number of available brightness steps of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pBrMax | Pointer to a variable to get the number of available brightness steps. |
RECERR |
RECERR kRecGetScanBrightnessMaxVal(int sid, out uint pBrMax);
RECERR RECAPIKRN kRecGetScanBrightnessVal | ( | int | sid, |
UINT * | pBrightness | ||
) |
Getting brightness.
The kRecGetScanBrightnessVal function is used to inquire the brightness of subsequent scanning(s) of the currently selected scanner. If the returned value is AUTOBRIGHTNESS it means that the automatic brightness control has been set.
[in] | sid | Settings Collection ID. |
[out] | pBrightness | Pointer to a variable to get the current brightness setting |
RECERR |
RECERR kRecGetScanBrightnessVal(int sid, out uint pBrightness);
RECERR RECAPIKRN kRecGetScanContrast | ( | int | sid, |
UINT * | pContrast | ||
) |
Getting contrast in %.
The kRecGetScanContrast function is used to inquire the contrast of subsequent scanning(s) of the currently selected scanner as a percentage.
[in] | sid | Settings Collection ID. |
[out] | pContrast | Pointer to a variable to get the current contrast setting. |
RECERR |
RECERR kRecGetScanContrast(int sid, out uint pContrast);
RECERR RECAPIKRN kRecGetScanContrastDefVal | ( | int | sid, |
UINT * | pCrDef | ||
) |
Getting default of contrast.
The kRecGetScanContrastDefVal function is used to inquire the default contrast value of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pCrDef | Pointer to a variable to get the default contrast value. This is not always the half of the value returned by kRecGetScanContrastMaxVal. |
RECERR | \note The specification of this function in C# is: RECERR kRecGetScanContrastDefVal(int sid, out uint pCrDef); |
RECERR RECAPIKRN kRecGetScanContrastMaxVal | ( | int | sid, |
UINT * | pCrMax | ||
) |
Getting number of contrast steps.
The kRecGetScanContrastMaxVal function is used to inquire the number of available contrast steps of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pCrMax | Pointer to a variable to get the number of available contrast steps. |
RECERR |
RECERR kRecGetScanContrastMaxVal(int sid, out uint pCrMax);
RECERR RECAPIKRN kRecGetScanContrastVal | ( | int | sid, |
UINT * | pContrast | ||
) |
Getting contrast.
The kRecGetScanContrastVal function is used to inquire the contrast of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pContrast | Pointer to a variable to get the current contrast setting. |
RECERR |
RECERR kRecGetScanContrastVal(int sid, out uint pContrast);
Getting dropout color.
The kRecGetScanDropout function is used to inquire the dropout color of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pColor | Pointer to a variable to get the current dropout color setting |
RECERR |
RECERR kRecGetScanDropout(int sid, out RSDLC pColor);
Getting dropout color capabilities.
The kRecGetScanDropoutCapa function is used to inquire the dropout color capabilities of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pColor | Pointer to a variable to get the dropout color capabilities. If the scanner does not support the dropout color feature, this value will be RSDLC_WHITE. Otherwise the returned value will be a binary ORed combination of the values above. |
RECERR |
RECERR kRecGetScanDropoutCapa(int sid, out RSDLC pColor);
Getting duplex scanning mode.
The kRecGetScanDuplex function is used to inquire the duplex scanning mode of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pDuplex | Pointer to a variable to get the current duplex scanning mode setting |
RECERR |
RECERR kRecGetScanDuplex(int sid, out RSDDX pDuplex);
Getting duplex scanning capabilities.
The kRecGetScanDuplexCapa function is used to inquire the duplex scanning capabilities of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pDuplex | Pointer to a variable to get the duplex scanning capabilities. The returned value is a binary ORed combination of the values above. |
RECERR |
RECERR kRecGetScanDuplexCapa(int sid, out RSDDX pDuplex);
RECERR RECAPIKRN kRecGetScanErrorMode | ( | int | sid, |
INTBOOL * | pIgnore | ||
) |
Getting error mode.
The kRecGetScanErrorMode function is used to inquire the error mode of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pIgnore | Pointer to a variable to get the current error mode setting |
RECERR |
RECERR kRecGetScanErrorMode(int sid, out bool Ignore);
RECERR RECAPIKRN kRecGetScanner | ( | int | sid, |
LPCTSTR * | pScanner | ||
) |
Getting the installed scanner.
Returns the currently installed scanner.
[in] | sid | Settings Collection ID. |
[out] | pScanner | Pointer to a LPCSTR variable which will receive the manufacturer and the name of the scanner model separated by a space character. The returned name is an empty string if the scanner selected by the kRecSetScannerSelected function is not available. |
RECERR |
RECERR kRecGetScanner(int sid, out string pScanner);
RECERR RECAPIKRN kRecGetScannerADFSize | ( | int | sid, |
LPSIZE | pSize | ||
) |
getting ADF size
The kRecGetScannerADFSize function is used to inquire the dimensions of the ADF of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pSize | Pointer to the structure of dimensions. The fields are as follows:
|
RECERR |
RECERR kRecGetScannerADFSize(int sid, out SIZE pSize);
RECERR RECAPIKRN kRecGetScannerFlatbedSize | ( | int | sid, |
LPSIZE | pSize | ||
) |
Getting flat-bed size.
The kRecGetScannerFlatbedSize function is used to inquire the dimensions of the flat-bed of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pSize | Pointer to the structure of dimensions. The fields are as follows:
|
RECERR |
RECERR kRecGetScannerFlatbedSize(int sid, out SIZE pSize);
RECERR RECAPIKRN kRecGetScannerManufacturer | ( | int | sid, |
LPTSTR | pManufacturer, | ||
size_t | iSize | ||
) |
Getting scanner manufacturer.
The kRecGetScannerManufacturer function can be used to get the scanner manufacturer of the currently installed scanner.
[in] | sid | Settings Collection ID. |
[out] | pManufacturer | Pointer to a buffer where the scanner manufacturer string will be copied to. |
[in] | iSize | Specifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes). |
RECERR |
RECERR kRecGetScannerManufacturer(int sid, out string pManufacturer);
RECERR RECAPIKRN kRecGetScannerModel | ( | int | sid, |
LPTSTR | pModel, | ||
size_t | iSize | ||
) |
Getting scanner model.
The kRecGetScannerModel function can be used to get the name of the currently installed scanner.
[in] | sid | Settings Collection ID. |
[out] | pModel | Pointer to a buffer where the scanner model string will be copied to. |
[in] | iSize | Specifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes). |
RECERR |
RECERR kRecGetScannerModel(int sid, out string pModel);
RECERR RECAPIKRN kRecGetScanners | ( | int | sid, |
int * | pNum, | ||
LPCTSTR * | pScanners | ||
) |
Getting all initialized scanners.
Returns the names of all initialized scanner models from the scanner init file.
[in] | sid | Settings Collection ID. |
[out] | pNum | Pointer to an int variable which will receive the number of initialized scanner models. This parameter should not be NULL . |
[out] | pScanners | Pointer to a LPCSTR variable which will receive the list of names of initialized scanner models. The returned list of names consists of one or more null-terminated strings, the last string is followed by a second null character. Each string contains the manufacturer and the name of the scanner model separated by a space character. This parameter may be NULL in which case only the number of initialized scanners will be retrieved. |
RECERR |
pScanners
parameter is not NULL
. For details, see the description of node Scanners. RECERR kRecGetScanners(int sid, out string[] pScanners);
RECERR RECAPIKRN kRecGetScannerSelected | ( | int | sid, |
LPCTSTR * | pScanner | ||
) |
Getting the current scanner.
Returns the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pScanner | Pointer to a LPCSTR variable which will receive the manufacturer and the name of the selected scanner model separated by a space character The returned name is the same as set by the last call of kRecSetScannerSelected function. |
RECERR |
RECERR kRecGetScannerSelected(int sid, out string pScanner);
RECERR RECAPIKRN kRecGetScannerSize | ( | int | sid, |
LPSIZE | pSize | ||
) |
Getting maximum scanning area size.
The kRecGetScannerSize function is used to inquire the dimensions of the maximum scanning area of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pSize | Pointer to the structure of dimensions. The fields are as follows:
|
RECERR |
RECERR kRecGetScannerSize(int sid, out SIZE pSize);
RECERR RECAPIKRN kRecGetScannerTransparencySize | ( | int | sid, |
LPSIZE | pSize | ||
) |
Getting transparency unit size.
The kRecGetScannerTransparencySize function is used to inquire the dimensions of the transparency unit of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pSize | Pointer to the structure of dimensions. The fields are as follows:
|
RECERR |
RECERR kRecGetScannerTransparencySize(int sid, out SIZE pSize);
RECERR RECAPIKRN kRecGetScannerVersion | ( | int | sid, |
LPTSTR | pVersion, | ||
size_t | buflen | ||
) |
Getting scanner version.
Returns the version of the currently selected scanner or whatever is returned from the underlying scanning subsystem.
[in] | sid | Settings Collection ID. |
[out] | pVersion | Pointer to a buffer where the scanner version string will be copied to. |
[in] | buflen | Specifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes). |
RECERR |
RECERR kRecGetScannerVersion(int sid, out string pVersion);
Getting orientation.
The kRecGetScanOrientation function is used to inquire the orientation of the subsequently scanned image(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pOrientation | Pointer to a variable to get the current orientation setting. |
RECERR |
RECERR kRecGetScanOrientation(int sid, out RSDOR pOrientation);
Getting orientation capabilities.
The kRecGetScanOrientationCapa function is used to inquire the orientation capabilities of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pOrientation | Pointer to a variable to get the orientation capabilities. The returned value is a binary ORed combination of the values above. |
RECERR |
RECERR kRecGetScanOrientationCapa(int sid, out RSDOR pOrientation);
RECERR RECAPIKRN kRecGetScanPaperSize | ( | int | sid, |
LPSIZE | pPaperSize | ||
) |
Getting paper size.
The kRecGetScanPaperSize function is used to inquire the paper size setting of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | pPaperSize | Pointer to the structure of the paper size. The fields are as follows: -cx : paper width, -cy : paper length. |
RECERR |
RECERR kRecGetScanPaperSize(int sid, out SIZE pPaperSize);
Getting paper source.
The kRecGetScanPaperSource function is used to inquire the paper source of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pSource | Pointer to a variable to get the current paper source setting. Possible values are: RSDPS_FLATBED , RSDPS_SHEETFEED , RSDPS_ADF_AUTO , RSDPS_TRANSP_AUTO , RSDPS_ADF and RSDPS_TRANSP possibly ORed with RSDPS_ADF_AUTOLOAD or RSDPS_ADF_SCANAHEAD . |
RECERR |
RECERR kRecGetScanPaperSource(int sid, out RSDPS pSource);
Getting paper source capabilities.
The kRecGetScanPaperSourceCapa function is used to inquire the paper source capabilities of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pSource | Pointer to a variable to get the paper source capabilities. The returned value is a binary ORed combination of the following possible values:
|
RECERR |
RECERR kRecGetScanPaperSourceCapa(int sid, out RSDPS pSource);
RECERR RECAPIKRN kRecGetScanParamSource | ( | int | sid, |
INTBOOL * | pFromScanner | ||
) |
Getting the source of parameters.
The kRecGetScanParamSource function is used to inquire the source of parameters of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pFromScanner | Pointer to a variable to get the current parameter source setting |
RECERR |
FromScanner
parameter is FALSE otherwise they will be retrieved from the scanning system. See also scanner setting synchronization. RECERR kRecGetScanParamSource(int sid, out bool FromScanner);
RECERR RECAPIKRN kRecGetScanResolution | ( | int | sid, |
UINT * | pResolution | ||
) |
Getting resolution.
The kRecGetScanResolution function is used to inquire the resolution of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pResolution | Pointer to a variable to get the current scanning resolution setting in DPI |
RECERR |
RECERR kRecGetScanResolution(int sid, out uint pResolution);
Getting resolution capabilities.
The kRecGetScanResolutionCapa function is used to inquire the resolution capabilities of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pResolCapa | Pointer to a variable to get the resolution capabilities. The returned value is a binary ORed combination of the values above. |
RECERR |
RECERR kRecGetScanResolutionCapa(int sid, out RSDRS pResolCapa);
Getting standard paper size.
The kRecGetScanStandardPaperSize function is used to inquire the dimensions of standard paper sizes.
[in] | Paper | One of the standard paper sizes (RSDPP_* ) |
[out] | pSize | Pointer to the structure of dimensions. The fields are as follows:
|
RECERR |
RECERR kRecGetScanStandardPaperSize(RSDPP Paper, out SIZE pSize);
Getting starting mode.
The kRecGetScanStartMode function is used to inquire the starting mode of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pStart | Pointer to a variable to get the current starting mode setting |
RECERR |
RECERR kRecGetScanStartMode(int sid, out RSDST pStart);
Getting starting mode capabilities.
The kRecGetScanStartModeCapa function is used to inquire the starting mode capabilities of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[out] | pStart | Pointer to a variable to get the starting mode capabilities. The returned value is a binary ORed combination of the values above. |
RECERR |
RECERR kRecGetScanStartModeCapa(int sid, out RSDST pStart);
RECERR RECAPIKRN kRecIsScanPaperSizeSupported | ( | int | sid, |
RSDPP | PaperSize, | ||
INTBOOL | Portrait, | ||
RSDPS | PaperSource, | ||
LPINTBOOL | pSupp | ||
) |
Checking paper size support.
The kRecIsScanPaperSizeSupported function returns TRUE if the currently selected scanner supports the standard paper size inquired. You should not assume that all paper sizes not larger than the scanner bed are supported.
[in] | sid | Settings Collection ID. |
[in] | PaperSize | One of the standard paper sizes (RSDPP_*) |
[in] | Portrait | Orientation of the paper: TRUE if portrait, FALSE if landscape |
[in] | PaperSource | The following values are valid: RSDPS_FLATBED , RSDPS_SHEETFEED , RSDPS_ADF and RSDPS_TRANSP , whichever is supported by the scanner (see kRecGetScanPaperSourceCapa) |
[out] | pSupp | The returned value is TRUE if the scanner supports the papersize. If the returned value is FALSE the scanner will still scan the image but it may be misaligned. |
RECERR |
RECERR kRecIsScanPaperSizeSupported(int sid, RSDPP PaperSize, bool Portrait, RSDPS PaperSource, out bool pSupp);
RECERR RECAPIKRN kRecReleaseScanner | ( | int | sid | ) |
Releasing a reserved scanner.
Releases the currently selected scanner. The scanner should be released as many times as it has been reserved.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecReleaseScanner(int sid);
RECERR RECAPIKRN kRecReserveScanner | ( | int | sid | ) |
Reserving the selected scanner.
Reserves the currently selected scanner for the current application.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecReserveScanner(int sid);
RECERR RECAPIKRN kRecResetScanner | ( | int | sid | ) |
Resetting the selected scanner.
Resets the currently selected scanner.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecResetScanner(int sid);
RECERR RECAPIKRN kRecScanInit | ( | HWND | hWnd, |
LPCTSTR | pScanIni, | ||
int | iIniLoc, | ||
LPCTSTR | pISISCustID | ||
) |
Initializing the scanning subsystem.
The kRecScanInit function will load and initialize the scanning subsystem.
[in] | hWnd | The window handle of the main window of the application |
[in] | pScanIni | Name of the scanner init file which is normally created by the Scanner Wizard. A NULL value for this parameter means that the default scanner init file, SCANNER.INI will be applied. |
[in] | iIniLoc | This parameter determines the location of the SCANNER.INI file if the previous parameter is NULL or it contains a simple file name without path information. See the possible values for the different locations. |
[in] | pISISCustID | Internal use only. Set to NULL. |
RECERR |
RECTST32.EXE
sample application can be used to create a scanner init file. A second, more general way is when the integrating application is distributed together with the Scanner Wizard (SWIZARD.DLL
). The Wizard can be called by the kRecScannerWizard or kRecScannerWizardByName functions. In both cases the application's user can choose a scanner type from a listbox. The list of the available scanners depends on the actual Engine configuration, i.e. the RSD files in the Engine Binaries directories. hWnd
parameter NULL
can also be used. Nevertheless, we recommend to avoid the use of the NULL
value in the hWnd
parameter since hWnd
will be the parent of all windows that will appear during scanning. RECERR rc = RecScanInit( "SCANNER.INI", hWnd );
RECERR rc = kRecScanInit( hWnd, NULL, SCINI_INSTALL, NULL ); if ( rc == REC_OK ) { rc = kRecSetScannerSelected( 0, NULL, NULL ); if ( rc != REC_OK ) kRecScanQuit(); }
RSD_ERROR
). In the case of an error, the calling program can inquire the exact scanner error values from the scanning subsystem with the kRecGetLastError function. RECERR kRecScanInit(IntPtr hWnd, string pScanIni, SCAN_INI iniLoc, string pISIScustID); // or when hWnd is NULL in C/C++ RECERR kRecScanInit(string pScanIni, SCAN_INI iniLoc, string pISIScustID);
RECERR RECAPIKRN kRecScannerWizard | ( | HWND | hWnd, |
LPCTSTR | pProduct | ||
) |
Opening Scanner Wizard.
Launches the Scanner Wizard.
[in] | hWnd | The window handle of the main window of the application to be used as the parent of the Wizard dialog window. |
[in] | pProduct | Name of the calling application to be displayed by the Wizard |
RECERR |
hWnd
parameter NULL
can also be used, in this case the hWnd
given by the call of kRecScanInit will be used. RECERR kRecScannerWizard(IntPtr hWnd, string pProduct); // or when hWnd is NULL in C/C++ RECERR kRecScannerWizard(string pProduct);
RECERR RECAPIKRN kRecScannerWizardByName | ( | HWND | hWnd, |
LPCTSTR | pScanner, | ||
LPCTSTR | pProduct, | ||
INTBOOL | bSilent | ||
) |
Opening the Scanner Wizard for a given scanner.
Launches the Scanner Wizard to set up a specific scanner.
[in] | hWnd | The window handle of the main window of the application to be used as the parent of the Wizard dialog window. |
[in] | pScanner | The manufacturer and the name of the model separated by a space character |
[in] | pProduct | Name of the calling application to be displayed by the Wizard |
[in] | bSilent | Silent setup for the scanners with hints in the hint file. |
RECERR |
hWnd
parameter NULL
can also be used, in this case the hWnd
given by the call of kRecScanInit will be used. RECERR kRecScannerWizardByName(IntPtr hWnd, string pScanner, string pProduct, bool bSilent); // or when hWnd is NULL in C/C++ RECERR kRecScannerWizardByName(string pScanner, string pProduct, bool bSilent);
RECERR RECAPIKRN kRecScanPage | ( | int | sid, |
LPCTSTR | pImgFile, | ||
IMF_FORMAT | ImgFileFormat | ||
) |
Scanning a page.
The kRecScanPage function provides a simplified programming interface for scanning a single page and saving it into an image file. The kRecScanPage function activates the PROCESSID::PID_IMGINPUT and PROCESSID::PID_IMGSAVE processes.
[in] | sid | Settings Collection ID. |
[in] | pImgFile | Name of the image file to be created. |
[in] | ImgFileFormat | Image file format of the output image file. |
RECERR |
RECERR kRecScanPage(int sid, string pImgFile, IMF_FORMAT ImgFileFormat);
RECERR RECAPIKRN kRecScanPages | ( | int | sid, |
LPCTSTR | pImgFile, | ||
IMF_FORMAT | ImgFileFormat, | ||
LPONETOUCH_CB | pCallBack, | ||
void * | pContext | ||
) |
Scanning pages.
The kRecScanPages function provides a simplified programming interface for scanning several pages and saving them into a multi-page image file. The kRecScanPages function activates the PROCESSID::PID_IMGINPUT and PROCESSID::PID_IMGSAVE processes.
[in] | sid | Settings Collection ID. |
[in] | pImgFile | Name of the output image file. |
[in] | ImgFileFormat | Image file format of the output image file. |
[in] | pCallBack | Callback function provided by the application or NULL . |
[in] | pContext | This pointer is transferred to the pCallBack function when it is called. |
RECERR |
NULL
value was specified in the place of the pCallBack
parameter the function will read pages one after each other continuously from the scanner until the ADF becomes empty. RECERR kRecScanPages(int sid, string pImgFile, IMF_FORMAT ImgFileFormat, ONETOUCH_CB callback);
RECERR RECAPIKRN kRecScanPreloadADF | ( | int | sid | ) |
Preloading the ADF.
The kRecScanPreloadADF function will preload the ADF of the currently selected scanner if the scanner is capable of this.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecScanPreloadADF(int sid);
RECERR RECAPIKRN kRecScanQuit | ( | void | ) |
Closing the scanning subsystem.
The kRecScanQuit function is used to terminate the running of the scanning subsystem. The scanning system will be closed when this function is called as many times as kRecScanInit has been called i.e. all previous kRecScanInit calls should be balanced by the appropriate kRecScanQuit call.
RECERR |
RECERR kRecScanQuit();
RECERR RECAPIKRN kRecScanReloadADF | ( | int | sid | ) |
Reloading the ADF.
The kRecScanReloadADF function will reload the ADF of the currently selected scanner if the scanner is capable of this.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecScanReloadADF(int sid);
RECERR RECAPIKRN kRecScanUnloadADF | ( | int | sid | ) |
Unloading the ADF.
The kRecScanUnloadADF function will unload the ADF of the currently selected scanner if the scanner is capable of this.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecScanUnloadADF(int sid);
RECERR RECAPIKRN kRecSetScanArea | ( | int | sid, |
LPCRECT | pRect | ||
) |
Setting scanning area.
The kRecSetScanArea function is used to specify the dimensions of the scanning area of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | pRect | Pointer to the structure of the dimensions. The fields of pRect are as follows:
|
RECERR |
RECERR kRecSetScanArea(int sid, RECT pRect);
Setting scanning mode.
The kRecSetScanBitsPerSample function is used to specify the scanning mode of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | Bps | Scanning mode to be set |
RECERR |
Bps
and the specified image conversion mode parameters. RECERR kRecSetScanBitsPerSample(int sid, RSDII Bps);
RECERR RECAPIKRN kRecSetScanBrightness | ( | int | sid, |
UINT | Brightness | ||
) |
Setting brightness in %.
The kRecSetScanBrightness function is used to specify the brightness of subsequent scanning(s) of the currently selected scanner as a percentage. Higher values result in brighter (lighter) images. A special value of AUTOBRIGHTNESS can be used for automatic brightness control if the scanner is capable.
[in] | sid | Settings Collection ID. |
[in] | Brightness | Brightness value to be set. The value should be in the range of 0-100% or for automatic brightness control the AUTOBRIGHTNESS value can be specified. |
RECERR |
RECERR kRecSetScanBrightness(int sid, uint Brightness);
RECERR RECAPIKRN kRecSetScanBrightnessVal | ( | int | sid, |
UINT | Brightness | ||
) |
Setting brightness.
The kRecSetScanBrightnessVal function is used to specify the brightness of subsequent scanning(s) of the currently selected scanner. Higher values result in brighter (lighter) images. A special value of AUTOBRIGHTNESS can be used for automatic brightness control if the scanner is capable of this.
[in] | sid | Settings Collection ID. |
[in] | Brightness | Brightness value to be set. The minimum value is zero (0), the maximum value is the value returned by kRecGetScanBrightnessMaxVal minus one (1) or for automatic brightness control the AUTOBRIGHTNESS value can be specified. |
RECERR |
RECERR kRecSetScanBrightnessVal(int sid, uint Brightness);
RECERR RECAPIKRN kRecSetScanContrast | ( | int | sid, |
UINT | Contrast | ||
) |
Setting contrast in %.
The kRecSetScanContrast function is used to specify the contrast of subsequent scanning(s) of the currently selected scanner as a percentage.
[in] | sid | Settings Collection ID. |
[in] | Contrast | Contrast value to be set. The value should be in the range of 0-100%. |
RECERR |
RECERR kRecSetScanContrast(int sid, uint Contrast);
RECERR RECAPIKRN kRecSetScanContrastVal | ( | int | sid, |
UINT | Contrast | ||
) |
Setting contrast.
The kRecSetScanContrastVal function is used to specify the contrast of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | Contrast | Contrast value to be set. The minimum value is zero (0), the maximum value is the value returned by kRecGetScanContrastMaxVal minus one (1). |
RECERR |
RECERR kRecSetScanContrastVal(int sid, uint Contrast);
RECERR RECAPIKRN kRecSetScanDefaults | ( | int | sid | ) |
Setting scanner parameters to default.
The kRecSetScanDefaults function is used to set the parameters of subsequent scanning(s) of the currently selected scanner to their default values.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecSetScanDefaults(int sid);
Setting dropout color.
The kRecSetScanDropout function is used to specify the dropout color of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | Color | Dropout color to be set |
RECERR |
RECERR kRecSetScanDropout(int sid, RSDLC Color);
Setting duplex scanning mode.
The kRecSetScanDuplex function is used to specify the duplex scanning mode of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | Duplex | Duplex scanning mode setting to be set. |
RECERR |
RECERR kRecSetScanDuplex(int sid, RSDDX Duplex);
RECERR RECAPIKRN kRecSetScanErrorMode | ( | int | sid, |
INTBOOL | Ignore | ||
) |
Setting error mode.
The kRecSetScanErrorMode function is used to set the error mode of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | Ignore | Ignore errors in kRecSetScanParamsBySettings function if TRUE. |
RECERR |
Ignore
parameter is TRUE. Otherwise only valid values will be set, invalid values will be ignored and the return code of kRecSetScanParamsBySettings will indicate the first invalid one. RECERR kRecSetScanErrorMode(int sid, bool Ignore);
RECERR RECAPIKRN kRecSetScannerSelected | ( | int | sid, |
LPCTSTR | pScanner, | ||
LPINTBOOL | pCallWiz | ||
) |
Selecting a scanner.
Selects a scanner from the initialized ones. The init file is the same as used by the last kRecGetScanners function or the same as used by the kRecScanInit function if kRecGetScanners has never been called in the current Settings Collection. The selected scanner is the first one in the scanner init file, if this function is called with a NULL
pointer. This way it is compatible with the previous version. All of the subsequent function calls use the selected scanner.
[in] | sid | Settings Collection ID. |
[in] | pScanner | The manufacturer and the name of the scanner model separated by a space character. If this pointer is NULL the first scanner will be selected from the init file. |
[out] | pCallWiz | If TRUE is returned in this flag, the application should call the Scanner Wizard to select another scanner because the selected scanner is not available. This pointer may be NULL . |
RECERR |
Kernel.Scanner
, Kernel.Scanner.Name
, Scanners
and builds up the setting subtree of the currently selected scanner (if it does not exist yet), which will be under the Scanners
node. For details, see Settings of the Scanner Module, Different ways of adjusting scanner settings and the description of Symbolic links. RECERR kRecSetScannerSelected(int sid, string pScanner, out bool pCallWiz); // or when pCallWiz is NULL in C/C++ RECERR kRecSetScannerSelected(int sid, string pScanner);
Setting orientation.
The kRecSetScanOrientation function is used to specify the orientation of subsequent scanning(s) of the currently selected scanner if the scanner is capable of rotating or mirroring the image.
[in] | sid | Settings Collection ID. |
[in] | Orientation | Orientation to be set |
RECERR |
RECERR kRecSetScanOrientation(int sid, RSDOR Orientation);
RECERR RECAPIKRN kRecSetScanPaperSize | ( | int | sid, |
LPCSIZE | pPaperSize | ||
) |
Setting paper size.
The kRecSetScanPaperSize function is used to specify the paper size of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | pPaperSize | Pointer to the structure of the paper size. The fields are as follows:
|
RECERR |
RECERR kRecSetScanPaperSize(int sid, SIZE pPaperSize);
Setting paper source.
The kRecSetScanPaperSource function is used to specify the paper source of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | PaperSource | Paper source to be set |
RECERR |
RSDPS_ADF_AUTO
, which means that if the scanner has an ADF installed and it is loaded with paper, it will be the paper source, otherwise the scanner will scan from another paper source (typically the flat-bed). RSDPS_ADF_AUTOLOAD
or RSDPS_ADF_SCANAHEAD
can be ORed to RSDPS_ADF_AUTO
or RSDPS_ADF
to speed up scanning from ADF. RECERR kRecSetScanPaperSource(int sid, RSDPS PaperSource);
RECERR RECAPIKRN kRecSetScanParamsBySettings | ( | int | sid | ) |
Sending the setting values to the scanning subsystem.
The kRecSetScanParamsBySettings function is used to set the parameters of subsequent scanning(s) of the currently selected scanner by the current setting values of the current Settings Collection.
[in] | sid | Settings Collection ID. |
RECERR |
RECERR kRecSetScanParamsBySettings(int sid);
RECERR RECAPIKRN kRecSetScanParamSource | ( | int | sid, |
INTBOOL | FromScanner | ||
) |
Setting the source of parameters.
The kRecSetScanParamSource function is used to set the source of parameters of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | FromScanner | Return parameter values from the scanning system by the appropriate functions if TRUE; return the corresponding setting values if FALSE. |
RECERR |
FromScanner
parameter is FALSE otherwise they will be retrieved from the scanning system. See also scanner setting synchronization. RECERR kRecSetScanParamSource(int sid, bool FromScanner);
RECERR RECAPIKRN kRecSetScanResolution | ( | int | sid, |
UINT | Resolution | ||
) |
Setting resolution.
The kRecSetScanResolution function is used to specify the resolution of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | Resolution | Scanning resolution to be set in DPI |
RECERR |
RECERR kRecSetScanResolution(int sid, uint Resolution);
Setting starting mode.
The kRecSetScanStartMode function is used to specify the starting mode of subsequent scanning(s) of the currently selected scanner.
[in] | sid | Settings Collection ID. |
[in] | Start | Starting mode to be set |
RECERR |
RECERR kRecSetScanStartMode(int sid, RSDST Start);