How do i get the image output from Scanner as a file input for HTML File Input field. I am using the dynasoft web twain api for scanning the images.http://www.dynamsoft.com/Support/DWTGuide/Dynamic%20Web%20TWAIN%20SDK.html#Manual
Snippet to acquire the scan image -
var DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
DWObject.IfDisableSourceAfterAcquire = true; // Source will be closed automatically after acquisition.
DWObject.SelectSource(); // Select a Data Source (a device like scanner) from the Data Source Manager.
DWObject.OpenSource(); // Open the source. You can set resolution, pixel type, etc. after this method. Please refer to the sample 'Scan' -> 'Custom Scan' for more info.
DWObject.AcquireImage();
Snippet for file input -
<input type="file" id="fileselect" accept="image/*,application/pdf" capture="camera" app-file-select="onFileSelect($files)" app-change="getFile($files)" app-model="file" style="display:none">
The Html file is being processed as a MultipartFile on the server side.
Thanks in advance
You don't need to create an input element. Just use the API HTTPUploadAllThroughPostAsPDF or HTTPUploadThroughPostAsMultiPagePDF. On the server side, you can use any programming languages you like.
For example, ASP.NET:
Use RemoteFile to extract the file content.