Page 1 of 1
Post Scan Event is called twice
Posted: Mon Oct 19, 2009 3:37 pm
by vanilla Y
Hi,
After I scan a document, it goes twice to the Post Scan event.
First time is good, but then immediately it enters another time to this event.
What can be the reason?
I'm registered only once to the event:
VSTwainDocument.PostScan += new AxVSTWAINLib._IVintaSoftTwainEvents_PostScanEventHandler(VSTwainDocument_PostScan);
Thanks ahead,
Vanilla
Re: Post Scan Event is called twice
Posted: Mon Oct 19, 2009 4:58 pm
by Alex
Hello Vanilla,
What scanner do you have? I think you have duplex scanner with enabled duplex. PostScan event occurs for each side of the scanned page.
Best regards, Alexander
Re: Post Scan Event is called twice
Posted: Tue Oct 20, 2009 9:18 am
by vanilla Y
Hi Alex,
My scanner doesn't have duplex option.
In my code, I do the following check:
if (m_bIsDuplex)
{
if (VSTwainDocument.Duplex != 0)
VSTwainDocument.DuplexEnabled = 1; //scan the doc from both sides
}
else
VSTwainDocument.DuplexEnabled = 0; //in my case, goes to this line
VSTwainDocument.Acquire();
Should I do another thing to disable the duplex option?
Thanks,
Vanilla
Re: Post Scan Event is called twice
Posted: Wed Oct 21, 2009 8:11 am
by Alex
Hello Vanilla,
Please send the following information to
support@vintasoft.com:
1. What scanner do you use?
2. Log-file generated by VintaSoftTwain.NET Library
Here are steps which you should do to generate a log-file of scanner's work:
1. Set the IsLoggingEnabled property to True before the StartDevice method.
2. Set the path to log-file with the LogFilePath property if path "c:\vstwain.log" is not accessible by your application.
3. Run your application.
4. Send us a log-file and detailed description of the problem.
Best regards, Alexander
Re: Post Scan Event is called twice
Posted: Wed Oct 28, 2009 10:43 am
by vanilla Y
Hi Alex,
As you said, I added the following:
VSTwainDocument.IsLoggingEnabled = 1;
VSTwainDocument.StartDevice();
VSTwainDocument.LogFilePath = "c:\vstwain.log";
I scanned a document and this is what I've got in c:\vstwain.log:
9:35:36.750 StopDevice
9:35:36.750 OWM: 92933250 129 0 101367484 0
9:35:36.750 OWM2
9:35:36.750 OWM8
9:35:36.750 OWM: 92933250 131 0 101367524 0
9:35:36.750 OWM2
9:35:36.765 OWM8
9:35:36.765 OWM: 92933250 1 0 101367464 0
9:35:36.765 OWM2
9:35:36.765 OWM8
9:35:36.765 OWM: 92933250 5 0 0 0
9:35:36.765 OWM2
9:35:36.765 OWM8
9:35:36.765 OWM: 92933250 3 0 0 0
9:35:36.765 OWM2
9:35:36.765 OWM8
9:35:36.765 ODSM1
9:35:36.765 ODSM2
9:35:36.765 C:\WINDOWS\TWAIN_32.DLL
9:35:36.765 ODSM2-1
9:35:36.765 ODSM20
9:35:36.984 StartDevice - 50047 92933250 20319114
--------- log till here
I'm using Epson perfection 1660.
Do you have a clue?
Thanks a lot!!!
Vanilla
Re: Post Scan Event is called twice
Posted: Wed Oct 28, 2009 5:29 pm
by Alex
Hello Vanilla,
Information you provided is not full. Please send full log-file to
support@vintasoft.com.
Best regards, Alexander