Preview Method

Summary

Gets a preview for a command for the specified page of an image in the Leadtools.Services.Twain session manager.

Syntax
C#
VB
C++
[WebGetAttribute(BodyStyle=1, 
   RequestFormat=1, 
   ResponseFormat=1, 
   UriTemplate="Preview?id={id}&pageNumber={pageNumber}&commandName={commandName}&arguments={argu" + "ments}&width={width}&height={height}&format={format}&bpp={bpp}&userData={userDat" + "a}")] 
[OperationContractAttribute(Name="Preview", 
   Action="Preview", 
   AsyncPattern=false, 
   IsOneWay=false, 
   IsInitiating=true, 
   IsTerminating=false)] 
public Stream Preview( 
   string id, 
   int pageNumber, 
   string commandName, 
   string arguments, 
   int width, 
   int height, 
   RasterImageFormat format, 
   int bpp, 
   object userData 
) 
<WebGetAttribute(BodyStyle:=1, 
   RequestFormat:=1, 
   ResponseFormat:=1, 
   UriTemplate:="Preview?id={id}&pageNumber={pageNumber}&commandName={commandName}&arguments={argu"& "ments}&width={width}&height={height}&format={format}&bpp={bpp}&userData={userDat"& "a}"), 
   OperationContractAttribute(Name:="Preview", 
   Action:="Preview", 
   AsyncPattern:=false, 
   IsOneWay:=false, 
   IsInitiating:=true, 
   IsTerminating:=false)> 
 Public Function Preview( 
   ByVal id As String, 
   ByVal pageNumber As Integer, 
   ByVal commandName As String, 
   ByVal arguments As String, 
   ByVal width As Integer, 
   ByVal height As Integer, 
   ByVal format As RasterImageFormat, 
   ByVal bpp As Integer, 
   ByVal userData As Object 
) As Stream 
public:  
   [WebGetAttribute(BodyStyle=1, 
      RequestFormat=1, 
      ResponseFormat=1, 
      UriTemplate=L"Preview\?id={id}&pageNumber={pageNumber}&commandName={commandName}&arguments={argu" L"ments}&width={width}&height={height}&format={format}&bpp={bpp}&userData={userDat" L"a}")] 
   [OperationContractAttribute(Name=L"Preview", 
      Action=L"Preview", 
      AsyncPattern=false, 
      IsOneWay=false, 
      IsInitiating=true, 
      IsTerminating=false)] 
   Stream^ Preview( 
       String^ id, 
      Int32 pageNumber, 
      String^ commandName, 
      String^ arguments, 
      Int32 width, 
      Int32 height, 
      RasterImageFormat^ format, 
      Int32 bpp, 
      Object^ userData 
   ) 

Parameters

id
Scanning session Id.

pageNumber
Page to process. pageNumber is one-based.

commandName
Name of the command to preview.

arguments
Arguments to pass to the command to preview.

width
Width of the preview image to return.

height
Height of the preview image to return.

format
File format of the preview image to return.

bpp
Bits-per-pixel of the preview image to return.

userData
User data object.

Return Value

Image in the format, bits per pixel, dimensions and processed with the command and arguments specified.

Remarks

Processes the image page without changing the image stored in the session manager.

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Services.Twain Assembly