mcpField
S
syncfusion-blazor-barcode

syncfusion-blazor-barcode

github.com/syncfusionDevelopment4371 installsUpdated 2w ago
Repository

About syncfusion-blazor-barcode

A developer reference for Syncfusion Blazor Barcode Generator, a set of components for generating 1D and 2D barcodes in Blazor applications. It documents GS1 formats, validation, customization, and image export.

Key features

  1. 011D barcode generation
  2. 02QR, Data Matrix, and DotCode generation
  3. 03GS1 barcode modes
  4. 04QR code logo embedding
  5. 05Validation events and checksums
  6. 06Image and Base64 export

Use cases

  1. 01Creating product and inventory labels
  2. 02Generating QR codes for URLs or contacts
  3. 03Producing pharmaceutical and shipping labels
  4. 04Embedding exported barcodes in documents

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/syncfusion/blazor-ui-components-skills --skill syncfusion-blazor-barcode

After installing, type/syncfusion-blazor-barcodein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
barcode-types.md
data-matrix-generator.md
dotcode-generator.md
export-and-customization.md
getting-started.md
gs1-barcodes.md
qr-code-generator.md

Details

From the project README

Syncfusion Blazor Barcode Generator

Syncfusion's Blazor Barcode Generator package (Syncfusion.Blazor.BarcodeGenerator) provides four components for generating barcodes in Blazor applications:

ComponentUse For
SfBarcodeGenerator1D linear barcodes (Code39, Code128, Codabar, etc.) plus GS1 Code 128, ITF-14, and the full GS1 DataBar family
SfQRCodeGeneratorQR codes with optional logo embedding, plus GS1 QR Code (EnableGS1)
SfDataMatrixGenerator2D Data Matrix codes for compact encoding, plus GS1 Data Matrix (EnableGS1)
SfDotCodeGeneratorHigh-density dot-matrix DotCode symbols, plus GS1 DotCode (EnableGS1)

All four work in Blazor Server, Blazor WebAssembly, and Blazor Web App (.NET 8+).


When to Use This Skill

  • User needs to render or display a barcode in a Blazor component
  • User asks about QR code generation (e.g., product links, 2FA, contact cards)
  • User needs Data Matrix codes (pharmaceutical, logistics, label printing)
  • User needs DotCode symbols for high-speed industrial/inkjet printing or product serialization
  • User is configuring SfBarcodeGenerator, SfQRCodeGenerator, SfDataMatrixGenerator, or SfDotCodeGenerator
  • User asks about exporting a barcode as an image (JPG/PNG) or Base64
  • User asks about barcode types, error correction, checksums, or validation events
  • User is embedding a logo in a QR code
  • User asks about GS1 standards or GS1-compliant barcodes: GS1 Code 128, ITF-14, GS1 DataBar (Omnidirectional, Stacked, Stacked Omnidirectional, Limited, Expanded, Expanded Stacked), GS1 QR Code, GS1 Data Matrix, or GS1 DotCode
  • User is building retail, logistics, warehouse, inventory management, product traceability, or supply chain labeling features
  • User asks about GS1 Application Identifiers (AIs), FNC1 separators, EnableGS1, or GTIN/SSCC check-digit calculation

Navigation Guide

Setting Up the Project

📄 Read: references/getting-started.md

  • NuGet package installation
  • _Imports.razor namespace configuration
  • Service registration in Program.cs
  • Stylesheet and script references
  • Setup for Blazor Server, WebAssembly, and Web App
  • Adding the first barcode component to a page
1D Barcode Types and Configuration

📄 Read: references/barcode-types.md

  • All supported BarcodeType enum values with descriptions
  • Code39, Code39 Extended, Code11, Code32, Code93, Codabar, Code128
  • Choosing the right type for your use case
  • EnableCheckSum configuration
  • OnValidationFailed event handling
QR Code Generator

📄 Read: references/qr-code-generator.md

  • Basic QR code usage
  • Error correction levels (L, M, Q, H)
  • Embedding a logo image in the QR code center
  • Customizing logo size
  • Color, dimension, and display text customization
  • OnValidationFailed event
Data Matrix Generator

📄 Read: references/data-matrix-generator.md

  • Basic Data Matrix code usage
  • Color, dimension, and display text customization
  • Common use cases (pharmaceuticals, labels)
  • OnValidationFailed event
DotCode Generator

📄 Read: references/dotcode-generator.md

  • Basic SfDotCodeGenerator usage
  • Numeric, alphanumeric, byte, and GS1 encoding modes
  • GS1 DotCode via EnableGS1 for pharmaceutical/healthcare serialization
  • Color and dimension customization
  • OnValidationFailed event and error causes
GS1 Barcode Standards (Retail, Logistics, Supply Chain)

📄 Read: references/gs1-barcodes.md

  • GS1 Application Identifier (AI) syntax and validation rules
  • GS1 Code 128 (BarcodeType.GS1Code128) for shipping/batch/expiry labels
  • ITF-14 (BarcodeType.ITF14) for carton/case-level GTIN tracking
  • Full GS1 DataBar family: Omnidirectional, Stacked, Stacked Omnidirectional, Limited, Expanded, Expanded Stacked
  • GS1 QR Code and GS1 Data Matrix via EnableGS1
  • GS1 DotCode overview (cross-links to dotcode-generator.md)
  • Choosing the right GS1 symbology for retail, inventory, and product traceability use cases
Exporting and Customizing Barcodes

📄 Read: references/export-and-customization.md

  • Export barcode to image file (JPG/PNG)
  • Export as Base64 string
  • ForeColor for custom barcode color
  • Width / Height for sizing
  • BarcodeGeneratorDisplayText for label text
  • Applies to all four generator types, including GS1-enabled modes

Quick Start Examples

1D Barcode
@using Syncfusion.Blazor.BarcodeGenerator

<SfBarcodeGenerator Width="200px" Height="150px"
                    Type="@BarcodeType.Code128"
                    Value="SYNCFUSION">
</SfBarcodeGenerator>
QR Code
@using Syncfusion.Blazor.BarcodeGenerator

<SfQRCodeGenerator Width="200px" Height="200px"
                   Value="https://www.syncfusion.com">
</SfQRCodeGenerator>
Data Matrix
@using Syncfusion.Blazor.BarcodeGenerator

<SfDataMatrixGenerator Width="200" Height="150"
                       Value="SYNCFUSION">
</SfDataMatrixGenerator>
DotCode
@using Syncfusion.Blazor.BarcodeGenerator

<SfDotCodeGenerator Width="300" Height="250"
                    Value="Product Serialization">
</SfDotCodeGenerator>
GS1 Code 128 (GS1-compliant 1D barcode)
@using Syncfusion.Blazor.BarcodeGenerator

<SfBarcodeGenerator Width="300px" Height="200px"
                    Type="@BarcodeType.GS1Code128"
                    Value="(01)09506000134352(17)261231(10)ABC123">
    <BarcodeGeneratorDisplayText Text="Product Serialization" />
</SfBarcodeGenerator>
GS1 QR Code (retail/traceability)
@using Syncfusion.Blazor.BarcodeGenerator

<SfQRCodeGenerator Width="250px" Height="250px"
                   Value="(01)09506000134352(17)271231(10)ABC123"
                   EnableGS1="true">
</SfQRCodeGenerator>

Key Properties

PropertyApplies ToDescription
ValueAllThe data string to encode
WidthAllWidth of the barcode (px or %)
HeightAllHeight of the barcode (px or %)
TypeSfBarcodeGeneratorBarcodeType enum — selects the 1D symbology, including GS1Code128, ITF14, and the GS1 DataBar variants
ForeColorAllColor of the barcode bars (e.g., "red", "#333")
EnableCheckSumSfBarcodeGeneratorAdds/validates checksum digit (default true for Code39)
ErrorCorrectionLevelSfQRCodeGeneratorQR error recovery: Low, Medium, Quartile, High
EnableGS1SfQRCodeGenerator, SfDataMatrixGenerator, SfDotCodeGeneratorSwitches the component into GS1 mode, encoding Value as (AI)data pairs with FNC1 handling
OnValidationFailedAllEvent triggered when Value contains invalid characters, malformed AI syntax, or an invalid check digit

Common Use Cases

NeedComponentRead
Product/inventory labelsSfBarcodeGenerator (Code128/Code39)barcode-types.md
URL / contact / 2FA QR codeSfQRCodeGeneratorqr-code-generator.md
Branded QR code with logoSfQRCodeGenerator + QRCodeLogoqr-code-generator.md
Pharmaceutical / shipping labelsSfDataMatrixGeneratordata-matrix-generator.md
Industrial/inkjet product serializationSfDotCodeGeneratordotcode-generator.md
Shipping/batch/expiry label (GS1)SfBarcodeGenerator (GS1Code128)gs1-barcodes.md
Carton/case GTIN trackingSfBarcodeGenerator (ITF14)gs1-barcodes.md
Retail POS omnidirectional scanSfBarcodeGenerator (GS1DataBarOmnidirectional)gs1-barcodes.md
Small package / limited space GTINSfBarcodeGenerator (GS1DataBarStacked/GS1DataBarLimited)gs1-barcodes.md
Variable-measure item or coupon (multi-AI)SfBarcodeGenerator (GS1DataBarExpanded/ExpandedStacked)gs1-barcodes.md
Supply chain / product traceability QRSfQRCodeGenerator + EnableGS1gs1-barcodes.md
Compact GS1 label (pharma/manufacturing)SfDataMatrixGenerator + EnableGS1gs1-barcodes.md
GS1 serialization on industrial printersSfDotCodeGenerator + EnableGS1dotcode-generator.md / gs1-barcodes.md
Download barcode as image.Export() methodexport-and-customization.md
Embed barcode in email/PDF.ExportAsBase64Image()export-and-customization.md

Comments

Markdown supported