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 Aplikacja: Barcode Plugins.

Tabela zawartości

C# Barcode Generator API - Darmowe pobranie

Aspose.BarCode dla biblioteki .NET to kompleksowa API zaprojektowana do generowania i skanowania kodów rzęs, co czyni go idealnym C# Free Barcode Generator*.

  • Kod 128
  • Kod 11
  • Kod 39
  • QR
  • Matryca danych
  • Jan 13
  • Jan 8
  • ITF 14
  • Książka PDF 417
  • wiele więcej.

You can Pobierz API za darmo, or install it directly in your .NET application using Nujka for a C# Barcode Generator NuGet Free solution:

PM> Install-Package Aspose.Barcode

Jak generować kod paska za pomocą C#

Generowanie kodu paska za pomocą programu Aspose Plugin jest proste i efektywne. postępuj zgodnie z następującymi krokami, aby utworzyć kod paska za pomocą C#, wykorzystując kod źródłowy generatora paska C#**:

Oto próbka kodu, która pokazuje, jak wytworzyć kod paska przy użyciu C# Barcode Generator:

Generate Barcode in C#

Jak generować kod paska QR za pomocą C#

Tworzenie kodu paska QR następuje podobny proces do generowania innych typów kodów paska.

  • Instantiate the BarcodeGenerator class, specifying the barcode type as Podręcznik .QR.
  • Generate the barcode using the BarcodeGenerator.Save(String) method.

Oto próbka kodu do generowania kodu paska QR za pomocą Aplikacji kodów pasków w C# .NET:

Generate QR Barcode in C#

Dostosuj wygląd kodu paska w C#

Dostosowanie pojawienia się kodu paska jest łatwe przy użyciu programu Aspose Plugin. Możesz zmienić jego czcionkę, kolor przedni, kolor tła i kolor tekstu.

  • 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#:

Generate Aztec Barcode in C#

Dodaj Caption do kodów barowych za pomocą C#

Włączanie kapsułek do kodów barowych może zapewnić dodatkowy kontekst, a wtyczka Aspose sprawia, że proces ten jest bezprzewodowy.

  • Instantiate the BarcodeGenerator class.
  • Set the barcode’s text and type in the constructor of Barcode generator.
  • Utilize the CaptionAbove or CaptionBelow properties to configure the caption.
  • Save the barcode using the BarcodeGenerator.Save(String) method.

Oto próbka kodu, aby dodać napis do kodu paska za pomocą C# Barcode Generator:

Generate Barcode with Caption in C#

konkluzja

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 dokumentacja 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