Forum Replies Created
- AuthorPosts
Thanks Gabe, It is difficult because I don’t have duplex scan device right now to test the program. But I will try to do it again.
Thanks again!Thanks Gabe!
Here is my source:when intDuplex param set = 1 -> Program set duplex scan mode.
public void Acquire(int intDuplex)
{
TwRC rc;
CloseSrc();
if (appid.Id == IntPtr.Zero)
{
Init(hwnd);
if (appid.Id == IntPtr.Zero)
return;
}
rc = DSMident(appid, IntPtr.Zero, TwDG.Control, TwDAT.Identity, TwMSG.OpenDS, srcds);
if (rc != TwRC.Success)
return;TwCapability cap;
if (intDuplex == 1)
{
System.Console.WriteLine(“Duplex”);
cap = new TwCapability(TwCap.XferCount, -1);rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}cap = new TwCapability(TwCap.DuplexEnabled, 1);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}cap = new TwCapability(TwCap.FeederEnabled, 1);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}
}
else
{
System.Console.WriteLine(“Non Duplex”);
cap = new TwCapability(TwCap.DuplexEnabled, 0);rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}cap = new TwCapability(TwCap.FeederEnabled, 0);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}cap = new TwCapability(TwCap.XferCount, 1);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}
}TwUserInterface guif = new TwUserInterface();
guif.ShowUI = 0; // False
guif.ModalUI = 1; // True
guif.ParentHand = hwnd;
rc = DSuserif(appid, srcds, TwDG.Control, TwDAT.UserInterface, TwMSG.EnableDS, guif);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}
}I am not familar with 1.9 spec or programming. Just press the button on the scanner.
March 16, 2006 at 9:15 pm in reply to: New to scanner world, need help on TWAIN scanner standard. #23255c#, vb.net or other?
2003 or 2005?if you havent read the 1.9 spec, read it. read it a lot.
any specific scanner hardware being targeted? any specific OS targeted?the hardware specific questions are (i think) rather important, as if you’re only tasked with writing an app to manipulate the settings covered by the twain spec you’ll be alright, but a lot of the manufactures have custom capabilities, custom operations, and custom return codes. i think writing an app to be competely hardware agnostic and still offer complete device manipulation is a rather large request (or maybe your project timeline is just massive – or perhaps you have massive resources available)
Are you looking for an off the shelf library, or are you planning to write the twain_32 wrapper as well?
Are you trying to run the twain device from a winform, webform or service? Have you taken a look as WIA2?, it could be (depending on the scanner and OS you’re targetting as not all hardware or OSs support WIA2)
There exist several rather decent twain librarys around, most for just a few hundred dollars. Not that I’m trying to talk you out of writing your our library (i am).What setting are you trying to manipulate?
If you don’t mind my asking, whats the project timeline, how much do you have implemented so far?
Sorry if I appear to ask more questions than i answer, but i think this will come to a point rather soon, if you answer them all.
gabe
March 6, 2006 at 2:50 pm in reply to: cant open TWAIN soucr interface on my new epson perfection 1 #23129Hello Jamie Liskutin,
Your problem is probably a connection one. First, is the USB cable an original one supplied with the scanner?. OK, Now remove the Epson software programs, then re-install them, read the bit in instructions about anti virus, and firewall programs, do what Epson recomends before you re-install. Try your scanner again.
Come back to ” The TWAIN Forum.
I have a 1670, it works OK, but I prefer the Twain 4 software program, supplied with the Epson Perfection 1200 Photo. Unless one pays for expensive professional programs, the software supplied with new scanners appears to be very ” Mickey Mouse “.I’m using the HP Color Laserjet 2840 and scanning with Acrobat (partly) works. The driver should install a TWAIN data source which should be visible within Acrobat (Use Create Document -> Scanning…).
To check whether TWAIN is installed you can try “Image Capture” from Apple. There is a menu entry called “Browsing” where you can select TWAIN plugins and use them.
My problem with acrobat is that only the first page is scanned even when I try to scan several pages. Scanning several pages works with Image Capture but the generated files are huge, by importing them into Acrobat you should be able to decrease the file size.
Spike,
Thanks for the info. After hasseling with Lexmark for the past week they finally admitted that there is no separate TWAIN driver available for the printer. They are trying to say that the TWAIN software is built into the Scanback software, which isn’t true. You can use the scanner without the Scanback software and still scan across the network, by simply connecting to the scanner’s HTTP page. The problem seems to be that the computer never recognizes the scanner at all. Scanner only talks to the printer through the firewire connection. It seems I would have to connect scanner directly to PC to get scanner working with another vendor’s driver which breaks the all-in-one functionality. Perhaps this is why Lexmark can sell this relatively cheaply; they aren’t finished developing it yet. 😆 It will be going back to Lexmark ASAP. And just to think, we were about to purchase 8 of this things.
Regards,
Eric
I think you set CAP_XFERCOUNT capability with -1 value.
Hi,
I need to know if TWAIN can select from multiple identical webcams attached to the same computer. The webcams are Logitech QuickCam Pro.
Thanks,
Cosmin.December 21, 2005 at 12:08 pm in reply to: Listing of Data Source, when user clicks "Select Source #23189Nice coincidence because I’ve just registered to ask a similar question. I just bought a new Canon A510 digital camera and hate their silly application used to download pictures. I want to be able to download the pictures directly from ACDSee like I use to, but I don’t see the camera in the “Aquiring Settings” box. I did install the TWAIN driver located on the CD.
What needs to be done?
@Marc Wentink wrote:
5:.
Okay I get that but where is all of this going?
@Anonymous wrote:
I am going to have to merge some code into it then to get some error codes out of it as i am using Jonathan Arnold’s code to test adn it returns no errors, i think it is returning TWCC_BADCAP when i click cancel on my WIA-e+ 48U 1.0 flatbed scanner instead of going through the preview or scan image but like i said i’ll have to merge some code or find some that has more testing within it..
I do think its what you said though where the DS needs shutting down and restarting if the action above is carried out.
sorry TWCC_BADCAP or TWCC_OPERATIONERROR i should have stated.
I am going to have to merge some code into it then to get some error codes out of it as i am using Jonathan Arnold’s code to test adn it returns no errors, i think it is returning TWCC_BADCAP when i click cancel on my WIA-e+ 48U 1.0 flatbed scanner instead of going through the preview or scan image but like i said i’ll have to merge some code or find some that has more testing within it..
I do think its what you said though where the DS needs shutting down and restarting if the action above is carried out.
I haven’t got enough coding in there to give me the correct error code but if i think it is where you mentioned closing and then reopening the DS when selecting cancel as if i tell it to goto exit when ( !TwainOpenDefaultSource() ) it allows me to open it again, but then another devive where the exception throws up an error code 4 freezes the app if i click getimage again..
Can I scan with FILETRANSFER mode to multipage TIFF?
When I use loop with “DG_IMAGE/DAT_IMAGEFILEXFER/MSG_GET”
while “DG_CONTROL/DAT_PENDINGXFERS/MSG_ENDXFER” count!=0
it scans from ADF properly but output TIFF is overriden every page…any hints? Thanks
- AuthorPosts