cancel
Showing results for 
Search instead for 
Did you mean: 

scan documents in pb claasic

former_member203861
Participant
0 Kudos

Hellow everyone ,

Does anyone can help or know how do i scan a documents within powerbudiler (11.5 and 12.5 versions).

i mean like that :

1. the user puts the documents in the scanner.

2. the user clicks the button in my applications.

3. my applications starts scanning the documents and save it automatically into a knowen path .

is it possible ? is it going to be another code for each scanner ?

thanks

Moshe

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

I've personally used GDPicture Imaging Toolkit with good results, but I use it only for displaying the scanned images and not for scanner control.

To keep things really simple, I set up the PB app to monitor a specific folder, and then configured the scanner button to scan to that same folder (using the vendor-supplied scanner software). The user sees the document appear in a window of the PB app, and can then drag and drop it into an appropriate place. The PB app manages the moving of the file from the scan folder into a directory that is managed by the application.

former_member203861
Participant
0 Kudos

hi Ronnie

thanx , its an idea

moshe

Former Member
0 Kudos
Former Member
0 Kudos

You basically have only a few options.

The easiest is via the ShowAcquisitionWizard method on the WIA (Windows Image Acquisition) API.  This will invoke the image capture process as coded by the device driver.  You can't interact with it while it is in process but once the scanned image is stored somewhere, you can then grab it from PB.

The second way is to purchase a third party component which you would then interact with via PB (either as a control within a PB object or as a .Net COM object).

You can search and search and search and search for information on this and after going down many dead ends come to the same place.

Matt

Former Member
0 Kudos

What you need is a TWAIN ActiveX control. TWAIN is the industry standard for controlling scanners.

Here is one I found that is reasonably priced. I haven't used it myself.

http://www.ciansoft.com/twaincontrolx/default.asp

Former Member
0 Kudos

Hi Moshe;

   I have great news for you ... I use:

1) EZTwain to scan the documents into my PB and Appeon applications.

http://www.dosadi.com/eztwainpowerbuilder.htm

2) Tesseract to OCR them (Free open source).

http://sourceforge.net/projects/tesseract-ocr/

3) And ImageMagicK to clean-up the images (Free open source).

http://www.imagemagick.org/script/index.php

Note: I think Bruce likes FreeImage - which also looks like a great product)

http://www.miqui.it/pbni_freeimage.htm

HTH

Regards ... Chris

Former Member
0 Kudos

EZTwain is $999 per year - yikes!

The one I put a link to is only a one time $110 charge.

I have been using a 2003 version of "Windows Imaging Professional" that originally was bundled with Windows 2000. It then was available from the original developer Kodak. They were spun off and changed their name a couple times. I'm not even sure if they are in business any more or what their name is.

Former Member
0 Kudos

HI Roland;

1) EZTwain is free

2) EZTwain Pro is $999 (but that includes maintenance). You can buy it without.

3) You can OPT to only pay for upgrades.

Thanks for the link on the TwainControlX product link. That looks like a good alternative as well! 

Regards ... Chris

Former Member
0 Kudos

FWIW: Note ... pricing is from $110. A corporate license (like EZTwain Pro) for the TwainControlX control is $330.

former_member203861
Participant
0 Kudos

hi chris ,

thanks for your response

Do you have some code to share that activates a scanner and let meedit the file name to save it ?

i put a button in a dw , some code ( click event , i copied the code from the EZtwain help for powerbuilder ) ,  but it doesnot work so far...

of course i copied from the txt help file all the dll functions declarations as needed into the Global area

thanx

Moshe


Former Member
0 Kudos

Hi Moshe;

  Yes I do ... please see the attached PB (v12.1) code example for EZTwain I wrote as a quick test.  

HTH

Regards ... Chris

former_member203861
Participant
0 Kudos

hi chris

I am sorry but I cant open the zip file ,

may I ask you put it again or send it to my mail : moshet@ramasys.co.il

thanx

CobyKako
Advisor
Advisor
0 Kudos

Hello Moshe,

On behalf Chris, I could help you

a) Right Click "CIP_Twain_Test.txt.zip (33.0 K) "

b) Save Target As...

c) Choose a ZIP file for the extension (e.g. CIP_Twain_Test.zip)

d) Once done, unzip CIP_Twain_Test.zip into a temp folder

e) Rename the extracted file CIP_Twain_Test.txt with a .ZIP extension

f) Once done, unzip CIP_Twain_Test.zip into a temp folder

You should get the PB workspace with the correct files

HTH

Jacob

former_member203861
Participant
0 Kudos

thanx

worked

I forgot the rename its by the command from dos ( cmd )

moshe

former_member203861
Participant
0 Kudos

hi chris

a big thanks , but.. I got a message like this file is missing :  TWAIN_32.DLL

the message is : " unable to open source manager ( TWAIN_32.DLL ) "

can you help me with this ?

thanx

moshe

former_member203861
Participant
0 Kudos

I googled it and found a fix_dll.exe something like that

is it any good ?

Former Member
0 Kudos

Thanks for helping Jacob! 

Former Member
0 Kudos

Hi Moshe;

   Did you download and install the EZTwain software yet?

http://www.eztwain.com/

Regards ... Chris

former_member203861
Participant
0 Kudos

HI CHRIS

yes , downloaded and installed , I can see in the programfiles(86)\eztwain\ ...

I can see all the directories and so on .

I have read the txt file under powerbuilder directory under the eztwain dir

and I have tried  the wizard included for creating script but I still got the same message

about twain manager


Former Member
0 Kudos

Excellent ...

Now, did you install the TWAIN drivers for your attached scanner?

In my case, I'm using a FUJITSU model 6230. After the driver installation or even installing MS-Office .. the TWAIN_32.dll driver appears in the "C:\Windows" root folder as follows:

HTH

Regards .. Chris

PS: I'm using W7 64bit

Former Member
0 Kudos

I have not done this myself, but it should be quite possible. You will be using TWAIN which is a standard API to digital image devices. There is a TWAIN developer's tool kit, I suggest you start here:

http://www.twain.org/scannerdriverdevelopers/specification-and-tools.html

Cheers

David