Home › Forums › TWAIN Classic › ICAP_XFERMETH File + Duplex
- This topic has 5 replies, 3 voices, and was last updated 13 years, 8 months ago by cristiam.
- AuthorPosts
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:
rc = DSixfer(appid, srcds, TwDG.Image, TwDAT.ImageFileXfer, TwMSG.Get, ref hbitmap);
But It’s saving only one file.
Anybody may help me? ❓
PS: Sorry my bad english 😳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?
@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.
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.
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. DisableDSIf 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@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. DisableDSIf 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 nameThanks a lot.
My error is that i was trying to set DG_CONTROL / DAT_SETUPFILEXFER / MSG_SET BEFORE the MSG_XFERREADY. 😳 😳Topic closed.
- AuthorPosts