How do I test a TWAIN device?

You may get problems when using your application with some scanners and wonder whether it is the issue with your application or it is the device issue.

If you are using a TWAIN library and your application is supposed to work with all TWAIN compatible devices, you can use Twacker, which is a TWAIN application developed by The TWAIN Working Group. It allows you to exercise features of a TWAIN driver and to see whether the driver of your device is working fine or not.

Install Twacker

You can download Twacker installers here:

Twack_32.msiTwack_64.msi
32-bit Twacker works with 32-bit TWAIN drivers, while 64-bit Twacker works with 64-bit TWAIN drivers.

How to use Twacker?

After the installation, you can follow the steps below to test your scanners.

  1. Launch Twack. Go to Windows Start  menu and type Twack.
    Launch Twacker

    Launch Twacker

     

  2. Connect to your scanner. Click menu File-> Select Source  and you will see all the available sources available on your machine.
    Twacker - select source

    Twacker – select source

     

    Twacker - choose device

    Twacker – choose device

     

  3. Test your scanner.

    Under File menu, check ShowUI to show the user interface of the device.

    With UI hidden, you can use the Automatic Feeding setting to test ADF scanning.

    Click Acquire to initiate scanning and see how your device works.

  4. Troubleshoot

    If you fail to acquire images from your scanner using Twacker, you can adjust the Message Level to see if you can get more information to pinpoint the cause of the issue.

    Under Special menu, you can also check the TWAIN State transition info.

Another easy way to test your TWAIN device online

You can also test your scanner using the online demo of Dynamic Web TWAIN, which is a browser-based TWAIN SDK. You only need to install an ActiveX/Plug-in for your browser (Internet Explorer/Chrome/Firefox, Safari) and have a quick check for your scanner online.

How to Source Control SQL Server Stored Procedure using TFS in VS 2012?

In this article, I will share with you on how to version control your SQL Server Stored Procedure using tfs in Visual Studio 2012.

Here I am using Dynamsoft TFS Hosting service. If you don’t have a TFS account yet, you can sign up online here with free trial.

Now we can follow the steps below to add Stored Procedures to TFS for version control.

 

  1. Launch VS 2012. Open an existing SQL Server Database Project or create a new one.New sql database project
  2. Then we can import your database in Solution Explorer.  Right-click on the project, and click Import -> Database…Import the database to the project
  3. We will be prompted with Import Database dialog below.Import Database dialog
  4. Click New Connection… and specify the Server and database name in Connection Properties window. And click OKConnection Properties
  5. After finishing importing the database objects to the VS project, we can now add it to TFS for source control.
    First, make sure Visual Studio team foundation server is the current source control provider at menu Tools->Options->Source Control.

    Right-click the solution file in Solution Explorer and click Add Solution to Source Control…

    Select  the Team Foundation Server and Team Project to put your database project.

    Connect to Dynamsoft TFS 

  6. Specify the location to store the project.Add to TFS
  7. Now you can manage the versions of the stored procedures in TFS.TFS Source Control Commands

 

 

New Article on CodeProject: How to make ActiveX work with IE Protected Mode?

Since Internet Explorer 7 on Windows Vista was released, Protected Mode has been introduced as a new security feature. When running in Protected Mode, Internet Explorer is a low integrity process and has limited permissions to access the user system.

When running Dynamic Web TWAIN, the scanner browser plugin for web application,  on Windows Vista and above, IE Protected Mode is on by default so users consistently get issues like the following:

  • ActiveX failed to access the scanners connected to the user machine
  • IE crashed when ActiveX tries to acquire images from scanner due to insufficient permission

 

With Dynamic Web TWAIN v9.0, you can now use an independent broker process to communicate with the scanners for better compatibility and robustness.

  • Avoid browser crashes caused by scanner driver problems, thus improving the robustness of the web application. The independent process will not affect the browser process.
  • The independent process used for scanning has a higher permission level than the browser process. This can solve the scanning issues, such as browsers not accessing the scanner source successfully, caused by the increased security features of Windows/IE.

 

