SetFileXferInfo()

Description

Sets the absolute file name (including its path) and file format to be used in File Transfer Mode.

Syntax

.SetFileXferInfo(string fileName, EnumDWT_FileFormat fileFormat);

Parameters

<string> fileName

The name of the file to be used in transfer. For example: "C:\\webtwain.jpg"

EnumDWT_FileFormat fileFormat

An enumerated value that indicates the format of the image. For example: EnumDWT_FileFormat.TWFF_JFIF

Allowed formats

Format Value Description
TWFF_TIFF 0 Tagged Image File Format. Used for document imaging. Native Linux format
TWFF_PICT 1 Native Macintosh format
TWFF_BMP 2 Native Microsoft format
TWFF_XBM 3 X-Windows Bitmap used for document imaging
TWFF_JFIF 4 JPEG File Interchange Format. Wrapper for JPEG images
TWFF_FPX 5 FlashPix, used with digital cameras
TWFF_TIFFMULTI 6 Multi-page TIFF files
TWFF_PNG 7 An image format standard intended for use on the web, replaces GIF
TWFF_SPIFF 8 A standard from JPEG, intended to replace JFIF, also supports JBIG
TWFF_EXIF 9 File format for use with digital cameras
TWFF_PDF 10 A file format from Adobe (TWAIN Spec 1.91)
TWFF_JP2

11 A file format from the Joint Photographic Experts Group ISO/IEC 15444-1 (TWAIN Spec 1.91)
TWFF_JPX 13 A file format from the Joint Photographic Experts Group ISO/IEC 15444-2 (TWAIN Spec 1.91)
TWFF_DEJAVU 14 A file format from LizardTech (TWAIN Spec 1.91)
TWFF_PDFA 15 A file format from Adobe PDF/A, Version 1 (TWAIN Spec 2.0)
TWFF_PDFA2 16 A file format from Adobe PDF/A, Version 2 (TWAIN Spec 2.1)

Return value

bool

true indicates success. false indicates failure.

When false is returned, check ErrorCode or ErrorString for error information.

Remarks

The SetFileXferInfo() method is valid only in File Transfer Mode.
In File Transfer Mode, the image is transferred to the designated location on the disk directly instead of Dynamic Web TWAIN.

Make sure the format you set is supported by the Data Source (your scanner).

Example

DWObject.SetFileXferInfo("C:\\webtwain.jpg", EnumDWT_FileFormat.TWFF_JFIF); 

See also

TransferMode

Is this page helpful?

Leave a Reply

Your email address will not be published.