Dynamic Web TWAIN 9.0 Released!

I am pleased to announce that version 9.0 is now available!

Three dramatic improvements are included in this new version:

  • Do document scanning in an independent process, which greatly improves the robustness of the application.
  • New license verification process. In v9.0, license key can be encrypted in licensing tool and directly embedded in scan page. So the installation & deployment process will be much easier for developers and end users.
  • Support multi-thread HTTP Upload/Download, which dramatically improves upload/download performance and user experience.

For full release notes, please refer to here.

Other resources:

If you are ready to purchase a license, please visit our online store or send your order tosales@dynamsoft.com.

I’d love to hear any comments or suggestions about this new version. Please don’t hesitate to contact me.

Take a Photo from a Desktop Webcam and Upload in a Web Browser

Control web cameras or the built-in laptop webcams inside IE, Firefox and Chrome with JavaScript

In some scenarios, such as Visitor Monitoring module for a government department or Patient Tracking module for a hospital, we may need to take a snap of human faces, patient charts, user IDs and so on and then upload them to a central server. How do we implement this for a web application?

How to interact with webcams connected to a computer in browsers?

It’s not possible to access a webcam using JavaScript only. However, it’s possible through the following options:

  • Flash – The web application requests permission to use the camera and the user will be presented with a dialog indicating the site wishes to use the camera. After the user accepts, the application will be able to grab images from the camera.
    First, you’ll need to initialize and attach the camera
  • HTML5 – The biggest hurdle is only a few browser versions support HTML 5. Details >>
  • 3-rd party browser plugin – Internet Explorer can interact with an imaging peripheral through an ActiveX control. Firefox and Chrome can do the same through a plugin of Netscape Plugin Application Programming Interface (NPAPI).

In this article, we are going to take a look at the 3rd option – Dynamic Webcam SDK. Unlike in the first 2 options where a developer needs to deal with camera initialization, an image capturing, editing encoding and uploading separately, everything is encapsulated in Dynamic Webcam SDK.

Introduction to the Webcam API

Dynamic Webcam SDK is a browser plugin which enables users to acquire images from a webcam, edit and then upload/save them to a database, web server or local disk. Also, it can capture a live video stream into a container and grab a snapshot to be exported to a file/binary. The plugin works with all webcams that are compatible with Windows Image Acquisition (WIA) and USB video device class (UVC).

Two editions are provided for different browsers: ActiveX Edition for IE and Plugin Edition for other browsers on Windows OS.

Client Side Server Side
JavaScript, VBScript, HTML ASP.NET, PHP, JSP, ASP, VB.NET, etc.
ActiveX Edition – x86 x64
Plugin Edition – on Windows
IIS, Tomcat, Apache and more 

 

Here you can see a working application:
http://www.dynamsoft.com/demo/dws/online_demo_webcam.aspx

Key Features >>

Sample Code

Client-side JavaScript

1. Initialize Dynamic Webcam SDK

ActiveX Edition

Firstly, copy DynamicWebcam.cab to the web server. There are 32-bit and 64-bit CAB files. Choose the proper one according to the needs. The trial and full versions of Dynamic Webcam use different class-ids.

DynamicWebcam.cab can be found in the installation folder of Dynamic Webcam SDK.

For the TRIAL version of Dynamic Webcam, insert the following code in your JS code:

<object classid="clsid:A65BC1E1-B2CE-4251-A0CB-721AC7E02B52" id="DynamicWebcam1" width="143" height="156"
CodeBase = "DynamicWebcam.cab#version=8,0">
</object>

Plug-in Edition

Plug-in edition can be used in Gecko-based browsers including Firefox, Chrome, Safari & Opera on PC. Please copy DynamicWebcam.msi to the web server.

Read more

How to Load Existing Images to Your Web App

A lot of businesses and organizations have a bunch of existing digital documents and images that require to be handled. These digital materials might be shared documents for different departments in the company, collected images from the customers, and more.

In this article, I’ll share with you on how to take advantage of a third-party image acquisition & processing component Dynamic Web TWAIN to handle these existing images. The following samples are based on the assumption that you’ve installed Dynamsoft’s Dynamic Web TWAIN on your development machine (30-Day Free Trial Download).

Load Images from Local Folders

You can use the LoadImage method to load images from your local disk or a shared folder. Supported image format includes BMP, JPEG, PNG, TIFF (both single and multi-page) and PDF (both single and multi-page).

LoadImage is a perfect method for image loading if you know the exact path and name of the images. If you want to provide a flexible way for your customers to load their local images, you can set IfShowFileDialog to true to show the browser dialog box.

Check out the feature in action: Dynamic Web TWAIN Online Demo

Download Images from Web Server or Database

