The leading developer of version control and bug tracking software
TWAIN ActiveX/Plug-in HTTP Control/SDK
 

FAQ

Questions

General Questions
  1. What is TWAIN?
  2. What is Dynamic Web TWAIN?
  3. For which purposes can I use Dynamic Web TWAIN?
  4. What is the main advantages of Dynamic Web TWAIN compared with other TWAIN which is also designed for web environment?
  5. Who do I contact if I need technical support?
  6. Where can I obtain a test application that uses Dynamic Web Twain?
  7. I would like to request some features in the next version of Dynamic Web TWAIN.  Where do I make these requests?
  8. I have problems. What should I do?
  9. What is Live Help?
  10. What are the major differences between the Virtual Developer Service and usual customer support?
  11. Do you provide sample code? If yes, how can I get it?
  12. What are the differences between ActiveX and Plug-in?
     
Distribution Questions
  1. How do I distribute my application?
  2. What files I need to include in the setup package of my program?
  3. Where can I find the LPK file, the CAB file or the XPI file?
  4. How to deploy Dynamic Web TWAIN on Web server?
  5. Can I deploy Dynamic Web TWAIN on Linux? If yes, how to?
     
License Questions
  1. How many licenses do I need for a web-based application that runs on one server but can be accessed by many clients?
  2. Do I need a Developer License to do the development if I have Web Server License?
  3. What can I do when the Trial version is out of period expiration?
  4. How can I upgrade the Trial version to Full version?
  5. What are the differences between Developer License and Web Server License?
     
Features Questions
  1. What operating systems will Dynamic Web TWAIN work with?
  2. What programming languages can Dynamic Web TWAIN ActiveX Edition work with?
  3. Does Dynamic Web TWAIN support NetScape or Firefox?
  4. Does Dynamic Web TWAIN support Database?
  5. Does Dynamic Web TWAIN support SSL?
  6. Can I use FTP upload and download with password?
  7. Can I upload and download images via proxy?
  8. Can Dynamic Web TWAIN work in a class library (DLL) project?
     
Programming Questions
  1. How can I acquire black-white images?
  2. How can I work without User Interface?
  3. How can I scan only a part of a picture?
  4. How can I select necessary device without device selection dialog?
  5. How can I disable progress indicator dialog when I acquire images without UI?
  6. How can I set resolution in the X and Y direction separately?
  7. How can I upload acquired image to the Web server?
  8. How to use ADF? We want to save each document in a separate file.
  9. How can I work with SSL?
  10. How can I add a new scanned image to an existed multi-page TIFF file?
  11. How can I rotate an image before I save it?
  12. How can I view a specified image if there are several images in buffer?
  13. How can I do a duplex scan?
  14. How to use Dynamic Web TWAIN in Visual C++ Non-Dialog Based Applications?
  15. How can I scan an inverted image?

Troubleshooting
  1. Why do I fail to download the ActiveX control on the client machine?
  2. Why do I get the error "HTTP process error"?
  3. Why do I get the error "Your trial license has expired"?
  4. How to use Dynamic Web TWAIN in Firefox?
  5. Why do I get the error "Class not registered" in Delphi environment when I upgrade the Trial version to Full version?
Answers

General Questions

1. What is TWAIN?

TWAIN is a protocol and Application Programming Interface (API) that standardizes communication between an application and image acquisition devices such as scanners and digital cameras. This standard allows a developer to make standard calls to any image acquisition device that supports TWAIN. Thus the application would not have to be rewritten to support every device. TWAIN has been in existence since 1992 and is governed by the TWAIN Working Group.

2. What is Dynamic Web TWAIN?

Dynamic Web TWAIN has both ActiveX and Plug-in edition.

Plug-in edition is compatible with Gecko-based browsers, such as Netscape, Firefox, Mozilla..

ActiveX edition is compatible with Microsoft Internet Explorer and all COM-compatible environment, such as MS Office, VB, VC.

Dynamic Web TWAIN enables you to acquire images from any TWAIN compatible devices. Basically speaking, Dynamic Web TWAIN has all the functionalities that Dynamic TWAIN has, plus much functionality specifically designed for web environment. With the carefully designed interface, and the built-in wizard mode, Dynamic Web TWAIN is very easy to use. You can typically do your TWAIN job in several lines of code. At the same time, Dynamic Web TWAIN is very powerful. It is compatible with TWAIN specification V1.9. It has built-in JPEG encoder and decoder. It supports all three image transfer modes and many other features.

