Page height

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
dcoffey
Posts: 12
Joined: Mon Feb 11, 2008 1:37 am

Page height

Post by 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

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: page height

Post by 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

dcoffey
Posts: 12
Joined: Mon Feb 11, 2008 1:37 am

Re: Page height

Post by 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.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Page height

Post by 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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests