BarcodeImage
BarcodeImage["string",format]
generates a barcode image of "string" in the specified format.
BarcodeImage["string",format,size]
attempts to generate a barcode image of the specified size.
Details


- BarcodeImage always returns a binary image.
- Possible values for size include:
-
width approximate width, height is computed automatically {width,height} approximate width and height - If the specified size does not provide sufficient resolution for generating the barcode, an image of a larger size is generated. »
- The following 1D barcode formats can be used for format:
-
"UPC" UPC-A 12 numerical digits "EAN8" EAN-8 8 numerical digits "EAN13" EAN-13 13 numerical digits "Code39" Code 39 up to 80 characters of uppercase letters, numeric digits, special characters -, ., $, /, +, %, and space "Code128" Code 128 up to 80 ASCII characters "ITF" ITF up to 80 numerical digits of an even length "Codabar" Codabar numerical digits and special characters :, /, +, . - The following 2D barcode formats can be used for format:
-
"Aztec" Aztec code 3000 ASCII or 3748 numeric "DataMatrix" Data Matrix code 2335 ASCII or 3116 numeric "QR" QR (error correction "L") 2953 ASCII, 7089 numeric or 4296 alphanumeric {"QR",lev} QR (error correction lev) ASCII characters (less storage for higher levels) "PDF417" PDF417 (error correction 2) up to 1781 ASCII characters - The error correction level lev can be "L", "M", "Q", or "H".
Examples
open allclose allBasic Examples (3)
Scope (12)
Generate a UPC barcode from a 12-digit numerical code:
With an 11-digit code, the checksum is automatically computed:
With a 7-digit code, the checksum is automatically computed:
Generate an EAN-13 barcode from a 13-digit numerical code:
With a 12-digit code, the checksum is automatically computed:
Generate a Code 39 barcode from numerical digits:
Generate a Code 39 barcode from an alphanumeric string:
Applications (3)
Properties & Relations (4)
Use BarcodeRecognize to convert a barcode image to a string:
Compute the UPC-A checksum from an 11-digit code:
The checksum is automatically computed if not provided and used as the 12th digit:
Compute the EAN-8 checksum for a 7-digit code:
BarcodeImage automatically computes the checksum:
Compute the EAN-13 checksum for a 12-digit code:
BarcodeImage automatically computes the checksum:
Possible Issues (5)
In generating 1D barcode images, the width specification might be ignored:
The resulting width is the minimum required to represent the barcode image:
In generating 2D barcode images, the size specification might be ignored:
Different formats have requirements for the input string, including length and supported characters:




For formats with a checksum character, an incorrect checksum is replaced with the correct value:

PDF417 barcodes can only be generated with error correction level of 2:

Text
Wolfram Research (2014), BarcodeImage, Wolfram Language function, https://reference.wolfram.com/language/ref/BarcodeImage.html.
CMS
Wolfram Language. 2014. "BarcodeImage." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BarcodeImage.html.
APA
Wolfram Language. (2014). BarcodeImage. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BarcodeImage.html