You TWAIN code is excellent but what is the situation with WIA
interface which has become the standard over the last few years.
How are other developers handling WIA and TWAIN ?
Are using and OCX or DLL or Fabrics stuff ?
Phil McGuinness
"Sherlock" <sher...@sherlock.com.au> wrote in message
news:1150762185....@g10g2000cwb.googlegroups.com:
What is MODI... ?
Did a quick Google search and found nothing remotely related to
programming or scanning.
Phil
---
MODI OCR (Microsoft Office Document Imaging)
I do not want to be dependant on Microsoft office and which version
they may or may not have on their machines.
Phil
-----
No matter what you use you will be dependent on something or someone.
The difference with MS is that it is relatively universal and covers a
wider range of scanner devices than other options. The key manufacturers
work in with MS.
Even Kodak only supported limited devices.
Don't forget that MS is also a founding member of WIA and promotes its
use. The good thing about MODI is that it has been around and the API is
in wide use. Meaning it is relatively stable.
But no one solution is going to fit all...
Geoff
"Sherlock" <sher...@sherlock.com.au> wrote in message
news:1150804016.9...@p79g2000cwp.googlegroups.com:
I will be working on a VO interface to an excellent product from
www.art-copy.com and have request the SDK. They seem to have a total
solution and for around $100 US which is reasonable for the
application. At least I can some support and know these people
specialise in this end of the market.
===
scanning to a file, scanning to a printer, scanning to your favorite
email client, scanning to a fax, or even scanning to another program on
your computer. Click the button and Art-Copy will take care of the rest
making for an all around simple process
===
duplex scanning support so that users can use their standard ADF
(automatic document feeder) to perform a full duplex scanning job. What
this means is now you can scan both sides of documents with your normal
ADF scanner and have Art-Copy Business automatically sort the page
order into a multiple page PDF or Tiff file.
===
with OCR functionality built directly into the program. Art Copy
Enterprise can batch scan documents while recognizing text, which can
be exported as a rich text format or even exported directly into
Microsoft Word.
===
Phil
OTOH, when i see their sample code like:
...
//'Set File type to PDF
ACSDK.ACFileFileTypeIndex = 2
//'Set Output to File
ACSDK.ACScanTarget = 0
i'd like to take a hammer and smit s/o ;-((
Karl
Firts of all try thgis in Google: wiaEventDeviceConnected it the easy
way to find the wia stuff on MS Support.
Then here is our function (from Paolo Calzi) below ....
Any improvements or comments appreciated
There is another MS Site to visit which lists the relatively FEW
scanners that support WIA. Cannot lay my hands on it immediately....
Richard
FUNCTION WIAAcquireImage(cFileToSave, cFileType, lLowRes) // File
// cFileType "TIF" "JPG"
// lLowRes "TRUE" for low resolution
// cFileToSave string indicating file path and name where to save the
scanned image NO FILE EXTENSION
LOCAL oImgFile AS OBJECT
LOCAL oApp AS OBJECT
LOCAL oIP AS OBJECT
LOCAL oOldErr AS USUAL
LOCAL oError AS USUAL
LOCAL lOk:=FALSE AS LOGIC
Default(@cFileType, "JPG")
IF ! cFileType == "TIF" // just to be safe
cFileType == "JPG"
ENDIF
Default(@lLowRes, FALSE)
oOldErr:=ErrorBlock() // dont use tdoc error
as we wish to recover
ErrorBlock({|oError| _Break(oError)})
BEGIN SEQUENCE
oApp:=OLEAutoobject{"WIA.CommonDialog"}
oImgFile:=OLEAutoobject{"WIA.ImageFile"}
oImgFile:=oAPP:ShowAcquireImage(,,MinimizeSize,,0,,)
IF oImgFile != NULL_OBJECT
// DIM IP AS New ImageProcess
oIP:= OLEAutoobject{"Wia.ImageProcess"}
// Set IP = CreateObject( "Wia.ImageProcess" )
oIP:Filters:Add(oIP:FilterInfos:[Item,"Convert"]:FilterID,)
// "Convert"
IF cFileType == "JPG"
oIP:Filters:[Item,1]:Properties:[Item,"FormatID"]:Value:=
wiaFormatJPEG
//IP.Filters(1).Properties("Quality").Value = 5
IF lLowRes
oIP:Filters:[Item,1]:Properties:[Item,"Quality"]:Value:=50
ENDIF
ELSEIF cFileType=="TIF"
oIP:Filters:[Item,1]:Properties:[Item,"FormatID"]:Value:=
wiaFormatTIFF
ENDIF
oImgFile := oIP:Apply(oImgFile)
FErase(cFileToSave + "." + oImgFile:FileExtension)
oImgFile:SaveFile(cFileToSave + "." + oImgFile:FileExtension)
IF File(cFileToSave + "." + oImgFile:FileExtension)
lOk:=TRUE
ENDIF
ENDIF
RECOVER USING oError
WarningBox{SysObject(),"Set Up Problem","WIA problem" + CRLF +
AsString(oError:Description)}:Show()
END SEQUENCE
ErrorBlock(oOldErr)
RETURN lOk
I'll compare this with our MODI lib later.
Geoff
"tdoc...@googlemail.com" <tdoc...@googlemail.com> wrote in message
news:1150813037.0...@u72g2000cwu.googlegroups.com:
It would be interesting to see what the dependent dll's are.
Keep us advised please.
Geoff
"Sherlock" <sher...@sherlock.com.au> wrote in message
news:1150808421.4...@c74g2000cwc.googlegroups.com: