![]() |
VOOZH | about |
dotnet add package Acontplus.Barcode --version 1.2.6
NuGet\Install-Package Acontplus.Barcode -Version 1.2.6
<PackageReference Include="Acontplus.Barcode" Version="1.2.6" />
<PackageVersion Include="Acontplus.Barcode" Version="1.2.6" />Directory.Packages.props
<PackageReference Include="Acontplus.Barcode" />Project file
paket add Acontplus.Barcode --version 1.2.6
#r "nuget: Acontplus.Barcode, 1.2.6"
#:package Acontplus.Barcode@1.2.6
#addin nuget:?package=Acontplus.Barcode&version=1.2.6Install as a Cake Addin
#tool nuget:?package=Acontplus.Barcode&version=1.2.6Install as a Cake Tool
Advanced barcode generation library with ZXing.Net integration. Supports QR codes, 1D/2D barcodes, custom styling, and high-performance image generation using SkiaSharp for cross-platform applications.
SKColorInstall-Package Acontplus.Barcode
dotnet add package Acontplus.Barcode
<PackageReference Include="Acontplus.Barcode" Version="x.x.x" />
// Program.cs
builder.Services.AddBarcode();
Then inject IBarcodeService wherever needed:
public class MyService(IBarcodeService barcodeService)
{
public byte[] GetQrCode(string url) =>
barcodeService.Create(new BarcodeConfig
{
Text = url,
Format = ZXing.BarcodeFormat.QR_CODE,
Width = 300,
Height = 300
});
}
using Acontplus.Barcode.Utils;
using Acontplus.Barcode.Models;
var config = new BarcodeConfig
{
Text = "https://example.com",
Format = ZXing.BarcodeFormat.QR_CODE,
Width = 300,
Height = 300
};
var qrCode = BarcodeGen.Create(config);
await File.WriteAllBytesAsync("qr-code.png", qrCode);
var config = new BarcodeConfig
{
Text = "123456789",
Format = ZXing.BarcodeFormat.CODE_128,
Width = 400,
Height = 100,
Margin = 10,
IncludeLabel = false,
OutputFormat = SkiaSharp.SKEncodedImageFormat.Png,
Quality = 100
};
var barcode = BarcodeGen.Create(config);
await File.WriteAllBytesAsync("barcode.png", barcode);
var formats = new[]
{
ZXing.BarcodeFormat.QR_CODE,
ZXing.BarcodeFormat.CODE_128,
ZXing.BarcodeFormat.CODE_39,
ZXing.BarcodeFormat.EAN_13,
ZXing.BarcodeFormat.PDF_417
};
foreach (var format in formats)
{
var config = new BarcodeConfig
{
Text = "Sample Data",
Format = format,
Width = 300,
Height = 100
};
var barcode = BarcodeGen.Create(config);
await File.WriteAllBytesAsync($"{format}.png", barcode);
}
var config = new BarcodeConfig
{
Text = "Important data that needs error correction",
Format = ZXing.BarcodeFormat.QR_CODE,
Width = 400,
Height = 400,
Margin = 20,
AdditionalOptions = new ZXing.QrCode.QrCodeEncodingOptions
{
ErrorCorrection = ZXing.QrCode.Internal.ErrorCorrectionLevel.H
}
};
var qrCode = BarcodeGen.Create(config);
var config = new BarcodeConfig
{
Text = "COLOR BARCODE",
Format = ZXing.BarcodeFormat.QR_CODE,
Width = 300,
Height = 300,
ForegroundColor = SkiaSharp.SKColors.DarkBlue,
BackgroundColor = SkiaSharp.SKColors.LightYellow
};
var barcode = BarcodeGen.Create(config);
var items = new[] { "Item001", "Item002", "Item003", "Item004" };
for (int i = 0; i < items.Length; i++)
{
var config = new BarcodeConfig
{
Text = items[i],
Format = ZXing.BarcodeFormat.CODE_128,
Width = 300,
Height = 80
};
var barcode = BarcodeGen.Create(config);
await File.WriteAllBytesAsync($"item_{i + 1}.png", barcode);
}
var config = new BarcodeConfig
{
Text = "Large amount of data that needs to be encoded in a compact 2D format",
Format = ZXing.BarcodeFormat.PDF_417,
Width = 400,
Height = 200
};
var barcode = BarcodeGen.Create(config);
| Format | Type | Data Capacity | Use Case |
|---|---|---|---|
| QR Code | 2D | High | URLs, contact info, general data |
| Code 128 | 1D | Medium | Inventory, shipping, logistics |
| Code 39 | 1D | Medium | Industrial, automotive, defense |
| EAN-13 | 1D | Low | Retail products, point of sale |
| UPC-A | 1D | Low | Retail products, North America |
| PDF417 | 2D | High | Government IDs, shipping labels |
| Data Matrix | 2D | Medium | Small items, electronics |
public class BarcodeConfig
{
public string Text { get; set; } // Required: text to encode
public ZXing.BarcodeFormat Format { get; set; } // Default: CODE_128
public int Width { get; set; } // Default: 300
public int Height { get; set; } // Default: 100
public bool IncludeLabel { get; set; } // Default: false
public int Margin { get; set; } // Default: 10
public SkiaSharp.SKEncodedImageFormat OutputFormat { get; set; } // Default: Png
public int Quality { get; set; } // Default: 100 (0-100)
public SkiaSharp.SKColor? ForegroundColor { get; set; } // Default: Black
public SkiaSharp.SKColor? BackgroundColor { get; set; } // Default: White
public ZXing.Common.EncodingOptions? AdditionalOptions { get; set; } // Format-specific options
}
Set via AdditionalOptions using ZXing.QrCode.QrCodeEncodingOptions:
// For URLs and general data
var qrConfig = new BarcodeConfig { Text = "https://example.com", Format = BarcodeFormat.QR_CODE };
// For inventory systems
var code128Config = new BarcodeConfig { Text = "INV-001", Format = BarcodeFormat.CODE_128 };
// For retail products
var eanConfig = new BarcodeConfig { Text = "5901234123457", Format = BarcodeFormat.EAN_13 };
// High-quality QR code for printing
var highQuality = new BarcodeConfig
{
Text = "https://example.com",
Format = BarcodeFormat.QR_CODE,
Width = 600,
Height = 600,
AdditionalOptions = new ZXing.QrCode.QrCodeEncodingOptions
{
ErrorCorrection = ZXing.QrCode.Internal.ErrorCorrectionLevel.H
}
};
// Compact barcode for web display
var compact = new BarcodeConfig
{
Text = "123456789",
Format = BarcodeFormat.CODE_128,
Width = 200,
Height = 60
};
var barcodes = await Task.WhenAll(items.Select(item => Task.Run(() =>
BarcodeGen.Create(new BarcodeConfig
{
Text = item,
Format = BarcodeFormat.CODE_128,
Width = 300,
Height = 100
}))));
public static class BarcodeGen
{
/// <summary>Generates a barcode image and returns its raw bytes.</summary>
public static byte[] Create(BarcodeConfig config);
}
public interface IBarcodeService
{
byte[] Create(BarcodeConfig config);
}
Register with services.AddBarcode() — the default implementation delegates to BarcodeGen.Create.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Acontplus.Barcode:
| Package | Downloads |
|---|---|
|
Acontplus.Reports
Advanced library for comprehensive report generation and management. Includes RDLC report processing, PDF/Excel export capabilities, ReportViewer integration, QuestPDF dynamic PDF generation with fluent composition, MiniExcel high-performance streaming Excel exports, ClosedXML advanced richly formatted Excel workbooks with corporate styles, freeze panes, autofilter and formula aggregates, template support, and enterprise-ready reporting patterns for business applications. |
|
|
Acontplus.Billing
Complete library for electronic invoicing and SRI integration in Ecuador. Includes models, services, XML validation, SRI web service support, and embedded XSD schemas for compliance. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.6 | 122 | 5/31/2026 |
| 1.2.5 | 279 | 5/17/2026 |
| 1.2.4 | 181 | 5/3/2026 |
| 1.2.3 | 176 | 4/16/2026 |
| 1.2.2 | 330 | 3/17/2026 |
| 1.2.1 | 159 | 3/8/2026 |
| 1.2.0 | 107 | 3/8/2026 |
| 1.1.3 | 259 | 2/22/2026 |
| 1.1.2 | 200 | 1/16/2026 |
| 1.1.1 | 508 | 12/11/2025 |
| 1.1.0 | 313 | 11/23/2025 |
| 1.0.7 | 522 | 11/2/2025 |
| 1.0.6 | 258 | 10/23/2025 |
| 1.0.5 | 363 | 9/25/2025 |
| 1.0.4 | 377 | 9/9/2025 |
| 1.0.3 | 382 | 8/7/2025 |
| 1.0.2 | 333 | 8/5/2025 |
| 1.0.1 | 501 | 7/9/2025 |
| 1.0.0 | 524 | 6/30/2025 |
Enhanced with ZXing.Net integration, SkiaSharp rendering, support for
multiple barcode formats (QR, Code128, Code39, EAN, UPC, PDF417, DataMatrix), custom styling
options, and high-performance cross-platform image generation.