Contact us


All times are UTC - 8 hours



   [ 2 posts ] 
Author Message
   


Joined: Mon Mar 09, 2015 12:21 am
Posts: 1
Hello,

Right now we make use of the Dynamic Web TWAIN in one of our web apps for scanning contracts. Our paper contract is approx 12 x 20. It's a long document. We have ADF and multi-scan enabled in addition to setting maxImagesInBuffer to 100. When the contract is scanned only the last half of the document is displayed in the WebTwain plugin. Is there any setting in the API will make the plugin twain split the page into separate documents if the document is longer than a certain size?


User avatar
   


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1706
Hello phyliciajessel,

Unfortunately, we don't have a built-in API to make the plugin split the page into separate documents.

But there is a workaround I can think of:

1. Scan a document into the viewer. For example, the image is 1700px * 6600 px and you want to split it into 3 separate images (1700px * 2200 px).

2. Get the height and width of the scanned image.

DWObject.GetImageHeight(0); // returns 6600
DWObject.GetImageWidth(0); //returns 1700

3. Crop the image into 3 pieces and then load it back into the viewer.

DWObject.CropToClipboard(0, 0, 0, 1700, 2200);
DWObject.LoadDibFromClipboard();

DWObject.CropToClipboard(0, 0, 2200, 1700, 4400);
DWObject.LoadDibFromClipboard();

DWObject.CropToClipboard(0, 0, 4400, 1700, 6600);
DWObject.LoadDibFromClipboard();

4. Remove the first image.

DWObject.RemoveImage(0);

Let me know if it works for you.

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


Display posts from previous:  Sort by  
   [ 2 posts ] 


Who is online

Users browsing this forum: WillieCam and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Copyright © 2018 Dynamsoft | All Rights Reserved
dynamic designed by Dynamsoft team
Fatal: Not able to open ./cache/data_global.php