Thanks for Downloading Dynamic Web TWAIN 30-Day Trial!
Your download will start shortly. If your download does not begin, click here to retry.
Image Editing
How can I configure all scanned images to conform to a specific size standard (e.g., A4)?
Simply, you can use PageSize to set the page size to be used when acquiring images. Or you can leverage the negotiation capabilities functionality by following the steps mentioned below.
- ask for the supported sizes of your device.
DWTObject.getCapabilities( function (result) { for (var i = 0; i < result.length; i++) { if ( result[i].capability.value === Dynamsoft.DWT.EnumDWT_Cap.ICAP_SUPPORTEDSIZES ) sizes = result[i].values; } console.log(sizes); }, function (error) { console.log(error); } );
- set the page size to a size standard as needed.
DWTObject.setCapabilities( { exception: "ignore", capabilities: [ { capability: Dynamsoft.DWT.EnumDWT_Cap.ICAP_SUPPORTEDSIZES, curValue: 1, // 1 means 'A4' in our case exception: "fail", }, ], }, function (result) { console.log(result); }, function (error) { console.log(error); } );
A list of the values of various supported sizes can be found here. You can use the value for the curValue property.