
Barcodes play a crucial role in product identification, offering machine-readable representations of data. Common formats such as Code 128, QR, Data Matrix, and Aztec are extensively utilized across various industries. In this guide, you’ll discover how to generate barcodes in C# and effortlessly customize their designs using the powerful Príslušenstvo.BarCode Plugins.
Tabuľka obsahu
- C# Barcode generátor API
- Ako vytvoriť barový kód pomocou C#
- Ako vytvoriť QR Barcode pomocou C#
- Prispôsobenie vzhľadu barového kódu v C#
- Pridať Caption do Barcodes pomocou C#
C# Barcode Generator API - zadarmo Stiahnuť
Aspose.BarCode pre .NET knižnicu je komplexný API navrhnutý pre generáciu a skenovanie čárového kódu, čo robí ideálny C# Free Barcode Generator.
- Kód 128
- Kód 11
- Kód 39
- QR
- Údaje Matrix
- EÚ 13
- Evan 8
- ITF 14
- PDF číslice 417
- Mnoho viac.
You can Stiahnuť API zadarmo, or install it directly in your .NET application using NuGet for a C# Barcode Generator NuGet Free solution:
PM> Install-Package Aspose.Barcode
Ako vytvoriť barový kód pomocou C#
Vytvorenie čárového kódu s aplikáciou Aspose Plugin je jednoduché a efektívne. postupujte podľa týchto krokov, aby ste vytvorili čarovný kód pomocou C#, pomocou C# Barcode Generator Source Code:
- Instantiate the Barcode generátor class, specifying the desired barcode type and text in the constructor.
- Nastavenie funkcií čiarového kódu, ako je rozlíšenie a veľkosť.
- Generate the barcode using the Barcode generátor.Save(String) method.
Tu je vzorka kódu, ktorá ukazuje, ako vytvoriť čárový kód pomocou C# Barcode Generator:

Ako vytvoriť QR Barcode pomocou C#
Vytvorenie QR čárového kódu nasleduje podobný proces pri vytváraní iných typov čárového kódu.
- Instantiate the
BarcodeGenerator
class, specifying the barcode type as Príslušenstvo pre: QR. - Generate the barcode using the
BarcodeGenerator.Save(String)
method.
Tu je vzorka kódu na generovanie QR kódov pomocou Barcode Application v C# .NET:

Prispôsobte vzhľad čárového kódu v C#
Prispôsobenie vzhľadu čiarového kódu je jednoduché s aplikáciou Aspose Plugin. Môžete zmeniť jeho písmo, farbu prednej časti, farbu pozadia a farbu textu. Tu sú kroky:
- Instantiate the
BarcodeGenerator
class. - Adjust the barcode’s appearance using the
BarcodeGenerator.Parameters
properties, such as BarcodeGenerator.Parametry.BackColor. - Generate the barcode using the
BarcodeGenerator.Save(String)
.
Here’s a code sample for generating a customized Aztec
barcode using Barcode Generator C#:

Pridajte Caption do Barcodes pomocou C#
Integrovanie capcií do barových kódov môže poskytnúť dodatočný kontext, a Aspose Plugin robí tento proces bezvýznamným.
- Instantiate the
BarcodeGenerator
class. - Set the barcode’s text and type in the constructor of Barcode generátor.
- Utilize the
CaptionAbove
orCaptionBelow
properties to configure the caption. - Save the barcode using the
BarcodeGenerator.Save(String)
method.
Tu je vzorka kódu pre pridanie nápisu na čárový kód pomocou C# Barcode Generator:

Záver
In this article, you learned how to programmatically generate barcodes using C#. You also explored how to customize their appearance and add captions. For more detailed information, visit the Aspose.BarCode Plugin dokumentácia to enhance your barcode generation capabilities with .NET Core Barcode Generator options. Additionally, explore how to generate barcode in C# windows application and utilize other features like the C# Barcode Scanner API and C# Barcode Generator Open Source for comprehensive barcode solutions.