.NET용 2D 바코드 작성기
2D Barcode Writer에 대한 소개 .NET
2D Barcode Writer for .NET은 개발자가 자신의 .Net 응용 프로그램에서 3D 바코드를 생성 할 수있는 플러그인입니다.이 가이드는 사용 가능한 기능에 대한 개요를 제공하고 코드 예를 사용하여 일반적인 작업을 수행하는 방법을 설명합니다.
지원되는 2D 바코드 유형
2D Barcode Writer for .NET은 다음을 포함하여 여러 종류의 3D barcode를 지원합니다.
- QR 코드
- 데이터 매트릭스
- PDF417 조회수
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 바코드 사용자 정의
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);