KA.Barcode for .NET WinForms
How to Print UPC-A in .NET WinForms with Valid Data
Complete UPC-A source code to generate, print UPC-A images using Barcode Generator for .NET Control
  • Full integration into Microsoft Visual Studio and other development environments
  • Linear UPC-A, UPC-A+2, UPC-A+5 barcode generation in .NET WinForms
  • Programmatically create and save UPC-A barcode graphics using C#, VB.NET class library
  • Draw and export high-quality .NET WinForms EAN-13, VB.NET Intelligent Mail, .NET WinForms EAN-8 barcodes as you wish
  • Encode ASCII characters 48 to 57 inclusive, in accordance with ISO 646 for 1D UPC-A
  • Completely compatible with latest GS1 specification for valid image UPC-A output
  • Draw C# PDF417, ITF-14 .NET WinForms, ITF-14 Java, ISBN Excel & other C# QR Code in .NET IDEs
  • Automatically compute and add one mandatory check digit for UPC-A
  • Generating, printing 1D UPC-A with a 2-digit or 5-digit add-on symbol
  • Support thermal printer to ensure best image printout even on low-resolution printers
If you want to easily generate, create an UPC-A, UPC-A with two-digit add-on, UPC-A with five-digit add-on, KeepAutomation Barcode Generator Plugin for .NET WinForms is your best choice, because it is developed to generate best quality UPC-A and other linear, 2-dimensional barcodes in .NET.
Microsoft Visual Studio 2005; Visual C#.NET. 1D & ....
With full integration into MS .NET Framework & many Windows systems; Easy to create 1D, matrix number barcode return images in Visual C#.NET,...
Generate Barcode in VB.NET. Mature barcode component dll to ....
NET. How to Generate Barcodes in RDLC Using C#.NET. ....
more>
This page is a tutorial for valid UPCA data encoding in .NET Winforms, explained with detailed C#, Visual Basic .NET demo code. For more barcoding options, please check here:
Linear UPC-A Introduction
UPC-A, is also named as Universal Product Code version A, UPC-A+2, UPC-A Supplement 2 (Two-digit Add-On), UPC-A+5, UPC-A Supplement 5 (Five-digit Add-On), UPC Bar Code, UPC Symbol, GTIN-12, GS1-12.

Valid Data

  • Numeric digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Valid Length

  • UPC-A barcode can encode 12 digits, including the last checksum digit, which will be automatically added by KA.
Download KA.Barcode for .NET Suite to create barcodes in .NET now! Install KA.Barcode for .NET Suite SDK Library. Please unzip the downloaded trial...
A professional barcode generator control SDK library, KA.Barcode for .NET Suite include complete and strong functionality for high-quality QR Code...
Streaming high-quality QR Codes and save locally in Png ....
more>
UPC-A Data Encoding in KA.Barcode Generator for .NET WinForms

Install UPC-A Barcode Generator into .NET Project

  1. 1.
  2. 2.
    Add Reference: Add "KeepAutomation.Barcode.Window.dll" to your .NET WinForms project reference.

Numeric Data for UPC-A

A UPC-A barcode can encode 12 numeric digits. However, KA.Barcode Generator for .NET Suite will automatically calculate and add the last checksum digit as specified in the GS1 barcode standard, so you can simply input 11 numeric digits as data.
using KeepAutomation.Barcode.Bean;
BarCode upca= new BarCode();
upca.Symbology = KeepAutomation.Barcode.Symbology.UPCA;
upca.CodeToEncode = "11223344556";
upca.X = 2;
upca.generateBarcodeToImageFile("C:/upca_csharp.png");
Dim upca As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

upca.Symbology = KeepAutomation.Barcode.Symbology. UPCA
upca.CodeToEncode = "11223344556"
upca.X = 2
upca.generateBarcodeToImageFile("C://upca _vb.png")

Numeric Data for UPC-A+2

A two-digit add-on symbol can help you encode more information into an UPC-A barcode image. Copy the sample code assembly below to your projects to convert numeric text data into a UPC-A+2 bar code to insert in WinForms.
using KeepAutomation.Barcode.Bean;
BarCode upca= new BarCode();
upca.Symbology = KeepAutomation.Barcode.Symbology.UPCASup2;
upca.CodeToEncode = "11223344556";
upca.SupplementCode = "22";
upca.X = 2;
upca.generateBarcodeToImageFile("C:/upca_add2.png");
Dim upca As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

upca.Symbology = KeepAutomation.Barcode.Symbology. UPCASup2
upca.CodeToEncode = "11223344556"
upca.SupplementCode = "22"
upca.X = 2
upca.generateBarcodeToImageFile("C://upca_add2.png")

Numeric Data for UPC-A+5

To encode some extra information into an UPC-A barcode, you might need to add a five-digit add-on symbol for an UPC-A barcodes. Copy the following sample codings procedure to your programs to transform numeric text value into an UPC-A+5 bar code.
using KeepAutomation.Barcode.Bean;
BarCode upca= new BarCode();
upca.Symbology = KeepAutomation.Barcode.Symbology.UPCASup5;
upca.CodeToEncode = "11223344556";
upca.SupplementCode = "55555";
upca.X = 2;
upca.generateBarcodeToImageFile("C:/upca_add5.png");
Dim upca As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

upca.Symbology = KeepAutomation.Barcode.Symbology. UPCASup5
upca.CodeToEncode = "11223344556"
upca.SupplementCode = "55555"
upca.X = 2
upca.generateBarcodeToImageFile("C://upca_add5.png")

UPC-A Data Encoding with Drag & Drop BarcodeControl

  1. 1.
    In "Choose Toolbox Items" form, click button "Browse...", and select KeepAutomation.Barcode.Windows.dll.
  2. 2.
    Now a BarCodeControl is added into your toolbox.
  3. 3.
    Drag and drop the BarCodeControl into the Forms and a Codabar image is generated.
  4. 4.
    Find Symbology" in the property panel and select "UPCA", "UPCASup2" or "UPCASup5".
  5. 5.
    Then input numeric characters in "CodeToEncode" blanket.
  6. 6.
    For UPC-A with add-on symbol, input the add-on data into the SupplementCode blanket, like "12".
  7. 7.
    Now an UPC-A barcode with valid data is successfully created!