Manual - UPC Extension 5

Introduction

UPC extension with 5 digits must be joined with a UPC or EAN code in order to add relevant information about the product to sell. The reader should read in both barcodes in one shot and return the UPC and then the extension code.

Usually, the encoded information is the suggested price of the selected product.
If the first number is 0, the price xx.xx is expressed in British Pounds. If the first number is a 5, the price is expressed in U.S Dollars.
Some special codes exist:

  • 90000 : No suggested retail price
  • 99991 : The item is a complementary of another one. Usually free
  • 99990 : Used by National Association of College Stores to mark "used book"
  • 90001 to 98999 : Internal purposes for some publishers

This class inherits the BakeryBarcode1D class.

Example

Methods

BakeryUpcext5's Methods

  • No specific methods for this class.

BakeryBarcode1D's Methods

BakeryBarcode's Methods

Code Example

S
import { BakeryColor, BakeryFont } from '@barcode-bakery/barcode-react';
import { BakeryUpcext5 } from '@barcode-bakery/barcode-react/1d';

export default function Home() {
  const font = new BakeryFont('Arial', 18);
  const colorBlack = new BakeryColor(0, 0, 0);
  const colorWhite = new BakeryColor(255, 255, 255);

  return <BakeryUpcext5
    scale={2}
    thickness={30}
    foregroundColor={colorBlack}
    backgroundColor={colorWhite}
    font={font}
    text='55499'
  >;
}

Method explanations

  • thickness={thickness} — Specifies the thickness of the barcode
    Description
    The thickness of the barcode in pixels. This is the vertical size.
  • label={label} — Sets the label
    Description
    The text label will be written below or above the barcode depending on the barcode. You can write the special value BakeryBarcode1D.Label if you would like your text to be chosen automatically. It will be the value passed to the text={} method.
  • font={font} — Sets the text font for the label
    Description
    The value of the argument must be an instance of the BakeryFontFile class.
  • displayChecksum={display} — Specifies the checksum to be added to the label
    Description
    Setting true will append the checksum to the default label.
    The default value is true.
  • text={text} — Analyzes a text message to draw afterwards
    Description
    The data you pass to the text argument must be supported by the type of barcode you use.
    Check each barcode's introduction section to obtain more information on how to use this method within each symbology.
  • scale={scale} — Sets the scale of the barcode
    Description
    The barcode will be x times bigger. Then a pixel will be x by x for its size.
  • foregroundColor={color} — Sets the color of the bars
    Description
    Sets the color of the bars of the barcode. By default, the color is black. This argument can be a BakeryColor class or any other argument that BakeryColor can accept in its constructor.
  • backgroundColor={color} — Sets the color of the spaces
    Description
    Sets the color of the spaces of the barcode. By default, the color is white. This argument can be a BakeryColor class or any other argument that BakeryColor can accept in its constructor.
  • offsetX={value} — Sets the X offset
    Description
    Specifies the X offset of the barcode in pixels multiplied by the scale.
  • offsetY={value} — Sets the Y offset
    Description
    Specifies the Y offset of the barcode in pixels multiplied by the scale.