Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

RASTER VIEWER NOT CAPTURING FULL A4
Started by matty at 09-19-2006 7:44. Topic has 6 replies.

Print Search « Previous Thread Next Thread »
  09-19-2006, 7:44
matty is not online. Last active: 9/19/2006 12:35:12 PM matty

Top 200 Posts
Joined on 05-12-2006
Posts 14
RASTER VIEWER NOT CAPTURING FULL A4
Reply Quote
I am using VB.NET 2005.

When I scan and capture an A4 page, about  2cm at the bottom of the page is not captured and displayed in the raster viewer.

Is there a setting to change the page size? Or could the problem be something else?

   Report 
  09-20-2006, 1:19
matty is not online. Last active: 9/19/2006 12:35:12 PM matty

Top 200 Posts
Joined on 05-12-2006
Posts 14
Re: RASTER VIEWER NOT CAPTURING FULL A4
Reply Quote
It would seem that the when I aquire an image from my TWAIN scanner that it is only capturing paper size Letter which is marginally shorter than A4.

I notice that the TwainSession object has a "PaperSize" property (Integer) but if I try to assign a value to it, VB.NET throws an "Invalid parameter" error.

The object browser has this to say about this property:

"This property internally gets or sets the page size capability ICAP_SUPPORTEDSIZES.  For more information on this capability, refer to www.twain.org/download.htm and click on TWAIN Specification (Version 1.9)."

I have tried assigning values as per this document but without success.



   Report 
  09-20-2006, 4:53
matty is not online. Last active: 9/19/2006 12:35:12 PM matty

Top 200 Posts
Joined on 05-12-2006
Posts 14
Re: RASTER VIEWER NOT CAPTURING FULL A4
Reply Quote
I have detected that this problem only occurs when I set the TwainUserInterfaceFlags to None (ie.when I don't show the manufacturer's interface).

When I set TwainUserInterfaceFlags to Show (ie.show the manufacturer's interface), the full A4 page is scanned.

I have replicated this problem with the Lead Tools MainDemo program

How can I replicate the output when I don't show the manufacturer's interface?

   Report 
  09-20-2006, 5:30
matty is not online. Last active: 9/19/2006 12:35:12 PM matty

Top 200 Posts
Joined on 05-12-2006
Posts 14
Re: RASTER VIEWER NOT CAPTURING FULL A4
Reply Quote
I finally resolved this as follows:

     Dim twCap As TwainCapability = New TwainCapability

            twCap.Information.Type = TwainCapabilityType.ImageSupportedSizes
            twCap.Information.ContainerType = TwainContainerType.OneValue
            twCap.OneValue.ItemType = TwainItemType.Uint16

            twCap.OneValue.Value = TwainCapabilityValue.SupportedSizesA4
           myTwainSession.SetCapability(twCap, TwainSetCapabilityMode.Set)

   Report 
  09-29-2006, 0:58
matty is not online. Last active: 9/19/2006 12:35:12 PM matty

Top 200 Posts
Joined on 05-12-2006
Posts 14
Re: RASTER VIEWER NOT CAPTURING FULL A4
Reply Quote
However, I have discovered that this does not work with certain TWAIN compatible scanners. This procedure throws an error "Capability not supported" and the page size scans as Letter.

Works fine with my Canon scanner but not my Lexmark. However, I have successfully used the Lexmark with other TWAIN scanning components.

Any ideas?

   Report 
  10-01-2006, 4:20
Maen Hasan is not online. Last active: 11/17/2008 4:23:44 PM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,799
Re: RASTER VIEWER NOT CAPTURING FULL A4
Reply Quote
Hello,

To make sure that the Lexmark don't support the SupportedSizesA4 value of the ICAP_SUPPORTEDSIZES capability, you need to check the twain driver using the twacker.exe from www.twain.org. Use the following URL to download the Twacker: http://www.twain.org/devfiles/twack.zip

Please let me know how it goes.

Thanks,
Maen Badwan
LEADTOOLS Technical Support

   Report 
  10-06-2006, 0:57
matty is not online. Last active: 9/19/2006 12:35:12 PM matty

Top 200 Posts
Joined on 05-12-2006
Posts 14
Re: RASTER VIEWER NOT CAPTURING FULL A4
Reply Quote

Thanks, Maen.

I have used the twacker and found that this capability is not supported by the Lexmark.

I have noticed that when you try to set a capability that is not supported, it causes NO image to be captured. I have written this procedure that checks whether a capability is supported before trying to set it:

Private Function IsCapabilitySupported(ByRef myTwainSession As Twain.TwainSession, _
    ByRef myCapabilityType As TwainCapabilityType) As Boolean

        Try
            myTwainSession.GetCapability(myCapabilityType, TwainGetCapabilityMode.GetCurrent)
            Return True
        Catch ex As Exception
            Return False
        End Try

    End Function


   Report 
Post
LEAD Support Fo... » Enduser » Capture & Prese... » RASTER VIEWER NOT CAPTURING FULL A4

Powered by Community Server, by Telligent Systems