Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ICAP_XFERMETH File + Duplex

 
Post new topic   Reply to topic     Forum Index -> General TWAIN Discussion
View previous topic :: View next topic  
Author Message
cristiam



Joined: 26 Jul 2010
Posts: 4

PostPosted: Wed Jul 28, 2010 5:41 am    Post subject: ICAP_XFERMETH File + Duplex Reply with quote

Hi,
I have a twain driver that is working with ICAP_XFERMETH file.
My problem is that i need to scan more than 300 pages in duplex mode and my machine stay with out of memory.
I want to set de ICAP_XFERMETH = TWSX_FILE to scan automaticaly to file.
I tryed:

Code:

rc = DSixfer(appid, srcds, TwDG.Image, TwDAT.ImageFileXfer, TwMSG.Get, ref hbitmap);


But It's saving only one file.
Anybody may help me? Question
PS: Sorry my bad english Embarassed
Back to top
View user's profile Send private message
peterp



Joined: 27 Jul 2010
Posts: 4
Location: Ottawa, ON

PostPosted: Thu Jul 29, 2010 6:02 am    Post subject: Is it a multi page TIFF file? Reply with quote

Many drivers use multi page TIFF files to save your result.

Is the single file a multi page TIFF file? Does the scanner actually scan all 300 pages, or does it stop scanning after one page?
Back to top
View user's profile Send private message
cristiam



Joined: 26 Jul 2010
Posts: 4

PostPosted: Thu Jul 29, 2010 6:04 am    Post subject: Re: Is it a multi page TIFF file? Reply with quote

peterp wrote:
Many drivers use multi page TIFF files to save your result.

Is the single file a multi page TIFF file? Does the scanner actually scan all 300 pages, or does it stop scanning after one page?


It's scanning all 300 pages but always save with the same filename.
Back to top
View user's profile Send private message
peterp



Joined: 27 Jul 2010
Posts: 4
Location: Ottawa, ON

PostPosted: Thu Jul 29, 2010 6:39 am    Post subject: Is it a multi page TIFF file? Reply with quote

Could you please answer the other question.

Is it a multi page TIFF file?

If not, what kind of file is it?

How big is the file?

A multi page TIFF file is a single file that can contain hundreds of pages inside itself. I suspect that your scanner is producing a multi page TIFF file and that every page that was scanned is there inside it.
Back to top
View user's profile Send private message
MSM



Joined: 17 May 2010
Posts: 10

PostPosted: Thu Jul 29, 2010 9:08 am    Post subject: Reply with quote

To do file transfer you have to do following:
1. Set ICAP_XFERMECH to TWSX_FILE
2. Set ICAP_IMAGEFILEFORMAT to one of supported by the driver formats
3. Enable DS
4. After you get MSG_XFERREADY, use DG_CONTROL / DAT_SETUPFILEXFER / MSG_SET to setup file name and file format (driver may not accept file format different from one set in ICAP_IMAGEFILEFORMAT )
5. Use DG_IMAGE / DAT_IMAGEFILEXFER / MSG_GET to do the transfer (Attantion!!! - last function parameter must be NULL)
6. Use DG_CONTROL / DAT_PENDINGXFERS / MSG_ENDXFER to find if there are more image. If Yes goto 4, if not continue
7. DisableDS


If you use single image file format (BMP, JPG..) change the name of the file before every transfer ().
If you use multi image file (TWFF_TIFFMULTI...) keep same file name
Back to top
View user's profile Send private message
cristiam



Joined: 26 Jul 2010
Posts: 4

PostPosted: Thu Jul 29, 2010 11:51 am    Post subject: Reply with quote

MSM wrote:
To do file transfer you have to do following:
1. Set ICAP_XFERMECH to TWSX_FILE
2. Set ICAP_IMAGEFILEFORMAT to one of supported by the driver formats
3. Enable DS
4. After you get MSG_XFERREADY, use DG_CONTROL / DAT_SETUPFILEXFER / MSG_SET to setup file name and file format (driver may not accept file format different from one set in ICAP_IMAGEFILEFORMAT )
5. Use DG_IMAGE / DAT_IMAGEFILEXFER / MSG_GET to do the transfer (Attantion!!! - last function parameter must be NULL)
6. Use DG_CONTROL / DAT_PENDINGXFERS / MSG_ENDXFER to find if there are more image. If Yes goto 4, if not continue
7. DisableDS


If you use single image file format (BMP, JPG..) change the name of the file before every transfer ().
If you use multi image file (TWFF_TIFFMULTI...) keep same file name


Thanks a lot.
My error is that i was trying to set DG_CONTROL / DAT_SETUPFILEXFER / MSG_SET BEFORE the MSG_XFERREADY. Embarassed Embarassed

Topic closed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General TWAIN Discussion All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group