Dynamic Web TWAIN has many features specifically designed for web environment, such as uploading and downloading images through FTP or HTTP protocol.

3. For which purposes can I use Dynamic Web TWAIN?

Dynamic Web TWAIN can be used for controlling any work of scanners, digital cameras and any other devices which support TWAIN standard. Dynamic Web TWAIN can upload and download images through FTP or HTTP protocol. Proxy is supported.

Also, you can use Dynamic Web TWAIN with any COM-compatible development tools, such as VB, VC, C#, VB.NET, Delphi.

4. What is the main advantage of Dynamic Web TWAIN when compared with other TWAIN which is also designed for web environment?

The main advantage of Dynamic Web TWAIN is that Dynamic Web TWAIN is a TRUE web scanning solution.

It is compatible with Internet Explorer, Netscape, Firefox and other browsers.

It is very small. Absolutely no supporting DLL is needed for distribution.

Upload and download image through HTTP and FTP.

Supports TIFF, JPEG, PDF and PNG compression.

5. Who do I contact if I need technical support?

  • We provide at least 20 hours Live Support per weekday. Live Support is an online chat service for our customers to interact with our support professional in real time.
  • You can email our support team. Our email address for TWAIN family products is

6. Where can I obtain a test application that uses Dynamic Web Twain?

The Online Demo of Dynamic Web TWAIN is available at WebTWAIN_Demos.aspx

7. I would like to request some features in the next version of Dynamic Web TWAIN.  Where do I make these requests?

If you have any requirement, please contact us by email. Your any request is very important to us. Our email address for TWAIN family products is

8. I have problems. What should I do?

The information on most of questions can be found in the documentation or in this FAQ.
Write to our support team to get more help. Our email address of support team is

9. What is Live Help?

DynamSoft is committed to providing the best customer support in the industry. Our support team is ready to offer no time limit, high quality, friendly and responsively technical support for our valued registered users.

We provide at least 20 hours Live Support per weekday. Live Support is an online chat service for our customers to interact with our support professional in real time.

  • Recognizing our world wide customers locate in different time zones, we proudly provide at least 20 hours Live Chat Support (Live Help) each day from Monday to Friday.
  • If you visit between Monday and Friday, and happen to see our Live Help support professional is offline, please wait a moment and our support professional will be with you shortly.
  • When the Live Help support professional is offline, you can also leave a message and we would response promptly.

10. What are the major differences between the Coding Service and usual customer support?
 

  • With the Virtual Developer Service, we can be involved in your project as much as needed. We take part in your project from requirement analysis to completion.
  • With the Virtual Developer Service, we communicate with you closely, analyze your requirements, propose tech solutions, write the code, help you integrate the code in your project, do the test and maintenance.
  • With standard customer support, you usually need a developer working on the TWAIN module who would then ask questions to our technical support team. With the Virtual Developer Service, you do not need a developer working on the TWAIN module and our developers participate in your project as a team member.

11. Do you provide sample code? If yes, how can I get it?

Yes, we provide sample code of Dynamic Web TWAIN in ASP, VB.NET, C#, PHP+Apache and JSP+Tomcat .

If you need a sample of Dynamic Web TWAIN, please access the following page to download samples.
https://www.dynamsoft.com/Secure/RegisterInfo_sample.aspx

12. What are the differences between ActiveX and Plug-in?

The ActiveX edition can be used in Microsoft IE while the Plug-in edition can be used in Firefox and Netscape. If you are sure that your end user will use IE, then ActiveX edition is right for you. If you do not know which browser your end user will use, you may need both ActiveX and Plug-in editions.


Distribution Questions:

1. How do I distribute my application?

Only DynamicWebTwainCtrl.dll and DynamicWebTwain.xpi can be distributable with end user application. All other files and documentations can NOT be distributed.

YOU MUST NOT DISTRIBUTE ".LIC" FILE OF DYNAMIC WEB TWAIN.

