Rapid.ScannerSDK 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rapid.ScannerSDK --version 1.0.1                
NuGet\Install-Package Rapid.ScannerSDK -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rapid.ScannerSDK" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rapid.ScannerSDK --version 1.0.1                
#r "nuget: Rapid.ScannerSDK, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Rapid.ScannerSDK as a Cake Addin
#addin nuget:?package=Rapid.ScannerSDK&version=1.0.1

// Install Rapid.ScannerSDK as a Cake Tool
#tool nuget:?package=Rapid.ScannerSDK&version=1.0.1                

Rapid.ScannerSDK

A powerful cross-platform SDK for integrating scanner functionality into web applications. Currently supports Windows with WIA (Windows Image Acquisition).

Author

MohaNed Ghawar

Features

  • Easy to integrate Blazor components
  • Scanner discovery and selection
  • Preview and full scanning
  • Configurable scan settings (resolution, color mode)
  • Real-time scanning progress
  • Modern, responsive UI
  • Support for JPEG and PNG formats
  • Fully customizable UI with CSS classes and text content

Quick Start

1. Install the NuGet Package

dotnet add package Rapid.ScannerSDK

2. Add to your Blazor Application

In your _Imports.razor:

@using Rapid.ScannerSDK
@using Rapid.ScannerSDK.Components

In your Program.cs or Startup.cs:

builder.Services.AddRapidScannerSDK();

3. Basic Usage

<Scanner />

4. Customized Usage

<Scanner 
    Class="my-scanner"
    Style="background-color: #f5f5f5; padding: 20px;"
    SelectionClass="custom-selection"
    SettingsClass="custom-settings"
    TitleClass="custom-title"
    SelectClass="custom-select"
    LabelClass="custom-label"
    PreviewButtonClass="custom-preview-btn"
    ScanButtonClass="custom-scan-btn"
    DownloadButtonClass="custom-download-btn"
    SelectionTitle="My Scanners"
    SettingsTitle="Scan Options"
    PreviewTitle="Quick Preview"
    ResultTitle="Final Result"
    SelectPlaceholder="Choose your scanner..."
    PreviewButtonText="Quick Preview"
    ScanButtonText="Start Scan"
    DownloadButtonText="Save Image"
    BaseUrl="http://localhost:5034"
    OnScanComplete="HandleScanComplete"
    OnError="HandleError"
/>

@code {
    private async Task HandleScanComplete(byte[] scanData)
    {
        // Handle the scanned image data
    }

    private void HandleError(string error)
    {
        // Handle any errors
    }
}

Customization Options

CSS Classes

Parameter Description
Class Main container class
Style Inline styles for main container
SelectionClass Scanner selection section class
SettingsClass Settings section class
ActionsClass Buttons section class
PreviewClass Preview image section class
ResultClass Scan result section class
TitleClass Title elements class
SelectClass Dropdown select elements class
LabelClass Label elements class
SettingGroupClass Setting group container class
ImageClass Preview and result images class
PreviewButtonClass Preview button class
ScanButtonClass Scan button class
DownloadButtonClass Download button class

Text Content

Parameter Description Default
SelectionTitle Scanner list title "Available Scanners"
SettingsTitle Settings section title "Scanner Settings"
PreviewTitle Preview section title "Preview"
ResultTitle Result section title "Scan Result"
SelectPlaceholder Scanner dropdown placeholder "Select a scanner..."
ResolutionLabel Resolution setting label "Resolution (DPI):"
ColorModeLabel Color mode setting label "Color Mode:"
PreviewButtonText Preview button text "Preview"
ScanButtonText Scan button text "Scan"
DownloadButtonText Download button text "Download"

Scanner Options

Parameter Description Default
ResolutionOptions Available resolution options [100, 200, 300, 600]
ColorModeOptions Available color mode options Color, Grayscale, Black & White
BaseUrl Scanner service URL "http://localhost:5034"

Events

Event Description
OnScanComplete Triggered when scan is complete with image data
OnError Triggered when an error occurs

Usage Example

@page "/scan"
@using Rapid.ScannerSDK.Components

<h1>Document Scanner</h1>

<Scanner />

Configuration

The SDK will automatically connect to the WebScannerSDK service running on the default port (5034). To configure a different port or URL:

<Scanner BaseUrl="http://localhost:YOUR_PORT" />

Support

For issues, feature requests, or contributions, please visit the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright 2024 MohaNed Ghawar. All rights reserved.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 42 12/26/2024
1.0.2 34 12/26/2024
1.0.1 36 12/26/2024
1.0.0 40 12/26/2024