2D バーコードライター for .NET
2D Barcode Writer for .NET の導入
The 2D Barcode Writer for .NET is a plugin that allows developers to generate 3D barcodes in their .net applications. このガイドは、利用可能な機能の概要を提供し、コードの例を使用して一般的なタスクを実行する方法を説明します。
サポートされている 2D バーコードタイプ
.NET の 2D Barcode Writer は、2D バーコードのいくつかのタイプをサポートしています。
- QRコード
- データマトリックス
- PDF417
2Dバーコードの作成
2Dバーコードを作成するには、 BarcodeGenerator
このクラスは、バーコードをカスタマイズできるいくつかの特性を提供します。 CodeText
, EncodeTypes
そして、 Resolution
.
using Aspose.BarCode;
// Create a new instance of BarcodeGenerator
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR, "https://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 バーコード
2Dバーコードの外観をカスタマイズするには、さまざまな特性を使用して BarcodeGenerator
例えば、バーコードの背景色を変更することができます。
using Aspose.BarCode;
// Create a new instance of BarcodeGenerator
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR, "https://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);