Dynamic Web TWAIN is very easy to distribute. Since Dynamic Web TWAIN is developed directly with pure Win32 API and assembly language, no additional supporting DLL or file is needed to distribute Dynamic Web TWAIN.

Please refer to the License Agreement for more info.

2. What files I need to include in the setup package of my program?

You need DynamicWebTwainCtrl.dll in the setup package only.

3. Where can I find the LPK file, the CAB file or the XPI file?

  • The CAB file can be found in the installation directory of Dynamic Web TWAIN ActiveX.
  • The XPI file can be found in the installation directory of Dynamic Web TWAIN Plug-in.
  • The LPK file can be created by Lpk_tool.exe that can be downloaded from www.microsoft.com.

Please refer to Deploying Dynamic Web TWAIN on Web Server for more info.

4. How to deploy Dynamic Web TWAIN on Web server?

Before deploying Dynamic Web TWAIN on web server, make sure you have obtained the Web Server License of Dynamic Web TWAIN. For evaluation license, you can deploy Dynamic Web TWAIN on web server for evaluation purpose only.

For more information on how to deploy Dynamic Web TWAIN on Web server, please refer to Deploying Dynamic Web TWAIN on Web Server.

5. Can I deploy Dynamic Web TWAIN on Linux? If yes, how to?

Yes, Dynamic Web TWAIN can be deployed on Linux.

  • Install the Dynamic Web TWAIN on Windows.
  • Place the CAB file and the LPK file into the directory of Web server on Linux.

For more information on how to deploy Dynamic Web TWAIN on Web server, please refer to Deploying Dynamic Web TWAIN on Web Server.


License Questions:

1. How many licenses do I need for a web-based application that runs on one internet server but can be accessed by many clients?

You need one Web Server License.

Please refer to the License Agreement for more info.

2. Do I need a Developer License to do the development if I have Web Server License?

Yes. Developer License is needed for development.

3. What can I do when the Trial version is out of period expiration?

You can send a mail to our support team and ask for extending the period. We will be more than happy to extend the license for you.

4. How can I upgrade the Trial version to Full version?

Please do the upgrade as follows:

  • Uninstall the Trial version of Dynamic Web TWAIN from your machine.
  • Install the Full version of Dynamic Web TWAIN to your machine.
  • Input the server license you purchased into the Licensing Tool.
  • Change the Class ID from Trial version to Full version.
    For the information about the Class ID of Trial version and Full version, please refer to Deploying Dynamic Web TWAIN on Web Server.
  • Recreate a LPK file with the server license you have purchased.

If you use Delphi for development, please see also:
Why do I get the error "Class not registered" in Delphi environment when I upgrade the Trial version to Full version?

5. What are the differences between Developer License and Web Server License?

  • Developer License: Developer License is for development. Every developer working on TWAIN programming needs a Developer License. For example, if you have 3 developers working on Dynamic Web TWAIN, you need 3 Developer licenses.
     
  • Web Server License: Web Server License is for Web server deployment. Every Web server deployment needs a Web Server License. For example, if you have 3 developers and 10 Web servers to deploy on, you need 3 Developer licenses and 10 Web Server Licenses. 

Question on Features

1. What operating systems will Dynamic Web TWAIN work with?

Dynamic Web TWAIN can support Windows 95, 98, ME, NT, XP, 2000, 2003 and Vista.

2. What programming languages can Dynamic Web TWAIN ActiveX Edition work with?

Dynamic Web TWAIN ActiveX Edition can be used in any COM-enlightened program language, such as C#, VB.NET, Visual C++, Visual Basic, Delphi, HTML/VBScript/JavaScript, and PowerBuilder and so on.

3. Does Dynamic Web TWAIN support NetScape or Firefox?

Yes. Dynamic Web Edition Plug-in Edition is compatible with Netscape, Firefox and other Gecko-based browsers.

4. Does Dynamic Web TWAIN support Database?

Yes. Dynamic Web TWAIN is able to save image files to the file system and database.

5. Does Dynamic Web TWAIN support SSL?

Yes. Dynamic Web TWAIN supports SSL.

For the information on how to work with SSL, please refer to How can I work with SSL.

6. Can I use FTP upload and download with password?

Yes. You can use the FTPUserName property and the FTPPassword property.

7. Can I upload and download images via proxy?