Call the method HTTPDownload method to download images from your web server. The following sample is developed by JavaScript. “localhost” indicates the server name, and “/WebTWAIN/Images/ImageData.jpg” is the relative path of ImageData.jpg on the web server.

Download Images from FTP Site

If you want to get images from your FTP site to your web application, you can use the FTPDownload method. Below is a simple sample in JavaScript.

After loading the images to your web application, you can further process them, for instance, scanning new documents and uploading all of them to your library.

Forget about the browser types

Besides document scanning, editing and uploading, supporting all mainstream browsers is another nice feature of Dynamic Web TWAIN. In this article, I’ll share with you on how to solve the browser compatibility issue using the image scanning SDK.

Browser Market Share

It’s always a pain for web application developers to learn the browser usage of end users. Whenever creating a web application, developers need to consider the browser compatibilities, and consequently need to find out the browsers that are being used by their customers.

I googled the browser market share online, and found the following figure from chitika’s website. If you’d like to learn more about the information, you can visit chitika’s website.

Complicated!!!??? It’s just complicated and time consuming to learn all these basic information from the customers. It would be ideal if there is a solution that lets us focus on the main functions regardless of the browser types. 

Browser Market Share

Make your Web Scanning App Support Different Browsers

Dynamic Web TWAIN, a TWAIN scanning SDK, provides 3 different editions to support different browsers and OSes.

ActiveX Edition: Supports 32-bit & 64-bit IE on Windows

Plug-in Edition: Supports Firefox, Chrome, Safari and Opera on Windows

Mac Edition: Supports Firefox, Chrome, Safari and Opera on Mac OS

Try it online

You can play with the online demo to get a rough idea of how it works. The demo supports images scanning from browsers including IE (both 32-bit & 64-bit), Firefox, Chrome, Safari and Opera.

Dynamic Web TWAIN Online Demo

You can customize the functions and the layout based on the online demo (or even developing from scratch) according to your needs.

Download Dynamic Web TWAIN 30-day Free Trial and Build Your Own Web Scanning App

How does it work with different OSes/browsers?

Code snippet: The sample code below shows you how to detect the browser being used and call the corresponding edition to implement the image acquisition.

//In HTML, you need to define the place holders for Dynamic Web TWAIN: 

<div id="dwtcontrol">
<div id="maindivPlugin" >
<div style="display: none;" id="mainControlNotInstalled">
<!-- Display a link for the .msi when the Plug-in is not installed-->
<table id="maintblcontrolnotinstalled" class="divcontrol">
    <tr>
    <td style="text-align: center; vertical-align: middle;">
        <a href="DynamicWebTWAIN/DynamicWebTWAINPlugIn.msi"><strong>Download and install the Plug-in Here</strong></a><br />
        After the installation, please restart your browser.
    </td>
    </tr>
</table>
</div> 

<div style="display: none;" id="MACmainControlNotInstalled">
<!-- Display a link for the .pkg when the Mac edition is not installed-->
<table id="MACtblmainControlNotInstalled" class="divcontrol">
    <tr>
    <td style="text-align: center; vertical-align: middle;">
        <a href="DynamicWebTWAIN/DynamicWebTWAINMacEditionTrial.pkg"><strong>Download and install the Plug-in Here</strong>
</a><br />
        After the installation, please quit and restart your browser. <br />
        If you are using Safari 5.0, you need to run the browser in 32-bit Mode</a>.<br />
    </td>
    </tr>
</table>
</div>

<div id="mainControlInstalled">
<!-- Place holder for the Plug-in -->
</div>
</div> 

<div id="maindivIE">
<!-- Place holder for the ActiveX, the below object for the LPK (License) is necessary-->
<object classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" style="display:none;">
    <param name="LPKPath" value="DynamicWebTWAIN/DynamicWebTwain.lpk" />
</object>

<div id="maindivIEx86" >                                   
</div>
<div id="maindivIEx64" >                                  
</div>
</div>
</div>

//In JavaScript: 

var WebTWAIN;
var OSType;
// WebTWAIN is the parameter name which represents Dynamic Web TWAIN of all three editions. This way you can use the same code for all browsers.

//Detect whether the browser is IE.

function ExplorerType() {
    ua = (navigator.userAgent.toLowerCase());
    if (ua.indexOf("msie") != -1) {
        return "IE";
    }
    else {
        return "notIE";
    }
}

