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 : Wednesday, February 20, 2008 10:55:41 AM(UTC)

blitzy  
blitzy

Groups: Registered
Posts: 16


I am using LEADTOOLS v14.5 for .NET and build 14.5.0.63.

Unless the user has special permissions (which none of them currently do), by default all of their scans should be in B&W with a resolution of 200 dpi. This works fine for our users scanning with the Fujitsu 5120c. However, those that are using the HP Scanjet 8250 are scanning documents at 300 dpi. Because they scan thousands of documents weekly, if they continue to scan at this resolution, our network space will fill up fast.

I've made sure that these computers have the latest driver from HP and any patch/firmware. I have also checked and double checked to make sure that the scanning software's configuration is always set at 200 dpi. Somewhere between the software setting the resolution (which does set properly) and the actual scanning, the scanner is overriding the LEADTOOLS settings and goes back to 300 dpi.

I have installed TWACKER on one of these computers and manually set the resolution setting to 200 dpi. I verified that the setting was saved at 200 and then used the scanning software to scan. Again, the resulting image file is set to 300 dpi.

I have been searching through the forums and noticed a few members also have a similar issue as me but with different scanners. Can someone please help me solve this problem or point me in the right direction?

Thanks.
 

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 : Thursday, February 21, 2008 12:24:21 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

You mentioned that you have installed TWACKER and manually set the resolution to 200 DPI. Did you try to scan using TWACKER?

How exactly do you set the resolution to 200 using LEADTOOLS?

However, we have new patches for LEADTOOLS v14.5. Can you please try the same issue using the latest patches?
To obtain the patches, please send your LEADTOOLS v14.5 serial number to support@leadtools.com and ask about the latest patches. Don't forget to mention this forum in your email to support.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Thursday, February 21, 2008 5:02:49 AM(UTC)

blitzy  
blitzy

Groups: Registered
Posts: 16


I haven't tried to scan using TWACKER. Let me try that as well. I will email LEADTOOLS to get the latest patches.

I am setting the scan resolution to 200 using VB.NET 2005 with these following steps:

1) User clicks the 'Scan' button
2) The Scan_Click event then calls a procedure to set all scan settings
3) The twnSession.Acquire(TwainUserInterfaceFlags.Non) is called

Here is a portion of my code for setting the capabilities and etc.

Dim ScanRes As New TwainImageResolution
Dim ScanImageEffects As New TwainImageEffects

twnSession.GetProperties()
ScanRes = twnSession.ImageResolution
ScanImageEffects = twnSession.ImageEffects

With ScanRes
.Unit = TwainCapabilityValue.UnitInches
.BitsPerPixel = 1
.HorizontalResolution = My.Settings.ScanResolution
.VerticalResolution = My.Settings.ScanResolution
.TopMargin = 0
.LeftMargin = 0
.RightMargin = My.Settings.ScanPageSizeWidth
.BottomMargin = My.Settings.ScanPageSizeHeight
End With

With twnSession
.ImageResolution = ScanRes
.ImageEffects = ScanImageEffects
.SetProperties()
End With
 
#4 Posted : Thursday, February 21, 2008 12:22:30 PM(UTC)

blitzy  
blitzy

Groups: Registered
Posts: 16


I have tried scanning using TWACKER, but that just pops up the default HP software and scans correctly at 200 DPI.

I received the latest patch for v14.5 and applied that to the latest build of our scanning software and did a test scan. The resulting resolution is still at 300 DPI.
 
#5 Posted : Thursday, February 21, 2008 11:35:59 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

Instead of using the TwainImageResolution structure, try to use the TwainSession.SetCapability method to set the ICAP_XRESOLUTION (TwainCapabilityType.ImageXResolution)and ICAP_YRESOLUTION (TwainCapabilityType.ImageYResolution) to 200:
+------------------+
Dim twCap As TwainCapability
Try

twCap = New TwainCapability
capability.Information.ContainerType = TwainContainerType.OneValue
twCap.Information.Type = TwainCapabilityType.ImageYResolution;
twCap.OneValue.ItemType = TwainItemType.Fix32;
twCap.OneValue.Value = 200;
this.twainSession.SetCapability(twCap, TwainSetCapabilityMode.Set);

twCap.Information.Type = TwainCapabilityType.ImageXResolution;
twCap.OneValue.ItemType = TwainItemType.Fix32;
twCap.OneValue.Value = 200;
this.twainSession.SetCapability(twCap, TwainSetCapabilityMode.Set);

Catch ex As Exception
MessageBox.Show(ex.Message)
+------------------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#6 Posted : Friday, February 22, 2008 6:01:30 AM(UTC)

blitzy  
blitzy

Groups: Registered
Posts: 16


I have tried using the TwainSession.SetCapability method just as you showed, but the results are still the same -- 300 DPI instead of 200 DPI.
 
#7 Posted : Sunday, February 24, 2008 1:59:43 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

I am attaching the project that I used to check this issue.

Please recheck the same issue using the attached project and let me know how it goes.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
File Attachment(s):
VBNetTestTwain145.zip (11kb) downloaded 17 time(s).
 
#8 Posted : Monday, February 25, 2008 12:32:29 PM(UTC)

blitzy  
blitzy

Groups: Registered
Posts: 16


Thank you for attaching the sample project. I have tested your project in one of the offices with this issue, and it scanned and saved the image correctly at 200 DPI. I will incorporate your exact code into my project and see if that makes a difference.

There's one thing that I am puzzled about. Before using the code that you provided in your sample project, I tested the similar code with my project. The only difference was that I encapsulated my twnCap statements within a With...End With statement and did not include the lines:

twCap = twnSession.GetCapability(Leadtools.Twain.TwainCapabilityType.ImageXResolution, Leadtools.Twain.TwainGetCapabilityMode.GetCurrent)

twCap = twnSession.GetCapability(Leadtools.Twain.TwainCapabilityType.ImageYResolution, Leadtools.Twain.TwainGetCapabilityMode.GetCurrent)

Would these last two lines have made any difference?
 
#9 Posted : Monday, February 25, 2008 11:21:36 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

After setting the image resolution capabilities, the correct way to retrieve the current resolution is by using the GetCapability method.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#10 Posted : Tuesday, February 26, 2008 6:20:57 AM(UTC)

blitzy  
blitzy

Groups: Registered
Posts: 16


Can you take a look at this sample project and see what I am doing wrong that it's still not scanning to 200 DPI?

I think it may be related to my other scan settings, but I don't know of another way to set these properties without using the TwainImageResolution structure.
File Attachment(s):
TwainTest.rar (11kb) downloaded 20 time(s).
 
#11 Posted : Wednesday, February 27, 2008 3:03:11 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

To resolve the problem, try to set the TwainCapabilityType.ImageXResolution and TwainCapabilityType.ImageYResolution capabilities after calling the twnSession.SetProperties method.

Please check the attached project and let me know how it goes.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
File Attachment(s):
TwainTest.zip (15kb) downloaded 18 time(s).
 
#12 Posted : Wednesday, February 27, 2008 12:17:35 PM(UTC)

blitzy  
blitzy

Groups: Registered
Posts: 16


This issue has been resolved by setting the TWAIN session properties before the resolution capabilities.

Thank you for all your help!
 
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-2020, Yet Another Forum.NET
This page was generated in 0.402 seconds.