Enum TwoDComponentType
Enum TwoDComponentType
Namespace: Aspose.BarCode.Generation
Assembly: Aspose.BarCode.dll (25.1.0)
Typ komponentu 2D
public enum TwoDComponentType
Pola
Auto = 0
Automatyczny wybór typu komponentu 2D
CC_A = 1
Typ komponentu 2D CC-A. Jest to wariant strukturalny MicroPDF417
CC_B = 2
Typ komponentu 2D CC-B. Jest to symbol MicroPDF417.
CC_C = 3
Typ komponentu 2D CC-C. Jest to symbol PDF417.
Przykłady
Ten przykład pokazuje, jak utworzyć i zapisać obraz kodu kreskowego GS1 Composite Bar.
Zauważ, że tekst kodu 1D i tekst kodu 2D są oddzielone symbolem ‘/’
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;
// Współczynnik proporcji komponentu 2D
generator.Parameters.Barcode.Pdf417.AspectRatio = 3;
// Wymiar X komponentów 1D i 2D
generator.Parameters.Barcode.XDimension.Pixels = 3;
// Wysokość komponentu 1D
generator.Parameters.Barcode.BarHeight.Pixels = 100;
generator.Save("test.png");
}