function Pageonload(){//Detect the browser when the page first loads
    OSType = "windows";
    if (navigator.userAgent.indexOf("Macintosh") != -1) {
        OSType = "mac";
    }
    var strObjectFF = "";
    strObjectFF = " <embed style='display: inline' id='mainDynamicWebTWAINnotIE'
    type='Application/DynamicWebTwain-Plugin'";
    if (OSType == "mac") {
        strObjectFF += "pluginspage='DynamicWebTWAIN/DynamicWebTWAINMacEditionTrial.pkg'></embed>";
        //For browsers on Mac, use the PKG
    }
    else {
        strObjectFF += "pluginspage='DynamicWebTWAIN/DynamicWebTWAINPlugIn.msi'></embed>";
        //For non-IE browsers on PC, use the MSI
    }
    var strObject = "";
    strObject += "   </object>";
    if (ExplorerType() == "IE" && navigator.userAgent.indexOf("Win64") != -1 && navigator.userAgent.indexOf("x64") != -1) {
        //For 64-bit IE, use the x64 CAB
        strObject = "<object id='mainDynamicWebTwainIE' codebase='DynamicWebTWAIN/DynamicWebTWAINx64.cab#version=8,0'" +
        "classid='clsid:FFC6F181-A5CF-4ec4-A441-093D7134FBF2'> " + strObject;
        //Display the right Plug-in and hide others

        var objDivx64 = document.getElementById("maindivIEx64");
        objDivx64.style.display = "inline";
        objDivx64.innerHTML = strObject;
        var obj = document.getElementById("maindivPlugin");
        obj.style.display = "none";
        WebTWAIN = document.getElementById("mainDynamicWebTwainIE");
    }
    else if (ExplorerType() == "IE" && (navigator.userAgent.indexOf("Win64") == -1 || navigator.userAgent.indexOf("x64") == -1)) {
        //For 32-bit IE, use the normal CAB
        strObject = "<object id='mainDynamicWebTwainIE' codebase='DynamicWebTWAIN/DynamicWebTWAIN.cab#version=8,0'" +
        "classid='clsid:FFC6F181-A5CF-4ec4-A441-093D7134FBF2'> " + strObject;

        //Display the right Plug-in and hide others        
        var objDivx86 = document.getElementById("maindivIEx86");
        objDivx86.innerHTML = strObject;
        objDivx86.style.display = "inline";
        var obj = document.getElementById("maindivPlugin");
        obj.style.display = "none";
        WebTWAIN = document.getElementById("mainDynamicWebTwainIE");
    }
    else {
        //Display the right Plug-in and hide others
        var objDivFF = document.getElementById("mainControlInstalled");
        objDivFF.style.display = "none";
        objDivFF.innerHTML = strObjectFF;
        var obj = document.getElementById("maindivIE");
        obj.style.display = "none";
        var obj = document.getElementById("maindivPlugin");
        obj.style.display = "inline";
        objDivFF.style.display = "inline";
        WebTWAIN = document.getElementById("mainDynamicWebTWAINnotIE");
    }

    //Detect Dynamic Web TWAIN when it is loaded (after 0.5 sec)

    seed = setInterval(ControlDetect, 500);
}

function ControlDetect() {
    if (WebTWAIN.ErrorCode == 0) {//Dynamic Web TWAIN is installed and ready to use
        clearInterval(seed);
    }
    else {
        if (OSType == "mac") {

            //Dynamic Web TWAIN Mac edition is not installed, display the download link for the pkg.

            document.getElementById("MACmainControlNotInstalled").style.display = "inline";
            document.getElementById("mainControlInstalled").style.display = "none";
        }
        else if (ua.match(/chrome\/([\d.]+)/) || ua.match(/opera.([\d.]+)/) || ua.match(/version\/([\d.]+).*safari/)) {

            //Dynamic Web TWAIN Plug-in edition is not installed, display the download link for the msi.
            //Please NOTE that Firefox doesn't need to display this link because it will prompt for the installation

            document.getElementById("mainControlNotInstalled").style.display = "inline";
            document.getElementById("mainControlInstalled").style.display = "none";
        }
    }
}

Deployment

Assuming you are using the sample code provided in this article, you can copy the following files to the DynamicWebTWAIN folder on your web server.

DynamicWebTWAIN.cab

DynamicWebTWAINx64.cab

DynamicWebTWAINPlugIn.exe

DynamicWebTWAINMacEditionTrial.pkg

All these files can be found in the installation folder of Dynamic Web TWAIN.

For the ActiveX edition, you also need to generate a LPK file and copy it to the same folder (DynamicWebTWAIN)

How to generate a LPK file

If you have any tips to share with us, please feel free to add your comments below.

Dynamsoft’s Webcam SDK Allows Developers to Create Image Capture Web Apps

New Dynamic Webcam SDK™ is Compatible with All Mainstream Browsers to Enable Secure Webcam All-in-One Image Capture, Processing and Saving in Web Applications

Dynamsoft Corp., a developer of source control / version control software and TWAIN™ SDK (software development kit) solutions, today announced its new Dynamic Webcam SDK™. The SDK enables software developers to implement webcam online image capture applications. It can be developed as a browser-based webcam plug-in or with ActiveX®. It is ideal in banking, hospital, government and other industries where convenient online image capture is essential.

