ASP.NET Barcode API

You can use the ShieldBarcode for automatic Barcode generation directly from numeric or character data. It supports several standards which can be used when you generate it. After adding barcode to the page it is necessary to configure its properties:

  • Value - a string value, specifying text, which will be encoded and rendered by the barcode.
  • Width - Specifying the width of the SVG and the HTML div element in which it is wrapped.
  • Height - Specifying the height of the SVG and the HTML div element in which it is wrapped.
  • Type - specifying the type of code which will be used. This can be any of the code values listed above.Presently, ShieldUI offers the following one-dimensional barcodes:
    "CODABAR", "CODE-11", "CODE-39", "CODE-93", "CODE-128",
    "CODE-128-A", "CODE-128-B", "CODE-128-C", "CODE-25-STANDARD",
    "CODE-25-INTERLEAVED", "EAN-8", "EAN-13", "UPC-A", "UPC-E",
    "MSI-10", "MSI-10-10", "MSI-11", "MSI-11-10", "POSTNET".
  • EnableChecksum - Specify whether to include the number located on the far right side of a bar code.
  • BarcodeStyle - Complex property, which allows further visual customization for the barcode control. The possible values, which can be set are:
    • BackgroundColor - Specifying the background color for the control.
    • BorderColor - Specifying the color of the border for the control.
    • BorderStyle - Specifying the style for the border.
    • BorderWidth - Specifying the width of the barcode border.
    • Color - Specifying the color of the barcode lines.
    • PaddingBottom - Integer number which specifies the bottom padding.
    • PaddingLeft - Integer number which specifies the left padding.
    • PaddingRight - Integer number which specifies the right padding.
    • PaddingTop - Integer number which specifies the top padding.
  • Text - Complex property which contains configuration properties for configuring the text rendered under the barcode.
    • Enabled - Specifying whether to show the text.
    • EnableChecksum - Whether to have a checksum appended to the text.
    • Style - Complex property, which allows further visual customization for the barcode text.
      • Color - Specifying the color of the text.
      • FontFamily - Specifying the text’s font family.
      • FontSize - Specifying the text’s font size.
      • PaddingBottom - Integer number which specifies the bottom padding.
      • PaddingLeft - Integer number which specifies the left padding.
      • PaddingRight - Integer number which specifies the right padding.
      • PaddingTop - Integer number which specifies the top padding.

The following example demonstrates some of the properties of the barcode control in action.