Wisej.NET Extensions
HomeNewsSupportVideos
  • Overview
  • Introduction
    • Extension Types
    • API
    • Concepts
    • Theme Builder
  • Icon Packs
    • Overview
    • BootstrapIcons
    • ElegantIcons
    • FontAwesome
    • MaterialDesign
    • ModernUI
    • VaadinIcons
    • VisualStudioIcons
  • Extensions
    • Themes
    • AceEditor
      • API
        • AceEditor
    • Amazon S3
      • API
        • S3FileSystemProvider
    • ASPNetControl
      • API
        • AspNetWrapper<T>
        • AspNetWrapperBase
        • HttpModule
        • HttpModuleStartup
    • Barcode
      • API
        • Barcode
        • BarcodeReader
        • BarcodeType
        • ScanEventArgs
        • ScanEventHandler
        • ScanMode
    • BingWallpaper
      • API
        • BingWallpaper
    • Brotli
      • API
        • Brotli
    • Bubbles
      • API
        • BubbleEventArgs
        • BubbleNotification
        • BubbleStyle
    • Camera
      • API
        • Camera
        • CameraErrorEventArgs
    • ChartJS
      • API
        • ChartClickEventArgs
        • ChartClickEventHandler
        • ChartJS
        • ChartType
        • DataLabelAlign
        • DataLabelAnchor
        • DataLabelTextAlignment
        • DataSet
        • DataSetCollection
        • OptionsAxisGridLines
        • OptionsBase
        • OptionsDataLabel
        • OptionsLegend
        • OptionsScales
        • OptionsTitle
        • OptionsTooltips
        • PointStyle
        • ScaleType
        • SteppedLine
    • Chat Control
      • API
    • CKEditor
      • API
        • CKEditor
        • CommandEventArgs
        • ExternalPlugin
        • LinkClickedEventArgs
    • ClearScript
      • API
        • ClearScript
        • EngineType
        • JScriptEngine
        • V8JavaScriptEngine
        • VBScriptEngine
    • ClientClipboard
      • API
    • ClientFileSystem
      • API
    • ColumnFilter
      • API
        • ColumnFilter
        • ColumnFilterPanel
        • SimpleColumnFilterPanel
        • WhereColumnFilterPanel
    • CoolClock
      • API
        • CoolClock
        • CoolClockSkin
        • CoolClockType
    • CountUp
      • API
        • CountUp
    • CustomWallpaper
      • API
        • CustomWallpaper
    • DataGridViewSummaryRow
      • API
        • DataGridViewSummaryRow
        • DataGridViewSummaryRowExtensions
        • SummaryType
    • FullCalendar
      • API
        • BusinessHours
        • ColumnHeaderFormats
        • DayClickEventArgs
        • Event
        • EventClickEventArgs
        • EventCollection
        • EventValueEventArgs
        • FullCalendar
        • ItemDropEventArgs
        • Resource
        • ResourceEventArgs
        • RetrieveVirtualEventEventArgs
        • ThemeSystem
        • ViewType
        • VirtualEventsNeededEventArgs
    • Geolocation
      • API
        • Geolocation
        • StatusCode
    • GoogleMaps
      • API
        • GeocoderLocationType
        • GeocoderResult
        • GoogleMap
        • LatLng
        • LatLngBounds
        • MapMouseEventArgs
        • MapPropertyChangedEventArgs
        • MarkerDragEventArgs
        • TravelMode
    • Html2Canvas
      • API
        • Html2Canvas
        • Html2CanvasOptions
    • jQueryKnob
      • API
        • Knob
        • KnobType
        • LineCapType
    • jSequence
      • API
        • ElementClickEventArgs
        • Sequence
    • JustGage
      • API
        • CustomSector
        • JustGage
    • NavigationBar
      • API
        • NavigationBar
        • NavigationBarItem
        • NavigationBarItemClickEventArgs
        • NavigationBarItemCollection
    • Notification
      • API
        • Notification
        • NotificationClickEventArgs
    • OfficeViewer
      • API
        • OfficeViewer
    • Pannellum
      • API
        • Pannellum
    • Polymer
      • API
        • PolymerComponent
        • PolymerWidget
    • ProgressCircle
      • API
        • ProgressCircle
    • RibbonBar
      • API
        • RibbonBar
        • RibbonBarAppButton
        • [RibbonBarCollectionBase<TOwner, TElement>](extensions/ribbonbar/api/wisej.web.ext.ribbonbar.ribbonb
        • RibbonBarGroup
        • RibbonBarGroupCollection
        • RibbonBarGroupEventArgs
        • RibbonBarItem
        • RibbonBarItemButton
        • RibbonBarItemButtonGroup
        • RibbonBarItemCheckBox
        • RibbonBarItemCollection
        • RibbonBarItemComboBox
        • RibbonBarItemControl
        • RibbonBarItemEventArgs
        • RibbonBarItemRadioButton
        • RibbonBarItemSeparator
        • RibbonBarItemSplitButton
        • RibbonBarItemTextBox
        • RibbonBarMenuItemEventArgs
        • RibbonBarPage
        • RibbonBarPageCollection
    • SideButton
      • API
        • SideButton
    • Signature
      • API
        • Signature
    • SmoothieChart
      • API
        • DataNeededEventArgs
        • InterpolationType
        • SmoothieChart
        • TimeSeries
        • TimeSeriesCollection
    • Speech
      • API
        • SpeechRecognition
        • SpeechRecognitionEventArgs
        • SpeechRecognitionResult
        • SpeechSynthesis
    • TaskBar
      • API
        • TaskBar
    • Tesseract
      • API
        • Tesseract
    • TinyEditor
      • API
        • TinyEditor
    • TinyMCE
      • API
        • TinyMCE
    • TourPanel
      • API
        • TourPanel
        • TourPanelEventArgs
        • TourStep
    • Translation
      • API
        • Translation
        • TranslationProviderBase
        • TranslationProviderYandex
        • TranslationResult
    • WebARIA
      • API
        • ARIA
        • Invalid
        • TriState
        • WebARIA
    • WebAuthn
      • API
        • Assertion
        • AttestationConveyancePreference
        • AuthenticatorAttachment
        • AuthenticatorData
        • AuthenticatorSelectionCriteria
        • AuthenticatorTransport
        • ClientData
        • COSEAlgorithmIdentifier
        • CredentialsResponse
        • PublicKey
        • PublicKeyCredentialDescriptor
        • PublicKeyCredentialParameters
        • PublicKeyCredentialUserEntity
        • RelyingParty
        • ResidentKeyRequirement
        • WebAuthn
    • WebShare
      • API
        • WebShare
    • XTerm
      • API
        • XTerm
  • Premium Extensions
    • Overview
    • Configuration
    • Webix
    • Syncfusion EJ1
    • Syncfusion EJ2
    • Telerik KendoUI
    • Infragistics IgniteUI
    • DevExpress DevExtreme
Powered by GitBook
On this page
  • Features
  • How to Use
  • Barcode
  • BarcodeReader

Was this helpful?

  1. Extensions

Barcode

PreviousHttpModuleStartupNextAPI

Last updated 2 years ago

Was this helpful?

The Barcode extension component uses to generate Barcodes on the server and render them on the client. Supports: UPC-A, EAN-8, EAN-13, Code 39, Code 128, ITF, Codabar, Plessey, MSI, QR Code, PDF-417, Aztec, Data Matrix.

Features

  • Generate Barcodes

  • Read Barcodes using the device's camera.

How to Use

The Barcode extension can be added to a Wisej.NET project using NuGet Package Manager.

Barcode

This class can be used to display values as Barcodes. Use the Text property to set the value and the BarcodeType property to select the type of Barcode. The BarcodeType determines the list of allowed values/formats. Use the ShowLabel property to optionally show the value as a label text (if supported by the BarcodeType).

BarcodeReader

Using an Image

The following code snippet shows how to parse the barcode data and display it in an AlertBox.

private void button1_Click(object sender, EventArgs e)
{
    var myBarcodeImage = Image.FromFile("path/to/image.png");

    var reader = new BarcodeReader();
    var resultString = reader.DecodeBarcode(myBarcodeImage);

    AlertBox.Show(resultString);
}
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
    Dim myBarcodeImage = Image.FromFile("path/to/image.png")
    Dim reader = New BarcodeReader()
    Dim resultString = reader.DecodeBarcode(myBarcodeImage)
    AlertBox.Show(resultString)
End Sub

Using a Camera Instance

Three scan modes are available:

  • Automatic: Continuously scans the environment for barcodes.

  • AutomaticOnce: Stops scanning after one successful barcode detection.

The following example shows how to attach and continuously scan images from the camera instance.

private void button1_Click(object sender, EventArgs e)
{
    var reader = new BarcodeReader();
    // attach the reader to the camera.
    reader.Camera = this.camera1;

    // continuously have the camera watching for barcodes.
    reader.ScanMode = ScanMode.Automatic;

    // handle successful scans.
    reader.ScanSuccess += Reader_ScanSuccess;

    // handle failed scans.
    reader.ScanError += Reader_ScanError;
}

private void Reader_ScanError(object sender, ScanEventArgs e)
{
    // handle failure.
    AlertBox.Show(e.Data);
}

private void Reader_ScanSuccess(object sender, ScanEventArgs e)
{
    // handle success.
    AlertBox.Show(e.Data);
}
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)

        Dim reader = New BarcodeReader()
        // attach the reader to the camera.
        reader.Camera = Me.camera1

        // continuously have the camera watching for barcodes.
        reader.ScanMode = ScanMode.Automatic

        // handle successful scans.
        reader.ScanSuccess += AddressOf Reader_ScanSuccess

        // handle failed scans.
        reader.ScanError += AddressOf Reader_ScanError
End Sub

Private Sub Reader_ScanError(ByVal sender As Object, ByVal e As ScanEventArgs)
        AlertBox.Show(e.Data)
End Sub

Private Sub Reader_ScanSuccess(ByVal sender As Object, ByVal e As ScanEventArgs)
        AlertBox.Show(e.Data)
End Sub

The extension also includes the ability to read and parse barcodes using a given or by attaching to a instance to detect barcodes in real-time on the client.

Using the to parse images on the server is easy. It utilizes ZXing.Net to parse the data from the image.

When attaching to a Camera instance, the processing of images takes place on the client using .

Manual: Requires the user to call the method.

You must attach a handler for and to receive the scanning data from the client widget.

Wisej.Web.Ext.Barcode
System.Drawing.Image
Wisej.Web.Ext.Camera
BarcodeReader
zxing-js
ZXing.Net
ScanImage
ScanError
ScanSuccess
wisej-extensions/Wisej.Web.Ext.Barcode at 3.0 · iceteagroup/wisej-extensionsGitHub
Barcode Source Code
Logo
Wisej-3-Barcode 3.0.10nuget
Logo