Read more: How to work with IE Protected Mode?

Try out Online Demo of Dynamic Web TWAIN

Download 30-day free trial of Dynamic Web TWAIN 9.0

Dynamsoft’s New Image Capture SDK Adds Mac Support and Sandbox

ImageCapture Suite 9.0 Adds Mac Capabilities to Ensure Cross-Platform Support and Sandbox for Improved Performance and Security

VANCOUVER, BC–(Marketwired – Apr 15, 2013) – Dynamsoft has made available a new software development kit (SDK) that adds to its existing Macintosh® (Mac) features for true cross-platform support and also adds Sandbox for increased robustness and security. The SDK, ImageCapture Suite 9.0, enables easy development of web applications for image acquisition, processing and management. It’s ideal for programmers, R&D managers and CIOs in industries requiring heavy scanning for digital document management. Such industries include healthcare, finance, government and others that require processing paper documents to digital formats. Dynamsoft is a developer of scanner programming libraries andImage Capture SDKs.

ImageCapture Suite 9.0 boasts compatibility with all mainstream browsers for use on Windows® or Macintosh® (Mac). This provides added flexibility to meet all image acquisition needs. Browsers supported include 32-bit and 64-bit Internet Explorer® (IE); Firefox®; Chrome™; Safari®; and Opera®. Devices supported include TWAIN-compatible scanners and UVC-compatible webcams. For webcams, it supports snapshot grabs from live video streams. The SDK enables developers to create image acquisition apps using just a few lines of code. This is instead of needing to code hundreds of lines from scratch and also spending months learning the TWAIN and other standards.

Compatibility has been improved with the addition of supporting a Mac client. Application robustness and security has also been improved with Sandbox. Sandbox enables using an independent process to communicate with imaging devices. With this separation of the scanning process from the browser process, security is enhanced.

“We’ve been developing simple and powerful image capture SDKs now for years,” said Amy Gu, Vice President of Dynamsoft. “ImageCapture Suite 9.0 continues our efforts to make things even easier and more powerful and secure for developers to deploy image capture applications. We also provide all our customers with award-winning technical support that includes everything from knowledge bases and forums to email, chat and phone support.”

The SDK has built-in support for image clean-up, crop, zoom-in/out, and more. In addition, it features multi-threaded and secure image uploading and downloading to/from a database or file system. It also has built-in JPEG, PNG, PDF and TIFF encoders for users to compress acquired images regardless of if the TWAIN source has the capability or not. ImageCapture Suite 9.0 works with ASP.NET; PHP; JSP; ASP; VB.NET; and others.

Pricing and Availability
ImageCapture Suite 9.0 is available starting April 16, 2013 and is licensed per web server. A royalty-free option is also available. There are three general versions. The Plugin Edition starts at $1,199. The ActiveX Edition also starts at $1,199 while the ActiveX + Plugin Edition starts at $1,999. Add-ons are also offered. A 1-D barcode reader starts at $599, a 2-D barcode reader starts at $799 and an OCR SDK starts at $1,599. Full pricing details, purchasing and downloading are 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) and other image capture SDKs. 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.

Note: Whether noted or not, references to certain words may be trademarks or registered trademarks of their respective owners.

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.

Using Barcode as Batch Separator in Web Application

Usage Scenario

For document management, it is a common requirement that a user put a stack of documents for automatic document feeder (ADF) scanning. The documents may be for different purpose and he wants to save them into different files automatically after the scanning finished. This way, it will greatly save the time.

So how can we achieve that? How to enable users to do that on your website or with your web application?

Dynamsoft ImageCapture Suite can satisfy your needs well. It is an image acquisition library which enables you to acquire images from TWAIN compatible scanners and USB/WIA compatible webcam, editing the images and upload them to web server, database or other repositories. It comes with a Barcode Reader SDK which supports both 1D & 2D barcode detection.