Yes. You can use the ProxyServer property.

8. Can Dynamic Web TWAIN work in a class library (DLL) project?

Dynamic Web TWAIN is not able to.


Programming Questions

1. How can I acquire black-white images?

Twain1.OpenSource
Twain1.IfShowUI = False
Twain1.IfDisableSourceAfterAcquire = True
Twain1.PixelType = 0         'Black - White image : 0, GRAY image: 1, RGB image: 2

Twain1.AcquireImage

2. How can I work without User Interface?

Private Sub BeginScan()

    Twain1.OpenSource
    Twain1.IfShowUI = False 'set without user interface
    Twain1.IfDisableSourceAfterAcquire = True

    Twain1.AcquireImage

End Sub

Private Sub Twain1_OnPostTransfer()

    Twain1.SaveAsBMP ("c:\temp.bmp", 0)

End Sub

3. How can I scan only a part of a picture?

Twain1.SelectSource
Twain1.OpenSource

Twain1.IfShowUI = False

'Set Image Layout
Twain1.Unit = 0 'INCHES
Twain1.SetImageLayout 0, 0, 5, 5

Twain1.AcquireImage

4. How can I select necessary device without device selection dialog?

Dim lngNum As Long 'For loop.

Twain1.OpenSourceManager

For lngNum = 0 To Twain1.SourceCount - 1
    If (Twain1.SourceNameItems(lngNum) = "Specified device name" Then
        Twain1.SelectSourceByIndex (lngNum)
    End If
Next

'if can't find the specified source, it'll select default source
Twain1.AcquireImage

5. How can I disable progress indicator dialog when I acquire images without UI?

Twain1.IfShowUI = False
Twain1.IfDisableSourceAfterAcquire = True

Twain1.OpenSource
Twain1.IfShowIndicator = False

Twain1.AcquireImage

6. How can I set resolution in the X and Y direction separately?

Twain1.SelectSource
Twain1.OpenSource

'Set XRESOLUTION current value.
Twain1.Capability = ICAP_XRESOLUTION
Twain1.CapType = TWON_ONEVALUE
Twain1.CapValue = 300
If (Twain1.CapSet = False) Then
    MsgBox "Failed to set the x-resolution." + vbCrLf + Twain1.ErrorString, vbCritical
End If

'Set YRESOLUTION current value.
Twain1.Capability = ICAP_YRESOLUTION
Twain1.CapType = TWON_ONEVALUE
Twain1.CapValue = 200
If (Twain1.CapSet = False) Then
    MsgBox "Failed to set the y-resolution." + vbCrLf + Twain1.ErrorString, vbCritical
End If

Twain1.AcquireImage

7. How can I upload acquired image to the Web server?

Dynamic Web TWAIN supports FTP, HTTP Put and HTTP Post upload method.

The following is a http put method sample:.

Private Sub BeginScan()

    WebTwain1.AcquireImage

End Sub

Private Sub WebTwain1_OnPostTransfer()

If (WebTwain1.HTTPUploadThroughPut("127.0.0.1", 0, "httpUploadFileTemp.bmp") = False) Then
    MsgBox WebTwain1.ErrorString
End If

End Sub

8. How to use ADF? We want to save each document in a separate file.

Dim iDocumentCounter As Integer

iDocumentCounter = 0 'set initialize value

Private Sub BeginScan()
    Twain1.OpenSource

    Twain1.IfShowUI = False
    Twain1.IfDisableSourceAfterAcquire = True
    If Twain1.Duplex <> 0 Then
        Twain1.IfDuplexEnabled = True 'enable duplex
    End If


    If Twain1.IfFeederEnabled = True Then
         Twain1.XferCount = -1
         Twain1.IfAutoFeed = True 'auto feed

         If Twain1.IfFeederLoaded = True Then
             Twain1.AcquireImage
         End If
    End If

End Sub

Private Sub Twain1_OnPosttransfer()

iDocumentCounter = iDocumentCounter + 1

If Twain1.SaveAsBMP("c:\Image\" + Str(iDocumentCounter) + ".bmp", 0) = False Then
    MsgBox Twain1.ErrorString
End If

End Sub

9. How can I work with SSL?

You can use the IfSSL property.

The following JavaScript Sample shows how to use IfSSL property.

<SCRIPT LANGUAGE="javascript">

function btnUpload_onclick()
{
   frmScan.DynamicWebTwain1.HTTPPort = 80;
   frmScan.DynamicWebTwain1.IfSSL = false; // if 80 is the port number of non-secure port

   /*
   frmScan.DynamicWebTwain1.HTTPPort = 443;
   frmScan.DynamicWebTwain1.IfSSL = true; // if 443 is the port number of secure port
   */

   frmScan.DynamicWebTwain1.HTTPUploadThroughPost("127.0.0.1", 0, "/SaveToFile.php", "imageData.jpg");

   if (frmScan.DynamicWebTwain1.ErrorCode != 0)
      alert(frmScan.DynamicWebTwain1.ErrorString);
   else //succeded
      alert("Successful");
}
</SCRIPT>

10. How can I add a new scanned image to an existed multi-page TIFF file?

Private Sub Scan_Click()

   DynamicWebTwain1.AcquireImage

End Sub

Private Sub DynamicWebTwain1_OnPostTransfer()

   DynamicWebTwain1.CloseSource

   DynamicWebTwain1.IfTiffMultiPage = True
   DynamicWebTwain1.SaveAsTIFF "SaveAsTIFF.tif", 0

   If (DynamicWebTwain1.ErrorCode <> 0) Then
      MsgBox (DynamicWebTwain1.ErrorString)
   Else 'succeded
      MsgBox ("Successful")
   End If

End Sub

11. How can I rotate an image before I save it?

You can use the RotateLeft property and the RotateRight property.

Private Sub Scan_Click()
   DynamicWebTwain1.AcquireImage
End Sub

Private Sub RotateLeft_Click()
   DynamicWebTwain1.RotateLeft 0
End Sub

Private Sub RotateRight_Click()
   DynamicWebTwain1.RotateRight 0
End Sub

Also, you can use the ShowImageEditor method.

Private Sub Scan_Click()
   DynamicWebTwain1.AcquireImage
End Sub

Private Sub DynamicWebTwain1_OnPostTransfer()
   DynamicWebTwain1.CloseSource
   DynamicWebTwain1.ShowImageEditor
   'You need to save the rotated image in the image editor before closing it
End Sub

12. How can I view a specified image if there are several images in buffer?

You can view a specified image or go through all the images in buffer with clicking "NextImage" or "PreImage" buttons.

Private Sub NextImage_Click()

   If (DynamicWebTwain1.HowManyImagesInBuffer = 0) Then
      MsgBox ("There is no image in buffer")
   End If

   DynamicWebTwain1.CurrentImageIndexInBuffer = DynamicWebTwain1.CurrentImageIndexInBuffer - 1

End Sub

Private Sub PreImage_Click()

   If (DynamicWebTwain1.HowManyImagesInBuffer = 0) Then
      MsgBox ("There is no image in buffer")
   End If

   DynamicWebTwain1.CurrentImageIndexInBuffer = DynamicWebTwain1.CurrentImageIndexInBuffer + 1

End Sub

13. How can I do a duplex scan?

Private Sub DuplexScan_Click()

   DynamicWebTwain1.SelectSource
   DynamicWebTwain1.OpenSource

   DynamicWebTwain1.IfDuplexEnabled = True 'enable duplex
   DynamicWebTwain1.XferCount = 2
   DynamicWebTwain1.MaxImagesInBuffer = 2

   DynamicWebTwain1.AcquireImage

End Sub

14. How to use Dynamic Web TWAIN in Visual C++ Non-Dialog Based Applications?

1. Adding Dynamic Web TWAIN to a Visual C++ Project.
2. Adding Code to the Project.

For more information about this question, please refer to Using Dynamic Web TWAIN in Visual C++ Non-Dialog Based Applications (SDI, MDI).

15. How can I scan an inverted image?

You can use the PixelFlavor property.

Private Sub Scan_Click()
   DynamicWebTwain1.PixelFlavor = 0
   'Value = 0 Chocolate. Zero pixel represents darkest shade.
   'Value = 1 Vanilla. Zero pixel represents lightest shade.
   DynamicWebTwain1.AcquireImage
End Sub


Troubleshooting

1. Why do I fail to download the ActiveX control on the client machine?

The failure of loading ActiveX control has the following possible causes:

1. The security settings of IE on the client machine are incorrect.

Please verify the following security settings of IE to "Prompt" or "Enabled":
a) Download signed ActiveX controls
b) Run ActiveX Controls and plug-ins
c) Script ActiveX controls marked safe for scripting

