New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dwt

Package Overview
Dependencies
Maintainers
0
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dwt

Dynamic Web TWAIN is a TWAIN/ICA/SANE-based scanning SDK software specifically designed for web applications running on Windows/macOS/Linux. With just a few lines of code, you can develop robust applications to scan documents from TWAIN/ICA/SANE-compatibl

  • 18.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

Dynamic Web TWAIN SDK for Scanner and Camera

version downloads jsdelivr

Dynamic Web TWAIN is a cross-platform scanning SDK designed for web document management applications. With just a few lines of JavaScript code, you can develop robust web applications to scan documents, edit images and save them to file systems. To see it in action, please visit this online demo

Note: Dynamic Web TWAIN SDK v18.5.1 is built in this package. For more detail, check the Version Info.

Table of Contents

Supported Environments

Supported Image Capturing Devices

  • Physical Document Scanners
  • Desktop Webcam

Supported Web Browsers

  • Chrome
  • Firefox
  • Edge
  • Safari

Supported OSs

  • Windows
  • Linux
  • macOS
  • Android
  • iOS (Remote scanner)

Supported CPU Architectures

  • x86/x64
  • MIPS64
  • ARM64

License Key

Installation

  • Official web site

    Dynamic Web TWAIN SDK for Windows, Linux, macOS

  • NPM

    npm install dwt
    

A Virtual Scanner

If you do not have a physical scanner to test on Windows, you can install a virtual scanner.

Read more here.

Deployment

Dynamic Web TWAIN relies on the files in the /dist/ folder to work. Make sure to put these files on your server and correctly refer to them by specifying the path with ResourcesPath (relative and absolute paths are both fine).

If you are making use of the CDN jsDelivr, you will still need to host the /dist/ folder somewhere on your server and refer to it by specifying the path with ResourcesPath. This is because file types like .msi are not allowed by this CDN.

Quick Start

Step 1 Create a HTML page and load dynamsoft.webtwain.min.js into your page:

<!DOCTYPE html>
<html>
<head>
 <title>Hello World</title>
 <script src="dist/dynamsoft.webtwain.min.js"></script>
</head>
<body>
</body>
</html>

Note that a relative path is used. You might want to change it based on where you are putting your code. The best practise is to put all the files on your own server and under the same domain as your web application.

Step 2 Add a script tag and make initial settings:

<!DOCTYPE html>
<html>
<head>
 <title>Hello World</title>
 <script src="dist/dynamsoft.webtwain.min.js"></script>
</head>
<body>
 <script type="text/javascript">
   Dynamsoft.DWT.ResourcesPath = "dist";
   Dynamsoft.DWT.ProductKey = 't0140cQMAA...';
   Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
 </script>
</body>
</html>

Note that ResourcesPath must be set in order to use the library.

  1. ResourcesPath is a relative path to where you put the directory "/dist/" and all the files in it.
  2. If you don't have a valid ProductKey, you can request a trial key to use.

Step 3 Write code to use the package to do a simple document scan

The following code demonstrates the minimum code needed to use the package. Note the addition of HTML elements as well as JavaScript code. For more sophisticated sample or demo, check out the Sample Gallery and our Github Repositories.

<!DOCTYPE html>
<html>
<head>
 <title>Hello World</title>
 <script src="dist/dynamsoft.webtwain.min.js"></script>
</head>
<body>
 <input type="button" value="Scan" onclick="AcquireImage();" />
 <div id="dwtcontrolContainer"></div>
 <script type="text/javascript">
   Dynamsoft.DWT.ResourcesPath = "dist";
   Dynamsoft.DWT.ProductKey = 't0140cQMAA...'; // Put your own key here
   Dynamsoft.DWT.Containers = [{ ContainerId: 'dwtcontrolContainer', Width: 270, Height: 350 }];
   window.onload = function () {
     Dynamsoft.DWT.Load();
   };
   var DWTObject;
   Dynamsoft.DWT.RegisterEvent("OnWebTwainReady", function() {
     // dwtcontrolContainer is the id of the DIV to create the WebTwain instance in.
     DWTObject = Dynamsoft.DWT.GetWebTwain('dwtcontrolContainer');
   });
   function AcquireImage() {
     if (DWTObject) {
       DWTObject.SelectSourceAsync().then(function(){
         return DWTObject.AcquireImageAsync({
           PixelType: Dynamsoft.DWT.EnumDWT_PixelType.TWPT_RGB,
           Resolution: 200,
           IfCloseSourceAfterAcquire: true
         });
       }).catch(function (exp) {
         alert(exp.message);
       });
     }
   }
 </script>
</body>
</html>

Documentation

Features

Dynamsoft Service for Scanner

FeaturesWindowsLinuxmacOS
Supports up to TWAIN specification 2.3:heavy_check_mark::x::x:
SANE compatible:x::heavy_check_mark::x:
Supports up to TWAIN specification 1.9; ICA compatible:x::x::heavy_check_mark:
Supports capturing document:heavy_check_mark::heavy_check_mark::heavy_check_mark:
Supports editing document:heavy_check_mark::heavy_check_mark::heavy_check_mark:
Optional disk caching mechanism for high volume scanning (thousands of pages):heavy_check_mark::heavy_check_mark::heavy_check_mark:
Built-In Auto Document Feeder (ADF) and multiple image acquisition:heavy_check_mark::heavy_check_mark::heavy_check_mark:
Offers duplex scanning mode:heavy_check_mark::heavy_check_mark::heavy_check_mark:
Supports blank page detection:heavy_check_mark::heavy_check_mark::heavy_check_mark:
Supports setting up image acquisition parameters (resolution, pixel type, bit depth, brightness, contrast, page size, unit, etc.):heavy_check_mark::heavy_check_mark::heavy_check_mark:
Provides native and disk file image transfer modes:heavy_check_mark::heavy_check_mark::heavy_check_mark:
Buffered memory transfer mode:heavy_check_mark::x::x:

More

Contact Us

Contact Dynamsoft to resolve any issue you encounter with the library.

License Agreement

https://www.dynamsoft.com/Products/WebTWAIN_License.aspx

Versions

Dynamsoft Service (DynamsoftService.exe, 64bit)

v18.5.1 (build version 1, 8, 5, 0828)

Dynamsoft Service Manager (DWASManager_18500312.dll, 64bit)

v18.5.1 (build version 18, 5, 0, 0312)

Device Manager (DeviceManager_18510828.dll, 64bit)

v18.5.1 (build version 18, 5, 1, 0828)

Dynamic Web TWAIN (dwt_18.5.1.0828.dll, 64bit)

v18.5.1 (build version 18, 5, 1, 0828)

Dynamsoft PDF Rasterizer (DynamicPdfRx64_11.5.3.0828.dll, 64bit)

v18.5.1 (build version 11, 5, 3, 0828)

Dynamsoft Barcode Reader (dbrx64_9.6.1.0312.dll, 64bit)

v9.6.1 (build version 9, 6, 1, 0312)

Dynamsoft Webcam Addon (DynamicWebcamx64_15.0.0.0625.dll, 64bit)

v18.5.1 (build version 15, 0, 0, 0625)

Dynamsoft Upload Module (UploadModule_1.8.5.0828.dll, 64bit)

v18.5.1 (build version 1, 8, 5, 0828)

Changelog

Check out the release notes of the Dynamic Web TWAIN library.

Keywords

FAQs

Package last updated on 21 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc