The leading provider of version control solution and TWAIN SDK

How can I upload or save each image in buffer as a separate image file?

1. The SaveAs*** method can be used to save a specified image in buffer as an image file. Currently, Dynamic Web TWAIN supports BMP, PNG, JPEG, PDF and TIFF. Click here to get more information..

2. The HTTPUploadThroughPost method can be used to upload a specified image in buffer as an image file. Click here to get more information about this method.

Here is a sample of saving each image in buffer as a separate PDF file.

Code:

//JavaScript
function btnUpload_onclick()
{
   var i;

   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 + "SaveToFile.aspx"; //the ActionPage's file path
   
   strHostIP = "localhost";        //the host's ip or name 
    
   frmScan.DynamicWebTwain1.HTTPPort = 80; 
   for (i=0; i<frmScan.DynamicWebTwain1.HowManyImagesInBuffer; i++)
   {
      frmScan.DynamicWebTwain1.HTTPUploadThroughPost(strHostIP, i, strActionPage, i+".PDF");
   }
}



Article Details

Last Updated
27th o October, 2010

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

Attachments

No attachments were found.

Visitor Comments

No visitor comments posted. Post a comment

Post a comment

To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Name:
   Email:
* Comment:
* Enter the code below:
 

Continue