Aquila.BarcodeGenerator 1.0.1

dotnet add package Aquila.BarcodeGenerator --version 1.0.1
                    
NuGet\Install-Package Aquila.BarcodeGenerator -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aquila.BarcodeGenerator" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aquila.BarcodeGenerator" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Aquila.BarcodeGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aquila.BarcodeGenerator --version 1.0.1
                    
#r "nuget: Aquila.BarcodeGenerator, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aquila.BarcodeGenerator@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aquila.BarcodeGenerator&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Aquila.BarcodeGenerator&version=1.0.1
                    
Install as a Cake Tool

Aquila.BarcodeGenerator

Lightweight, platform-neutral .NET 9 library for generating QR codes and barcodes. Works seamlessly in MAUI, Xamarin, .NET apps, or any .NET 9+ project.

Table of Contents

Features

Supported Barcode Types

Installation

Usage

Generating a QR Code

Generating a Barcode

Input Validation

License

Features

Generate QR Codes and traditional barcodes.

Returns image as byte array, compatible with MAUI ImageSource.

Lightweight and platform-neutral (.NET 9).

Uses ZXing.Net for barcode generation and SkiaSharp for image rendering.

Supports custom dimensions for barcode or QR code.

Can be easily packaged as NuGet and reused across projects.

Supported Barcode Types BarcodeType Notes QRCode Square QR code, supports alphanumeric text. Code128 Variable-length alphanumeric barcode. Ean13 Numeric only, 12 digits input (13th is checksum). Ean8 Numeric only, 7 digits input (8th is checksum). Code39 Alphanumeric barcode. PDF417 2D stacked barcode. DataMatrix 2D barcode, compact. Aztec 2D barcode, compact, often used in tickets. Installation NuGet dotnet add package Aquila.BarcodeGenerator --version 1.0.0

Or via Visual Studio NuGet Package Manager:

Manage NuGet Packages → Browse → Aquila.BarcodeGenerator → Install

Package Dependencies

ZXing.Net (>= 0.16.11)

SkiaSharp (>= 3.119.2)

These dependencies are automatically included when installing via NuGet.

Usage Generating a QR Code using Aquila.BarcodeGenerator.Enums; using Aquila.BarcodeGenerator.Services;

// Example: Generate QR code var qrBytes = BarcodeService.Generate( "Hello QR Code", BarcodeType.QRCode, width: 300, height: 300 );

// In MAUI, display in Image QrImage.Source = ImageSource.FromStream(() ⇒ new MemoryStream(qrBytes));

Generating a Barcode using Aquila.BarcodeGenerator.Enums; using Aquila.BarcodeGenerator.Services;

// Example: Generate Code128 barcode var codeBytes = BarcodeService.Generate( "1234567890", BarcodeType.Code128, width: 300, height: 150 );

// Display in MAUI Image BarcodeImage.Source = ImageSource.FromStream(() ⇒ new MemoryStream(codeBytes));

Input Validation

Some barcode types have strict requirements:

EAN-8: Must be exactly 7 digits.

EAN-13: Must be exactly 12 digits.

Non-numeric input will throw an exception.

Other barcode types (Code128, QRCode, PDF417, etc.) allow alphanumeric input.

Tip: Always validate input length and numeric content before calling BarcodeService.Generate() to avoid runtime exceptions.

Example MAUI Usage private void OnGenerateClicked(object sender, EventArgs e) { var input = InputEntry.Text?.Trim(); var type = BarcodeType.QRCode; // Or any BarcodeType

if (string.IsNullOrEmpty(input))
    return;

var bytes = BarcodeService.Generate(input, type, 300, 300);
QrImage.Source = ImageSource.FromStream(() => new MemoryStream(bytes));

}

License

MIT License – free to use in commercial or personal projects.

MIT License

Copyright (c) 2026 Aswin Sadhasivam

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction...

Author

Aswin Sadhasivam – Aquila Innovations

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 153 2/13/2026
1.0.0 127 2/13/2026