Dynamic Web TWAIN  - TWAIN ActiveX/Plug-in, Scanner COM Control
TWAIN ActiveX/Plug-in HTTP Control/SDK

SaveAsTIFF Method

Description

Saves the image of a specified index in buffer as a TIFF file.

Syntax

Boolean ObjectName. SaveAsTIFF(String FileName, Short sImageIndex)

Parameters

String FileName: the name of the TIFF file to be saved. It should be an absolute path on the local disk.

Short sImageIndex: specifies the index of image in buffer. The index is 0-based. 

Return value

Boolean.

TRUE indicates success. FALSE indicates failure.

When an error occurs and IfThrowException property is TRUE, an exception will be thrown.

When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.

Remarks

TIFF is a built-in feature of Dynamic Web TWAIN, no other DLLs are required.

See also

IfTIFFMultiPage property, TIFFCompressionType property, SaveAsJPEG(), SaveAsBMP(), SaveAsPNG(), SaveAllAsMultiPageTIFF(), HTTPUploadThroughPut(), HTTPUploadThroughPost(), FTPUpload()

Samples

Save acquired images as a Multi-Page TIFF file.

VB Sample:
Private Sub Scan_Click()
Twain.OpenSource Twain.IfShowUI = False 'Set without user interface Twain.IfDisableSourceAfterAcquire = True Twain.AcquireImage
End Sub
Private Sub Twain_OnPostTransfer()    Twain.IfTiffMultiPage = True 'Save as multi-page TIFF    Twain.SaveAsTIFF "C:\SaveAsTIFF.tif", 0
   If (Twain.ErrorCode <> 0) Then        MsgBox (Twain.ErrorString)    Else 'succeded        MsgBox ("Successful")    End If
End Sub

 

JavaScript Sample:

<script language="javascript"> function btnSaveTIFF_onclick() {
frmScan.DynamicWebTwain1.SaveAsTIFF("C:/ImageData.tif",0); } </script>

Save each document in a separate TIFF file.













TWAIN ActiveX | TWAIN Plug-in | TWAIN Control | TWAIN SDK | Scanner COM
Software Configuration Management | Version Control | Source Control
Copyright © 2009 Dynamsoft Corporation. All Rights Reserved.