TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

Setting DPI sometimes fails

Forums › TWAIN Classic › Setting DPI sometimes fails

  • This topic has 3 replies, 2 voices, and was last updated 13 years, 10 months ago by gabe.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 30, 2007 at 3:51 pm #22126 Reply
    brogge
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    Hello Twain experts,

    I have been trying to add scanning support to our application and have therefore tried to implement a twain driver. The software runs rather well, except on some scanners and on some operating system I can not set the DPI value (X nor Y). Retrieving the supported DPIs yields a strange set of values.

    E.g. the software works fine with an HP 5590 on windows XP but fails to set the DPI with exactly the same scanner on windows 2000.

    1. On the 2yk machine setting the XResolution capability returns an error message: TWRC_FAILURE. But when checking the condition code for this error we find: SUCCESS.

    2. When querying the list of supported resolutions the following set of numbers is returned by the device:

    200 200 0 0.003723145 788.0001 5.003906 12 0 0.5556793 30677.38 25.34644 24.00002

    On the XP machine this returns the normal set of values 75 100 200 300 600 1200 2400

    I guess I’m missing something !
    Any tips, ideas would be highly appreciated.

    Thanks,
    boris

    April 30, 2007 at 9:19 pm #23751 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    ICAP_XRESOLUTION and ICAP_YRESOLUTION are TW_FIX32, which when I wrote my wrapper were tricky (yeah I’m slow). If I were to guess, I’d say your TW_FIX32 logic isn’t quite right ot the vendor is misbehaving. If you want to post the code or logic you use to read the take pointer and get a TW_FIX32 out of it, someone here might be able to help. Also, if you let us know what vendor and driver (and version) you see this on someone (probably spike, as Dosadi _must_ have to have a massive library of scanner properties and quirks) may know if the driver is odd across platforms.

    rc= failure and cc=success I’ve seen. I treat those as a success. Double check that you aren’t calling the cc twice as the cc is (should be if the vendor follows the api, but.. well that isn’t always or even usually the case) reset after you call it and if you’re checking the second read instead of the first then you’re looking in the wrong place.

    May 2, 2007 at 8:24 am #23752 Reply
    brogge
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    Hello Gabe,
    Hello all,

    It could be that my Fix32 contains some errors, but on a number of machines the code is working just fine. Therefore I’m not a 100% convinced that it is the code (although it usually is 🙁 )

    I will start by posting about the scanner and drivers, maybe someone knows something about them (or the combination of them).

    The scanner I’m using is a hp scanjet 5590 and the driver details are:

    On windows XP professional (everything working fine)

    provider: Hewlett-Packard
    date: 11/01/2007
    version: 8.1.0.73

    Driver files:
    usbscan.sys (5.1.2600.2180)
    hp5590co.dll (8.1.0.73)
    hpgt5590.dll (1.3.0.0)
    hpxp5590.dll (8.1.0.73)

    I have also tested with another scanner (Dell Photo AIO Printer 964) which appears to work fine on both of these platforms.

    Thanks again for any help,

    boris
    On windows 2000 (DPI issues)

    Provider: Hewlett-Packard
    Date: 18/12/2003
    Version: 2.1.1.2

    Driver files:
    usbscan.sys (5.00.2195.6655)
    hp5590co.dll (2.9.4.570)
    hpgt5590.dll (1.3.0.570)
    hpgtpusd.dll (1.3.2.570)
    hpqgends.tmp (1.1.0.570)

    May 2, 2007 at 4:18 pm #23753 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    or test with the twacker sample app. If twacker gives you the results that you get on winXP, then your code is odd. If twacker gives you screwed up values then the source is odd (…but in all fairness we already know the source is at least a little bit odd cause HP made it, we just don’t know if this is a part of it’s oddness)

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Reply #23752 in Setting DPI sometimes fails
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • Scanner starts transfer when console gets closed (CITRIX)
  • Kodak RFS 3600
  • Didn’t save enough file scan
  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.