Enum TwoDComponentType
Enum TwoDComponentType
Namespace: Aspose.BarCode.Generation
Assembly: Aspose.BarCode.dll (25.1.0)
ประเภทของส่วนประกอบ 2D
public enum TwoDComponentType
ฟิลด์
Auto = 0
เลือกประเภทของส่วนประกอบ 2D โดยอัตโนมัติ
CC_A = 1
ประเภท CC-A ของส่วนประกอบ 2D มันเป็นรูปแบบโครงสร้างของ MicroPDF417
CC_B = 2
ประเภท CC-B ของส่วนประกอบ 2D มันเป็นสัญลักษณ์ MicroPDF417.
CC_C = 3
ประเภท CC-C ของส่วนประกอบ 2D มันเป็นสัญลักษณ์ PDF417.
ตัวอย่าง
ตัวอย่างนี้แสดงวิธีการสร้างและบันทึกภาพบาร์โค้ด GS1 Composite Bar
โปรดทราบว่า codetext 1D และ codetext 2D แยกจากกันด้วยสัญลักษณ์ ‘/’
var codetext = "(01)03212345678906/(21)A1B2C3D4E5F6G7H8";
using (var generator = new BarcodeGenerator(EncodeTypes.GS1CompositeBar, codetext))
{
generator.Parameters.Barcode.GS1CompositeBar.LinearComponentType = EncodeTypes.GS1Code128;
generator.Parameters.Barcode.GS1CompositeBar.TwoDComponentType = TwoDComponentType.CC_A;
// อัตราส่วนของส่วนประกอบ 2D
generator.Parameters.Barcode.Pdf417.AspectRatio = 3;
// ขนาด X ของส่วนประกอบ 1D และ 2D
generator.Parameters.Barcode.XDimension.Pixels = 3;
// ความสูงของส่วนประกอบ 1D
generator.Parameters.Barcode.BarHeight.Pixels = 100;
generator.Save("test.png");
}