Leadtools.Twain Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
TwainSession Class Members
See Also  Properties  Methods  Events
Leadtools.Twain Namespace : TwainSession Class

The following tables list the members exposed by TwainSession.

Public Constructors

 NameDescription
Public Constructor TwainSession Constructor Constructs a new TwainSession object with default values.  
Top

Public Properties

 NameDescription
Public Property AcquirePageOptions Gets or sets the paper size and paper orinetation values to use when transferring images from the current TWAIN source.  
Public Property DuplexScanningMode (Read only) Gets the duplex mode value.  
Public Property EnableAcquireMultiPageEvent (Document/Medical only) Enables or disables the generation of the TwainSession.AcquireMultiPage event.  
Public Property EnableDuplexScanning Enables or disables the duplex mode.  
Public Property EnableFastConfigurationEvent (Document/Medical only) Enables or disables the generation of the TwainSession.FastConfiguration event.  
Public Property EnableGetDeviceEvent Enables or disables firing GetDeviceEvent event  
Public Property EnableSetPropertyEvent Enable or disable firing property event when calling calling set TwainSession.Properties property.  
Public Property EnableShowUserInterfaceOnly Gets or sets flag that indicates whether to display the Twain user interface with or without the Scan button, if supported.  
Public Property ImageBitsPerPixel Gets or sets the bits per pixel value used to transfer images from the current TWAIN source.  
Public Property ImageEffects Gets or sets the brightness, highlight and contrast values to use when transferring images from the current TWAIN source.  
Public Property ImageFrame Gets or sets the image frame used when transferring images from the current TWAIN source.  
Public Property ImageUnit Gets or sets the image unit value used to transfer images from the current TWAIN source.  
Public Property MaximumTransferCount Gets or sets the maximum number of images that can be transferred from the current TWAIN source.  
Public Property Properties Gets or Sets the current data source properties.  
Public Property Resolution Gets or sets the horizontal and vertical resolution used to transfer images from the current TWAIN source.  
Public Property TransferOptions Gets and sets the options used for transferring data from the current TWAIN source.  
Top

Public Methods

 NameDescription
Public Method Acquire Acquires one or more images from a TWAIN source.  
Public Method AcquireFast (Document/Medical only) Acquires one or more images from a TWAIN source and stores the images in the specified file(s).  
Public Method AcquireToImage Acquires one image from a TWAIN source.  
Public Method FindConfiguration (Document/Medical only) Gets all available configurations for the current session.  
Public Method FindFastConfiguration (Document/Medical only) Determines the best scanner configuration.  
Public Method GetCapability Gets the TwainCapability value at the specified index from the array of capabilities supported by the selected TWAIN source.  
Public Method GetDeviceEventCapability Gets device events capability values for current TWAIN session.  
Public Method GetDeviceEventData Gets information for specific device event  
Public Method GetJpegCompression Gets the current or default JPEG compression settings for the TWAIN session.  
Public Methodstatic (Shared in Visual Basic) IsAvailable Determines whether a TWAIN source is installed.  
Public Method IsTransferModeAvailable Check if the specific transfer mode is supported in the current Twain source.  
Public Method LoadTemplateFile Loads the TWAIN capability values stored in the specified template file and sets the selected TWAIN source using these values.  
Public Method ModifyRgbResponse Sets the RGB elements to be used when transferring data from the current TWAIN source.  
Public Method QueryCapability Gets all the supported values of the requested capability.  
Public Method QueryFileSystem Query Twain file system.  
Public Method QuerySourceInformation Gets information about the available TWAIN Data Sources.  
Public Method QuerySupportedCapabilities Gets an array of Twain Capabilities supported in the current session.
 
Public Method raise_AcquireMultiPage (Document/Medical only) Occurs during multipage image scanning  
Public Method raise_AcquirePage Occurs after an image is acquired.  
Public Method raise_FastConfiguration (Document/Medical only) Occurs during fast twain configuration testing.  
Public Method raise_GetDeviceEvent Occurs after a device event is received.  
Public Method raise_LoadTemplate Occurs loading of a TWAIN Template using LoadTemplateFile  
Public Method raise_SaveTemplate Occurs saving of a TWAIN Template SaveTemplateFile.  
Public Method raise_SetProperty Occurs when setting TWAIN capability using TwainSession.Properties  
Public Method ResetDeviceEventCapability Resets CAP_DEVICEEVENT capability to defaults values  
Public Method SaveCustomDSData Saves the custom data source data to a file  
Public Method SaveTemplateFile Enumerates all supported capabilities, and the current values, for the currently selected TWAIN source and saves them to the specified template file.  
Public Method SelectedSourceName Gets the name of the selected TWAIN source. This name is provided by the manufacturer.  
Public Method SelectSource Displays the TWAIN dialog box to be used to select a TWAIN source for acquiring images.  
Public Method SetCapability Sets the value of the specified capability.  
Public Method SetDeviceEventCapability Sets CAP_DEVICEEVENT capability values  
Public Method SetJpegCompression Sets the JPEG compression options for the current TWAIN session. This method lets the user set JPEG compression options for the current TWAIN session or reset the default JPEG compression options for the current TWAIN session, depending on the flag passed to the flag parameter.  
Public Method ShowProgressIndicator Enables or disables the display of a progress indicator during the acquisition of images from the current TWAIN source.  
Public Method ShowTemplateDialog Displays the TWAIN source manufacturer's template dialog, without actually acquiring an image.  
Public Method Shutdown Ends a TWAIN session.  
Public Method Startup Initializes the TWAIN session.  
Public Method Startup2 Initializes the TWAIN session.  
Public Method StopFeeder Stop acquiring images only from the feeder of the TWAIN source.  
Public Method UpdateCustomDSData Update the custom data source  
Public Method UpdateExtraImageInformation Gets the extended image information.  
Top

Protected Methods

 NameDescription
Protected Method raise__acquireMultiPage (Document/Medical only) Occurs during multipage image scanning  
Protected Method raise__acquirePage Occurs after an image is acquired.  
Protected Method raise__fastConfiguration (Document/Medical only) Occurs during fast twain configuration testing.  
Protected Method raise__getDeviceEvent Occurs after a device event is received.  
Protected Method raise__loadTemplate Occurs loading of a TWAIN Template using LoadTemplateFile  
Protected Method raise__saveTemplate Occurs saving of a TWAIN Template SaveTemplateFile.  
Protected Method raise__setProperty Occurs when setting TWAIN capability using TwainSession.Properties  
Top

Public Events

 NameDescription
Public Event AcquireMultiPage (Document/Medical only) Occurs twice for each scanned page, if the EnableAcquireMultiPageEvent property is set to true.  
Public Event AcquirePage Occurs for each page acquired from the currently selected TWAIN source using the Acquire method.  
Public Event FastConfiguration (Document/Medical only) This event is fired for each scan configuration tested, if the value of the EnableFastConfigurationEvent property is set to true.  
Public Event GetDeviceEvent Occurs for for each device event received from the TWAIN source to the application  
Public Event LoadTemplate Occurs when loading TWAIN capabilities from the currently selected TWAIN source to a template file by calling the LoadTemplateFile method.  
Public Event SaveTemplate Occurs when saving TWAIN capabilities from the currently selected TWAIN source to a template file by calling the SaveTemplateFile method.  
Public Event SetProperty Occurs when setting TWAIN capabilities to currently selected TWAIN source by calling the TwainSession.Properties property.  
Top

See Also