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

Reply To: How to set the resolution (DPI)?

Forums › TWAIN Classic › How to set the resolution (DPI)? › Reply To: How to set the resolution (DPI)?

July 28, 2007 at 4:01 pm #24002
dabd
Participant
  • Topics - 3
  • Replies - 3
  • Total Posts - 6

@gabe wrote:

rc is return code and it is from the twain spec. If you don’t think that the java wrapper you’re using makes the rc available to you recheck the docs for the library, it could be that the library’s author decieded not to expose it but it seems unlikely to me. While you’re looking for information on an rc look for information on the cc, condition code for the calls to twain as there are situation when dealing with twain that you need to know why a call failed. From the code you submitted I’m most interested in the rc for:


source.setXResolution(300.0);

but it looks like you’re on the right track. You see that before you set the units they were inches (and 300 wouldn’t make much sense in most cases nor be supported in any that I’ve ever heard of) and now you’re getting pixels as the units and your 300 is much more likely. Now add another set and right after you set the units to pixels (and double check that the setting ‘sticks’) recheck for the supported x/y resolution. Just execute the Get for x/y resolution after you set the units. In most cases you should either get an enumeration of supported values or a range of acceptable values with a stepsize between each value in the range.

.

Right after I set the units the get x resolution shows only one value in the range: 1.0.
One important bit of information is that JTwain is not free and I am using a trial edition which has expired (maybe this is the cause of my problems I’m not sure).

Anyway I’d be interested in a free solution with the only requisite that I must be able to use it from a Java application. Can I use OpenTwain from Java?

Thanks.

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

  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • To get the list of scanners from javascript client side (browser)
  • 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