- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
C#. UPC-A Generator Data Encoding Tutorialsample source code to input valid data and generate linear UPC-A images in C# .NET
UPC-A, also known as Universal Product Code version A , UPC Code, UPC Symbol, GTIN-12, GS1-12, UCC-12, is the most common and well-known barcode symbology in the United States. UPC-A Structure
W: the width of UPC-A barcode image, including quiet zones. Please see BarCodeWidth.UPC-A Image Height Related Settings H: the barcode height of UPC-A. Please see BarCodeHeight. Setting UPC-A Barcode Size in C#
C# UPC-A barcode provides a set of barcode size settings to specify you UPC-A barcodes. Please download C# barcode component and install, copy those following code to your Visual Studio: Linear barcode = new Linear();Modify your UPC-A barcodes by setting those following properties: UOM
UOM is short for Unit of Measure, which is the unit of measure for all size related settings in the library. C# UPC-A barcode provides 3 options: Pixel, Cm, and Inch. The default is Pixel. barcode.UOM = UnitOfMeasure.PIXEL; Supplement Space
SupplementSpace is the space between the UPC-A barcodes and supplemental data. The default is 15 (float). barcode.SupplementSpace = 19; Supplement HeightSupplementHeight is the height of the supplement data bar module. It is the N percent of Y (module height of UPC-A barcode bar). The default is 0.8f (float). barcode.SupplementSpace = 0.5f; Barcode Width & Height
BarcodeWidth is the UPC-A barcode image width. The default in C# UPC-A barcode is 0 (float). barcode.BarcodeWidth = 0;Notice: if your setting is smaller than the barcode required minimum width and height, the library will automatically reset to barcode minimum width. Or you may enable AutoResize to automatically resize your UPC-A barcode image. Barcode Margin
BarcodeMargin is the white zone around the UPC-A symbol. C# UPC-A barcode provides 4 options: Left Margin, Right Margin, Top Margin and Bottom Margin. The default of these four margins are 0 (float). barcode.TopMargin = 3; X & Y
X is the width of barcode bar module (narrow bar). The default in C# UPC-A barcode is 1 (float). barcode.X = 2; Text Margin & Font
TextMargin is the space between barcode and barcode data text. The default in C# UPC-A barcode is 6 (float). barcode.TextMargin = 9; |