Loading...

Page height

Support for GdTwain ActiveX and GdTwain Pro ActiveX/SDK.

Page height

Postby dcoffey » Mon Feb 11, 2008 7:20 pm

Im having an issue, no matter what I set the page size, it makes it 1400

I want to use a4 (8.5 x11)

here is my code Im playing with

Code: Select all
Dim nImageID As Integer

        If Imaging1.TwainOpenDefaultSource() Then

            InitScanConfig()

            Imaging1.TwainSetCurrentResolution(100)
            Imaging1.TwainSetCurrentPixelType(GdPicturePro4.TwainPixelType.TWPT_BW) 'BW
            Imaging1.TwainSetCurrentBitDepth(1) ' 1 bpp
            Imaging1.TwainSetPaperSize(1) ' have tried everything here
            Imaging1.TwainSetAutoFeed(True) 'Set AutoFeed Enabled
            Imaging1.TwainSetAutoScan(True) 'To  achieve the maximum scanning rate

            While Imaging1.CreateImageFromTwain(Me.Handle.ToInt32) <> 0
                nImageID = Imaging1.GetNativeImage
                If nImageID <> 0 Then
                    count += 1
                    Call Imaging1.SaveAsTiff(My.Application.Info.DirectoryPath & "\acquire" & Str(count) & ".tiff")
                    Call Imaging1.CloseImage(nImageID)
                End If
            End While
            Imaging1.Crop()
            Call Imaging1.TwainCloseSource()
            MsgBox("Done !")
        Else
            MsgBox("can't open default source, twain state is: " & Trim(Str(Imaging1.TwainGetState)))
        End If
dcoffey
 
Posts: 7
Joined: Mon Feb 11, 2008 1:37 am

Re: page height

Postby Loïc » Wed Feb 13, 2008 12:56 pm

Hi,

I don't understand what is your problem.

What would you say by
Im having an issue, no matter what I set the page size, it makes it 1400



Best regards,

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

Re: Page height

Postby dcoffey » Thu Feb 14, 2008 2:06 am

what I mean is, it is scanning 8x14 page, even though I tell it to only scan a 8x11 page
So all the scans have an extra 3" of white space at the end.
dcoffey
 
Posts: 7
Joined: Mon Feb 11, 2008 1:37 am

Re: Page height

Postby Loïc » Tue Feb 19, 2008 7:23 pm

Hi,

Your scanner does probably not support this format. What is the returned value of the Imaging1.TwainSetPaperSize(1) call ?


PS you can check the supported paper format like that:

Code: Select all
For ncPt = 1 To Imaging1.TwainGetAvailablePaperSizeCount
      MsgBox Imaging1.TwainGetAvailablePaperSizeNo(ncPt)
Next ncPt



Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
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 2 guests