VB.NET UPC-A Generator Library SDK
Integration & Developer Guide of UPC-A Barcode Generation in VB.NET Class

Generate barcode UPC-A images in Visual Basic .NET with complete sample VB.NET source code

  • Generate, create UPC-A in Visual Basic .NET applications
  • Easy to install & integrate barcode UPC-A generation library SDK into VB.NET developments
  • Generate over 30 linear, 2d barcode images in VB.NET including VB.NET QR Code, VB.NET Data Matrix, VB.NET EAN, VB.NET UPC-E, VB.NET Code 39
  • Generate UPC-A images in VB.NET class library
  • Create barcode UPC-A in VB.NET ASP.NET web application, webform, webpage
  • Print UPC-A barcode in VB.NET Windows Form project
  • Draw UPC-A in SQL Server Reporting Services (SSRS) & Crystal Reports for .NET projects
  • Easy to encode UPC-A images to jpeg, gif, png, tiff, bitmap files in VB.NET program

How to create, print UPC-A barcode in VB.NET Windows Forms, WPF application?

  1. Download VB.NET UPC-A Barcode Generator SDK
  2. Install Visual Basic library to generate UPC-A in VB.NET Windows Projects
  3. Step by Step Tutorial






VB.NET UPC-A Generator Introduction

Top
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.
Using VB.NET UPC-A Generator to create UPC-A barcodes in VB.NET program is a simple and easy job. VB.NET UPC-A Generator control is easy to install with a single .NET Barcode generation control. It is easy to generate UPC-A barcodes in VB.NET class with detailed VB.NET UPC-A settings document and complete demo for UPC-A generation in VB.NET provided in this article.

UPC-A Generators

OnBarcode provides several UPC-A Generator components and software, including UPC-A Generator, C# UPC-A, .NET UPC-A, Java UPC-A, ASP.NET UPC-A.




Create UPC-A Barcodes in VB.NET

Top
Here we will show how to quickly generate a UPC-A linear (1D) barcode, a standard retail product identification symbology using VB.NET codes.

The following vb.net codes initialize a linear barcode generator, sets the type to UPC-A, assigns valid 11-digit (or 12 digits with check digit) input data, and exports the printed barcode as a PNG image file.

Dim barcode = New Linear()
barcode.Type = BarcodeType.UPCA
barcode.Data = "01234567891"
barcode.drawBarcode("C://Output//vb-net-upc-a-how-to-create.png")





Creating UPC-A with add-on symbol

UPC-A may include a 2-digit or 5-digit add-on symbol. The following vb.net codes explain how to create a UPC-A barcode with add-on symbol included.

  • Use property Type to set the barcode symbology to UPC-A with a 2-digit add-on (BarcodeType.UPCA_2), a standard format for magazines, books, and retail supplements.
  • Use property Data to assign the 11-digit (or 12-digit with check digit) primary UPC-A data, which the library automatically validates and appends a check digit to.
  • Use property SupData to set the 2-digit supplemental add-on data used for additional product metadata such as issue numbers.
  • Use property SupSpace to define a 50-pixel horizontal space between the main UPC-A barcode and the supplemental add-on.
  • Use property SupHeight to set the height ratio of the supplemental add-on barcode to 60% (0.6) of the main barcode height.
Dim barcode = New Linear()
barcode.Type = BarcodeType.UPCA_2
barcode.Data = "01234567891"
barcode.SupData = "12"
barcode.SupSpace = 50
barcode.SupHeight = 0.6
barcode.drawBarcode("C://Output//vb-net-upc-a-addon-2-digits.png")





Print, customize UPC-A Barcode with specified dimension size in VB.NET

Top
Use property BarcodeWidth and BarcodeHeight to customize the printed UPC-A barcode dimension size.

Dim barcode = New Linear()
barcode.Type = BarcodeType.UPCA
barcode.Data = "01234567891"
barcode.BarcodeWidth = 300
barcode.BarcodeHeight = 200
barcode.drawBarcode("C://Output//vb-net-upc-a-size.png")





Generate, customize UPC-A Barcode using VB.NET

Top

Customize UPC-A text font style

