Dynamic Web TWAIN: How can I upload or save each image as a separate image file?

1. The SaveAs*** method can be used to save a specified image in Dynamic Web TWAIN's 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 code snippet of saving each image in buffer as a separate PDF file.


function btnUpload_onclick() 
   var _strServerName = location.hostname; //Demo: "www.dynamsoft.com";
   var _strPort = location.port == "" ? 80 : location.port; //Demo: 80;
   var _currentPathName = unescape(location.pathname); // get current PathName in plain ASCII     
   var _currentPath = _currentPathName.substring(0, _currentPathName.lastIndexOf("/") + 1);
   var _strActionPage = _currentPath + "AJAXUpload.aspx";
   DWObject.HTTPPort = _strPort; 

   for (i=0; i< DWObject.HowManyImagesInBuffer; i++)
      DWObject.HTTPUploadThroughPost(strHostIP, i, _strActionPage, i+".pdf");
Is this page helpful?

Leave a Reply

Your email address will not be published.