IDAutomation.UPCA

jdubs edited this page Oct 23, 2016 · 1 revision

Table of Contents

Overview

The UPCA barcode option is specified in IDAutomation Barcode Fonts, Components and Applications to create a UPC-A barcode, which is a symbology that is most commonly used to encode 12 digits of the GTIN.

The 12th digit of UPCA is a MOD10 check digit that is re-calculated in all IDAutomation barcode products to reduce scanning errors, and may be omitted when encoding data. A 2 or 5 digit add-on may be created by appending the numbers to the end of the 11 or 12 digits that make up the primary symbol. Therefore, a number string of 11, 12, 13, 14, 16 or 17 digits (with or without a check digit) must make up the DataToEncode.

Reference

http://www.idautomation.com/barcode/UPC-A.html

Parameters

SpecName (constant) The variable containing the input to be converted. Proper UPC font must be applied in the template.

ErrorMessage (multiple | optional) The error message to return when any error occurs.

Source Code

public static void UPCA(string SpecName, object ErrorMessage)
{
	Actions.Break();
	try
	{
		string code = Actions.Variable(SpecName).Value;
		Actions.Variable(SpecName).Value = CallFontEncoder("UPCa", new object[] { code });
	}
	catch (Exception ex)
	{
		throw new Actions.Four51ActionsException(ex.Message, (string)ErrorMessage);
	}
}

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.