ImageCapture Suite is a client-side image capture API and you can use JavaScript to call its methods/properties. It has ActiveX and Plugin editions which supports all the main-stream browsers on Windows, including IE (x86/x64), Chrome, Firefox, Safari and Opera.

Online Demo

You can test scanning documents or loading an existing image into the SDK and recognize the barcode online here.

A Simple Sample

Below is a simple sample (HTML/JavaScript + C#) for demonstrating how to use ImageCapture Suite to do ADF batch scanning and save the documents into different PDF files to web server automatically based on barcode separator.

Besides C#, you can also use your preferred server-side language, like PHP, VB.NET, JPS,  for the image upload part.

On client side – Scan.html: 

<script language="javascript" type="text/javascript">
function DWObject_OnPostTransfer(){ // OnPostTransfer event will be triggered automatically after each paper scan
    DWObject.IfShowProgressBar = false;
    DWObject.ReadBarcode(DWObject.CurrentImageIndexInBuffer, 0);
 if(DWObject.BarcodeCount != 0) {  // if this doc contains barcode info, i.e. it is the Seperator, we will upload image index 0 ~ seperator index as a multiple page PDF file
 var currentTime = new Date();
 var hours = currentTime.getHours();
 var minutes = currentTime.getMinutes();
 var seconds = currentTime.getSeconds();   //  here we are using current time as PDF file name
    var strActionPage;
    var strHostIP;
    var CurrentPathName = unescape(location.pathname); // get current PathName in plain ASCII 
    var CurrentPath = CurrentPathName.substring(0, CurrentPathName.lastIndexOf("/") + 1); 
    strActionPage = CurrentPath + "imageupload.aspx"; //the ActionPage's file path
    strHostIP = "tserver"; //The host's IP or name 
    DWObject.HTTPPort = 80;//location.port==""?80:location.port;
    DWObject.HTTPUploadAllThroughPostAsPDF(strHostIP,strActionPage, hours+"_"+minutes+"_"+seconds+".pdf");
    if (DWObject.ErrorCode != 0)
    alert(DWObject.ErrorString);
    DWObject.RemoveAllImages();  // remove all the scanned images from buffer after uploading them to the server
 }
}
</script>

Server Side – imageupload.aspx:

<%@ Page Language="c#" AutoEventWireup="false" Debug="True"%>

<%
    HttpFileCollection files = HttpContext.Current.Request.Files;
    HttpPostedFile uploadfile = files["RemoteFile"];
    uploadfile.SaveAs(System.Web.HttpContext.Current.Request.MapPath(".") + "/" + uploadfile.FileName);
%>

Get Samples
You can get the complete sample code here.

30-day free trial of ImageCapture Suite is available:
http://www.dynamsoft.com/Downloads/ImageCaptureSuite_Download.aspx

If you have any questions, you can contact our support team at support@dynamsoft.com.

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 developer needs to deal with camera initialization, 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/Webcam/online_demo_scan.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 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

SourceAnywhere Brings Fully Version Control Support for Visual Studio 2012

vs12 n saws

I am happy to announce that the latest SourceAnywhere release (from ver. 4.2) brings fully support for Visual Studio 2012.

Visual Studio is one of the first and most important IDEs that SourceAnywhere series support and integrate with ever since 2003.

VS 2012 comes with more colors in the main UI and the flexibility to adjust it according to your taste. For instance, color theme, fonts and colors for different display items, fully customizable toolbars and commands. It has 5 editions: Ultimate, Premium, Professional, Test Professional and Express. Moreover, team foundation server 2012 is shipped with VS 2012.

Comparing with tfs, SourceAnywhere (we call it SAW for short)is a truly agile source control software designed for local and remote development teams. If you’re experiencing inefficiency – exceptionally large amount of time cost while doing the essential source control operations like get, check in or check out, using it locally or over the internet, with developers located worldwide, then SAW is the best source control product that you should try. It focuses on security, speed, team collaboration, usability, and integration with IDEs especially Visual Studio, Eclipse and Dreamweaver. It is a pure, simple and easy-to-use source control tool, which does it should does and without hassles, complexity or costly user training.

SAWS4.2About

When I look back to the progresses we have made on SAW in this very year of 2012. We successively rolled out several major updates to it, SAW 4.0, SAW 4.1 and SAW 4.2 which was brought out 2 weeks ago(11/26/2012). Particularly in SAW 4.2, we upgraded SourceAnywhere Add-in to support Visual Studio 2012. It makes the performance of SAW, when working with Visual Studio 2012, faster, smoother and more efficient.

After installing SAW 4.2, you can enable it at VS 2012 menu Tools/Add-in Manager.

add-in manager

By far we have received quite a few positive feedbacks as well as some constructive suggestions from SAW users. These are the powers that motivate our R&D team to keep evolving our products, especially SAW series.

Secure Image Scanning, Processing and Uploading in Web App

Introduction

Security is always an important factor when choosing a document imaging API. It directly relates to:

  • Whether the control is safe and friendly enough for the end users to download and install.
  • Whether the control will access the local data and communicate with the others silently.
  • Whether it is secure to upload the image data over the network.

In this article, I’ll share with you how Dynamsoft’s Dynamic Web TWAIN scanner control deals with the securities.

About Dynamic Web TWAIN

Dynamic Web TWAIN is an image acquisition API optimized for web applications. The component allows you to scan documents/images from scanners and other TWAIN compliant devices. Extension features including image processing and uploading are also supported.

Security Features

1. Safe to Download

Dynamic Web TWAIN ActiveX is digitally signed by VeriSign. By signing the component digitally, a dialog box with the publisher’s legal name will appear when a customer first installs the scanning component. The user can choose whether they want to install the component during the download and install process.

Install DWT on the client side

If the control is altered after the publisher has signed it, the digital signature will be broken and the user will be informed. This makes it impossible for the signed control to be infected by a virus or maliciously tampered by hackers. With Dynamic Web TWAIN, there are 2 levels of signatures:

First, the library files “DynamicWebTwainCtrl.dll” and “DynamicWebTwainCtrlTrial.dll” are digitally signed. This ensures that Dynamic Web TWAIN itself won’t be tampered with.

Secondly, the cabinet files “DynamicWebTWAIN.cab” and “DynamicWebTWAINx64.cab” are digitally signed. These files contain the library files and additional files with the extension “INF” (which are used when the control is being installed on the client machine). This signature makes sure that the files downloaded on the client machines are the correct & unchanged ones.

2. Marked safe for initialization and scripting

Dynamic Web TWAIN is marked safe for initialization and scripting as you can see in the below screenshot. With these marks, Dynamsoft guarantees there is no security breach when you use Dynamic Web TWAIN.

DWT marked safe for initialization and scripting

3. Non-disclosure of any personal info.

Dynamic Web TWAIN is a component meant to add scanner support to web applications. For end users, the documents they scan are usually private and important. Any unintentional disclosure of the info cannot be tolerated. When documents are scanned, they’re stored in the buffer of Dynamic Web TWAIN which is part of the physical memory allocated for the web browser on the client machines. Without the permission from the user, the data won’t go anywhere. All interfaces of Dynamic Web TWAIN are secure; it does nothing unless commanded by the current user.

4. Minimal communication with the outside world.

Users of great security level are concerned about any info that would be sent out to the outside world without them knowing it. They can rest assured when using Dynamic Web TWAIN because the only communication it does with the outside world is verifying the certificate that was used for the digital signature. The certificate is from VeriSign. And the verification process is considered 100% secure.

If the user doesn’t even want the verification, the certificate can be removed. But this is not recommended as discussed in point 1.)

