Post Scan Event is called twice

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Moderator: Alex

Post Reply
vanilla Y
Posts: 3
Joined: Mon Oct 19, 2009 3:03 pm

Post Scan Event is called twice

Post by vanilla Y » Mon Oct 19, 2009 3:37 pm

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? :roll:

I'm registered only once to the event:

VSTwainDocument.PostScan += new AxVSTWAINLib._IVintaSoftTwainEvents_PostScanEventHandler(VSTwainDocument_PostScan);

Thanks ahead,
Vanilla

Alex
Site Admin
Posts: 1462
Joined: Thu Jul 10, 2008 2:21 pm

Re: Post Scan Event is called twice

Post by Alex » Mon Oct 19, 2009 4:58 pm

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

vanilla Y
Posts: 3
Joined: Mon Oct 19, 2009 3:03 pm

Re: Post Scan Event is called twice

Post by vanilla Y » Tue Oct 20, 2009 9:18 am

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

Alex
Site Admin
Posts: 1462
Joined: Thu Jul 10, 2008 2:21 pm

Re: Post Scan Event is called twice

Post by Alex » Wed Oct 21, 2009 8:11 am

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

vanilla Y
Posts: 3
Joined: Mon Oct 19, 2009 3:03 pm

Re: Post Scan Event is called twice

Post by vanilla Y » Wed Oct 28, 2009 10:43 am

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

Alex
Site Admin
Posts: 1462
Joined: Thu Jul 10, 2008 2:21 pm

Re: Post Scan Event is called twice

Post by Alex » Wed Oct 28, 2009 5:29 pm

Hello Vanilla,

Information you provided is not full. Please send full log-file to support@vintasoft.com.

Best regards, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest