TWAIN ActiveX Control, Plug-in, Scanner SDK, Component, HTTP Control/SDK

Dynamsoft TWAIN Products

Support Community for TWAIN Control/Component/SDK for Scanning Solutions
* Login   * Register
* FAQ    * Search

It is currently Sun May 20, 2012 3:53 pm




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: multi-page scanning and tiff images
PostPosted: Tue Apr 26, 2005 2:46 am 
Offline

Joined: Tue Apr 26, 2005 2:37 am
Posts: 2
hi there,

I'm having some problems with the evaluation version of dynamic twain 3.0.1 (the control says it's 3.0 but i installed it with the 3.0.1 download kit).

When i try and scan documents without showing the UI i only get one document being scanned and the multi-page tiff gets updated with that document image.

When i show the UI both documents are scanned but the twain.picture is empty and the saveastiff function fails.

I'm using VB6 sp6.

Can you help?

Here's the code.....


Private Sub cmdSelectSource_Click()


On Error GoTo ErrorHandString:

Twain.SelectSourceByIndex (lstSource.ListIndex)


Twain.OpenSource

Twain.IfTiffMultiPage = True
Twain.XferCount = -1
Twain.IfAutoFeed = True 'auto feed

Twain.IfDisableSourceAfterAcquire = True
Twain.IfThrowException = True
Twain.IfShowUI = False 'only scans one document!?!?
'Twain.IfShowUI = True 'scans both but no image?!?!?

If Twain.IfFeederLoaded = True Then
Twain.AcquireImage
End If

Exit Sub

ErrorHandString:
MsgBox "Error string: " + Twain.ErrorString


End Sub

Private Sub Twain_OnPostAllTransfers()

Twain.DisableSource
Twain.CloseSource

Twain.SaveAsTiff ("c:\\twaintiff.tif")

End Sub

Thanks,

Nik


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 4:33 am 
Offline
User avatar

Joined: Mon Mar 07, 2005 11:11 pm
Posts: 866
Hi Nik,

We have modified your code, as seen below:
Code:
Private Sub cmdSelectSource_Click()

On Error GoTo ErrorHandString:

Twain.SelectSourceByIndex (lstSource.ListIndex)

Twain.OpenSource

Twain.IfTiffMultiPage = True
Twain.XferCount = -1
Twain.IfAutoFeed = True 'auto feed

Twain.IfDisableSourceAfterAcquire = True
Twain.IfThrowException = True
Twain.IfShowUI = False

If Twain.IfFeederLoaded = True Then
Twain.AcquireImage
End If

Exit Sub

ErrorHandString:
MsgBox "Error string: " + Twain.ErrorString

End Sub


Private Sub Twain_OnPostTransfer()

Twain.SaveAsTiff ("c:\\twaintiff.tif")

End Sub



You can try it and see if there's still a problem.

_________________
Robert
TWAIN Support Team
http://www.dynamsoft.com/
TWAIN ActiveX/Plug-in HTTP Control/SDK & TWAIN ActiveX Control, Scanner SDK, Component
Software Configuration Management | SCM Solution


Top
 Profile  
 
 Post subject: multi-page tiff images
PostPosted: Wed Apr 27, 2005 5:07 am 
Offline

Joined: Tue Apr 26, 2005 2:37 am
Posts: 2
Hi,

The code you posted here only works for one of the pages of the document I'm trying to scan. After the auto feeder scans the first page it stops. I need all 9 pages of the document to be scanned and added to the same tiff image.

Can you post some code to help me do this?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 29, 2005 1:51 am 
Offline
User avatar

Joined: Mon Mar 07, 2005 11:11 pm
Posts: 866
Hi Nik,

So far we cannot see from you code what causes your problem.

We'll further look into it, and get back to you if we figure it out.

Please check back.

Thanks.

_________________
Robert
TWAIN Support Team
http://www.dynamsoft.com/
TWAIN ActiveX/Plug-in HTTP Control/SDK & TWAIN ActiveX Control, Scanner SDK, Component
Software Configuration Management | SCM Solution


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

It is currently Sun May 20, 2012 3:53 pm


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Copyright © 2010 Dynamsoft Corporation. All Rights Reserved. | Knowledge Base | Source Control Blog