Dynamic Web TWAIN - ComponentSource

Transcription

Developer’s GuideAugust 201710 Years of Experience in TWAIN SDKs and Version Control Solutions

ContentsDeveloper’s Guide . 1Preface. 1Description . 1Audience . 1Getting Started . 2What is TWAIN . 2What is Dynamic Web TWAIN . 2Basic Requirements . 3Deciding which Dynamic Web TWAIN Edition to use . 3Building the "Hello World" Scan Page . 4Step 1: Start a Web Application . 41.1 Copy the Dynamsoft Resources folder to your project . 41.2 Create an empty HTML page . 4Step 2: Add Dynamic Web TWAIN to the HTML Page . 42.1 Include the two Dynamsoft JS files in the head tag . 42.2 Add Dynamic Web TWAIN container to the body tag . 4Step 3: Use Dynamic Web TWAIN . 53.1 Add a Scan button and the minimum scripts to scan . 53.2 Review the completed code . 53.3 See the scan page in action . 6Using JavaScript IntelliSense. 8In Visual Studio. 8In Eclipse . 10Customizing the Dynamic Web TWAIN Object . 12Naming the Dynamic Web TWAIN object. 12Changing the Size of the Viewer . 12Changing the Look of the Installation Prompt . 13Using Dynamic Web TWAIN. 14

Properties . 14Methods . 14Events . 14Handling Events . 15Dynamic Web TWAIN Service Configuration . 17General Settings . 17Exploring the Features . 18Customizing scan settings . 18Manipulating the image(s). 19Using Thumbnails . 21How to define two controls within one page . 21Adding/Removing Dynamic Web TWAIN object individually . 22Add a Dynamic Web TWAIN object at runtime. 23Remove a Dynamic Web TWAIN object at runtime . 24Scanning a large number of Documents - Disk Caching . 24Using the Image Editor . 25What is the Image Editor . 25What can you do with the Image Editor . 25Opening the Image Editor . 26Loading local image(s) into Dynamic Web TWAIN . 26Preparation . 26Calling the methods. 26Saving image(s) locally. 27Preparation . 27Calling the methods. 28Uploading image(s) to the web server . 29Preparation . 29Calling the methods. 30Action Page . 31Uploading to FTP . 32

Uploading image(s) to a Database . 33Uploading image(s) with extra data . 33Downloading image(s) from the web . 34Using Custom capabilities . 35Using Add-ons. 37How to use PDF Rasterizer. 37How it works . 38How to use the Professional OCR Add-on . 40License Verification. 43Basic Information . 43Generating a Product Key . 43Using the Product Key . 43Set it during initialization (recommended) . 43Set it when necessary (not recommended) . 44Multiple Product Keys . 44Upgrading from Previous Versions . 45Troubleshooting . 46Installing the Virtual Scanner for testing . 46Is my scanner driver TWAIN-compliant . 46Why is my scanner not shown or not responding in the browser . 46Why does Dynamic Web TWAIN fail to upload my documents. 47More Troubleshooting Topics . 47Useful Resources . 48Online Demo Site . 48Knowledge Base . 48Forum . 48FAQ . 48API Documentation . 48Contact Us. 48Appendix A: How to Perform Capability Negotiation . 49

Description . 49Capability Containers . 49What is involved. 50Get . 50Set. 51TW ONEVALUE . 51TW ARRAY . 52TW RANGE . 53TW ENUMERATION . 54Using a custom capability that the TWAIN Specification doesn’t have . 55

PrefaceDescriptionThis guide provides instructions on how to use Dynamsoft’s Dynamic Web TWAIN SDK. It provides anoverview of most of the things you can achieve with the SDK.AudienceThis guide is meant for all developers interested in the Dynamic Web TWAIN SDK.For new developers, there is a step-by-step g

Deciding which Dynamic Web TWAIN Edition to use Dynamic Web TWAIN has several editions: ActiveX, HTML5 for Windows, HTML5 for Mac and HTML5 for Linux. Based on the browser(s) your end users use, you can decide which edition(s) to use. ActiveX: supports IE 6-9 on Windows by default, it can be configured to support IE 10, 11 as well;