Dynamsoft’s Dynamic Webcam SDK is compatible with all mainstream browsers. This includes 32-bit and 64-bit editions of Internet Explorer® (IE), Firefox®, Chrome™, Safari® and Opera™. With the webcam API, software developers can integrate image capture, processing and webcam control into browsers. The webcam SDK supports SSL and Windows®, forms and basic authentication for secure image uploading and downloading. Dynamsoft’s Dynamic Webcam SDK can be used to capture images for many key applications. This includes patient charts in hospitals or customer ID cards in banking, government and more. Images are easy to upload to a web server or database. It’s also possible to capture a snapshot from a video stream. Dynamsoft drew upon its experience in developing Dynamic Web TWAIN software components to develop the SDK. The Dynamic Webcam SDK webcam library is based on the DirectShow® API. It works with USB-based video device class (UVC) and WIA compatible webcams. SDK development is possible in ASP.NET; ASP; JSP; PHP; VB.NET, and more.

“CIOs of industry’s where convenient image capture is a must will benefit from our Dynamic Webcam SDK,” said Amy Gu, Vice President of Dynamsoft Corp. “Banks, hospitals, government agencies and more need convenient web-based image capture applications. Our new SDK makes it simple for software developers to implement web-based image capturing from a webcam. Applications are possible with just a few lines of source code. This makes it simpler to create online webcam image capture applications suited for their industry.”

Pricing and Availability
The Dynamic Webcam SDK will be available starting Sept. 18, 2012. The ActiveX Edition is $799. The Plug-In Edition is $599. Bundled pricing is also possible. Full software features can be found online. Add-ons (such as OCR and barcode), other pricing details, and purchasing, are also available online.

About Dynamsoft Corp.
Founded in 2003, Dynamsoft Corp. provides enterprise-class source control / version control software. Its SourceAnywhere™ software enables efficient file management of source code versions. This ensures greater collaboration and integrity of source code. It is ideal for web, software and application development throughout the lifecycle of development and support. Dynamsoft also provides TWAIN™ software development kits (SDK). Dynamsoft is an associate member of the TWAIN Working Group that develops TWAIN standards. Thousands of customers use Dynamsoft’s source control and TWAIN SDK solutions. Customers include: 3M®; Apple®; EMC®; Fujitsu®; GE®; H&R Block®; HP®; IBM®, Intel®; InfoSys®; Lockheed Martin®; Olympus®; Philips®; PricewaterhouseCoopers®; Samsung®; Siemens®; Symantec®; Unisys®; Verizon®; and more.  More information is available at http://www.dynamsoft.com.

Source:

DeveloperIQhttp://www.developeriq.in/news/2012/sep/18/dynamsofts-webcam-sdk-allows-developers-to-create-/

Image Acquisition Control Optimized for Web App

Dynamsoft ImageCapture Suite, Give Your Customers the Most Flexibility

Dynamsoft’s DWT (Dynamic Web TWAIN), an image acquisition SDK, available since 2013 has won the trust of many customers from different industries, including Lockheed Martin, IBM, Nokia and more. Optimized for web applications, the component supports Internet Explorer, follows by Firefox, Chrome and other mainstream browsers on Windows, and then Mac OS X is supported from v6.4. In addition, the improvement of the feature set along the way as well the robust security ones make the control much stronger and more competitive.

Based on years of experience and also the valuable feedback from our customers, Dynamsoft provides a new SDK this month– ICS (ImageCapture Suite). Inheriting almost all the beautiful features of Dynamic Web TWAIN, the new component added the support of capturing images from webcams. In other words, with ICS, you can provide the most flexibility image acquisition solution for your customers, regardless what kind of devices they are using, scanners, webcams or others.

Dynamsoft ICS Online Demo

I’d like to share with you the key features available in ICS.

Key Features

  • Compatible with the mainstream browsers including IE (both 32-bit & 64-bit), Firefox, Chrome, Safari and Opera.
  • Able to capture images from scanners, webcams and other TWAIN/WIA/UVC compatible devices.
  • Support for loading images from local folders, web servers and databases.
  • Support for image editing, such as Crop, Rotate, Change Image Size, Mirror and more.
  • Support for saving/uploading images to your system. It includes local folder, web server, FTP site, database, SharePoint Library.
  • Robust security features. Support for SSL and Windows/Forms/Basic Authentications.
  • Support for cookie/session.

Learn the details.

If you are interested in the SDK, 30-day free trial is available:
ImageCapture Suite 30-Dat Free Trial Download

Or you can see in action:
ImageCapture Suite Online Demo