Link to home
Start Free TrialLog in
Avatar of stevensont
stevensontFlag for United States of America

asked on

TWAIN compatible scanners

I’ve developed an application in Access 2007 that store documents and images. Currently, documents/images have to be scanned then imported into the DB which will store the file on a server with the name of the document/image in the DB. I would like to code a button that will start the appreciate device scanning capabilities. There were no standards when the scanners were purchased so therefore, there are several different scanners, but all are TWAIN compatible devices. I would have thought this to be an easy problem to overcome, but I have searched and found similar problems were solved by purchasing some other software. Hasn’t anyone written or know of a way to start a scanning device and import the scan into a DB?
ASKER CERTIFIED SOLUTION
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stevensont

ASKER

All the scanners came with software that performs the scanning. I know it Is possible to launch each scanner's specific application. However, the HP all-in-one has the HP solution center which performs scanning. The Dell all-in-one has a different application. I guess now the question would be how to launch these different solfware from code without knowing which scanner software is installed on the machine. All the systems are windows 7, 64-bit if that makes a difference.
AFAIK, the software you are referring to is for humans to use to manually scan. I have not seen any SDK or APIs so that you can automate these applications. Not sure why you would even want to automate them. Normally you write your own software to do the image acquisition and  store it whee it can be used by your application.

 These may help:

http://www.atalasoft.com/free-dotnet-image-sdk

http://www.codeproject.com/Articles/45241/How-to-Scan-Tiff-and-PDF-from-the-Web
I use this to handle all aspects of systems like this:
http://www.ammara.com/dbpix/access.html
It is doable, but twain is a mine field because suppliers don't follow the standards completely.

After much trouble I ended up with Chestysoft's csXImage control:

http://www.chestysoft.com/ximage/default.asp

It is not free but will save you hours of work. Also, the support is excellent and you probably will need it. Simon helped me out with a nasty (and cheap) Lexmark scanner with a buggy driver.

/gustav
stevensont stated they wanted to store a document/image in the DB.  With documents this normally mean that you will need to handle multiple page documents stored in a single file. The document image standard is a multiple page TIFF. In the USA the PDF format is also common.

@gustav, That looks like a great control. From what I see it looks like Chestysoft's csXImage control: will could handle multiple page documents as a TIFF or export to a PDF.  Have you had good experience with it scanning multiple page documents with this control?

@boag2000, AFAIK, DBPix is really for images not for multiple page documents.   Have you used this control for document scanning?
<@boag2000, AFAIK, DBPix is really for images not for multiple page documents.   Have you used this control for document scanning?>
I have used it for scanning in documents and images, ...."as images"
The kicker here is what is meant by:
"store documents and images"

...at it's core, DBPix is designed to scan/display/Manage, "Images".
So, if the scanned Documents will be OCR'ed to text (or word Documents), or converted to PDF's, ...then DBPix will not fit the bill here...

As always, it is possible that I may have misunderstood something here
;-)

There is a lot still unknown about the existing system...
Will the scanner just be used to scan in and convert the images? ...(and the "documents" will be stored directly)

And this is not clear:
"documents/images have to be scanned then imported into the DB which will store the file on a server with the name of the document/image in the DB"
Are the "Files "being stored in the Database, or stored on the server, or Both...?
If they are stored, are they stored in Attachment Dataypes, or OLE objects
...or are the files simply "Linked"?


JeffCoachman
Yes, the multipage TIFF was what I used, saved with Group 4 Fax Encoding.
This mimics fax resolution in b/w which is OK for most business documents.

However, if you later wish to reprint or forward a document, the PDF format is more handy and wider accepted, and csXImage does that conversion too. Very handy.

/gustav
@gustav, thanks for the info. That is exactly what I needed to know.  I am downloading the trial now.  Can't beat the price. It is a lot cheaper than other solutions I have used.

@boag2000,
<<If they are stored, are they stored in Attachment Dataypes, or OLE objects
...or are the files simply "Linked"?>>

 You can acquire a document/image in many ways. It could be downloaded,  scanned with other software and saved, within the application, etc.  The acquisition of an image/document really is independent of how/where it is stored in the application. The application could easily use multiple methods to get the document/image and always store it the same way.
<You can acquire a document/image in many ways. It could be downloaded,  scanned with other software and saved, within the application, etc.  The acquisition of an image/document really is independent of how/where it is stored in the application. The application could easily use multiple methods to get the document/image and always store it the same way.>

Yes, ...this all I knew, ...it was just not clear what the OP had as their existing setup, or what they ultimately needed or wanted.
I’m sorry for the confusion. I’ll try to explain better.
First, the user scans a single or multiple page documents or an image (picture). The HP scanning software (HP Solution Center) saves the document in PDF format and images in JPG format. Documents and images are placed in a “scan” folder by the HP software. The Access application use ahtCommonFileOpenSave to select any file type (PDF, DOC, DOCX,  XLS, XLSM, JPG, BMP, PNG, etc.) and stores the name of the file in a text field in a table within the DB and moves the actual file to a folder on a server and that’s it. When a user wants to view a document, the DB creates a hyperlink to the file stored on the server and opens it with the appropriate application (MS Word, MS Excel, Picture Viewer, etc.) based on the systems file type association.

What I thought was simple is turning out to be more complicated and not worth the time and bother right now; maybe later. Purchasing a solution to scan for which there are already scanner specific software to perform the function is going to prove difficult to get approved. So, I’m stumped and amazed how this has turned out.
stevensont,

I felt the same way when I first started do document management systems.   I have client with large MFP devices that can scan. They basically do exactly what you have described. For the ones with MFPs that have twain drives, I am able to automate the process a lot more.

For me it is all about the volume. I have clients that scan have several employee tht each scan 100's of documents a day. For them it needed to be integrated to improve productivity.
Did you investigate the link TheHiTechCoach posted.
Looks promissing.

Sorry, but there is no "Drop In" solution for this.
:-(
> I’m sorry for the confusion. I’ll try to explain better.

Well, this is what you asked:

> Hasn’t anyone written or know of a way to start a scanning device and import the scan into a DB?

If you just wan't to pick up files from a scan folder and record the file names, it is quite simple and sounds like what you already do.

So? End of story?

/gustav
I found this VBA Scanning Code and it seems complete and working. This is a solution that I've been try to find. It doesn't look very complicated, so if anyone else wants to give it a try, then click the link.
Will it scan documents in as PDFs?
boag2000,
I read through the whole post and on the last page it discuss how to save the file as PDF. I'm going to take the time and put together a DB to test all the code with various scanners here. In any regards, it is what I was searching for and couldn't find until now with no expense.
OK, let us hear about your findings please.

/gustav
stevensont,

The link you provide uses WIA that I suggested in the very first reply. The downside I have found with WIA is that is is very limited in the output formats built in.  To save as a PDF you have use another application.    Most applications that use WIA are getting images and not documents from TWAIN devices.
Yep. PDF is basically not an image format though widely used for distribution (for print) because of the nearly 100% acceptance of the format.

/gustav
I'm not a top level developer, but I do pretty good. Given other projects, deadlines, and bug fixes. This enhancement needs budget $ and time. I don't have appoval for either.