You can customize and configure Code 128 barcode text margin and OCR-B font using the following VB.NET code.

  • Use property TextMargin to set a vertical margin of 30 pixels between the barcode bars and the human-readable text below it. This property improves visual clarity and layout spacing in VB.NE Windows Forms and WPF desktop application UI rendering.
  • Use property TextFont to create and customize a GS1 industry-standard OCR-B font with size 12 and regular style for the barcode's human-readable text.

    OCR-B is the GS1 standard recommended font for UPC-A barcodes, ensuring optimal readability and compliance in .NET desktop applications.

Dim barcode = New Linear()
barcode.Type = BarcodeType.UPCA
barcode.Data = "01234567891"
barcode.TextMargin = 30
barcode.TextFont = New Font("OCR-B", 12.0F, FontStyle.Regular)
barcode.drawBarcode("C://Output//vb-net-upc-a-text-style.png")





UPC-A quiet zone indicator

This single-line VB.NET code disables the visual quiet zone indicator for UPC-A barcodes in Windows Forms and WPF desktop applications. It removes the optional marker lines that show the boundaries of the required quiet zone (blank margin) around the UPC-A barcode, producing a cleaner visual output.

barcode.ShowQuietZoneIndicator = False





Customize UPC-A lead, trail digit style

This VB.NET code snippet generates a UPC-A linear barcode with advanced customization of the leading and trailing digits for VB.NET Windows Forms and WPF desktop applications.

The following VB.NET example source code initializes a linear barcode generator, sets UPC-A type and data, configures spacing, vertical offset, and size ratio for the system digits, then exports the UPC-A barcode to a PNG image.

  • Use property UPCEANLeadDigitSpace to set a horizontal space of 10 pixels between the leading digit (system digit) and the main barcode body.
  • Use property UPCEANTrailDigitSpace to define a horizontal space of 10 pixels between the main barcode and the trailing digit (check digit) on the right.
  • Use property UPCEANLeadDigitYShift to move the leading digit 20 pixels upward (negative Y value) relative to its default position.
  • Use property UPCEANTrailDigitYShift to shift the trailing digit 20 pixels upward to match the vertical position of the leading digit.
  • Use property UPCEANLeadTrailDigitSizeRatio to set the font size of the lead and trail digits to 60% (0.6) of the main barcode text size.

Dim barcode = New Linear()
barcode.Type = BarcodeType.UPCA
barcode.Data = "01234567891"
barcode.UPCEANLeadDigitSpace = 10
barcode.UPCEANTrailDigitSpace = 10
barcode.UPCEANLeadDigitYShift = -20
barcode.UPCEANTrailDigitYShift = -20
barcode.UPCEANLeadTrailDigitSizeRatio = 0.6F
barcode.drawBarcode("C://Output//vb-net-upc-a-lead-trail-digits-space.png")













Common Asked Questions

What is a GTIN-12 UPC-A barcode?

GTIN-12 is a 12 digits Global Trade Item Number. It is usually encoded in UPC-A barcode. The 12 digits Global Trade Item Number includes 11 digits of data message, and one digit of check sum digit. Using VB.NET Barcode Library, you can input 12-digit GS1 numeric data or 13-digits data with checksum digit in class UPCA in VB.NET source code.

What is the minimum & maximum size for a UPC-A barcode?

  • The Minimum X-dimension for the UPC-A barcode is 0.0104 inches.
  • The Maximum X-dimension for the UPC-A barcode is 0.0260 inches
You can apply the UPC-A barcode X-dimension through methodsetX() in VB.NET barcode class UPCA using VB.NET Barcode Generator library.

What is the difference between EAN-13 and UPC-A?

UPC-A Format barcodes have traditionally been used in the North America (USA and Canada), whereas EAN-13 format barcodes have been used throughout the rest of the world. VB.NET Barcode Generator SDK supports both UPC-A and EAN-13 with add-on symbol barcode generation in Visual Basic .NET class library, console, WinForms, WPF windows applications.

What is the difference between UPC-A and UPC-E?

Both of UPC-A and UPC-E are UPC barcode. UPC-A is a 12-digit barcode, and UPC-E is a compressed UPC-A with 6 digits code. The UPC-E will be used in limited space for a barcode. You can create both UPC-A and UPC-E images in VB.NET projects using VB.NET barcode library.




































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.