LEADTOOLS Support
Imaging
Imaging SDK Questions
Question about resetting scanning template !!!!
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, March 26, 2006 9:30:33 PM(UTC)
Groups: Registered
Posts: 9
I am trying to set an scanning template. It seems that the default template can be set by using the following method : (Here is the example of setting the default image frame for the scanning template)
' Set the Default Frame of the image for scanning
Dim twnCap As TwainCapability = New TwainCapability
Dim frame As TwainFrame = New TwainFrame
frame.LeftMargin = 2
frame.TopMargin = 2
frame.RightMargin = 2
frame.BottomMargin = 2
try
twnCap.Information.Type = TwainCapabilityType.ImageFrames
twnCap.Information.ContainerType = TwainContainerType.OneValue
twnCap.OneValue.ItemType = TwainItemType.Frame
twnCap.OneValue.Value = frame
Catch ex As Exception
throw ex
End Try
When running the exe, the following error occurred
"Error in the status of TWAIN source"
However, i can reset the brightness of the scanning template as follow:
, ,
Dim twnCap As TwainCapability = New TwainCapability
Dim brightness as Single
brightness = 52
try
twnCap.Information.Type = TwainCapabilityType.ImageBrightness
twnCap.Information.ContainerType = TwainContainerType.OneValue
twnCap.OneValue.ItemType = TwainItemType.Fix32
twnCap.OneValue.Value = brightness
Catch ex As Exception
throw ex
End Try
It seems that the coding is the same except the resetting parameters.......
Do there something go wrong/ some code missing in the above program? OR
How can i reset the default setting of the scanning template ?
Please advise. Thanks.
P.S. I am using Leadtools v14.5 and vb.net (.Net Framework v1.1)
#2
Posted
:
Wednesday, March 29, 2006 12:02:53 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
To retrieve the default twain template, you may try to save the template file before calling any capabilities. And when you want to retrieve the default settings load the template file that you saved before.
For more information please refer to the LEADTOOLS DotNet documentation and read the following topics:
- TwainSession.SaveTemplateFile Method
- TwainSession.LoadTemplateFile Method
Thanks,
Maen Badwan
LEADTOOLS Technical Support
Edited by moderator Thursday, October 6, 2016 5:04:12 PM(UTC)
| Reason: Not specified
LEADTOOLS Support
Imaging
Imaging SDK Questions
Question about resetting scanning template !!!!
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.