Home | About us | Overview | Software - Download | Evaluate | Order | Support | Contact | F.A.Q. | Documentations | Blog | Newsletter
Loading...

Twain Scanning with Vista

Support for GdTwain ActiveX and GdTwain Pro ActiveX/SDK.

Twain Scanning with Vista

Postby bpabmeyer » Thu Mar 11, 2010 5:25 pm

I have an issue with scanning, whenever I run the sample code "twain_sample". The Imaging.CreateImageFromTwain(Me.Handle.ToInt32) returns a 0. I can't seem to get the scanner to scan in the image that I want it to. I am not sure where to go from here. I created my own section of code and I was constantly getting nothing. I went to the SDK samples and get the same issue. Any help will be appreciated. Here are the specs...

Vista Ultimate
GDPicture 5.12.8
Kyocera KM-1820 (All in One) with driver 3.1.1819


Code...
Code: Select all
       Dim nImageID As Integer
        AxImaging1.TwainLogStart("c:\twainlog.txt")

        If AxImaging1.TwainOpenDefaultSource() Then

            InitScanConfig()

            AxImaging1.TwainSetAutoFeed(True) 'Set AutoFeed Enabled
            AxImaging1.TwainSetAutoScan(True) 'To  achieve the maximum scanning rate

            AxImaging1.TwainSetCurrentResolution(300)
            AxImaging1.TwainSetCurrentPixelType(GdPicturePro5.TwainPixelType.TWPT_RGB) 'RGB
            AxImaging1.TwainSetCurrentBitDepth(8) ' 24 bpp
            AxImaging1.TwainPdfStart(imagepath & "Temp.pdf")


            While AxImaging1.CreateImageFromTwain(Me.Handle.ToInt32) <> 0
                nImageID = AxImaging1.GetNativeImage
                DisplayNativeImage()
                AxImaging1.TwainAddGdPictureImageToPdf(nImageID)
                AxImaging1.CloseImage(nImageID)
            End While

            AxImaging1.TwainPdfStop()
            AxImaging1.TwainCloseSource()
            MsgBox("Done !")
        Else
            MsgBox("Can't open default source, TWAIN state is: " & Trim(Str(AxImaging1.TwainGetState)))
        End If
bpabmeyer
 
Posts: 9
Joined: Tue Oct 07, 2008 4:32 pm

Re: Twain Scanning with Vista

Postby Loïc » Fri Mar 12, 2010 4:11 pm

Hi,

We need more information to investigate. Please have a look on this thread: announces/twain-acquisition-issues-t1486.html

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4226
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdTwain [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest