Blazor Barcode Example - Code 32
This sample visualizes the Code 32 barcode, a compact pharmaceutical barcode symbology that encodes numeric data in a compressed format. Code 32 supports the digits 0–9 and is commonly used in pharmaceutical and healthcare contexts for numeric labeling, product identification, and inventory management where space efficiency and scanning reliability are important.
The sample demonstrates how to create a Code 32 barcode by encoding each character using five bars and four spaces. To render this symbology, set the generator's Type property to Code32. The compact encoding reduces label width while preserving numeric fidelity for reliable scanning.
Customize the barcode appearance and behavior using the options below:
- Content: Modify the
Valueproperty to change the encoded data. - Size: Adjust
WidthandHeightto control display and print dimensions. - Colors: Set
Background ColorandFore Color; ensure sufficient contrast for consistent scanner performance. - Text display: Use
Text Visibilityto show or hide the human-readable value. - Spacing: Configure
Margin(left, right, top, bottom) to maintain required quiet zones. - Text alignment: Set
Position(top or bottom) andAlignment(left, center, right) to control label placement.
Use the Download button to export the barcode as an image for printing or archival. For printed labels, prefer higher export resolution and validate margins, contrast, and size to ensure accurate scanning.
All anchors open in a new tab and include aria-label attributes for accessibility; consult the linked API documentation for full property references, examples, and platform notes before integrating the barcode into production workflows.