AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones TWAIN
  • Overview
  • Definition
  • Which document is retrieved?
  • User interface
  • Principle
  • Retrieving a document coming from a Twain device
  • Managing the duplex scanners
  • Modo de funcionamiento en las aplicaciones de 64 bits
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Retrieving documents coming from Twain devices
Overview
Several WINDEV functions allow you to retrieve documents from a Twain device. Twain is a standard used by the devices for capturing images.
Examples of devices supporting the Twain standard:
  • scanner,
  • web camera,
  • digital camera.
When a Twain device is installed, specific DLLs are installed: DLLs managing the Twain layer. These DLLs are required to use the TWAIN functions of WLanguage.
Definition

Which document is retrieved?

When using TWAIN functions, the retrieved document corresponds to:
  • the document found in a scanner.
  • the image broadcasted by a "web camera".
  • the first photo saved in a digital camera.
    Note: If the user interface is used, the retrieved document will correspond to the photograph selected by the user.. If several photos are selected, only the first selected photo will be retrieved.

User interface

The functions for retrieving a document are used to:
  • program how the document will be retrieved.
  • start the user interface of the Twain device used. The user interface corresponds to the main window of the software associated with the Twain device. This interface allows you to save the document, to modify the default parameters of the device, ... The available actions depend on the device used.
Principle

Retrieving a document coming from a Twain device

To retrieve a document coming from a Twain device:
  1. Define (if necessary) the Twain device to use:
    TwainCurrentSourceAllows you to find out and change the Twain device used by default.
    TwainListSourceReturns the list of drivers for the Twain devices connected to the current computer.
    TwainSelectSourceMuestra un cuadro de diálogo estándar utilizado para listar los diferentes dispositivos Twain disponibles en el ordenador actual.
  2. If the Twain device used corresponds to a scanner, the area to scan can be defined by TwainScanArea.
  3. Retrieve the width and height of the document to capture (by a Twain device).
    TwainSourceHeightDevuelve la altura (en milímetros) del documento capturado por un dispositivo Twain.
    TwainSourceWidthDevuelve la anchura (en milímetros) del documento capturado por un dispositivo Twain.
  4. Retrieve the document coming from a Twain device.
    TwainToBMPAllows you to perform one of the following actions:
    • save the document coming from the Twain device in a Bitmap file (".BMP" extension).
    • view the document coming from the Twain device in the user interface of the device.
    • save the document coming from the Twain device directly in memory in Bitmap format (in a buffer).
    TwainToClipboardAllows:
    • copy the document coming from the Twain device to the clipboard.
    • view the document coming from the Twain device in the user interface of device.
    TwainToControlAllows:
    • view the document coming from the Twain device in an Image control.
    • view the document coming from the Twain device in the user interface of device.
    TwainToGIFAllows:
    • save the document coming from the Twain device in a GIF file.
    • view the document coming from the Twain device in the user interface of device.
    • save the document coming from the Twain device directly in memory in GIF format (in a buffer).
    TwainToJPEGAllows:
    • save the document coming from the Twain device in a JPEG file.
    • view the document coming from the Twain device in the user interface of device.
    • save the document coming from the Twain device directly in memory in JPEG format (in a buffer).
    TwainToPDFAllows:
    • save the document coming from the Twain device in a PDF file.
    • view the document coming from the Twain device in the user interface of device.
    • save the document coming from the Twain device directly in memory in PDF format (in a buffer).
    TwainToTIFFAllows:
    • save the document coming from the Twain device in a TIFF file.
    • view the document coming from the Twain device in the user interface of device.
    • save the document coming from the Twain device directly in memory in TIFF format (in a buffer).
Note: These functions can also be used to launch the user interface of the Twain device in use.. You have the ability to specify whether the scanner must use the "duplex" mode.

Managing the duplex scanners

If the scanner supports the duplex mode, you have the ability to perform a double-sided scan. The generated document contains both sides of the scanned document.
Note: Depending on the hardware used, the Twain driver may not be sufficient for duplex scanning. You may have to install additional drivers supplied by the manufacturer.

Modo de funcionamiento en las aplicaciones de 64 bits

En una aplicación de 64 bits, esta función utilizará automáticamente el Driver Twain de 64 bits. El TWAIN no se puede utilizar si este Driver no está instalado.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local