RecAPI
Scanning Module

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.

Detailed Description

This is the Scanner API of the KernelAPI. The Scanning Module is supported on: Windows.

Initialization

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.

Loading images from scanner

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.

Different ways of adjusting scanner settings

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!

Note:
Functions retrieving scan parameters can get their returned values from two different sources: from the scanning system or from the corresponding setting. Normally these values are the same but in special cases (e.g. after loading a setting file) they can be different in which cases the functions return with a warning status. There are two different ways to synchronize the settings and the values stored by the scanning system.
  • kRecSetScanParamsBySettings copies the values from the settings of the current scanner to the scanning system.
  • the appropriate function (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.

Other scanner related topics

Settings of the Scanning Module
Standard paper sizes

Note:
In the enum definitions below, the following notations are used:
  • (G) get only,
  • (G/S) get/set.
Capability masks of the enum types do not cover get only flags.


Typedef Documentation

typedef enum RSDAF RSDAF

Application flags.

Remarks:
These flags specify the behavior of RSD in some respects as necessary for the application. These flags can be overridden by the corresponding entries in the [RSD] section of the INI file.
typedef enum RSDCI RSDCI

Color interpretation (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • Inversion: RSDCI_BLACK0 and RSDCI_WHITE0,
  • Bit order: RSDCI_MSBFIRST and RSDCI_LSBFIRST,
  • Color mode: from RSDCI_RGB to RSDCI_PALETTE.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDPS_CAP...
typedef enum RSDCM RSDCM

Compression (G/S)

Remarks:
Masks of this enum type show the flags that can be used in different modes.
typedef enum RSDDF 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.

typedef enum RSDDX RSDDX

Duplex scanning (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • One sided: RSDDX_SINGLE or RSDDX_SIMPLEX (these are synonyms),
  • Two sided, margin settings: RSDDX_DUPLEX_PAGE and RSDDX_DUPLEX_BOOK,
  • Two sided, flip settings: RSDDX_DUPLEX_FLIP_BOOK and RSDDX_DUPLEX_FLIP_TABLET,
  • Two sided, merge settings: RSDDX_DUPLEX_MERGE_BOOK and RSDDX_DUPLEX_MERGE_TABLET.
Flags of "two sided" classes can be combined with each other. For any duplex mode at least one flag of "two sided" classes should be set. The flags of each class can be masked with capability masks RSDDX_CAP....
typedef enum RSDFS RSDFS

File types for scanning to/from file (G/S)

Remarks:
Masks of this enum type show the flags that can be used in different modes.
typedef enum RSDII RSDII

Image interpretation (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • Image mode: from RSDII_BW to RSDII_COLOR8,
  • Color arrangement: from RSDII_PACKED to RSDII_PAGES.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDII_CAP...
typedef enum RSDPP RSDPP

Standard paper sizes.

Remarks:
The elements of this enum can be grouped into the following classes:
  • ISO: from RSDPP_A0 to RSDPP_C8,
  • JIS (Japanese): RSDPP_...JIS,
  • ANSI (US engineering): from RSDPP_A to RSDPP_E,
  • North American: from RSDPP_STATEMENT to RSDPP_DLETTER,
  • North American envelopes: from RSDPP_PERSONAL to RSDPP_COM14,
  • Other: from RSDPP_COUPON to RSDPP_BCHECK.
typedef enum RSDPS RSDPS

Paper source (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • Image source: from RSDPS_CAMERA to RSDPS_TRANSP,
  • Flatbed property: RSDPS_FLATBED_SPLIT,
  • ADF properties: from RSDPS_ADF_AUTOLOAD to RSDPS_ADFSTAT_AFTERSCAN,
  • Immediate actions: from RSDPS_ADF_PRELOAD to RSDPS_ADF_RELOAD.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDPS_CAP... and RSDPS_ACT.
typedef enum RSDST RSDST

Start mode (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • Start event: RSDST_IMMEDIATE,
  • UI mode: RSDST_UI_...
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDST_CAP...
typedef enum RSDWZ RSDWZ

Wizard flags.

Remarks:
These flags specify the behavior of the new Scanner Setup Wizard (SSW)

Enumeration Type Documentation

enum RSDAD

Adjustable parameters (G)

Enumerator:
RSDAD_RESOLUTION 

resolution in both directions

RSDAD_PAPERSIZE 

paper size

RSDAD_AUTOPAPERSIZE 

auto-papersize

RSDAD_MARGINS 

margins

RSDAD_BRIGHTNESS 

brightness

RSDAD_AUTOBRIGHTNESS 

auto-brightness

RSDAD_CONTRAST 

contrast

RSDAD_AUTOCONTRAST 

auto-contrast

RSDAD_MIDTONE 

midtone

RSDAD_LAMPCOLOR 

lamp or filter (dropout) color

RSDAD_SCAN2FILEONLY 

scanning is possible to file only (RSDFS_NO is not useful)

RSDAD_UI_SHOW 

user interface can be shown

RSDAD_UI_HIDE 

user interface can be hidden

RSDAD_SCANPARAMFILE 

scan parameters can be stored in a file

RSDAD_IMPRINTER 

imprinter/endorser

enum RSDAF

Application flags.

Remarks:
These flags specify the behavior of RSD in some respects as necessary for the application. These flags can be overridden by the corresponding entries in the [RSD] section of the INI file.
Enumerator:
RSDAF_CHECKADF 

"CheckADF": check ADF capabilities anyway

RSDAF_SETUITOPMOST 

"SetUITopmost": keep the UI in the topmost position

RSDAF_PALETTESUPPORT 

"PaletteSupport": images with palette are acceptable

RSDAF_COMPRESSEDIMAGES 

"CompressedImages": compressed images are acceptable

RSDAF_IMAGEFILES 

"ImageFiles": file names of prescanned images are acceptable

enum RSDAS

ADF/transparency adapter status (G)

Enumerator:
RSDAS_ADF_EMPTY 

ADF empty

RSDAS_ADF_READY 

ADF ready

RSDAS_ADF_JOBSEPARATOR 

job separator sheet detected in ADF

RSDAS_BACKSIDE_READY 

second side of duplex scan is available

RSDAS_TRANSP_NOTREADY 

transparency adapter not ready

RSDAS_TRANSP_READY 

transparency adapter ready

RSDAS_NOTCONNECTED 

ADF / transparency adapter not connected

RSDAS_COVEROPEN 

ADF / transparency adapter cover open

RSDAS_ADF_PAPERJAM 

ADF paper jam

RSDAS_ADF_DOUBLEFEED 

ADF double feed

RSDAS_ADF_BOTHLOADED 

Both feeders (trays) are loaded

RSDAS_SPLIT_READY 

next area from flatbed is ready

enum RSDCI

Color interpretation (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • Inversion: RSDCI_BLACK0 and RSDCI_WHITE0,
  • Bit order: RSDCI_MSBFIRST and RSDCI_LSBFIRST,
  • Color mode: from RSDCI_RGB to RSDCI_PALETTE.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDPS_CAP...
Enumerator:
RSDCI_BLACK0 

black is 0

RSDCI_WHITE0 

white is 0

RSDCI_MSBFIRST 

MSBit is the leftmost

RSDCI_LSBFIRST 

LSBit is the leftmost

RSDCI_RGB 

RGB

RSDCI_CMY 

CMY

RSDCI_CMYK 

CMYK

RSDCI_YUV 

YUV or YCbCr

RSDCI_YUVK 

YUVK

RSDCI_CIEXYZ 

CIE XYZ

RSDCI_PALETTE 

palette

RSDCI_CAPBW 

inversion capability mask

RSDCI_CAPML 

bit order capability mask

RSDCI_CAP 

color mode capability mask

enum RSDCM

Compression (G/S)

Remarks:
Masks of this enum type show the flags that can be used in different modes.
Enumerator:
RSDCM_NO 

no compression

RSDCM_RAW 

Uncompressed

RSDCM_PACKBITS 

PackBits

RSDCM_CCITTG31DNE 

CCITT G3/1D w/o EOL

RSDCM_CCITTG31D 

CCITT G3/1D w/ EOL

RSDCM_CCITTG32D 

CCITT G3/2D

RSDCM_CCITTG4 

CCITT G4/2D

RSDCM_LZW 

LZW

RSDCM_JPEG 

JPEG

RSDCM_ZIP 

ZIP

RSDCM_PCX 

PCX

RSDCM_BMP 

Windows Bitmap

RSDCM_RLE4 

RLE4

RSDCM_RLE8 

RLE8

RSDCM_BITFIELDS 

Bitfields

RSDCM_JBIG 

JBIG

RSDCM_GIF 

GIF

RSDCM_PICT 

Macintosh PICT

RSDCM_PNG 

PNG

RSDCM_JPEG2000 

JPEG 2000

RSDCM_FILE 

indication of file transfer

RSDCM_CAP 

overall capability mask

RSDCM_BW 

B/W capability mask

RSDCM_GRAY4 

4-bit gray capability mask

RSDCM_GRAY8 

8-bit gray capability mask

RSDCM_COLOR1 

3*1-bit color capability mask

RSDCM_COLOR4 

3*4-bit color capability mask

RSDCM_COLOR8 

3*8-bit color capability mask

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.

Enumerator:
RSDDF_NONE 

no detection

RSDDF_LENGTH_LOW 

detection by length, low sensitivity

RSDDF_LENGTH_NORMAL 

detection by length, normal sensitivity

RSDDF_LENGTH_HIGH 

detection by length, high sensitivity

RSDDF_LENGTH_VALUE 

detection by length, value on low word

RSDDF_THICKNESS_LOW 

detection by thickness, low sensitivity

RSDDF_THICKNESS_NORMAL 

detection by thickness, normal sensitivity

RSDDF_THICKNESS_HIGH 

detection by thickness, high sensitivity

RSDDF_THICKNESS_VALUE 

detection by thickness, value on low word

RSDDF_CAP 

capability mask

RSDDF_CAPL 

capability mask for length

RSDDF_CAPT 

capability mask for thickness

RSDDF_VAL 

value mask

enum RSDDX

Duplex scanning (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • One sided: RSDDX_SINGLE or RSDDX_SIMPLEX (these are synonyms),
  • Two sided, margin settings: RSDDX_DUPLEX_PAGE and RSDDX_DUPLEX_BOOK,
  • Two sided, flip settings: RSDDX_DUPLEX_FLIP_BOOK and RSDDX_DUPLEX_FLIP_TABLET,
  • Two sided, merge settings: RSDDX_DUPLEX_MERGE_BOOK and RSDDX_DUPLEX_MERGE_TABLET.
Flags of "two sided" classes can be combined with each other. For any duplex mode at least one flag of "two sided" classes should be set. The flags of each class can be masked with capability masks RSDDX_CAP....
Enumerator:
RSDDX_SINGLE 

single sided

RSDDX_SIMPLEX 

simplex mode

RSDDX_DUPLEX_PAGE 

duplex mode, same margins (default)

RSDDX_DUPLEX_BOOK 

duplex mode, mirrored margins

RSDDX_DUPLEX_FLIP_BOOK 

duplex mode, flip along vertical edge (default)

RSDDX_DUPLEX_FLIP_TABLET 

duplex mode, flip along horizontal edge

RSDDX_DUPLEX_MERGE 

duplex mode, merge front and back images, return one image only

RSDDX_DUPLEX_MERGE_BOOK 

duplex mode, merge front and back images along vertical edge, return one image only

RSDDX_DUPLEX_MERGE_TABLET 

duplex mode, merge front and back images along horizontal edge, return one image only

RSDDX_CAP 

modes by margin settings

RSDDX_CAPFL 

modes by flip settings

RSDDX_CAPMG 

modes by merge setting

RSDDX_CAPALL 

all modes

enum RSDFS

File types for scanning to/from file (G/S)

Remarks:
Masks of this enum type show the flags that can be used in different modes.
Enumerator:
RSDFS_NO 

no file

RSDFS_TIFF 

to TIFF #1 uncompressed

RSDFS_TIFF_PACKBITS 

to TIFF #32773 compressed PackBits

RSDFS_TIFF_G31DNE 

to TIFF #2 compressed CCITT G3/1D w/o EOL

RSDFS_TIFF_G31D 

to TIFF #3 compressed CCITT G3/1D w/ EOL

RSDFS_TIFF_G32D 

to TIFF #3 compressed CCITT G3/2D

RSDFS_TIFF_G4 

to TIFF #4 compressed CCITT G4/2D

RSDFS_TIFF_LZW 

to TIFF #5 compressed LZW

RSDFS_TIFF_JPEG 

to TIFF #6 compressed JPEG

RSDFS_TIFF_ZIP 

to TIFF compressed ZIP

RSDFS_PCX 

to PCX

RSDFS_BMP 

to Windows Bitmap

RSDFS_BMP_RLE4 

to BMP compressed RLE4

RSDFS_BMP_RLE8 

to BMP compressed RLE8

RSDFS_JPEG 

to JPEG

RSDFS_WMF 

to Windows Metafile

RSDFS_JBIG 

to JBIG

RSDFS_GIF 

to GIF

RSDFS_PICT 

to Macintosh PICT

RSDFS_XBM 

to X-Windows Bitmap

RSDFS_JFIF 

to JPEG File Interchange Format

RSDFS_FPX 

to Flash Pix

RSDFS_PNG 

to PNG

RSDFS_SPIFF 

to SPIFF (JPEG, JBIG)

RSDFS_EXIF 

to EXIF (TIFF, JPEG)

RSDFS_DCX 

to DCX

RSDFS_JPEG2000 

to JPEG 2000

RSDFS_PDF 

to PDF

RSDFS_EMF 

to Enhanced Metafile

RSDFS_MULTIPAGE 

to Multi-page file (must be ORed with one of RSDFS_*)

RSDFS_READ 

from any file above

RSDFS_CAP 

overall capability mask

RSDFS_CAPMULTI 

multipage file capability mask

RSDFS_BW 

B/W capability mask

RSDFS_GRAY4 

4-bit gray capability mask

RSDFS_GRAY8 

8-bit gray capability mask

RSDFS_COLOR1 

3*1-bit color capability mask

RSDFS_COLOR4 

3*4-bit color capability mask

RSDFS_COLOR8 

3*8-bit color capability mask

enum RSDHT

Halftone patterns (G)

Enumerator:
RSDHT_NONE 

unknown type/size

RSDHT_SIZE 

pattern size mask

RSDHT_ERRDIFF 

error diffused

RSDHT_BAYER 

bayer

RSDHT_SPIRAL 

spiral

RSDHT_FATTING 

fatting

RSDHT_HORIZONTAL 

horizontal

RSDHT_VERTICAL 

vertical

RSDHT_DIAGONAL 

diagonal

RSDHT_NETSCREEN 

net screen

enum RSDII

Image interpretation (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • Image mode: from RSDII_BW to RSDII_COLOR8,
  • Color arrangement: from RSDII_PACKED to RSDII_PAGES.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDII_CAP...
Enumerator:
RSDII_BW 

B/W

RSDII_HT 

halftone

RSDII_GRAY4 

gray 4 bit

RSDII_GRAY8 

gray 8 bit

RSDII_COLOR1 

color 3*1 bits

RSDII_COLORHT 

color halftone

RSDII_COLOR4 

color 3*4 bits

RSDII_COLOR8 

color 3*8 bits

RSDII_PACKED 

0RGB0RGB 2 pixels of RSDII_COLOR1 or RSDII_COLORHT

RSDII_BYTES 

RRRRRRRR GGGGGGGG BBBBBBBB 8 pixels of RSDII_COLOR1 or RSDII_COLORHT
RRRRRRRR GGGGGGGG BBBBBBBB 2 pixels of RSDII_COLOR4
RRRRRRRR GGGGGGGG BBBBBBBB 1 pixel of RSDII_COLOR8

RSDII_LINES 

R line, G line, B line of any color mode

RSDII_PAGES 

R page, G page, B page of any color mode

RSDII_CAP 

image mode capability mask

RSDII_CAPPIX 

color arrangement capability mask

enum RSDIN

Indication during scanning (G/S)

Enumerator:
RSDIN_NO 

(G/S) indication during scanning (RSDS*_wINDICATION) (G/S) no indication

RSDIN_PROGRESS 

(G/S) progress indication during scanning

RSDIN_IMAGE 

(G) strips of the image are accessible during scanning

RSDIN_CAP 

capability mask (G) strip length of scanning (RSDSC_wINDICATION)

RSDIN_MIN_LINE 

(G) min length of a strip is 1 line

RSDIN_MIN_64K 

(G) min length of a strip is 64k bytes

RSDIN_MIN_IMG 

(G) min length of a strip is the whole image

RSDIN_MIN 

mask for minimal strip length

RSDIN_OPT_LINE 

(G) opt length of a strip is 1 line

RSDIN_OPT_64K 

(G) opt length of a strip is 64k bytes

RSDIN_OPT_IMG 

(G) opt length of a strip is the whole image

RSDIN_OPT 

mask for optimal strip length

RSDIN_TIMEOUT 

(G) the scanner has a timeout feature; if waiting time between strips exceeds typically 30..60 secs scanning may be aborted

enum RSDLC

Lamp or filter color (G/S)

Enumerator:
RSDLC_WHITE 

(G/S) white lamp or no filter

RSDLC_RED 

(G/S) red lamp or filter

RSDLC_GREEN 

(G/S) green lamp or filter

RSDLC_BLUE 

(G/S) blue lamp or filter

RSDLC_CYAN 

(G/S) cyan lamp or filter

RSDLC_MAGENTA 

(G/S) magenta lamp or filter

RSDLC_YELLOW 

(G/S) yellow lamp or filter

RSDLC_CAP 

color capability mask

enum RSDOR

Orientation (G/S)

Enumerator:
RSDOR_NORMAL 

normal

RSDOR_MIRROR 

mirror

RSDOR_ROTATE90 

rotate 90 degrees CW

RSDOR_ROTATE180 

rotate 180 degrees

RSDOR_ROTATE270 

rotate 90 degrees CCW

RSDOR_AUTO 

rotate automatically

RSDOR_CAPROT 

capability mask for rotation

RSDOR_CAP 

capability mask

enum RSDPO

Orientation of paper.

Enumerator:
RSDPO_PORTRAIT 

portrait

RSDPO_LANDSCAPE 

landscape

enum RSDPP

Standard paper sizes.

Remarks:
The elements of this enum can be grouped into the following classes:
  • ISO: from RSDPP_A0 to RSDPP_C8,
  • JIS (Japanese): RSDPP_...JIS,
  • ANSI (US engineering): from RSDPP_A to RSDPP_E,
  • North American: from RSDPP_STATEMENT to RSDPP_DLETTER,
  • North American envelopes: from RSDPP_PERSONAL to RSDPP_COM14,
  • Other: from RSDPP_COUPON to RSDPP_BCHECK.
Enumerator:
RSDPP_AUTO 

automatic detection

RSDPP_CUSTOM 

custom size

RSDPP_SCNMAX 

scanner's maximum (paper source dependent!)

RSDPP_A0 

A0

RSDPP_A1 

A1

RSDPP_A2 

A2

RSDPP_A3 

A3

RSDPP_A4 

A4

RSDPP_A5 

A5

RSDPP_A6 

A6

RSDPP_A7 

A7

RSDPP_A8 

A8

RSDPP_B0 

B0 (ISO)

RSDPP_B1 

B1 (ISO)

RSDPP_B2 

B2 (ISO)

RSDPP_B3 

B3 (ISO)

RSDPP_B4 

B4 (ISO)

RSDPP_B5 

B5 (ISO)

RSDPP_B6 

B6 (ISO)

RSDPP_B7 

B7 (ISO)

RSDPP_B8 

B8 (ISO)

RSDPP_C0 

C0

RSDPP_C1 

C1

RSDPP_C2 

C2

RSDPP_C3 

C3

RSDPP_C4 

C4

RSDPP_C5 

C5

RSDPP_C6 

C6

RSDPP_C7 

C7

RSDPP_C8 

C8

RSDPP_C65 

Envelope C6/C5

RSDPP_C76 

Envelope C7/C6

RSDPP_DL 

Envelope DL

RSDPP_B0JIS 

B0 (JIS)

RSDPP_B1JIS 

B1 (JIS)

RSDPP_B2JIS 

B2 (JIS)

RSDPP_B3JIS 

B3 (JIS)

RSDPP_B4JIS 

B4 (JIS)

RSDPP_B5JIS 

B5 (JIS)

RSDPP_B6JIS 

B6 (JIS)

RSDPP_B7JIS 

B7 (JIS)

RSDPP_B8JIS 

B8 (JIS)

RSDPP_A 

A

RSDPP_B 

B

RSDPP_C 

C

RSDPP_D 

D

RSDPP_E 

E

RSDPP_STATEMENT 

Statement

RSDPP_INVOICE 

Invoice

RSDPP_EXECUTIVE 

Executive

RSDPP_LETTER 

Letter

RSDPP_FOLIO 

Folio

RSDPP_LEGAL 

Legal

RSDPP_LEDGER 

Ledger

RSDPP_TABLOID 

Tabloid

RSDPP_DLETTER 

Double Letter

RSDPP_PERSONAL 

Envelope Personal

RSDPP_MONARCH 

Envelope Monarch

RSDPP_COM9 

Envelope #9

RSDPP_COM10 

Envelope #10

RSDPP_COM11 

Envelope #11

RSDPP_COM12 

Envelope #12

RSDPP_COM14 

Envelope #14

RSDPP_COUPON 

Coupon

RSDPP_USBCARD 

US Business Card

RSDPP_BCARD 

Intl. Business Card

RSDPP_JBCARD 

Japanese Business Card

RSDPP_USCHECK 

US Check

RSDPP_PCHECK 

Personal Check

RSDPP_BCHECK 

Business Check

enum RSDPS

Paper source (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • Image source: from RSDPS_CAMERA to RSDPS_TRANSP,
  • Flatbed property: RSDPS_FLATBED_SPLIT,
  • ADF properties: from RSDPS_ADF_AUTOLOAD to RSDPS_ADFSTAT_AFTERSCAN,
  • Immediate actions: from RSDPS_ADF_PRELOAD to RSDPS_ADF_RELOAD.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDPS_CAP... and RSDPS_ACT.
Enumerator:
RSDPS_CAMERA 

(G) photo/video camera

RSDPS_FLATBED 

(G/S) flatbed

RSDPS_SHEETFEED 

(G/S) roller type or manual feed

RSDPS_ADF_AUTO 

(G/S) ADF selected automatically

RSDPS_TRANSP_AUTO 

(G/S) transparency adapter selected automatically

RSDPS_ADF 

(G/S) ADF

RSDPS_TRANSP 

(G/S) transparency adapter

RSDPS_FLATBED_SPLIT 

(G/S) split images of multiple documents, produces as many images as many documents are on the flatbed

RSDPS_ADF_AUTOLOAD 

(G/S) ADF loads the next page automatically

RSDPS_ADF_SCANAHEAD 

(G/S) pages are scanned continuously from ADF

RSDPS_ADF_SCANAHEAD_PAUSE 

(G) continuous scanning from ADF can be paused

RSDPS_ADF_REVERSEORDER 

(G) ADF gets the last sheet first

RSDPS_ADF_JOBSEPARATOR 

(G) ADF can detect job separator sheet

RSDPS_ADFSTAT_AFTERSCAN 

(G) ADF detects paper only after scan

RSDPS_ADF_PRELOAD 

(G/S) preload page in ADF

RSDPS_ADF_UNLOAD 

(G/S) unload page from ADF

RSDPS_ADF_RELOAD 

(G/S) reload page in ADF

RSDPS_CAP 

image source capability mask

RSDPS_CAPAD 

ADF source capability mask

RSDPS_CAPTR 

transparency adapter source capability mask

RSDPS_CAPLD 

autoload / scan ahead capability mask

RSDPS_ACT 

mask of immediate actions

enum RSDRS

Resolution (appropriate values) (G/S)

Enumerator:
RSDRS_75 

75 dpi

RSDRS_100 

100 dpi

RSDRS_150 

150 dpi

RSDRS_200 

200 dpi

RSDRS_240 

240 dpi

RSDRS_300 

300 dpi

RSDRS_400 

400 dpi

RSDRS_500 

500 dpi

RSDRS_600 

600 dpi

RSDRS_800 

800 dpi

RSDRS_1200 

1200 dpi

RSDRS_1600 

1600 dpi

RSDRS_2400 

2400 dpi

RSDRS_3200 

3200 dpi

RSDRS_4800 

4800 dpi

RSDRS_6400 

6400 dpi

RSDRS_9600 

9600 dpi

RSDRS_CAP 

capability mask

enum RSDST

Start mode (G/S)

Remarks:
The elements of this enum can be grouped into the following classes:
  • Start event: RSDST_IMMEDIATE,
  • UI mode: RSDST_UI_...
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDST_CAP...
Enumerator:
RSDST_IMMEDIATE 

immediate

RSDST_UI_ALWAYS 

show user interface (for backwards compatibility)

RSDST_UI_SHOW 

show user interface

RSDST_UI_NEVER 

hide user interface (for backwards compatibility)

RSDST_UI_HIDE 

hide user interface

RSDST_UI_ONCE 

show user interface once for a stack in the ADF

RSDST_UI_KEEP 

keep user interface shown after scan

RSDST_CAP 

start capability mask

RSDST_CAPUI 

UI capability mask

enum RSDUI

Display the driver's UI (G/S)

Enumerator:
RSDUI_API 

(G/S) set scan parameters by the API

RSDUI_BASIC 

(S) display the driver's basic UI set scan parameters by the UI; immediate action!

RSDUI_ADVANCED 

(S) display the driver's advanced UI set advanced scan parameters by the UI; immediate action!

RSDUI_EXTENDED 

(S) display the driver's extended UI set extended scan parameters by the UI; immediate action!

RSDUI_AREA 

(S) display the driver's scan area UI set scan area parameters by the UI; immediate action!

RSDUI_CONFIG 

(S) display the driver's configuration UI set configuration parameters by the UI; immediate action!

RSDUI_ABOUT 

(S) display the driver's "about" UI; immediate action!

RSDUI_KEEP 

(G/S) keep UI shown

RSDUI_ONSCREEN 

(G) is UI on screen

RSDUI_PENDING 

(G) API<->UI change is impossible because of pending item(s)

RSDUI_CAP 

capability mask

enum RSDWZ

Wizard flags.

Remarks:
These flags specify the behavior of the new Scanner Setup Wizard (SSW)
Enumerator:
RSDWZ_TOPMOST 

set the Wizard topmost if it has no parent window

RSDWZ_SILENT 

silent mode

RSDWZ_SILENT_FORCED 

forced silent mode

RSDWZ_NOSAFEMODE 

disable safe mode

RSDWZ_STISELECT 

enable STI selection

RSDWZ_NOHINTEDITOR 

disable Hint Editor and Advanced Settings

RSDWZ_NOTESTS 

disable all tests

RSDWZ_BASICTEST 

perform basic test separately

RSDWZ_ADDITIONALTESTS 

enable additional tests

RSDWZ_SET_DEFAULT 

set default scanner by putting it to the first position in the INI file

RSDWZ_DONTSAVE_INIFILE 

don't save the INI file

RSDWZ_SAVE_RSDII 

save RSDII capability of the default scanner

RSDWZ_REMOTE 

enable remote selection

RSDWZ_OLD_WIZARD 

use the old SSW in the CSDK (not used in RSD); no other RSDWZ_... flags are valid with this one


Function Documentation

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.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
The specification of this function in C# is:
 RECERR kRecCheckScannerReady(int sid); 
RECERR RECAPIKRN kRecDeleteScannerNames ( LPCTSTR  pScanners)

Deleting scanner name buffer.

Deallocates the buffer retrieved by kRecGetAllScanners and kRecGetScanners.

Parameters:
[in]pScannersPointer retrieved by functions kRecGetAllScanners and kRecGetScanners.
Return values:
RECERR
RECERR RECAPIKRN kRecGetAllScanners ( int *  pNum,
LPCTSTR *  pScanners 
)

Getting all available scanners.

Returns the names of all available scanner models.

Parameters:
[out]pNumPointer to an int variable which will receive the number of available scanner models.
[out]pScannersPointer 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.
Return values:
RECERR
Note:
The retrieved memory buffer can be deallocated by the call of kRecDeleteScannerNames.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in,out]pSizeMaximal 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]PaperSizesArray to store standard paper sizes.
[out]OrientationsArray to store orientation of papers.
[in]PaperSourcePaper source of interest. Possible values: RSDPS_FLATBED, RSDPS_SHEETFEED, RSDPS_ADF_AUTO, RSDPS_ADF, RSDPS_TRANSP
Return values:
RECERR
Note:
The arrays pointed by PaperSizes and Orientations must have the same size.
The specification of this function in C# is:
    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);
RECERR RECAPIKRN kRecGetScanADF ( int  sid,
RSDAS pAdf 
)

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.

Parameters:
[in]sidSettings Collection ID.
[out]pAdfPointer to a variable to get the status information
Return values:
RECERR
Note:
When duplex scanning is set, each scan generates and stores two images. Between the processing of the front and the back sides of each sheet, the status of the hardware is overridden with the value RSDAS_BACKSIDE_READY. The status of the hardware is not available until the image of the second side of the page has been processed by a second PROCESSID.PID_IMGINPUT process or a kRecResetScanner call is issued.
Most important RSDAS definitions: states of the automatic document feeder (ADF) and the transparency adapter.
  • RSDAS_NONE : ADF status is not available
  • RSDAS_ADF_EMPTY : ADF is empty
  • RSDAS_ADF_READY : ADF is ready
  • RSDAS_ADF_JOBSEPARATOR: Job separator sheet is detected in ADF
  • RSDAS_BACKSIDE_READY : Ready to process the second side of a page during duplex scanning
  • RSDAS_TRANSP_NOTREADY : Transparency adapter is not ready
  • RSDAS_TRANSP_READY : Transparency adapter is ready
  • RSDAS_NOTCONNECTED : ADF or transparency adapter is not connected
  • RSDAS_COVEROPEN : ADF or transparency adapter cover is open
  • RSDAS_ADF_PAPERJAM : Paper jam detected in ADF
  • RSDAS_ADF_DOUBLEFEED : Double feed detected in ADF
The specification of this function in C# is:
 RECERR kRecGetScanADF(int sid, out RSDAS pAdf); 
RECERR RECAPIKRN kRecGetScanAdjustCapa ( int  sid,
RSDAD pAdjust 
)

Getting adjustable capabilities.

The kRecGetScanAdjustCapa function is used to inquire the adjustable capabilities of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pAdjustPointer to a variable to get the adjustable capabilities. The returned value is a binary ORed combination of the values above.
Return values:
RECERR
Note:
Most important RSDAD definitions: Adjustable capabilities.
  • RSDAD_RESOLUTION: resolution in both directions
  • RSDAD_MARGINS : margins, width, length
  • RSDAD_PAPERSIZE : paper size
  • RSDAD_BRIGHTNESS: brightness
  • RSDAD_AUTOBRIGHTNESS: auto brightness
  • RSDAD_CONTRAST : contrast
  • RSDAD_UI_SHOW : user interface can be shown
  • RSDAD_UI_HIDE : user interface can be hidden
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pRectPointer to the structure of the dimensions. The fields of pRect are as follows:
  • left : left margin of the scanning area,
  • top : top margin of the scanning area,
  • right : scanning width (not the right margin!),
  • bottom : scanning length (not the bottom margin!).
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
This function gets the settings Kernel.Scanner.Left, Kernel.Scanner.Top, Kernel.Scanner.Length, Kernel.Scanner.Width. These settings can be changed by kRecSetScanArea.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]bAutoPointer to a Boolean variable to hold the presence/absence status of the automatic brightness control capability.
Return values:
RECERR
Note:
If the scanner itself or its associated software does not have built-in automatic brightness control capability, but it supports gray-scale scanning (as most scanners do) the Automatic Adaptive Thresholding mode (CNV_AUTO) can be used.
The specification of this function in C# is:
 RECERR kRecGetScanAutoBrightnessCapa(int sid, out bool bAuto); 
RECERR RECAPIKRN kRecGetScanBitsPerSample ( int  sid,
RSDII pBps 
)

Getting scanning mode.

The kRecGetScanBitsPerSample function is used to inquire the scanning mode of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pBpsPointer to a variable to get the current scanning mode setting
Return values:
RECERR
Note:
This function gets the setting Kernel.Scanner.Bps. This setting can be retrieved by kRecSetScanBitsPerSample.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanBitsPerSample(int sid, out RSDII pBps); 
RECERR RECAPIKRN kRecGetScanBitsPerSampleCapa ( int  sid,
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.

Parameters:
[in]sidSettings Collection ID.
[out]pBpsPointer to a variable to get the scanning mode capabilities. The returned value is a binary ORed combination of the values above.
Return values:
RECERR
Note:
Most important RSDII definitions: Scanning mode values.
  • RSDII_BW: Scanning in Black-and-white (B/W) mode
  • RSDII_GRAY4: Scanning in 4-bit gray-scale mode
  • RSDII_GRAY8: Scanning in 8-bit gray-scale mode
  • RSDII_COLOR8: Scanning in color mode
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pBrightnessPointer to a variable to get the current brightness setting.
Return values:
RECERR
Note:
This function and also kRecGetScanBrightnessVal get the settings Kernel.Scanner.Brightness and Kernel.Scanner.BrightnessVal. These settings can be changed by kRecSetScanBrightnessVal and kRecSetScanBrightness.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pBrDefPointer to a variable to get the default brightness value. This is not always the half of the value returned by kRecGetScanBrightnessMaxVal.
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pBrMaxPointer to a variable to get the number of available brightness steps.
Return values:
RECERR
Note:
The range of the scanning brightness value is from zero (0) to the returned value of this function minus one (1). If the currently selected scanner does not have a brightness setting capability, the function will return zero (0).
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pBrightnessPointer to a variable to get the current brightness setting
Return values:
RECERR
Note:
This function and also kRecGetScanBrightness get the settings Kernel.Scanner.Brightness and Kernel.Scanner.BrightnessVal. These settings can be changed by kRecSetScanBrightnessVal and kRecSetScanBrightness.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pContrastPointer to a variable to get the current contrast setting.
Return values:
RECERR
Note:
This function and also kRecGetScanContrastVal get the settings Kernel.Scanner.Contrast and Kernel.Scanner.ContrastVal. These settings can be changed by kRecSetScanContrastVal and kRecSetScanContrast.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pCrDefPointer to a variable to get the default contrast value. This is not always the half of the value returned by kRecGetScanContrastMaxVal.
Return values:
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.

Parameters:
[in]sidSettings Collection ID.
[out]pCrMaxPointer to a variable to get the number of available contrast steps.
Return values:
RECERR
Note:
The range of the scanning contrast value is from zero (0) to the returned value of this function minus one (1). If the currently selected scanner does not have a contrast setting capability, the function will return zero (0).
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pContrastPointer to a variable to get the current contrast setting.
Return values:
RECERR
Note:
This function and also kRecGetScanContrast get the settings Kernel.Scanner.Contrast and Kernel.Scanner.ContrastVal. These settings can be changed by kRecSetScanContrastVal and kRecSetScanContrast.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanContrastVal(int sid, out uint pContrast); 
RECERR RECAPIKRN kRecGetScanDropout ( int  sid,
RSDLC pColor 
)

Getting dropout color.

The kRecGetScanDropout function is used to inquire the dropout color of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pColorPointer to a variable to get the current dropout color setting
Return values:
RECERR
Note:
This function gets the setting Kernel.Scanner.Dropout. This setting can be changed by kRecSetScanDropout.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanDropout(int sid, out RSDLC pColor); 
RECERR RECAPIKRN kRecGetScanDropoutCapa ( int  sid,
RSDLC pColor 
)

Getting dropout color capabilities.

The kRecGetScanDropoutCapa function is used to inquire the dropout color capabilities of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pColorPointer 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.
Return values:
RECERR
Note:
Most important RSDLC definitions: dropout color values.
  • RSDLC_WHITE : White lamp or no filter (Default)
  • RSDLC_RED : Red lamp or red filter
  • RSDLC_GREEN : Green lamp or green filter
  • RSDLC_BLUE : Blue lamp or blue filter
  • RSDLC_CYAN : Cyan lamp or cyan filter
  • RSDLC_MAGENTA: Magenta lamp or magenta filter
  • RSDLC_YELLOW : Yellow lamp or yellow filter
The specification of this function in C# is:
 RECERR kRecGetScanDropoutCapa(int sid, out RSDLC pColor); 
RECERR RECAPIKRN kRecGetScanDuplex ( int  sid,
RSDDX pDuplex 
)

Getting duplex scanning mode.

The kRecGetScanDuplex function is used to inquire the duplex scanning mode of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pDuplexPointer to a variable to get the current duplex scanning mode setting
Return values:
RECERR
Note:
This function gets the setting Kernel.Scanner.Duplex. This setting can be changed by kRecSetScanDuplex.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanDuplex(int sid, out RSDDX pDuplex); 
RECERR RECAPIKRN kRecGetScanDuplexCapa ( int  sid,
RSDDX pDuplex 
)

Getting duplex scanning capabilities.

The kRecGetScanDuplexCapa function is used to inquire the duplex scanning capabilities of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pDuplexPointer to a variable to get the duplex scanning capabilities. The returned value is a binary ORed combination of the values above.
Return values:
RECERR
Note:
Most important RSDDX definitions: duplex scanning capabilities of the scanner.
  • RSDDX_SINGLE: Single sided scanning (default)
  • RSDDX_DUPLEX_PAGE: Double sided scanning with same margins
  • RSDDX_DUPLEX_BOOK: Double sided scanning with mirrored margins
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pIgnorePointer to a variable to get the current error mode setting
Return values:
RECERR
Note:
This function gets the setting Kernel.Scanner.IgnoreErrors. This setting can be changed by kRecSetScanErrorMode.
The specification of this function in C# is:
 RECERR kRecGetScanErrorMode(int sid, out bool Ignore); 
RECERR RECAPIKRN kRecGetScanner ( int  sid,
LPCTSTR *  pScanner 
)

Getting the installed scanner.

Returns the currently installed scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pScannerPointer 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.
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pSizePointer to the structure of dimensions. The fields are as follows:
  • cx : width of the ADF,
  • cy : length of the ADF.
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
If the scanner has no ADF zeros are returned.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pSizePointer to the structure of dimensions. The fields are as follows:
  • cx : width of the flat-bed,
  • cy : length of the flat-bed.
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
If the scanner has no flat-bed zeros are returned.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pManufacturerPointer to a buffer where the scanner manufacturer string will be copied to.
[in]iSizeSpecifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes).
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pModelPointer to a buffer where the scanner model string will be copied to.
[in]iSizeSpecifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes).
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pNumPointer to an int variable which will receive the number of initialized scanner models. This parameter should not be NULL.
[out]pScannersPointer 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.
Return values:
RECERR
Note:
The retrieved memory buffer can be deallocated by the call of kRecDeleteScannerNames.
This function builds up the setting subtrees of scanners it retrieves if the pScanners parameter is not NULL. For details, see the description of node Scanners.
The specification of this function in C# is:
 RECERR kRecGetScanners(int sid, out string[] pScanners); 
RECERR RECAPIKRN kRecGetScannerSelected ( int  sid,
LPCTSTR *  pScanner 
)

Getting the current scanner.

Returns the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pScannerPointer 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.
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pSizePointer to the structure of dimensions. The fields are as follows:
  • cx : width of the scanner,
  • cy : length of the scanner.
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
The returned dimensions are typically the maximum width and height of the flat-bed area. In this case the maximum width of the ADF will be the same as that of the flat-bed, the maximum length of the paper the ADF can handle is the height of the flat-bed area or 14 inches, whichever is greater. If the scanner has no flat-bed area then the returned values are the dimensions of the ADF.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pSizePointer to the structure of dimensions. The fields are as follows:
  • cx : width of the transparency unit,
  • cy : length of the transparency unit.
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
If the scanner has no transparency unit zeros are returned.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pVersionPointer to a buffer where the scanner version string will be copied to.
[in]buflenSpecifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes).
Return values:
RECERR
Note:
The specification of this function in C# is:
 RECERR kRecGetScannerVersion(int sid, out string pVersion); 
RECERR RECAPIKRN kRecGetScanOrientation ( int  sid,
RSDOR pOrientation 
)

Getting orientation.

The kRecGetScanOrientation function is used to inquire the orientation of the subsequently scanned image(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pOrientationPointer to a variable to get the current orientation setting.
Return values:
RECERR
Note:
This function gets the setting Kernel.Scanner.Orientation. This setting can be changed by kRecSetScanOrientation.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanOrientation(int sid, out RSDOR pOrientation); 
RECERR RECAPIKRN kRecGetScanOrientationCapa ( int  sid,
RSDOR pOrientation 
)

Getting orientation capabilities.

The kRecGetScanOrientationCapa function is used to inquire the orientation capabilities of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pOrientationPointer to a variable to get the orientation capabilities. The returned value is a binary ORed combination of the values above.
Return values:
RECERR
Note:
Most important RSDOR definitions: orientation capabilities of the scanner. RSDOR_NORMAL: No transformation RSDOR_MIRROR: Mirror horizontally RSDOR_ROTATE90: Rotate 90 degrees CW RSDOR_ROTATE180: Rotate 180 degrees RSDOR_ROTATE270: Rotate 90 degrees CCW
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]pPaperSizePointer to the structure of the paper size. The fields are as follows: -cx : paper width, -cy : paper length.
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
This function gets the settings Kernel.Scanner.PaperLength, Kernel.Scanner.PaperWidth. These settings can be changed by kRecSetScanPaperSize.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanPaperSize(int sid, out SIZE pPaperSize); 
RECERR RECAPIKRN kRecGetScanPaperSource ( int  sid,
RSDPS pSource 
)

Getting paper source.

The kRecGetScanPaperSource function is used to inquire the paper source of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pSourcePointer 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.
Return values:
RECERR
Note:
This function gets the setting Kernel.Scanner.PaperSource. This setting can be changed by kRecSetScanPaperSource.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanPaperSource(int sid, out RSDPS pSource); 
RECERR RECAPIKRN kRecGetScanPaperSourceCapa ( int  sid,
RSDPS pSource 
)

Getting paper source capabilities.

The kRecGetScanPaperSourceCapa function is used to inquire the paper source capabilities of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pSourcePointer to a variable to get the paper source capabilities. The returned value is a binary ORed combination of the following possible values:
  • RSDPS_FLATBED: The scanner has a flat-bed scanning area
  • RSDPS_SHEETFEED: The scanner is a roller type one or it requires manual feed
  • RSDPS_ADF_AUTO: The scanner is equipped with an ADF and it can be selected automatically
  • RSDPS_TRANSP_AUTO: The scanner is equipped with a transparency adapter and it can be selected automatically
  • RSDPS_ADF: The scanner is equipped with an ADF and it can be selected as the exclusive paper source of the scanner
  • RSDPS_TRANSP: The scanner is equipped with a transparency adapter and it can be selected as the exclusive paper source of the scanner
  • RSDPS_ADF_AUTOLOAD: The ADF can load the the next page automatically to the scanning position
  • RSDPS_ADF_SCANAHEAD: The scanner can scan as many pages from the ADF in advance as fit into its internal buffer
  • RSDPS_ADFSTAT_AFTERSCAN: Identifes a scanner whose ADF detects paper only after scan
  • RSDPS_ADF_PRELOAD: The ADF has a preload capability
  • RSDPS_ADF_UNLOAD: The ADF has an unload capability
  • RSDPS_ADF_RELOAD: The ADF has a reload capability
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pFromScannerPointer to a variable to get the current parameter source setting
Return values:
RECERR
Note:
Functions retrieving scan parameters can get their returned values from two different sources: from the scanning system or from the corresponding setting. Normally these values are the same but in special cases they can be different in which cases the functions return with a warning status. The returned values will be the corresponding settings if the FromScanner parameter is FALSE otherwise they will be retrieved from the scanning system. See also scanner setting synchronization.
This function gets the setting Kernel.Scanner.GetParamsFromScanner. This setting can be changed by kRecSetScanParamSource.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[out]pResolutionPointer to a variable to get the current scanning resolution setting in DPI
Return values:
RECERR
Note:
This function gets the setting Kernel.Scanner.Resolution. This setting can be changed by kRecSetScanResolution.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanResolution(int sid, out uint pResolution); 
RECERR RECAPIKRN kRecGetScanResolutionCapa ( int  sid,
RSDRS pResolCapa 
)

Getting resolution capabilities.

The kRecGetScanResolutionCapa function is used to inquire the resolution capabilities of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pResolCapaPointer to a variable to get the resolution capabilities. The returned value is a binary ORed combination of the values above.
Return values:
RECERR
Note:
Most important RSDRS definitions: scanning resolution values.
  • RSDRS_75 : Scanning with 75 dpi
  • RSDRS_100 : Scanning with 100 dpi
  • RSDRS_150 : Scanning with 150 dpi
  • RSDRS_200 : Scanning with 200 dpi
  • RSDRS_240 : Scanning with 240 dpi
  • RSDRS_300 : Scanning with 300 dpi
  • RSDRS_400 : Scanning with 400 dpi
  • RSDRS_600 : Scanning with 600 dpi
  • RSDRS_800 : Scanning with 800 dpi
  • RSDRS_1200: Scanning with 1200 dpi
  • RSDRS_1600: Scanning with 1600 dpi
  • RSDRS_2400: Scanning with 2400 dpi
  • RSDRS_3200: Scanning with 3200 dpi
  • RSDRS_4800: Scanning with 4800 dpi
The specification of this function in C# is:
 RECERR kRecGetScanResolutionCapa(int sid, out RSDRS pResolCapa); 
RECERR RECAPIKRN kRecGetScanStandardPaperSize ( RSDPP  Paper,
LPSIZE  pSize 
)

Getting standard paper size.

The kRecGetScanStandardPaperSize function is used to inquire the dimensions of standard paper sizes.

Parameters:
[in]PaperOne of the standard paper sizes (RSDPP_*)
[out]pSizePointer to the structure of dimensions. The fields are as follows:
  • cx : paper width,
  • cy : paper length.
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
See the list of all the possible standard paper sizes.
The specification of this function in C# is:
 RECERR kRecGetScanStandardPaperSize(RSDPP Paper, out SIZE pSize); 
RECERR RECAPIKRN kRecGetScanStartMode ( int  sid,
RSDST pStart 
)

Getting starting mode.

The kRecGetScanStartMode function is used to inquire the starting mode of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pStartPointer to a variable to get the current starting mode setting
Return values:
RECERR
Note:
This function gets the setting Kernel.Scanner.StartMode. This setting can be changed by kRecSetScanStartMode.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
 RECERR kRecGetScanStartMode(int sid, out RSDST pStart); 
RECERR RECAPIKRN kRecGetScanStartModeCapa ( int  sid,
RSDST pStart 
)

Getting starting mode capabilities.

The kRecGetScanStartModeCapa function is used to inquire the starting mode capabilities of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[out]pStartPointer to a variable to get the starting mode capabilities. The returned value is a binary ORed combination of the values above.
Return values:
RECERR
Note:
Most important RSDST definitions: starting modes of the scanner.
  • RSDST_IMMEDIATE: Start immediately (default)
  • RSDST_PAPER: Start when the ADF is loaded
  • RSDST_BUTTON: Start when a button is pressed on the scanner
  • RSDST_UI_SHOW: Show the native UI of the underlying scanning subsystem
  • RSDST_UI_HIDE: Hide the native UI of the underlying scanning subsystem
  • RSDST_UI_ONCE: Show the native UI of the underlying scanning subsystem only once for a stack of paper in the ADF
  • RSDST_UI_KEEP: Keep the native UI of the underlying scanning subsystem shown after scan
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]PaperSizeOne of the standard paper sizes (RSDPP_*)
[in]PortraitOrientation of the paper: TRUE if portrait, FALSE if landscape
[in]PaperSourceThe following values are valid: RSDPS_FLATBED, RSDPS_SHEETFEED, RSDPS_ADF and RSDPS_TRANSP, whichever is supported by the scanner (see kRecGetScanPaperSourceCapa)
[out]pSuppThe 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.
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
The specification of this function in C# is:
 RECERR kRecReleaseScanner(int sid); 
RECERR RECAPIKRN kRecReserveScanner ( int  sid)

Reserving the selected scanner.

Reserves the currently selected scanner for the current application.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
The reserved scanner cannot be used by other CSDK/RSD-based applications until it is released. Reserving a scanner prevents its driver from unloading as a side effect. This may speed up continuous scanning from ADF.
The specification of this function in C# is:
 RECERR kRecReserveScanner(int sid); 
RECERR RECAPIKRN kRecResetScanner ( int  sid)

Resetting the selected scanner.

Resets the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
As a side effect all prescanned images will be lost. This is how to remove prescanned images, such as the back side images in duplex scanning or to stop scanning from ADF when ScanAhead is on if the scanning process needs to be aborted.
The specification of this function in C# is:
 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.

Parameters:
[in]hWndThe window handle of the main window of the application
[in]pScanIniName 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]iIniLocThis 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]pISISCustIDInternal use only. Set to NULL.
Return values:
RECERR
Note:
Within the Capture SDK the 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.
The integrator or the user can create more than one Scanner init file and use them at different times.
In the place of the 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.
Unlike in previous versions of the CSDK, this function does not initialize any specific scanner. Use the kRecSetScannerSelected function for this purpose. A former call of
        RECERR rc = RecScanInit( "SCANNER.INI", hWnd );
can exactly be replaced by the following sequence:
        RECERR rc = kRecScanInit( hWnd, NULL, SCINI_INSTALL, NULL );
        if ( rc == REC_OK )
        {
            rc = kRecSetScannerSelected( 0, NULL, NULL );
            if ( rc != REC_OK )
                kRecScanQuit();
        }
Any scanning functions can return with the scanner error code (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.
The specification of this function in C# is:
    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.

Parameters:
[in]hWndThe window handle of the main window of the application to be used as the parent of the Wizard dialog window.
[in]pProductName of the calling application to be displayed by the Wizard
Return values:
RECERR
Note:
In the place of the hWnd parameter NULL can also be used, in this case the hWnd given by the call of kRecScanInit will be used.
The specification of this function in C# is:
    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.

Parameters:
[in]hWndThe window handle of the main window of the application to be used as the parent of the Wizard dialog window.
[in]pScannerThe manufacturer and the name of the model separated by a space character
[in]pProductName of the calling application to be displayed by the Wizard
[in]bSilentSilent setup for the scanners with hints in the hint file.
Return values:
RECERR
Note:
In the place of the hWnd parameter NULL can also be used, in this case the hWnd given by the call of kRecScanInit will be used.
The specification of this function in C# is:
    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.

Parameters:
[in]sidSettings Collection ID.
[in]pImgFileName of the image file to be created.
[in]ImgFileFormatImage file format of the output image file.
Return values:
RECERR
Note:
This function assumes that the scanning subsystem has been initialized properly and the application has set the necessary scanning related settings.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]pImgFileName of the output image file.
[in]ImgFileFormatImage file format of the output image file.
[in]pCallBackCallback function provided by the application or NULL.
[in]pContextThis pointer is transferred to the pCallBack function when it is called.
Return values:
RECERR
Note:
This function assumes that the scanning subsystem has been initialized properly and the application has set the necessary scanning related settings.
If the scanner is equipped with an ADF, and a 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.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Return values:
RECERR
Note:
Note that the termination of the engine requires a separate kRecQuit function call.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]pRectPointer to the structure of the dimensions. The fields of pRect are as follows:
  • left : left margin of the scanning area,
  • top : top margin of the scanning area,
  • right : scanning width (not the right margin!),
  • bottom : scanning length (not the bottom margin!).
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
If this function is not called to specify the paper size, the size of the current paper source will be applied.
This function sets the settings Kernel.Scanner.Left, Kernel.Scanner.Top, Kernel.Scanner.Length, Kernel.Scanner.Width. These settings can be retrieved by kRecGetScanArea.
The specification of this function in C# is:
 RECERR kRecSetScanArea(int sid, RECT pRect); 
