正如我们在上一节中介绍的三种使用Dynamic Web TWAIN的方法,您可以通过三种方式控制Dynamic Web TWAIN对象:属性,方法和事件。有关Dynamic Web TWAIN的所有内置属性,方法和事件的完整列表,请参阅我们的在线API文档以供您参考。在这里,我们将更详细地介绍Dynamic Web TWAIN的功能:在开始实际扫描会话之前,您可以选择扫描文档的方式。通常,您可以更改扫描仪内置用户界面中的所有设置。
在开始实际扫描会话之前,您可以选择扫描文档的方式。通常,您可以更改扫描仪内置用户界面中的所有设置。以虚拟扫描仪为例:
一方面,对于最终用户而言,所有这些设置可能都是压倒性的,特别是对于那些没有技术背景的用户。另一方面,您可能希望以相同的方式扫描所有存档文档。使用Dynamic Web TWAIN,您可以在JavaScript代码中自定义所有这些设置。例如:
DWObject.SelectSource();
/* You should customize the settings after opening a source */
DWObject.OpenSource();
/* Hide the User Interface of the scanner */
DWObject.IfShowUI = false;
/* Use the document feeder to scan in batches */
DWObject.IfFeederEnabled = true;
/* Scan in Simplex mode (only 1 side of the page) */
DWObject.IfDuplexEnabled = false;
/* Scan pages in GRAY */
DWObject.PixelType = EnumDWT_PixelType.TWPT_GRAY;
/* Scan pages in 200 DPI */
DWObject.Resolution = 200;
/* Start scanning */
DWObject.AcquireImage();
相关API
BitDepth | Brightness | Contrast | PageSize | Resolution |
PixelType | PixelFlavor | IfDuplexEnabled | IfFeederEnabled | IfShowUI |
XferCount | IfAutoDiscardBlankpages | IfAutomaticDeskew | IfAutomaticBorderDetection |