Generate Barcode using C#

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 Аппоз.BarCode Plugins.

Таблица контента

C# Barcode Generator API - бесплатно скачать

Aspose.BarCode для библиотеки .NET является комплексным API, предназначенным для создания и сканирования баркода, что делает его идеальным C# Free Barcode Generator. Он позволяет создавать и читать различные символы баркода, в том числе:

  • Код 128
  • Кодекс 11
  • Кодекс 39
  • КР
  • Матрица данных
  • Эйн 13
  • Эйн 8
  • ITF 14
  • ПДФ 417
  • многое больше.

You can Скачать API бесплатно, or install it directly in your .NET application using НУГЕТ for a C# Barcode Generator NuGet Free solution:

PM> Install-Package Aspose.Barcode

Как генерировать баркод с помощью C#

Создание баркода с помощью плагина Aspose является простым и эффективным.Следуйте следующим шагам для создания баркода с помощью C#, используя Barcode Generator C# Source Code:

Вот шаблон кода, демонстрирующий, как генерировать баркод с помощью C# Barcode Generator:

Generate Barcode in C#

Как генерировать QR баркод с помощью C#

Создание QR баркода выполняет аналогичный процесс с генерированием других типов баркода.

  • Instantiate the BarcodeGenerator class, specifying the barcode type as Изображения.QR.
  • Generate the barcode using the BarcodeGenerator.Save(String) method.

Вот шаблон кода для создания QR баркода с использованием Barcode Application в C# .NET:

Generate QR Barcode in C#

Настройка появления баркода в C#

Приспособление внешнего вида баркода легко с помощью плагина Aspose. Вы можете модифицировать его шрифт, передний цвет, цвет фонов и цвет текста.

  • Instantiate the BarcodeGenerator class.
  • Adjust the barcode’s appearance using the BarcodeGenerator.Parameters properties, such as BarcodeGenerator.Parameters.BackColor.
  • Generate the barcode using the BarcodeGenerator.Save(String).

Here’s a code sample for generating a customized Aztec barcode using Barcode Generator C#:

Generate Aztec Barcode in C#

Добавьте Caption в баркоды с помощью C#

Инкорпорирование капций в баркоды может обеспечить дополнительный контекст, а плагин Aspose делает этот процесс бессмысленным.

  • Instantiate the BarcodeGenerator class.
  • Set the barcode’s text and type in the constructor of Barcode генератор.
  • Utilize the CaptionAbove or CaptionBelow properties to configure the caption.
  • Save the barcode using the BarcodeGenerator.Save(String) method.

Вот шаблон кода для добавления шрифта в баркод с использованием C# Barcode Generator:

Generate Barcode with Caption in C#

Заключение

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 Документация 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.

More in this category