generates a barcode image of "string" in the specified format.

attempts to generate a barcode image of the specified size.


  • BarcodeImage always returns a binary image.
  • Possible values for size include:
  • widthapproximate 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-A12 numerical digits
    "EAN8"EAN-88 numerical digits
    "EAN13"EAN-1313 numerical digits
    "Code39"Code 39up to 80 characters of uppercase letters, numeric digits, special characters -, ., $, /, +, %, and space
    "Code128"Code 128up to 80 ASCII characters
    "ITF"ITFup to 80 numerical digits of an even length
    "Codabar"Codabarnumerical digits and special characters :, /, +, .
  • The following 2D barcode formats can be used for format:
  • "Aztec"Aztec code3000 ASCII or 3748 numeric
    "DataMatrix"Data Matrix code2335 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".
Introduced in 2014