Welcome to the comprehensive API documentation for the BarcodeGenerator .NET library. This library provides high-performance barcode generation capabilities using SkiaSharp for cross-platform graphics rendering.
- Getting Started - Your first barcode in minutes
- API Reference - Complete class and method documentation
- Examples - Code samples for common scenarios
- Advanced Topics - In-depth customization guides
BarcodeGenerator is a .NET library that supports multiple barcode types with a fluent, easy-to-use API. Built on SkiaSharp, it provides consistent rendering across Windows, macOS, and Linux platforms.
| Type | Description | Format |
|---|---|---|
| EAN-13 | European Article Number | 13 digits |
| UPC-A | Universal Product Code | 12 digits, North American retail |
| UPC-E | Compact UPC | 8 digits, small packages |
| ISBN-13 | International Standard Book Number | For books |
| EAN-8 | Compact EAN version | For small packages |
| CODE-39 | Alphanumeric barcode | Industrial, automotive |
| CODE-93 | Alphanumeric barcode | Used in logistics |
| CODE-128 | High-density barcode | Alphanumeric encoding |
| CODABAR | Numeric barcode | Libraries, blood banks |
🚀 Performance & Quality
- High-performance optimization for speed and memory efficiency
- Professional-quality output suitable for commercial use
- Consistent rendering across all supported platforms
🎨 Customization & Flexibility
- Fully configurable colors, fonts, scaling, and margins
- Intuitive configuration with lambda expressions
- Support for custom font loading and styling
📱 Cross-Platform Compatibility
- Works seamlessly on Windows, macOS, Linux, and mobile platforms
- Multiple export formats: PNG, JPEG, WEBP, and more
- Framework support: .NET Standard 2.0, .NET Framework 4.6.2, .NET 8.0, .NET 10.0
✅ Validation & Reliability
- Automatic check digit calculation and validation
- Comprehensive error handling and informative exceptions
- Input validation for all supported barcode types
Get started with a simple barcode generation example:
using SkiaSharp;
using TyKonKet.BarcodeGenerator;
// Create and configure a barcode
using var barcode = new Barcode(options =>
{
options.Type = BarcodeTypes.Ean13;
options.Height = 50;
options.Scaling = 3;
options.RenderText = true;
options.UseTypeface("Arial", SKFontStyle.Normal);
});
// Generate and export
string validatedCode = barcode.Encode("123456789012");
barcode.Export("my-barcode.png", SKEncodedImageFormat.Png, 100);| Class | Description | Documentation |
|---|---|---|
| Barcode | Main entry point for barcode generation | Complete API reference |
| BarcodeOptions | Configuration options for barcode appearance | All properties and methods |
| BarcodeTypes | Enumeration of supported barcode types | Type definitions |
| Class/Enum | Description | Documentation |
|---|---|---|
| FontFamily | Font family wrapper with implicit conversions | Usage examples |
| FontFamilies | Predefined font family enumeration | Available fonts |
- Simple Barcode Generation - Get started with basic barcode creation
- Configuration Options - Customize appearance and behavior
- Export Formats - Different output formats and quality settings
- Supported Barcode Types - Examples for each supported format
Explore advanced features and customization options:
- Custom Font Loading - Load fonts from files, streams, and embedded resources
- Export Options and File Naming - Advanced export scenarios and dynamic naming
- Barcode Validation - Input validation, check digits, and error handling
Install-Package TyKonKet.BarcodeGeneratordotnet add package TyKonKet.BarcodeGenerator| Framework | Version | Target Scenario |
|---|---|---|
| .NET Standard 2.0 | 2.0+ | Core compatibility for most scenarios |
| .NET Framework | 4.6.2+ | Legacy Windows applications |
| .NET 8.0 | 8.0+ | Long-term support version |
| .NET 10.0 | 10.0+ | Latest stable version |
This library is released under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please read our Code of Conduct and check the project's GitHub repository for contribution guidelines.