Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Full Scanning Program using ADF

Posted on 2006-11-27
7
Medium Priority
?
1,287 Views
Last Modified: 2008-03-15
Hi

i Need a full Program that uses the scanner's Auto document feeder(ADF) and show the scanned pictures on the form as thumbnails.
Also i want to set the number of documents to scan, and after that the scanner should stop.
i don't want the scanner source select to be shown to the user, i want it to be selected from code. or at least once
all the scanned Pictures should be saved as files in a temporary folder specified in Code.
i don't want to use any outside component unless it's free and downloadable.
i also want to be able to select if i want to scan from the ADF or the flat pad.

I have windows XP SP2, using HP Scanjet 8300 Series, I'm Using Delphi 6.0

points will go directly to the first working program with my requirements


Appreciate your Help, thanks in advance and best regards,
0
Comment
Question by:Balshe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 1

Author Comment

by:Balshe
ID: 18017762
i forgot to say if it is possible to specify the resolution and the scan mode(Gray scale, black & white,24 bit color,...)
0
 
LVL 9

Expert Comment

by:bernani
ID: 18032263
Hi,

Nearly a complete application you're asking, no ? A clone of the HP utility provided with the hardware. ;)

first go to:
http://delphitwain.sourceforge.net/
"Delphi Twain is my latest contribution to the Delphi community. This library consists in a implementation of Twain features for Borland Delphi tool."

Have a look at about on this subject:

http://delphi.about.com/od/graphics/l/aa030299.htm

and

http://www.twain.org/index.html



You can also download a compo from jedi: ftp://ftp.delphi-jedi.org/api/twain19.zip
(http://www.delphi-jedi.org/apilibrary.html)

and why not
http://www.efg2.com/Lab/Library/Delphi/Graphics/ImageProcessing
http://support.leadtools.com/SupportPortal/cs/forums/11/ShowForum.aspx (a forum)

http://www.koders.com/info.aspx?c=ProjectInfo&pid=9ZDXKG4FQBYWAL84NWVLEFLDMG
(unit+demo) - sourceforge project no more maintained
TScanner, a component interface to a TWAIN compliant scanner.
Copyright (C) 2000, Oliver George


0
 
LVL 1

Author Comment

by:Balshe
ID: 18058873
Dear Bernani,

i already have visited these sites, I've downloaded Delphi Twain, but i didn't know how to select the scanner source(Flatpad or ADF), the example generates some errors when you try to use the"Send Command" Screen and i don't know why.

www.Twain.org i couldn't get any use of it, besides there is a lot of documents and i don't have enough time to read them, and this is why i asked for a full project.


ftp://ftp.delphi-jedi.org/api/twain19.zip , the link is not working

Lead tools is not for free

i need a full source project that does what i need.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Accepted Solution

by:
bernani earned 2000 total points
ID: 18112287
Hi,

Did you read the DelphiTwain.chm wich comes with the Twain unit from http://delphitwain.sourceforge.net.

In the Methods, you will read under the item SetfeederEnabled

If TRUE, Source must acquire data from the document feeder acquire area and other feeder capabilities can be used. If FALSE, Source must acquire data from the non-feeder acquire area and no other feeder capabilities can be used

function SetFeederEnabled(Value: WordBool): TCapabilityRet;

Description
The application should set this capability to TRUE before attempting to use any other feeder capabilities. This sets the current acquire area to the feeder area (it may not be a different physical area on some Sources).
The application can set this capability to FALSE to use the Source’s non-feeder acquisition area and disallow the further use of feeder capabilities..

Return values
This method returns a TCapabilityRet enumeration to test if it was successful. crSuccess means it worked ok.

TCapabilityRet is explained in the help file.

In one of the tutorials called "How to retrieve and set twain capabilities" you can read:

The explanation
What are the twain capabilities ?

One of TWAIN’s benefits is it allows applications to easily interact with a variety of acquisition devices. Devices can provide image or audio data. For instance,

Some devices have automatic document feeders.
Some devices are not limited to one image but can transfer multiple images.
Some devices support color images.
Some devices offer a variety of halftone patterns.
Some devices support a range of resolutions while others may offer different choices.
Some devices allow the recording of audio data associated with an image.
All these items may be negotiated with the source (using the source manager) using capabilities, which are properties which the application may set and retrieve from the source.
.......

All is explained in the help.

The help file contains also 6 examples and from one, you  can read:

To this example to work, create the twain component (TDephiTwain) in the main form and create your own code to load the library (LibraryLoaded parameter), source manager (SourceManagerLoaded), select a source (Source[Index: Integer]) and load it (Loaded). This example will handle ICAP_HIGHLIGHT capability from twain by providing two methods, one to get the value and the other to set.


I don't have a scanner with ADF, so I 'm not able to test code that I could write. I believe, reading the samples, tutorial an the help file itself, that all the steps required are already coded in the different examples or they need few modifications to work.

You answered :

ftp://ftp.delphi-jedi.org/api/twain19.zip , the link is not working

Re-tested. clicking on the link download the zip file on my PC. Maybe a security issue for your browser.

0
 
LVL 1

Author Comment

by:Balshe
ID: 18364311
i've made it work, but now i'm facing another problem, my Scanner supports Duplex ADF(it's cabable of scanning both sides of the paper) but i couldn't get his functionality to work .. any ideas?

thanks

0
 
LVL 1

Expert Comment

by:Computer101
ID: 21135796
Forced accept.

Computer101
EE Admin
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

618 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