5. Secure data transmission over the network.

a. Support for SSL

You can use SSL to encode your posted data to further ensure secure data transmission. This is necessary for many web applications that would require data upload/download

b. Authentication

Dynamic Web TWAIN supports authentications including Windows, Forms and Basic Authentication. It gives the software developers the most flexibility to set the access permissions. Cookie and session are also supported by the component.

c. Compatible with Protected Mode and Data Execution Prevention (DEP)

Since Windows 2008, Microsoft set Protected Mode and DEP ON as the default option to protect from virus and other attack on purpose. Dynamic Web TWAIN is fully compatible with Protected Mode and DEP.

Case Study — Lockheed Martin

All the above features are the reasons why Lockheed Martin chose us for their Intranet Quorum system (check out the case study in PDF format). Intranet Quorum®, or IQ, is Lockheed Martin’s web based out-of-the-box enterprise contact management and workflow system for government offices. It is widely used by leading federal agencies, the United States Congress, and numerous state and local government organizations.

If you are interested in the SDK, the trial version is available for you.
Dynamic Web TWAIN 30-Day Free Trial Download

You can also see it in action:
Dynamic Web TWAIN Online Demo

Why a Dedicated VM for Your TFS Hosting Service

More and more people incline to choose hosting services. It is convenient, secure, cost-effective, etc. Usually, a hosting company would provide two kinds of plans for their customers with different requirements: Shared Plan and Managed Plan. The primary difference between these plans is that the Managed plan provides users a dedicated virtual machine.

