| data | Yes | What to encode, e.g. 590123412345 (the check digit is added if missing; spaces, hyphens and a leading spreadsheet apostrophe are ignored in numbers), A-10442 for Code 128 (encoded exactly, plain ASCII), (01)09501101530003(17)261231(10)LOT42 for GS1-128 (parentheses recommended; unbracketed AI strings are also read), 0-306-40615-2 for ISBN. | |
| add_on | No | Optional 2- or 5-digit add-on printed to the right of an EAN-13, UPC-A, UPC-E, EAN-8, ISBN or ISSN barcode, e.g. 51299 (book price code for 12.99 USD) or 07 (magazine issue). | |
| show_text | No | Print the human-readable digits/text under the bars, e.g. true (default). | |
| symbology | Yes | Barcode type, e.g. ean13. ean13 (EAN-13 retail, 12 or 13 digits), ean8 (7 or 8 digits), upca (UPC-A, 11 or 12 digits), upce (UPC-E: 6-8 digits, or a 12-digit UPC-A to compress), code128 (any ASCII text such as SKUs; automatic code set A/B/C switching), gs1_128 (GS1-128 with Application Identifiers), code39 (A-Z, 0-9, - . space $ / + %), itf14 (GTIN-14 carton code with bearer bars, 13 or 14 digits), isbn (book barcode from an ISBN-10 or ISBN-13), issn (magazine barcode from an ISSN). | |
| printer_dpi | No | Resolution of the label printer, e.g. 203 or 300. Bar widths are snapped to whole printer dots so every bar prints exactly; the PNG is rendered at this resolution. | |
| bar_height_mm | No | Bar height in millimetres, e.g. 15. Defaults to the GS1 height for retail codes, 31.75 mm for ITF-14 and GS1-128, else the larger of 12.7 mm and 15% of the symbol length. | |
| x_dimension_mm | No | Width of the narrowest bar in millimetres, e.g. 0.33. Overrides magnification. Defaults: 0.33 (EAN/UPC, Code 128, Code 39), 0.495 (GS1-128), 0.635 (ITF-14). | |
| fix_check_digit | No | If the number already has a check digit and it is wrong, replace it with the correct one instead of returning an error, e.g. true. Default false. | |
| code39_check_digit | No | Code 39 only: append the optional modulo-43 check character, e.g. true. Default false. | |
| magnification_percent | No | EAN/UPC/ISBN/ISSN and ITF-14 size as a percentage of the GS1 nominal size, e.g. 100 (EAN-13 = 37.29 x 25.93 mm; GS1 retail range 80-200). | |