RECERR RECAPIKRN kRecSetScanBitsPerSample ( int  sid,
RSDII  Bps 
)

Setting scanning mode.

The kRecSetScanBitsPerSample function is used to specify the scanning mode of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[in]BpsScanning mode to be set
Return values:
RECERR
Note:
If requested, during the PROCESSID::PID_IMGINPUT process an image conversion is also performed, according to the Conversion parameter of a previous kRecSetImgConvMode call. The resulting image type (e.g. B/W, 8-bit gray, etc.) of the new image will be determined by both the Bps and the specified image conversion mode parameters.
If this function is not called to specify the scanning mode, the default value of Black-and-white scanning will be applied.
This function sets the setting Kernel.Scanner.Bps. This setting can be retrieved by kRecGetScanBitsPerSample.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]BrightnessBrightness 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.
Return values:
RECERR
Note:
Use the kRecGetScanBrightnessMaxVal function to determine whether the brightness can be set for the currently installed scanner.
This function and also kRecSetScanBrightnessVal set the settings Kernel.Scanner.Brightness and Kernel.Scanner.BrightnessVal. These settings can be retrieved by kRecGetScanBrightnessVal and kRecGetScanBrightness.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]BrightnessBrightness 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.
Return values:
RECERR
Note:
Use the kRecGetScanBrightnessMaxVal function to determine whether the brightness can be set for the currently selected scanner.
This function and also kRecSetScanBrightness set the settings Kernel.Scanner.Brightness and Kernel.Scanner.BrightnessVal. These settings can be retrieved by kRecGetScanBrightnessVal and kRecGetScanBrightness.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]ContrastContrast value to be set. The value should be in the range of 0-100%.
Return values:
RECERR
Note:
Use the kRecGetScanContrastMaxVal function to determine whether the contrast can be set for the currently installed scanner.
This function and also kRecSetScanContrastVal set the settings Kernel.Scanner.Contrast and Kernel.Scanner.ContrastVal. These settings can be retrieved by kRecGetScanContrastVal and kRecGetScanContrast.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]ContrastContrast value to be set. The minimum value is zero (0), the maximum value is the value returned by kRecGetScanContrastMaxVal minus one (1).
Return values:
RECERR
Note:
Use the kRecGetScanContrastMaxVal function to determine whether the contrast can be set for the currently selected scanner.
This function and also kRecSetScanContrast set the settings Kernel.Scanner.Contrast and Kernel.Scanner.ContrastVal. These settings can be retrieved by kRecGetScanContrastVal and kRecGetScanContrast.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
The default scanner settings are as follows:
  • Paper Source = RSDPS_ADF_AUTO;
  • Duplex = RSDDX_SIMPLEX
  • Resolution = 300;
  • ScanArea = 0, 0, 9921, 14031 or 0, 0, 10200, 13200;
  • PaperSize = A4 or Letter;
  • Brightness = default of the scanner;
  • Contrast = default of the scanner;
  • BitsPerSample = RSDII_BW;
  • Dropout = RSDLC_WHITE;