So why Managed Plan, in spite of that it costs more money? Take Dynamsoft’s TFS Hosting service for example, I’ll give 5 reasons:

TFS Plan

1. More Intense Monitoring

Besides the 24*7 network and security monitoring from the world-class primus data center, our administrator 24*7 monitors your server to ensure you get the maximum security and performance capability.

  • 24*7 track your hosting environment
  • Monitor your server, CUP/memory usages
  • Track and eliminate unexpected traffic increases

2. More secure and independent

Instead of sharing one SQL Server with other hosting users, you get your own instance of VM and SQL Server. By isolating your database from others, the dedicated VM environment decreases the impact from other hosting users to the minimum.

3. Flexible

Urban Turtle and Build Server are optional add-ons provided by Dynamsoft’s hosting services, both for the shared and managed plans. Besides these two add-ons, you are allowed to install additional software/add-ons onto your virtual machine. To keep a secure environment, remote access is disabled to avoid any malicious data.

In the meantime, based on the ongoing proactive server monitoring, Dynamsoft provides the maximum available memory in the most flexible way. Security and other software upgrades and patches can be applied according to your requirements.

4. More Resources

Considering teams with more than 5 members are more inclined to choose the Managed Plan, we design the plan to help customers focus on their own tasks, no worry about the performances and the resource related questions that might be caused by the expanding teams and the size-increasing projects under version control. You are allowed to expand the physical memory based on the 4G by default. The maximum storage capacity is also increasable to fully fulfill your requirements.

5. More support

One of the main differences that make the dedicated hosting service standout is that the Managed Plan offs more support. As a customer oriented company, Dynamsoft opens different support channels, including email, online chat, phone call, forum, knowledge base and the ticket system, as the standard ones to help customers from different time zones. On top of those, managed plan users will get best practice suggestions and consultant from our R&D team based on the 8 years of experiences in developing our own version control and issue tracking tools.
(Our team developed SourceAnywhere for VSS as the fastest internet and cross-platform VSS solution; then SourceAnywhere, a SQL Server based version control; and then we have SCM Anywhere available which constitutes version control and issue tracking.)

If you are interested in the Managed Plan of Dynamsoft tfs Hosted, you can check out the following page for detailed information. 5-day free trial is available for you.

Dynamsoft TFS hosted Managed Plan