DirectScan - Programming Interface

Über das DirectScan SDK können Softwareentwickler einfach, schnell und kostengünstig die Scan- und OCR-Funktionen von DirectScan auch in eigene Anwendungen integrieren ohne sich mit der Komplexität von Imageformaten, PDF, PDF/A, OCR und der Ansteuerung von Scannern auseinandersetzen zu müssen.

Die Integration kann entweder per Commandline Aufruf oder über die direkte Integration per ActiveX (VB) bzw .NET (C#) erfolgen.

Zwei Beispielprogramme inkl. SourceCode zeigen wie die DirectScan Funktionen aus VB bzw .NET C# heraus verwendet werden können um Dokumente scannen, OCR verarbeiten sowie als PDF, TIFF, JPEG usw abspeichern zu können.

DirectScan has a .NET as well as an OLE AUTOMATION interface.

Methoden:

  • GetProfileCount with no parameters, returns the available profiles count as an integer value;
  • GetProfileName with one parameter, the profile zero starting index, returns the profile name as string value;
  • LoadProfile with one parameter, the profile name;
  • Scan with two boolean parameters, duplex and verbose; the first enables the duplex scan mode (manual or automatic), the second allow detailed error messages.

Properties: The available properties override the loaded profile settings. They cannot be saved.

  • UseADF enables the device ADF (if available);
  • UseDuplex enables the device duplex (if available); it works in conjunction with the Scan duplex parameter;
  • TwainSource the TWAIN source name;
  • ShowTwainDialog
  • Zip zip-compress the output file(s);
  • BWResolution
  • ColorResolution
  • MultipageFormat set the single page / multipage format for pdf and tiff output;
  • ColorFormat
  • JpegQuality
  • TiffCompression
  • OutputFormat the pdf, tiff and jpeg formats are available;
  • DestinationFolder
  • FileName without extension
  • UseSubfolders the client application usually must disable this option;
  • SubfoldersDefinition a string array with the subfolders definition; the client application is not encouraged to modify this property, but to use it as an additional information;
  • DrdTemplate the full path of the DRD template or an empty string.
  • DateFormat the date format string for variables substitution.
  • TimeFormat the time format string for variables substitution.
  • OverwriteOption can be AskUser, Overwrite or AddCounter.

DirectScan Commandline Parameter:

Beispiel - Aufruf DirectScan über ein konfiguriertes Profil des HP ScanJet 5000 Scanners: 

PROFILE=name or PROFILE=“name”

The scanning profile name, without folder and extension

DUPLEX=y

Enables the duplex scanning mode

VERBOSE=y

Enables the error message dialogs.

/REGEVENTS

Registers application for WIA scanner events.

/UNREGEVENTS

Unregister application for WIA scanner events.

/REGISTER

Registers application as COM server

/UNREGISTER

Unregisters application as COM server

/ICONIC

The application is started minimized.

/PATH=path or PATH=”path”

The output path redirection (overrides the profile settings