The dialog box of the security setting can be launched from menu Tools>Internet Options. Then select the security tab.

2. The deployment of Dynamic Web TWAIN does not follow the right steps.

Please make sure the DynamicWebTwain.lpk file and the DynamicWebTWAIN.cab file are placed in the directory of your Web server.

For more information on how to deploy Dynamic Web TWAIN on Web server, please refer to Deploying Dynamic Web TWAIN on Web Server.

3. The DynamicWebTWAIN.cab file is invalid.

If the above is the not the cause and the problem still exists, please send the DynamicWebTWAIN.cab file to twainsupport@dynamsoft.com and we will check it for you.

2. Why do I get the error "HTTP process error"?

The error "HTTP process error" has the following possible causes:

1. The write permission is not graded to the specified directory of Web server.

2. The action page returns something from Web server.
Dynamic Web TWAIN uses a special way to see if an image is uploaded and processed successfully by server. If the server returns 0 bytes, indicates success. Otherwise, indicates failure. In other words, when the uploaded image is processed successfully, the action page on the server should not return anything.

When you get the error "HTTP process error", please check the response string from the HTTP server. You can get the response string by using the HTTPPostResponseString property.

3. Why do I get the error "Your trial license has expired"?

The Trial version of Dynamic Web TWAIN is downloaded for evaluation purpose. The evaluation period is 30 days.
You will get the error "Your trial license has expired" when the Trial version of Dynamic Web TWAIN is out of its period expiration.