Which means that a forthcoming scanning process will be performed as B/W scanning without dropout color filtering at 300 dpi resolution while the scanner brightness and contrast will be set to their default values. The scanning subsystem will be prepared for an A4-size or Letter-size paper to be scanned depending on the regional settings.
The specification of this function in C# is:
 RECERR kRecSetScanDefaults(int sid); 
RECERR RECAPIKRN kRecSetScanDropout ( int  sid,
RSDLC  Color 
)

Setting dropout color.

The kRecSetScanDropout function is used to specify the dropout color of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[in]ColorDropout color to be set
Return values:
RECERR
Note:
The dropout color feature can be used to eliminate color background patterns in documents to be scanned. Scanning with a dropout color may mean that lines, borders, frames etc. visible on the input document become invisible on the scanned image. This can be useful for forms or checkmark processing.
If this function has not been called, the default value of the dropout color setting, RSDLC_WHITE, will be applied.
This function sets the setting Kernel.Scanner.Dropout. This setting can be retrieved by kRecGetScanDropout.
The specification of this function in C# is:
 RECERR kRecSetScanDropout(int sid, RSDLC Color); 
RECERR RECAPIKRN kRecSetScanDuplex ( int  sid,
RSDDX  Duplex 
)

Setting duplex scanning mode.

