2D Barcode Writer за .NET
Въведение в 2D Barcode Writer за .NET
2D Barcode Writer за .NET е плъгин, който позволява на разработчиците да генерират 3D баркодове в техните приложения. Този ръководство предоставя преглед на наличните функции и обяснява как да изпълняват общи задачи с помощта на кодове примери.
Поддържани 2D Barcode типове
2D Barcode Writer за .NET поддържа няколко вида 2Д баркодове, включително:
- QR код
- Матрица на данни
- ПДФ417
Създаване на 2D баркодове
To generate a 2D barcode, you can use the BarcodeGenerator
class. This class provides several properties that allow you to customize the barcode, such as CodeText
, EncodeTypes
, and Resolution
.
using Aspose.BarCode;
// Create a new instance of BarcodeGenerator
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR, "http://www.example.com");
// Set the resolution of the barcode
generator.Parameters۔Resolution = 300;
// Save the barcode to an image file
generator.Save("qr_code.png", BarCodeImageFormat.Png);
Разработване на 2D Barcode
You can customize the appearance of the 2D barcode by using various properties provided by the BarcodeGenerator
class. For example, you can change the background color of the barcode.
using Aspose.BarCode;
// Create a new instance of BarcodeGenerator
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR, "http://www.example.com");
// Set the background color of the barcode
generator.Parameters.BackColor = Color.Blue;
// Set the auto-size mode
generator.Parameters.AutoSizeMode = AutoSizeMode.Nearest;
// Save the barcode to an image file
generator.Save("qr_code.png", BarCodeImageFormat.Png);