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 3:22 pm #24001
gabe
Participant
  • Topics - 9
  • Replies - 583
  • Total Posts - 592

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.

.

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

  • Sports betting Bonus Code
  • PDF/R For who and where?
  • Making searchable PDF with PDF/R
  • Backward compatibility with PDF/A and traditional PDF
  • could not open the twain source. Make sure there is a valid source for your sca
  • 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