The kRecSetScanDuplex function is used to specify the duplex scanning mode of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[in]DuplexDuplex scanning mode setting to be set.
Return values:
RECERR
Note:
This function sets the setting Kernel.Scanner.Duplex. This setting can be retrieved by kRecGetScanDuplex.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]IgnoreIgnore errors in kRecSetScanParamsBySettings function if TRUE.
Return values:
RECERR
Note:
The kRecSetScanParamsBySettings function sets all scanner parameters with the appropriate settings. Any settings with invalid values will be substituted by the appropriate default values if the 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.
This function sets the setting Kernel.Scanner.IgnoreErrors. This setting can be retrieved by kRecGetScanErrorMode.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]pScannerThe 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]pCallWizIf 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.
Return values:
RECERR
Note:
After having called this function, the currently selected scanner model and its manufacturer can be retrieved with the kRecGetScannerModel and kRecGetScannerManufacturer functions, respectively.
In general, this function does not check that the scanner is switched on or ready for use. It requires only the presence of the correct scanner driver. The application may check the scanner by calling an inquiry function which communicates with it, e.g. kRecGetScanADF.
This function sets 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. For details, see Settings of the Scanner Module, Different ways of adjusting scanner settings and the description of Symbolic links.
The specification of this function in C# is:
    RECERR kRecSetScannerSelected(int sid, string pScanner, out bool pCallWiz);
    // or when pCallWiz is NULL in C/C++
    RECERR kRecSetScannerSelected(int sid, string pScanner);
