Solved

TWAIN compatible scanners

Posted on 2012-04-09
21
744 Views
Last Modified: 2012-04-16
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?
0
Comment
Question by:stevensont
  • 6
  • 5
  • 5
  • +1
21 Comments
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 500 total points
ID: 37825602
If you have a TWAIN drive and the APIs for it then you will be able to do it.

You could try WIA from Microsoft (click here).  

I have done several document management systems.  I have found it is well worth it to purchase a good control unless you have 3-6 months just to devote to the part.
0
 

Author Comment

by:stevensont
ID: 37825884
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.
0
 
LVL 21
ID: 37825947
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
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37826324
I use this to handle all aspects of systems like this:
http://www.ammara.com/dbpix/access.html
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 37826496
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
0
 
LVL 21
ID: 37828273
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?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37828495
<@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
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 37828611
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
0
 
LVL 21
ID: 37828728
@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.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37829108
<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.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:stevensont
ID: 37830494
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.
0
 
LVL 21
ID: 37830826
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.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37830842
Did you investigate the link TheHiTechCoach posted.
Looks promissing.

Sorry, but there is no "Drop In" solution for this.
:-(
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 37831218
> 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
0
 

Author Comment

by:stevensont
ID: 37832102
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.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37832571
Will it scan documents in as PDFs?
0
 

Author Comment

by:stevensont
ID: 37833404
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.
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 37833467
OK, let us hear about your findings please.

/gustav
0
 
LVL 21
ID: 37833895
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.
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 37836209
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
0
 

Author Closing Comment

by:stevensont
ID: 37854014
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.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Dcount unique 6 24
MS Access Bound Objects. 6 28
Trying to develop input form for time clock database 15 23
Square brackets 4 0
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now