Contact us


All times are UTC - 8 hours



   [ 6 posts ] 
Author Message
   


Joined: Wed Jun 09, 2010 12:12 am
Posts: 15
Hi
I have quick question,
Is it possible to pre-populate(load) an image to the twain control on page? I only want to scan(rescan) the image if the original image is scrambled or corrupted .I see one method,
Quote:
HTTPDownload(String HTTPServer, String HTTPRemoteFile)
but I can't specify a static image name. rather I prefer to write as stream. Scanned images are stored in database as blobs and is fine as long as new entry. But when the user want see the existing images when he edit the existing 'entry' to decide if rescan is required.
I use Servlet for storing scanned images in to db. Is there any way to populate the same image(only as stream) in to scan control?

It could be great if you could find solution for me!
Thanks
Satheesh


User avatar
   


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

To download images as stream, you can follow the steps below:
1. Transform the image format to DIB and get it to the clipboard.
2. Use LoadDibFromClipboard method to load the data from clipboard to the control.
http://www.dynamsoft.com/help/TWAIN/met ... pboard.htm

Would you please let me know why you don't want to specify an image name? If security is your concern, you can use the variable instead of an image name, so users are not able to get image names by View Source. Also you can set IfSSL to TRUE to transfer image data over SSL.
http://www.dynamsoft.com/help/TWAIN/Web ... 0IfSSL.htm

Thanks.

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


   


Joined: Wed Jun 09, 2010 12:12 am
Posts: 15
I tried this, but able to get a grip on that!! If I want to use 'LoadDibFromClipboard ' method,the image should have been in the clipboard. This is where I got stuck, is there any method to load/transform images in to clipboard?

Actually images are loaded directly from the database(stored as blob) so there is no static name /path for the images.
Thanks
Satheesh


User avatar
   


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1706
Hi Satheesh,

Sorry for the delay in response. It took us some time to find the proper solution. :P

After some research, we found that the method HTTPDownloadEx can be used to download images from database as stream. We have just sent the sample code we tested to your registered email address.
http://www.dynamsoft.com/help/TWAIN/Web ... loadEx.htm

Please let us know how the sample works for you.

Please NOTE that you need to change the parameters in the sample code to test it, such as Server, IP, HTTPPort, etc.

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


   


Joined: Mon Jul 02, 2012 3:41 am
Posts: 1
Hi,
Can you please send me the sample code, I have been struggling with this issue as well.
EDIT: nevermind, I got it working using a file servlet as described here
Code:
HTTPDownload("myserver", "/MyApp/FileServlet/" + filename + ".tif");


note that the HTTPDownload method requires the download URL to end with an extension (i.e: ".tif") or else the servlet won't be called.


User avatar
   


Joined: Tue Nov 08, 2011 7:41 pm
Posts: 51
Location: Vancouver
Thanks for your information.

Yes, you are right, the path should ends with the extension of the image.

_________________
Robby Jackson
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Display posts from previous:  Sort by  
   [ 6 posts ] 


Who is online

Users browsing this forum: No registered users 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