RECERR RECAPIKRN kRecSetScanOrientation ( int  sid,
RSDOR  Orientation 
)

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.

Parameters:
[in]sidSettings Collection ID.
[in]OrientationOrientation to be set
Return values:
RECERR
Note:
This function sets the setting Kernel.Scanner.Orientation. This setting can be retrieved by kRecGetScanOrientation.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]pPaperSizePointer to the structure of the paper size. The fields are as follows:
  • cx : paper width,
  • cy : paper length.
Return values:
RECERR
Note:
All values are measured in 1/1200 inches.
If this function is not called to specify the paper size, the size of the current paper source will be applied.
Using this function is highly recommended for the proper alignment of the image.
This function sets the settings Kernel.Scanner.PaperLength, Kernel.Scanner.PaperWidth. These settings can be retrieved by kRecGetScanPaperSize.
The specification of this function in C# is:
 RECERR kRecSetScanPaperSize(int sid, SIZE pPaperSize); 
RECERR RECAPIKRN kRecSetScanPaperSource ( int  sid,
RSDPS  PaperSource 
)

Setting paper source.

The kRecSetScanPaperSource function is used to specify the paper source of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[in]PaperSourcePaper source to be set
Return values:
RECERR
Note:
The default value is 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).
If the scanner has different paper sources for scanning, the application can specify here from which paper source the scanning should be performed.
RSDPS_ADF_AUTOLOAD or RSDPS_ADF_SCANAHEAD can be ORed to RSDPS_ADF_AUTO or RSDPS_ADF to speed up scanning from ADF.
This function sets the setting Kernel.Scanner.PaperSource. This setting can be retrieved by kRecGetScanPaperSource.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
Return values:
RECERR
Note:
Functions retrieving scan parameters can get their returned values from two different sources: from the scanning system or from the corresponding setting. Normally these values are the same but in special cases they can be different in which cases the functions return with a warning status. See also scanner setting synchronization.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]FromScannerReturn parameter values from the scanning system by the appropriate functions if TRUE; return the corresponding setting values if FALSE.
Return values:
RECERR
Note:
Functions retrieving scan parameters can get their returned values from two different sources: from the scanning system or from the corresponding setting. Normally these values are the same but in special cases they can be different in which cases the functions return with a warning status. The returned values will be the corresponding settings if the FromScanner parameter is FALSE otherwise they will be retrieved from the scanning system. See also scanner setting synchronization.
This function sets the setting Kernel.Scanner.GetParamsFromScanner. This setting can be retrieved by kRecGetScanParamSource.
The specification of this function in C# is:
 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.

Parameters:
[in]sidSettings Collection ID.
[in]ResolutionScanning resolution to be set in DPI
Return values:
RECERR
Note:
If this function is not called to specify the scanning resolution, the default value, 300 DPI will be applied.
This function sets the setting Kernel.Scanner.Resolution. This setting can be retrieved by kRecGetScanResolution.
The specification of this function in C# is:
 RECERR kRecSetScanResolution(int sid, uint Resolution); 
RECERR RECAPIKRN kRecSetScanStartMode ( int  sid,
RSDST  Start 
)

Setting starting mode.

The kRecSetScanStartMode function is used to specify the starting mode of subsequent scanning(s) of the currently selected scanner.

Parameters:
[in]sidSettings Collection ID.
[in]StartStarting mode to be set
Return values:
RECERR
Note:
One UI mode may be ORed with the start mode if supported.
The UI mode set here will override the one set by the Wizard.
This function sets the setting Kernel.Scanner.StartMode. This setting can be retrieved by kRecGetScanStartMode.
The specification of this function in C# is:
 RECERR kRecSetScanStartMode(int sid, RSDST Start);