Please refer to What can I do when the Trial version is out of period expiration for more information.

4. How to use Dynamic Web TWAIN in Firefox?
You can try the following steps.

  • Please refer to the following code.

<HTML>
   <HEAD>
      <TITLE>Image Scanner Application</TITLE>
   </HEAD>
   <BODY>
      <p>This is a simple test page for the DynamicWebTwain plug-in. </p>
      <EMBED
         TYPE="Application/DynamicWebTwain-Plugin"
         OnPostTransfer="OnPostTransferCallback()"
         WIDTH="200"
         HEIGHT="200"
         PLUGINSPAGE="DynamicWebTwain.xpi">
      </EMBED>
      <p>
      <INPUT type="button" onclick="AcquireImage()" value="AcquireImage" >
      <SCRIPT>
      function OnPostTransferCallback()
      {
         var Plugin = document.embeds[0];
         Plugin.CloseSource();
      }

      function AcquireImage()
      {
         var Plugin = document.embeds[0];
         Plugin.SelectSource();
         Plugin.AcquireImage();
      }
      </SCRIPT>
      </p>
   </BODY>
</HTML>

  • Place the 'DynamicWebTwain.xpi' file (where to find the 'DynamicWebTwain.xpi' file) in the same directory of your page.
  • Click the 'Install Missing Plugins' button. Firefox displays a message indicating it couldn't find any suitable plugins. Then click the 'Manual Install' button.
  • Select to open the 'DynamicWebTwain.xpi' file with 'firefox.exe' and click 'OK'.
  • Click 'Install Now'.
  • Refresh your page.

When you see a grey box with "No image" written on it, it indicates that Dynamic Web TWAIN Plug-in has been installed in Firefox.

5. Why do I get the error "Class not registered" in Delphi environment when I upgrade the Trial version to Full version?
Please try the steps as follows.

  • Find the 'dclusr.dpk' file in the "Lib" folder under the installation directory of Delphi and then open it with Delphi.
  • Right click the "DYNAMICWEBTWAINCTRLLib_TLB.dcr" file and select "Remove Form Project". Also, do the same operation to the "DYNAMICWEBTWAINCTRLLib_TLB.pas" file.
  • Click the "Compile" icon.
  • Save the 'dclusr.dpk' file before closing it.

After doing that, you will find the Dynamic Web TWAIN ActiveX control is no longer in the Component Palette. Then you need to re-import the Dynamic Web TWAIN into Delphi.