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: Set X / YResolution returned TWRC_CHECKSTATUS! Fujitsu C#

Forums › TWAIN Classic › Set X / YResolution returned TWRC_CHECKSTATUS! Fujitsu C# › Reply To: Set X / YResolution returned TWRC_CHECKSTATUS! Fujitsu C#

June 15, 2007 at 1:59 pm #23847
Anonymous
Participant
  • Topics - 60
  • Replies - 107
  • Total Posts - 167

@gabe wrote:

try to set that cap with twacker. if twacker can’t do it either, then it isn’t your code – it is entirely possible that the scanner doesn’t support setting that cap to that value… If you send a get for xresolution you often get the allowed values for the set operation – try setting to one of the value you recieve from the get op.

I just tried to set xResolution cap with Twacker..and it worked. I think something wrong with the type?

In Twacker, the itemtype is TWTY_FIX32 and the value I set to 50 for X Resolution.

If the value set to XResolution must be TWTY_FIX32, for my app it is the TwFix32 object.

But, TwCapability() doesn’t take the twfix32 object as value. It only take the value in Short!

TwFix32 f32 = new TwFix32();
f32.FromFloat(50);
tc = new TwCapability(TwCap.XResolution, f32.Whole);
tc.ConType = (short)TwOn.One;
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, tc);

rc will return CheckStatus. But Twacker tell me that the value can be set to the scanner!! Other CAP are alright, except this one taking the TwFix32 .

I am not sure how to get the xresolution from the get op in the code. Can you give me a sample code?

@gabe wrote:

What do you have for units when you are trying to set the resolution?
And as with everything else, what is the condition code returned?

I tried to set the units to pixels and got success returned!

tc = new TwCapability(TwCap.IUnits, (short)TwUn.PIXELS);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, tc);

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

  • TWAIN for dental imaging integration
  • 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