Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, January 11, 2010 3:27:25 AM(UTC)

papyrum  
papyrum

Groups: Registered
Posts: 32







Hello,

I am using LeadTools v16. and the .NET class library.



I am developing a general scanning application. What I like to say with "general" is that the application should work in any PC with any twain scanner.

To avoid showing the "user interface window" of each twain driver, I made a windows form with most of the typical functionality (resolution, paper size, scanning type, etc). Before showing this "general configuration form" I query the supported capabilities to enable or disable some parts of this form. For example: if the scanner does not support "imprinter", the "imprinter configuration" are of the form should be disabled.

 But I am having some problems to implement the printer capability. I am trying the application with a kodak i610 scanner. Its supports next printer capabilities: printer, printerenabled, printerindex and printersuffix.

And I amd using the next code:

                Dim ltCapImprinter As New TwainCapability
                ltCapImprinter.Information.Type = TwainCapabilityType.Printer
                ltCapImprinter.Information.ContainerType = TwainContainerType.OneValue
                ltCapImprinter.OneValueCapability.ItemType = TwainItemType.Int32
                ltCapImprinter.OneValueCapability.Value = TwainCapabilityValue.PrinterImprinterTopBefore
                oSesionTwain.SetCapability(ltCapImprinter, TwainSetCapabilityMode.Set)

                Dim ltCapImprinterEnabled As New TwainCapability
                ltCapImprinterEnabled.Information.Type = TwainCapabilityType.PrinterEnabled
                ltCapImprinterEnabled.Information.ContainerType = TwainContainerType.OneValue
                ltCapImprinterEnabled.OneValueCapability.ItemType = TwainItemType.Int32
                ltCapImprinterEnabled.OneValueCapability.Value = 1
                oSesionTwain.SetCapability(ltCapImprinterEnabled, TwainSetCapabilityMode.Set)

                Dim ltCapImprinterIndex As New TwainCapability
                ltCapImprinterIndex.Information.Type = TwainCapabilityType.PrinterIndex
                ltCapImprinterIndex.Information.ContainerType = TwainContainerType.OneValue
                ltCapImprinterIndex.OneValueCapability.ItemType = TwainItemType.Int32
                ltCapImprinterIndex.OneValueCapability.Value = 22
                oSesionTwain.SetCapability(ltCapImprinterIndex, TwainSetCapabilityMode.Set)

                Dim ltCapImprinterSuffix As New TwainCapability
                ltCapImprinterSuffix.Information.Type = TwainCapabilityType.PrinterSuffix
                ltCapImprinterSuffix.Information.ContainerType = TwainContainerType.OneValue
                ltCapImprinterSuffix.OneValueCapability.ItemType = TwainItemType.Str255
                ltCapImprinterSuffix.OneValueCapability.Value = "PLG"
                oSesionTwain.SetCapability(ltCapImprinterSuffix, TwainSetCapabilityMode.Set)

But whe I do the  oSesionTwain.Acquire(Twain.TwainUserInterfaceFlags.None) documents are not printed.

Could you please help me???

Thanks in advance,

Pablo L.G.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, January 11, 2010 7:32:42 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Pablo,
It appears you're using incorrect TwainItemType values for the data types.
For TwainCapabilityType.Printer, you should use TWTY_UINT16, which is TwainItemType.Uint16 in LEADTOOLS .NET.
Similarly, for CAP_PRINTERENABLED, you should use TW_BOOL, not TWTY_UINT32.

Please refer to the Twain specification for details on the capability types.
 
#3 Posted : Tuesday, January 12, 2010 10:02:02 PM(UTC)

papyrum  
papyrum

Groups: Registered
Posts: 32


Thanks Adnan,

That was not exactly the problem. I discovered that our kodaks scanner have some custom capabilities that I should work with to use imprinter.

Thanks,

Pablo L.G.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.112 seconds.