- Add new symbologies BARCODE_EAN8, BARCODE_EAN_2ADDON,

`BARCODE_EAN_5ADDON`, `BARCODE_EAN13`, `BARCODE_EAN8_CC` and
  `BARCODE_EAN13_CC` as replacements for `BARCODE_EANX`,
  `BARCODE_EANX_CHK` and `BARCODE_EANX_CC` and use in CLI/GUI
  (`BARCODE_EANX` etc. marked as legacy)
- For EAN/UPC accept space as alternative add-on separator to '+',
  and accept GTIN-13 format with & without 2-digit or 5-digit
  add-on (no separator)
- Buffer length of member `errtxt` in `zint_symbol` extended 100
  -> 160 (will be sufficient for eventual translation and
  gs1-syntax-dictionary errors hopefully)
- UPC-E: warn if first digit of 7 (or 8 if check digit given) not
  '0' or '1'
- manual: update for new EAN symbologies and mention EANX now
  legacy but still supported
This commit is contained in:
gitlost 2025-04-16 22:26:43 +01:00
parent 9265abd9e1
commit 3592edd64e
51 changed files with 6995 additions and 4949 deletions

View file

@ -1,10 +1,12 @@
Version 2.15.0.9 (dev) not released yet (2025-04-11)
Version 2.15.0.9 (dev) not released yet (2025-04-16)
====================================================
**Incompatible changes**
------------------------
- New `raw_segs` & `raw_seg_count` fields in `symbol` for use with new output
option `BARCODE_RAW_TEXT`
- Buffer length of member `errtxt` in `zint_symbol` extended 100 -> 160
(client buffers may need checking/extending)
- New `raw_segs` & `raw_seg_count` fields in `zint_symbol` for use with new
output option `BARCODE_RAW_TEXT`
- Symbol structure members `option_1`, `option_2` and `option_3` now updated
after `ZBarcode_Encode()` and variants are called, and there are three new
methods in the Qt Backend to access to them
@ -12,6 +14,7 @@ Version 2.15.0.9 (dev) not released yet (2025-04-11)
- GS1 Composites now return warning if CC type upped from requested due to size
of composite data
- EAN-8 with add-on now returns warning that it's non-standard
- UPC-E now returns warning if first digit of 7 digits ignored (not '0' or '1')
Changes
-------
@ -32,6 +35,14 @@ Changes
- DOTCODE: now pads rows if given number of columns instead of failing if rows
below min (5)
- EAN-8 + add-on: warn as non-compliant
- UPC-E: warn if first digit of 7 (or 8 if check digit given) not '0' or '1'
- Extend `errtxt` buffer 100 -> 160
- Add new symbologies `BARCODE_EAN8`, `BARCODE_EAN_2ADDON`,
`BARCODE_EAN_5ADDON`, `BARCODE_EAN13`, `BARCODE_EAN8_CC` and
`BARCODE_EAN13_CC` as replacements for `BARCODE_EANX`, `BARCODE_EANX_CHK` and
`BARCODE_EANX_CC` and use in CLI/GUI (`BARCODE_EANX` etc. marked as legacy)
- For EAN/UPC accept space as alternative add-on separator to '+', and accept
GTIN-13 format with & without 2-digit or 5-digit add-on (no separator)
Bugs
----
@ -60,7 +71,7 @@ Version 2.15.0 (2025-02-25)
**Incompatible changes**
------------------------
- New `text_length` field in `symbol`
- New `text_length` field in `zint_symbol`
Changes
-------
@ -83,7 +94,7 @@ Version 2.14.0 (2025-02-05)
**Incompatible changes**
------------------------
- New `memfile` & `memfile_size` fields in `symbol` for use with new output
- New `memfile` & `memfile_size` fields in `zint_symbol` for use with new output
option `BARCODE_MEMORY_FILE`
- Buffer length of member `text` (HRT) in `zint_symbol` extended 200 -> 256
(client buffers may need checking/extending)

View file

@ -566,18 +566,37 @@ INTERNAL int is_bindable(const int symbology) {
return 0;
}
/* Whether `symbology` is EAN/UPC */
INTERNAL int is_upcean(const int symbology) {
/* Whether `symbology` is EAN */
INTERNAL int is_ean(const int symbology) {
switch (symbology) {
case BARCODE_EAN8:
case BARCODE_EAN_2ADDON:
case BARCODE_EAN_5ADDON:
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EAN13:
case BARCODE_ISBNX:
case BARCODE_EANX_CC:
case BARCODE_EAN8_CC:
case BARCODE_EAN13_CC:
return 1;
break;
}
return 0;
}
/* Whether `symbology` is EAN/UPC */
INTERNAL int is_upcean(const int symbology) {
if (is_ean(symbology)) {
return 1;
}
switch (symbology) {
case BARCODE_UPCA:
case BARCODE_UPCA_CHK:
case BARCODE_UPCE:
case BARCODE_UPCE_CHK:
case BARCODE_ISBNX:
case BARCODE_EANX_CC:
case BARCODE_UPCA_CC:
case BARCODE_UPCE_CC:
return 1;
@ -589,7 +608,9 @@ INTERNAL int is_upcean(const int symbology) {
/* Whether `symbology` can have composite 2D component data */
INTERNAL int is_composite(const int symbology) {
return symbology >= BARCODE_EANX_CC && symbology <= BARCODE_DBAR_EXPSTK_CC;
/* Note if change this must change "backend_qt/qzint.cpp" `takesGS1AIData()` also */
return (symbology >= BARCODE_EANX_CC && symbology <= BARCODE_DBAR_EXPSTK_CC)
|| symbology == BARCODE_EAN8_CC || symbology == BARCODE_EAN13_CC;
}
/* Whether `symbology` is a matrix design renderable as dots */

View file

@ -271,6 +271,9 @@ INTERNAL int errtxt_adj(const int error_number, struct zint_symbol *symbol, cons
/* Whether `symbology` can have row binding */
INTERNAL int is_bindable(const int symbology);
/* Whether `symbology` is EAN */
INTERNAL int is_ean(const int symbology);
/* Whether `symbology` is EAN/UPC */
INTERNAL int is_upcean(const int symbology);

View file

@ -1164,6 +1164,8 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
switch (symbol->symbology) {
/* Determine width of 2D component according to ISO/IEC 24723 Table 1 */
case BARCODE_EANX_CC:
case BARCODE_EAN8_CC:
case BARCODE_EAN13_CC:
if (pri_len < 20) {
int padded_pri_len;
int with_addon;
@ -1173,7 +1175,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
return errtxt_adj(ZINT_ERROR_TOO_LONG, symbol, "%1$s%2$s", " (linear component)");
}
padded_pri_len = (int) ustrlen(padded_pri);
if (padded_pri_len <= 7) { /* EAN-8 */
if (padded_pri_len <= 7 || symbol->symbology == BARCODE_EAN8_CC) { /* EAN-8 */
cc_width = 3;
} else {
switch (padded_pri_len) {
@ -1283,6 +1285,8 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
switch (symbol->symbology) {
case BARCODE_EANX_CC:
case BARCODE_EAN8_CC:
case BARCODE_EAN13_CC:
error_number = eanx_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
break;
case BARCODE_GS1_128_CC:
@ -1331,6 +1335,8 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
switch (symbol->symbology) {
/* Determine horizontal alignment (according to section 12.3) */
case BARCODE_EANX_CC:
case BARCODE_EAN8_CC:
case BARCODE_EAN13_CC:
switch (linear->text_length) { /* Use zero-padded length */
case 8: /* EAN-8 */
case 11: /* EAN-8 + 2 */

View file

@ -564,8 +564,8 @@ typedef int (*barcode_seg_func_t)(struct zint_symbol *, struct zint_seg[], const
static const barcode_src_func_t barcode_src_funcs[BARCODE_LAST + 1] = {
NULL, code11, c25standard, c25inter, c25iata, /*0-4*/
NULL, c25logic, c25ind, code39, excode39, /*5-9*/
NULL, NULL, NULL, eanx, eanx, /*10-14*/
NULL, gs1_128, NULL, codabar, NULL, /*15-19*/
eanx, eanx, eanx, eanx, eanx, /*10-14*/
eanx, gs1_128, NULL, codabar, NULL, /*15-19*/
code128, dpleit, dpident, code16k, code49, /*20-24*/
code93, NULL, NULL, flat, dbar_omn, /*25-29*/
dbar_ltd, dbar_exp, telepen, NULL, eanx, /*30-34*/
@ -591,7 +591,7 @@ static const barcode_src_func_t barcode_src_funcs[BARCODE_LAST + 1] = {
composite, composite, composite, composite, composite, /*130-134*/
composite, composite, composite, composite, composite, /*135-139*/
channel, NULL, NULL, upnqr, NULL, /*140-144*/
NULL, bc412, dxfilmedge, /*145-147*/
NULL, bc412, dxfilmedge, composite, composite, /*145-149*/
};
#define LIB_SEG_FUNCS_START 55
@ -616,7 +616,7 @@ static const barcode_seg_func_t barcode_seg_funcs[BARCODE_LAST + 1 - LIB_SEG_FUN
NULL, NULL, NULL, NULL, NULL, /*130-134*/
NULL, NULL, NULL, NULL, NULL, /*135-139*/
NULL, codeone, gridmatrix, NULL, ultra, /*140-144*/
rmqr, NULL, NULL, /*145-147*/
rmqr, NULL, NULL, NULL, NULL, /*145-149*/
};
static int reduced_charset(struct zint_symbol *symbol, struct zint_seg segs[], const int seg_count);
@ -922,8 +922,8 @@ static int map_invalid_symbology(struct zint_symbol *symbol) {
static const unsigned char id_map[LIB_ID_MAP_LAST + 1] = {
0, 0, 0, 0, 0, /*0-4*/
BARCODE_C25STANDARD, 0, 0, 0, 0, /*5-9*/
BARCODE_EANX, BARCODE_EANX, BARCODE_EANX, 0, 0, /*10-14*/
BARCODE_EANX, 0, BARCODE_UPCA, 0, BARCODE_CODABAR, /*15-19*/
0, 0, 0, 0, 0, /*10-14*/
0, 0, BARCODE_UPCA, 0, BARCODE_CODABAR, /*15-19*/
0, 0, 0, 0, 0, /*20-24*/
0, BARCODE_UPCA, 0, 0, 0, /*25-29*/
0, 0, 0, BARCODE_GS1_128, 0, /*30-34*/
@ -1633,8 +1633,8 @@ int ZBarcode_BarcodeName(int symbol_id, char name[32]) {
static const char *const names[] = {
"", "CODE11", "C25STANDARD", "C25INTER", "C25IATA", /*0-4*/
"", "C25LOGIC", "C25IND", "CODE39", "EXCODE39", /*5-9*/
"", "", "", "EANX", "EANX_CHK", /*10-14*/
"", "GS1_128", "", "CODABAR", "", /*15-19*/
"EAN8", "EAN_2ADDON", "EAN_5ADDON", "EANX", "EANX_CHK", /*10-14*/
"EAN13", "GS1_128", "", "CODABAR", "", /*15-19*/
"CODE128", "DPLEIT", "DPIDENT", "CODE16K", "CODE49", /*20-24*/
"CODE93", "", "", "FLAT", "DBAR_OMN", /*25-29*/
"DBAR_LTD", "DBAR_EXP", "TELEPEN", "", "UPCA", /*30-34*/
@ -1660,7 +1660,7 @@ int ZBarcode_BarcodeName(int symbol_id, char name[32]) {
"EANX_CC", "GS1_128_CC", "DBAR_OMN_CC", "DBAR_LTD_CC", "DBAR_EXP_CC", /*130-134*/
"UPCA_CC", "UPCE_CC", "DBAR_STK_CC", "DBAR_OMNSTK_CC", "DBAR_EXPSTK_CC", /*135-139*/
"CHANNEL", "CODEONE", "GRIDMATRIX", "UPNQR", "ULTRA", /*140-144*/
"RMQR", "BC412", "DXFILMEDGE", /*145-147*/
"RMQR", "BC412", "DXFILMEDGE", "EAN8_CC", "EAN13_CC", /*145-149*/
};
name[0] = '\0';
@ -1721,9 +1721,15 @@ unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag) {
case BARCODE_CODABLOCKF:
case BARCODE_HIBC_BLOCKF:
case BARCODE_ITF14:
case BARCODE_EAN8:
case BARCODE_EAN8_CC:
case BARCODE_EAN_2ADDON:
case BARCODE_EAN_5ADDON:
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EANX_CC:
case BARCODE_EAN13:
case BARCODE_EAN13_CC:
case BARCODE_ISBNX:
case BARCODE_UPCA:
case BARCODE_UPCA_CHK:
@ -1875,9 +1881,15 @@ float ZBarcode_Default_Xdim(int symbol_id) {
break;
/* GS1 (excluding GS1-128, ITF-14, GS1 QRCODE & GS1 DATAMATRIX - see default) */
case BARCODE_EAN8:
case BARCODE_EAN8_CC:
case BARCODE_EAN_2ADDON:
case BARCODE_EAN_5ADDON:
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EANX_CC:
case BARCODE_EAN13:
case BARCODE_EAN13_CC:
case BARCODE_ISBNX:
case BARCODE_UPCA:
case BARCODE_UPCA_CHK:

View file

@ -262,10 +262,16 @@ static int out_quiet_zones(const struct zint_symbol *symbol, const int hide_text
}
done = 1;
break;
case BARCODE_EAN8:
case BARCODE_EAN_2ADDON:
case BARCODE_EAN_5ADDON:
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EANX_CC:
case BARCODE_EAN13:
case BARCODE_ISBNX:
case BARCODE_EANX_CC:
case BARCODE_EAN8_CC:
case BARCODE_EAN13_CC:
/* GS1 General Specifications 21.0.1 Section 5.2.3.4 */
switch (symbol->text_length) {
case 13: /* EAN-13/ISBN */
@ -774,8 +780,7 @@ INTERNAL int out_process_upcean(const struct zint_symbol *symbol, const int comp
upceanflag = 0;
main_width = symbol->width;
if ((symbol->symbology == BARCODE_EANX) || (symbol->symbology == BARCODE_EANX_CHK)
|| (symbol->symbology == BARCODE_EANX_CC) || (symbol->symbology == BARCODE_ISBNX)) {
if (is_ean(symbol->symbology)) {
switch (symbol->text_length) {
case 13: /* EAN-13 */
case 16: /* EAN-13 + EAN-2 */

View file

@ -391,7 +391,7 @@ static void test_errtxt(const testCtx *const p_ctx) {
/* 8*/ { 0, ZINT_ERROR_TOO_LONG, 9999, "Data too long", "9999: Data too long" },
/* 9*/ { 0, ZINT_ERROR_TOO_LONG, 10000, "Data too long", "9999: Data too long" },
/* 10*/ { 0, ZINT_ERROR_TOO_LONG, 99999, "Data too long", "9999: Data too long" },
/* 11*/ { 1, ZINT_ERROR_TOO_LONG, 10000, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234", "9999: 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123" },
/* 11*/ { 1, ZINT_ERROR_TOO_LONG, 10000, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234", "9999: 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123" },
};
const int data_size = ARRAY_SIZE(data);
int i, ret;
@ -454,9 +454,9 @@ static void test_errtxtf(const testCtx *const p_ctx) {
/* 19*/ { 0, ZINT_ERROR_TOO_LONG, 123, "%9$d %8$d %7$d %6$d %5$.3s %4$d %3$d %2$d %1$d", 9, 4, "5max", -1, -1, "123: 2100000009 2100000008 2100000007 2100000006 5ma 4 3333 2100000002 2100000001" },
/* 20*/ { 0, ZINT_ERROR_TOO_LONG, 123, "%1$d %2$d %3$d %5$.*4$s %6$d %7$d %8$d %9$d", 9, 4, "45max", -1, -1, "123: 2100000001 2100000002 3333 45ma 2100000006 2100000007 2100000008 2100000009" },
/* 21*/ { 0, ZINT_ERROR_TOO_LONG, 123, "%%%d %d %d %d %s %d %d %d %d", 9, 4, "5max", -1, -1, "123: %2100000001 2100000002 3333 4 5max 2100000006 2100000007 2100000008 2100000009" },
/* 22*/ { 0, ZINT_ERROR_TOO_LONG, 123, "%%%d%%%% %%d %d%%%%%09d %d%% %%%s %d %d %%%% %d%d%%", 9, 4, "5max", -1, -1, "123: %2100000001%% %d 2100000002%%000003333 4% %5max 2100000006 2100000007 %% 21000000082100000009%" },
/* 23*/ { 1, ZINT_ERROR_TOO_LONG, 123, "%%%d%%%% %%d %d%%%%%09d %d%% %%%s %d %d %%%% %d %d%%", 9, 4, "5max", -1, -1, "123: %2100000001%% %d 2100000002%%000003333 4% %5max 2100000006 2100000007 %% 2100000008 2100000009" }, /* Truncated */
/* 24*/ { 1, ZINT_ERROR_TOO_LONG, 123, "%%%d%%%% %%d %d%%%%%09d %d%% %%%s %d %d %%%% %d %d ", 9, 4, "5max", -1, -1, "123: %2100000001%% %d 2100000002%%000003333 4% %5max 2100000006 2100000007 %% 2100000008 2100000009" }, /* Truncated */
/* 22*/ { 0, ZINT_ERROR_TOO_LONG, 123, "%%%d%%%% %%d %d%%%%%069d %d%% %%%s %d %d %%%% %d%d%%", 9, 4, "5max", -1, -1, "123: %2100000001%% %d 2100000002%%000000000000000000000000000000000000000000000000000000000000000003333 4% %5max 2100000006 2100000007 %% 21000000082100000009%" },
/* 23*/ { 1, ZINT_ERROR_TOO_LONG, 123, "%%%d%%%% %%d %d%%%%%069d %d%% %%%s %d %d %%%% %d %d%%", 9, 4, "5max", -1, -1, "123: %2100000001%% %d 2100000002%%000000000000000000000000000000000000000000000000000000000000000003333 4% %5max 2100000006 2100000007 %% 2100000008 2100000009" }, /* Truncated */
/* 24*/ { 1, ZINT_ERROR_TOO_LONG, 123, "%%%d%%%% %%d %d%%%%%069d %d%% %%%s %d %d %%%% %d %d ", 9, 4, "5max", -1, -1, "123: %2100000001%% %d 2100000002%%000000000000000000000000000000000000000000000000000000000000000003333 4% %5max 2100000006 2100000007 %% 2100000008 2100000009" }, /* Truncated */
/* 25*/ { 0, ZINT_ERROR_TOO_LONG, 123, "%d %011d %05d %05d %s %d %d %d %014d", 9, 4, "5max", -1, -1, "123: 2100000001 02100000002 03333 00004 5max 2100000006 2100000007 2100000008 00002100000009" },
/* 26*/ { 0, ZINT_ERROR_TOO_LONG, 123, "", 0, 0, NULL, 0, -1, "123: " },
/* 27*/ { 0, ZINT_ERROR_TOO_LONG, -1, "Gosh '%c' wow", 1, 1, NULL, -1, -1, "Gosh '\001' wow" },
@ -503,7 +503,7 @@ static void test_errtxtf(const testCtx *const p_ctx) {
/* 68*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh '%.*s' wow", 2, 4, "gee", -1, -1, "123: Gosh 'gee' wow" },
/* 69*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh '%.*s' wow", 2, 999, "gee", -1, -1, "123: Gosh 'gee' wow" },
/* 70*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh '%2$.*1$s' wow", 2, 2, "gee", -1, -1, "123: Gosh 'ge' wow" },
/* 71*/ { 1, ZINT_ERROR_TOO_LONG, 123, "Gosh %s wow", 1, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456", -1, -1, "123: Gosh 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456 wo" },
/* 71*/ { 1, ZINT_ERROR_TOO_LONG, 123, "Gosh %s wow", 1, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456", -1, -1, "123: Gosh 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 wo" },
/* 72*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh '%c' %g wow", 2, 'A', NULL, -12.1f, -1, "123: Gosh 'A' -12.1 wow" },
/* 73*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh %d %s wow", 2, 123456789, "cor", -1, -1, "123: Gosh 123456789 cor wow" },
/* 74*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh %1$d %2$s wow", 2, 123456789, "cor", -1, -1, "123: Gosh 123456789 cor wow" },
@ -514,7 +514,7 @@ static void test_errtxtf(const testCtx *const p_ctx) {
/* 79*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh %2$.2s %1$d wow second %2$s", 2, 123456789, "cor", -1, -1, "123: Gosh co 123456789 wow second co" }, /* TODO: incompat: last length trumps but each should be respected */
/* 80*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh %2$.2s %1$d wow second %2$.1s", 2, 123456789, "cor", -1, -1, "123: Gosh c 123456789 wow second c" }, /* TODO: incompat: last length trumps */
/* 81*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh %2$.1s %1$d wow second %2$.2s", 2, 123456789, "cor", -1, -1, "123: Gosh co 123456789 wow second co" }, /* TODO: incompat: last length trumps */
/* 82*/ { 1, ZINT_ERROR_TOO_LONG, -1, "%1$s %1$s", 1, -1, "12345678901234567890123456789012345678901234567890", -1, -1, "12345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678" },
/* 82*/ { 1, ZINT_ERROR_TOO_LONG, -1, "%1$s %1$s", 1, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", -1, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678" },
/* 83*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh %d %s %g wow", 3, 1, "cor", 3, -1, "123: Gosh 1 cor 3 wow" },
/* 84*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh %1$d %2$s %3$g wow", 3, 1, "cor", 3, -1, "123: Gosh 1 cor 3 wow" },
/* 85*/ { 0, ZINT_ERROR_TOO_LONG, 123, "Gosh %3$g %2$s %1$d wow", 3, 1, "cor", 3, -1, "123: Gosh 3 cor 1 wow" },

File diff suppressed because it is too large Load diff

View file

@ -65,35 +65,44 @@ static void test_print(const testCtx *const p_ctx) {
/* 8*/ { BARCODE_ULTRA, -1, -1, -1, 5, -1, -1, -1, 0.0f, 0, "147AD0", "FC9630", 0, "123", "ultracode_fg_bg.emf", "" },
/* 9*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX, 2, 2, -1, -1, 0.0f, 0, "FF0000", "0000FF", 0, "123", "ultracode_fg_bg_box2.emf", "" },
/* 10*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX, 2, 2, -1, -1, 0.0f, 600.0f / 25.4f, "FF0000", "0000FF", 0, "123", "ultracode_fg_bg_box2_600dpi.emf", "" },
/* 11*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.emf", "" },
/* 12*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.emf", "" },
/* 13*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2.emf", "" },
/* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2_gws.emf", "" },
/* 15*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "210987654321+54321", "ean13_5addon_#185.emf", "#185 Byte count, font data, HeaderExtension1/2" },
/* 16*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.emf", "" },
/* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.emf", "" },
/* 18*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.emf", "" },
/* 19*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2.5f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_sc2_5.emf", "" },
/* 20*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.emf", "" },
/* 21*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.emf", "" },
/* 22*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 1, 2, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf", "" },
/* 23*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon.emf", "" },
/* 24*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_gws.emf", "" },
/* 25*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 150.f / 25.4f, "", "", 0, "0123456+12", "upce_2addon_150dpi.emf", "" },
/* 26*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_small_bold.emf", "" },
/* 27*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_small_bold_gws.emf", "" },
/* 28*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "123", "itf14_bold.emf", "" },
/* 29*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 600.f / 25.4f, "", "", 0, "123", "itf14_bold_600dpi.emf", "" },
/* 30*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 90, "123", "code39_rotate_90.emf", "" },
/* 31*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 300.f / 25.4f, "", "", 90, "123", "code39_rotate_90_300dpi.emf", "" },
/* 32*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 180, "123", "code39_rotate_180.emf", "" },
/* 33*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 270, "123", "code39_rotate_270.emf", "" },
/* 34*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185.emf", "#185 Maxicode scaling" },
/* 35*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 150.f / 25.4f, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185_150dpi.emf", "#185 Maxicode scaling" },
/* 36*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 600.f / 25.4f, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185_600dpi.emf", "#185 Maxicode scaling" },
/* 37*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg.emf", "" },
/* 38*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 300.0f, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg_300dpi.emf", "" },
/* 39*/ { BARCODE_UPU_S10, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0.0f, 0, "71,0,40,44", "FFFFFF00", 0, "QA47312482PS", "upu_s10_cmyk_nobg.emf", "" },
/* 11*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.emf", "" },
/* 12*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.emf", "" },
/* 13*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.emf", "" },
/* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.emf", "" },
/* 15*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2.emf", "" },
/* 16*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2.emf", "" },
/* 17*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2_gws.emf", "" },
/* 18*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2_gws.emf", "" },
/* 19*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "210987654321+54321", "ean13_5addon_#185.emf", "#185 Byte count, font data, HeaderExtension1/2" },
/* 20*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "210987654321+54321", "ean13_5addon_#185.emf", "#185 Byte count, font data, HeaderExtension1/2" },
/* 21*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.emf", "" },
/* 22*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.emf", "" },
/* 23*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.emf", "" },
/* 24*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.emf", "" },
/* 25*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.emf", "" },
/* 26*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.emf", "" },
/* 27*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2.5f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_sc2_5.emf", "" },
/* 28*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2.5f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_sc2_5.emf", "" },
/* 29*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.emf", "" },
/* 30*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.emf", "" },
/* 31*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 1, 2, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf", "" },
/* 32*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon.emf", "" },
/* 33*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_gws.emf", "" },
/* 34*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 150.f / 25.4f, "", "", 0, "0123456+12", "upce_2addon_150dpi.emf", "" },
/* 35*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_small_bold.emf", "" },
/* 36*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_small_bold_gws.emf", "" },
/* 37*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "123", "itf14_bold.emf", "" },
/* 38*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 600.f / 25.4f, "", "", 0, "123", "itf14_bold_600dpi.emf", "" },
/* 39*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 90, "123", "code39_rotate_90.emf", "" },
/* 40*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 300.f / 25.4f, "", "", 90, "123", "code39_rotate_90_300dpi.emf", "" },
/* 41*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 180, "123", "code39_rotate_180.emf", "" },
/* 42*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 270, "123", "code39_rotate_270.emf", "" },
/* 43*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185.emf", "#185 Maxicode scaling" },
/* 44*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 150.f / 25.4f, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185_150dpi.emf", "#185 Maxicode scaling" },
/* 45*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 600.f / 25.4f, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185_600dpi.emf", "#185 Maxicode scaling" },
/* 46*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg.emf", "" },
/* 47*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 300.0f, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg_300dpi.emf", "" },
/* 48*/ { BARCODE_UPU_S10, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0.0f, 0, "71,0,40,44", "FFFFFF00", 0, "QA47312482PS", "upu_s10_cmyk_nobg.emf", "" },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;

View file

@ -401,7 +401,7 @@ static void test_too_big(const testCtx *const p_ctx) {
length = (int) strlen(data);
ZBarcode_Reset(&symbol);
symbol.symbology = BARCODE_EANX;
symbol.symbology = BARCODE_EAN_5ADDON;
strcpy(symbol.outfile, "out.gif");
symbol.scale = 200.0f;
symbol.whitespace_width = 32;

File diff suppressed because it is too large Load diff

View file

@ -257,7 +257,7 @@ static void test_code128(const testCtx *const p_ctx) {
static void test_composite(const testCtx *const p_ctx) {
static const struct perf_item data[] = {
/* 0*/ { BARCODE_EANX_CC, -1, 1, -1, -1, "123456789012",
/* 0*/ { BARCODE_EAN13_CC, -1, 1, -1, -1, "123456789012",
"[91]123456789012345678901234567890123456789012345678901234",
0, 11, 99, "58 chars CC-A" },
/* 1*/ { BARCODE_UPCA_CC, -1, 2, -1, -1, "12345678901",
@ -669,16 +669,16 @@ static void test_microqr(const testCtx *const p_ctx) {
static void test_upcean(const testCtx *const p_ctx) {
static const struct perf_item data[] = {
/* 0*/ { BARCODE_EANX, -1, -1, -1, -1, "123456789012+12345", "", 0, 1, 149, "EAN-13 add-on 5" },
/* 1*/ { BARCODE_EANX, -1, -1, -1, -1, "123456789012", "", 0, 1, 95, "EAN-13 no add-on" },
/* 0*/ { BARCODE_EAN13, -1, -1, -1, -1, "123456789012+12345", "", 0, 1, 149, "EAN-13 add-on 5" },
/* 1*/ { BARCODE_EAN13, -1, -1, -1, -1, "123456789012", "", 0, 1, 95, "EAN-13 no add-on" },
/* 2*/ { BARCODE_UPCA, -1, -1, -1, -1, "12345678901+12345", "", 0, 1, 151, "UPC-A add-on 5" },
/* 3*/ { BARCODE_UPCA, -1, -1, -1, -1, "12345678901", "", 0, 1, 95, "UPC-A no add-on" },
/* 4*/ { BARCODE_EANX, -1, -1, -1, -1, "1234567+12345", "", 0, 1, 121, "EAN-8 add-on 5" },
/* 5*/ { BARCODE_EANX, -1, -1, -1, -1, "1234567", "", 0, 1, 67, "EAN-8 no add-on" },
/* 4*/ { BARCODE_EAN8, -1, -1, -1, -1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, 1, 121, "EAN-8 add-on 5" },
/* 5*/ { BARCODE_EAN8, -1, -1, -1, -1, "1234567", "", 0, 1, 67, "EAN-8 no add-on" },
/* 6*/ { BARCODE_UPCE, -1, -1, -1, -1, "1234567+12", "", 0, 1, 78, "UPC-E add-on 2" },
/* 7*/ { BARCODE_UPCE, -1, -1, -1, -1, "1234567", "", 0, 1, 51, "UPC-E no add-on" },
/* 8*/ { BARCODE_EANX, -1, -1, -1, -1, "12345", "", 0, 1, 47, "EAN-5" },
/* 9*/ { BARCODE_EANX, -1, -1, -1, -1, "12", "", 0, 1, 20, "EAN-2" },
/* 8*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, "12345", "", 0, 1, 47, "EAN 5-digit add-on" },
/* 9*/ { BARCODE_EAN_2ADDON, -1, -1, -1, -1, "12", "", 0, 1, 20, "EAN 2-digit add-on" },
};
const int data_size = ARRAY_SIZE(data);
const int default_iterations = 10 * 1000;

View file

@ -162,84 +162,113 @@ static void test_print(const testCtx *const p_ctx) {
/* 11*/ { BARCODE_CODABLOCKF, -1, 3, -1, -1, -1, -1, 3, -1, 0, 0, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_3rows.png", "" },
/* 12*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_hvwsp2.png", "" },
/* 13*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.png", "" },
/* 14*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1.png", "" },
/* 15*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1_gws.png", "" },
/* 16*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" },
/* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.png", "" },
/* 18*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" },
/* 19*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.png", "" },
/* 20*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.png", "" },
/* 21*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.png", "" },
/* 22*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" },
/* 23*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.png", "" },
/* 24*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" },
/* 25*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.png", "" },
/* 26*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" },
/* 27*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.png", "" },
/* 28*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5_gws.png", "" },
/* 29*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon.png", "" },
/* 30*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_gws.png", "" },
/* 31*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, 0, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_notext.png", "" },
/* 32*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_bind3.png", "" },
/* 33*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.png", "" },
/* 34*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4_gws.png", "" },
/* 35*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.png", "" },
/* 36*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.png", "" },
/* 37*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.png", "" },
/* 38*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", 0, "upce_2addon.png", "" },
/* 39*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", 0, "upce_2addon_gws.png", "" },
/* 40*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon.png", "" },
/* 41*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon_small.png", "" },
/* 42*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon_small_gws.png", "" },
/* 43*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.png", "" },
/* 44*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_gws.png", "" },
/* 45*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.png", "" },
/* 46*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_gws.png", "" },
/* 47*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.png", "" },
/* 48*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1.png", "" },
/* 49*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1_gws.png", "" },
/* 50*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.png", "" },
/* 51*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.png", "" },
/* 52*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.png", "" },
/* 53*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.png", "" },
/* 54*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.png", "" },
/* 55*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.png", "" },
/* 56*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.png", "" },
/* 57*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.png", "" },
/* 58*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5.png", "" },
/* 59*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_gws.png", "" },
/* 60*/ { BARCODE_EANX, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_bind2.png", "" },
/* 61*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2.png", "" },
/* 62*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_gws.png", "" },
/* 63*/ { BARCODE_EANX, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_box1.png", "" },
/* 64*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123", "", 0, "code39_small.png", "" },
/* 65*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3.5, { 0, 0, "" }, "", "", 1, "12345", "", 0, "postnet_zip.png", "300 dpi, using 1/43in X, 300 / 43 / 2 = ~3.5 scale" },
/* 66*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "CFCECDCC", 1, "12345", "", 0, "pdf417_bgalpha.png", "" },
/* 67*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "30313233", "", 1, "12345", "", 0, "pdf417_fgalpha.png", "" },
/* 68*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "20212244", "CFCECDCC", 1, "12345", "", 0, "pdf417_bgfgalpha.png", "" },
/* 69*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "FF000033", 1, "12345", "", 0, "ultra_bgfgalpha.png", "" },
/* 70*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "FF000033", 1, "12345", "", 0, "ultra_bgalpha.png", "" },
/* 71*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "FF0000", 1, "12345", "", 0, "ultra_fgalpha.png", "" },
/* 72*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "", 1, "12345", "", 0, "ultra_fgalpha_nobg.png", "" },
/* 73*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ultra_hvwsp1_box1.png", "" },
/* 74*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "00FF007F", "BABDB6", 1, "12345", "", 0, "ultra_fgalpha_hvwsp1_box1.png", "" },
/* 75*/ { BARCODE_ULTRA, -1, 1, BARCODE_BIND_TOP, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "00FF007F", "BABDB6", 1, "12345", "", 0, "ultra_fgalpha_hvwsp1_bindtop1.png", "" },
/* 76*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, { 0, 0, "" }, "", "", 1, "1", "", 0, "ultra_odd.png", "" },
/* 77*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.5.png", "6 dpmm, 150 dpi" },
/* 78*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BOX, 3, -1, -1, -1, -1, 0, 0.7, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.7_wsp3_box1.png", "8 dpmm, 200 dpi" },
/* 79*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.4, { 0, 0, "" }, "1111117F", "EEEEEEEE", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_1.4_bgfgalpha.png", "16 dpmm, 400 dpi" },
/* 80*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2.1, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_2.1.png", "24 dpmm, 600 dpi" },
/* 81*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_hvwsp1_box2.png", "" },
/* 82*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.png", "" },
/* 83*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, -1, -1, -1, -1, 0, 2.0, { 0, 0, "" }, "", "", 1, "1234", "", 0, "datamatrix_2.0_bind1_dotty.png", "" },
/* 84*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0, 2.0, { 0, 0, "" }, "", "", 1, "1234", "", 0, "datamatrix_2.0_hvwsp1_bind1_dotty.png", "" },
/* 85*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678909", "", 0, "dbar_ltd.png", "" },
/* 86*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5.0, 0, { 0, 0, "" }, "", "", 1, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.png", "" },
/* 87*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, 0, { 0, 0, "" }, "", "", 1, "12345678901234567890", "", 0, "imail_height7.75.png", "" },
/* 88*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 4, 7, "Z1.txt" }, "", "", 1, "3456", "", 0, "aztec_z1_seq4of7.png", "" },
/* 89*/ { BARCODE_PDF417, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, 5, 8, 16, 1.5, { 0, 0, "" }, "", "", 1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", "", ZINT_WARN_NONCOMPLIANT, "pdf417_#204.png", "Ticket #204 Blank line in PDF417" },
/* 90*/ { BARCODE_DPD, -1, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "008182709980000020028101276", "", 0, "dpd_compliant.png", "Now with bind top 3X default" },
/* 91*/ { BARCODE_CHANNEL, -1, -1, CMYK_COLOUR | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "100,85,0,20", "FFFFFF00", 1, "123", "", 0, "channel_cmyk_nobg.png", "" },
/* 14*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1.png", "" },
/* 15*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1.png", "" },
/* 16*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1_gws.png", "" },
/* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1_gws.png", "" },
/* 18*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" },
/* 19*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" },
/* 20*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.png", "" },
/* 21*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.png", "" },
/* 22*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" },
/* 23*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" },
/* 24*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.png", "" },
/* 25*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.png", "" },
/* 26*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.png", "" },
/* 27*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.png", "" },
/* 28*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.png", "" },
/* 29*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.png", "" },
/* 30*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" },
/* 31*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" },
/* 32*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.png", "" },
/* 33*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.png", "" },
/* 34*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" },
/* 35*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" },
/* 36*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.png", "" },
/* 37*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.png", "" },
/* 38*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" },
/* 39*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" },
/* 40*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.png", "" },
/* 41*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5_gws.png", "" },
/* 42*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon.png", "" },
/* 43*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_gws.png", "" },
/* 44*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, 0, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_notext.png", "" },
/* 45*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_bind3.png", "" },
/* 46*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.png", "" },
/* 47*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4_gws.png", "" },
/* 48*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.png", "" },
/* 49*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.png", "" },
/* 50*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.png", "" },
/* 51*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", 0, "upce_2addon.png", "" },
/* 52*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", 0, "upce_2addon_gws.png", "" },
/* 53*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon.png", "" },
/* 54*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon_small.png", "" },
/* 55*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon_small_gws.png", "" },
/* 56*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.png", "" },
/* 57*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_gws.png", "" },
/* 58*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.png", "" },
/* 59*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_gws.png", "" },
/* 60*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.png", "" },
/* 61*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1.png", "" },
/* 62*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1.png", "" },
/* 63*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1_gws.png", "" },
/* 64*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1_gws.png", "" },
/* 65*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.png", "" },
/* 66*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.png", "" },
/* 67*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.png", "" },
/* 68*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.png", "" },
/* 69*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.png", "" },
/* 70*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.png", "" },
/* 71*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.png", "" },
/* 72*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.png", "" },
/* 73*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.png", "" },
/* 74*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.png", "" },
/* 75*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.png", "" },
/* 76*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.png", "" },
/* 77*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.png", "" },
/* 78*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.png", "" },
/* 79*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.png", "" },
/* 80*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.png", "" },
/* 81*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5.png", "" },
/* 82*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5.png", "" },
/* 83*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_gws.png", "" },
/* 84*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_gws.png", "" },
/* 85*/ { BARCODE_EAN_5ADDON, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_bind2.png", "" },
/* 86*/ { BARCODE_EANX, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_bind2.png", "" },
/* 87*/ { BARCODE_EAN_2ADDON, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2.png", "" },
/* 88*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2.png", "" },
/* 89*/ { BARCODE_EAN_2ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_gws.png", "" },
/* 90*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_gws.png", "" },
/* 91*/ { BARCODE_EAN_2ADDON, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_box1.png", "" },
/* 92*/ { BARCODE_EANX, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_box1.png", "" },
/* 93*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "123", "", 0, "code39_small.png", "" },
/* 94*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3.5, { 0, 0, "" }, "", "", 1, "12345", "", 0, "postnet_zip.png", "300 dpi, using 1/43in X, 300 / 43 / 2 = ~3.5 scale" },
/* 95*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "CFCECDCC", 1, "12345", "", 0, "pdf417_bgalpha.png", "" },
/* 96*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "30313233", "", 1, "12345", "", 0, "pdf417_fgalpha.png", "" },
/* 97*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "20212244", "CFCECDCC", 1, "12345", "", 0, "pdf417_bgfgalpha.png", "" },
/* 98*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "FF000033", 1, "12345", "", 0, "ultra_bgfgalpha.png", "" },
/* 99*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "FF000033", 1, "12345", "", 0, "ultra_bgalpha.png", "" },
/*100*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "FF0000", 1, "12345", "", 0, "ultra_fgalpha.png", "" },
/*101*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "", 1, "12345", "", 0, "ultra_fgalpha_nobg.png", "" },
/*102*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ultra_hvwsp1_box1.png", "" },
/*103*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "00FF007F", "BABDB6", 1, "12345", "", 0, "ultra_fgalpha_hvwsp1_box1.png", "" },
/*104*/ { BARCODE_ULTRA, -1, 1, BARCODE_BIND_TOP, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "00FF007F", "BABDB6", 1, "12345", "", 0, "ultra_fgalpha_hvwsp1_bindtop1.png", "" },
/*105*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, { 0, 0, "" }, "", "", 1, "1", "", 0, "ultra_odd.png", "" },
/*106*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.5.png", "6 dpmm, 150 dpi" },
/*107*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BOX, 3, -1, -1, -1, -1, 0, 0.7, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.7_wsp3_box1.png", "8 dpmm, 200 dpi" },
/*108*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.4, { 0, 0, "" }, "1111117F", "EEEEEEEE", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_1.4_bgfgalpha.png", "16 dpmm, 400 dpi" },
/*109*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2.1, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_2.1.png", "24 dpmm, 600 dpi" },
/*110*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_hvwsp1_box2.png", "" },
/*111*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.png", "" },
/*112*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, -1, -1, -1, -1, 0, 2.0, { 0, 0, "" }, "", "", 1, "1234", "", 0, "datamatrix_2.0_bind1_dotty.png", "" },
/*113*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0, 2.0, { 0, 0, "" }, "", "", 1, "1234", "", 0, "datamatrix_2.0_hvwsp1_bind1_dotty.png", "" },
/*114*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "12345678909", "", 0, "dbar_ltd.png", "" },
/*115*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5.0, 0, { 0, 0, "" }, "", "", 1, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.png", "" },
/*116*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, 0, { 0, 0, "" }, "", "", 1, "12345678901234567890", "", 0, "imail_height7.75.png", "" },
/*117*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 4, 7, "Z1.txt" }, "", "", 1, "3456", "", 0, "aztec_z1_seq4of7.png", "" },
/*118*/ { BARCODE_PDF417, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, 5, 8, 16, 1.5, { 0, 0, "" }, "", "", 1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", "", ZINT_WARN_NONCOMPLIANT, "pdf417_#204.png", "Ticket #204 Blank line in PDF417" },
/*119*/ { BARCODE_DPD, -1, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", 1, "008182709980000020028101276", "", 0, "dpd_compliant.png", "Now with bind top 3X default" },
/*120*/ { BARCODE_CHANNEL, -1, -1, CMYK_COLOUR | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "100,85,0,20", "FFFFFF00", 1, "123", "", 0, "channel_cmyk_nobg.png", "" },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;

View file

@ -64,54 +64,63 @@ static void test_print(const testCtx *const p_ctx) {
/* 8*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "147AD0", "FC9630", 0, "123", "ultra_fg_bg.eps" },
/* 9*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 2, -1, -1, -1, 0, 0, "0000FF", "FF0000", 0, "123", "ultra_fg_bg_box.eps" },
/* 10*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX | CMYK_COLOUR, 1, 1, -1, -1, 0, 0, "0000FF", "FF0000", 0, "123", "ultra_fg_bg_box_cmyk.eps" },
/* 11*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.eps" },
/* 12*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.eps" },
/* 13*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" },
/* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2_gws.eps" },
/* 15*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.eps" },
/* 16*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.eps" },
/* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.eps" },
/* 18*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" },
/* 19*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" },
/* 20*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.eps" },
/* 21*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.eps" },
/* 22*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 1, 3, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps" },
/* 23*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 90, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_rotate_90.eps" },
/* 24*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 180, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps" },
/* 25*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 4, -1, -1, -1, 0, 0, "", "", 270, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps" },
/* 26*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon.eps" },
/* 27*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_gws.eps" },
/* 28*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "0123456+12345", "upce_5addon_rotate_270.eps" },
/* 29*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold.eps" },
/* 30*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold_gws.eps" },
/* 31*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "A\\B)ç(D", "code128_escape_latin1.eps" },
/* 32*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "1501234567890", "dbar_ltd_24724_fig7_bold.eps" },
/* 33*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.1, 0, "", "", 0, "12", "dotcode_0.1.eps" },
/* 34*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.08, 0, "", "", 0, "12", "dotcode_0.1.eps" },
/* 35*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" },
/* 36*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" },
/* 37*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" },
/* 38*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" },
/* 39*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" },
/* 40*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" },
/* 41*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" },
/* 42*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" },
/* 43*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" },
/* 44*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" },
/* 45*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" },
/* 46*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" },
/* 47*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" },
/* 48*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" },
/* 49*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" },
/* 50*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" },
/* 51*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" },
/* 52*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" },
/* 53*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" },
/* 54*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" },
/* 55*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" },
/* 56*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" },
/* 57*/ { BARCODE_MAXICODE, -1, -1, -1, 3, -1, -1, -1, 0, 0, "", "0000FF00", 180, "12", "maxicode_no_bg_hwsp3_rotate_180.eps" },
/* 58*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 2.4, 0, "", "", 90, "12", "maxicode_2.4_rotate_90.eps" },
/* 11*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.eps" },
/* 12*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.eps" },
/* 13*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.eps" },
/* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.eps" },
/* 15*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" },
/* 16*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" },
/* 17*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2_gws.eps" },
/* 18*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2_gws.eps" },
/* 19*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.eps" },
/* 20*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.eps" },
/* 21*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.eps" },
/* 22*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.eps" },
/* 23*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.eps" },
/* 24*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.eps" },
/* 25*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" },
/* 26*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" },
/* 27*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" },
/* 28*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" },
/* 29*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.eps" },
/* 30*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.eps" },
/* 31*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 1, 3, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps" },
/* 32*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 90, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_rotate_90.eps" },
/* 33*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 180, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps" },
/* 34*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 4, -1, -1, -1, 0, 0, "", "", 270, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps" },
/* 35*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon.eps" },
/* 36*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_gws.eps" },
/* 37*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "0123456+12345", "upce_5addon_rotate_270.eps" },
/* 38*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold.eps" },
/* 39*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold_gws.eps" },
/* 40*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "A\\B)ç(D", "code128_escape_latin1.eps" },
/* 41*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "1501234567890", "dbar_ltd_24724_fig7_bold.eps" },
/* 42*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.1, 0, "", "", 0, "12", "dotcode_0.1.eps" },
/* 43*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.08, 0, "", "", 0, "12", "dotcode_0.1.eps" },
/* 44*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" },
/* 45*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" },
/* 46*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" },
/* 47*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" },
/* 48*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" },
/* 49*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" },
/* 50*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" },
/* 51*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" },
/* 52*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" },
/* 53*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" },
/* 54*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" },
/* 55*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" },
/* 56*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" },
/* 57*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" },
/* 58*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" },
/* 59*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" },
/* 60*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" },
/* 61*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" },
/* 62*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" },
/* 63*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" },
/* 64*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" },
/* 65*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" },
/* 66*/ { BARCODE_MAXICODE, -1, -1, -1, 3, -1, -1, -1, 0, 0, "", "0000FF00", 180, "12", "maxicode_no_bg_hwsp3_rotate_180.eps" },
/* 67*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 2.4, 0, "", "", 90, "12", "maxicode_2.4_rotate_90.eps" },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;

File diff suppressed because it is too large Load diff

View file

@ -67,78 +67,108 @@ static void test_print(const testCtx *const p_ctx) {
/* 7*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_3rows.svg", "" },
/* 8*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, 3, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2.svg", "" },
/* 9*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.svg", "" },
/* 10*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1.svg", "" },
/* 11*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws.svg", "" },
/* 12*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws_embed.svg", "" },
/* 13*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg", "" },
/* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.svg", "" },
/* 15*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg", "" },
/* 16*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.svg", "" },
/* 17*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.svg", "" },
/* 18*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.svg", "" },
/* 19*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg", "" },
/* 20*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.svg", "" },
/* 21*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg", "" },
/* 22*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.svg", "" },
/* 23*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg", "" },
/* 24*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.svg", "" },
/* 25*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5_gws.svg", "" },
/* 26*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon.svg", "" },
/* 27*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_gws.svg", "" },
/* 28*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_bind3.svg", "" },
/* 29*/ { BARCODE_UPCA, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_small_bold.svg", "Note BOLD_TEXT ignored for UPC/EAN" },
/* 30*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.svg", "" },
/* 31*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4_gws.svg", "" },
/* 32*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.svg", "" },
/* 33*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_gws.svg", "" },
/* 34*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.svg", "" },
/* 35*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.svg", "" },
/* 36*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon.svg", "" },
/* 37*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon_gws.svg", "" },
/* 38*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon.svg", "" },
/* 39*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small.svg", "" },
/* 40*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small_gws.svg", "" },
/* 41*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, 0, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_notext.svg", "" },
/* 42*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.svg", "" },
/* 43*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_gws.svg", "" },
/* 44*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "FF0000EE", "0000FF11", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_fgbgalpha.svg", "" },
/* 45*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "FFFFFF00", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_nobg.svg", "" },
/* 46*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 270, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_rotate_270.svg", "" },
/* 47*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.svg", "" },
/* 48*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_gws.svg", "" },
/* 49*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.svg", "" },
/* 50*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1.svg", "" },
/* 51*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1_gws.svg", "" },
/* 52*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.svg", "" },
/* 53*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.svg", "" },
/* 54*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.svg", "" },
/* 55*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.svg", "" },
/* 56*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.svg", "" },
/* 57*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.svg", "" },
/* 58*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.svg", "" },
/* 59*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.svg", "" },
/* 60*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5.svg", "" },
/* 61*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_gws.svg", "" },
/* 62*/ { BARCODE_EANX, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_bind2.svg", "" },
/* 63*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2.svg", "" },
/* 64*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_gws.svg", "" },
/* 65*/ { BARCODE_EANX, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_box1.svg", "" },
/* 66*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "123", "", 0, "code39_small.svg", "" },
/* 67*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "postnet_zip.svg", "" },
/* 68*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_box2.svg", "" },
/* 69*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.svg", "" },
/* 70*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "121212DD", "EEEEEE22", 90, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_fgbg_rotate_90.svg", "" },
/* 71*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_vwsp1_bind1_dotty.svg", "" },
/* 72*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_hvwsp1_bind1_dotty.svg", "" },
/* 73*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345678909", "", 0, "dbar_ltd.svg", "" },
/* 74*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, "", "", 0, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.svg", "" },
/* 75*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, "", "", 0, "12345678901234567890", "", 0, "imail_height7.75.svg", "" },
/* 76*/ { BARCODE_ULTRA, -1, 3, BARCODE_BOX, 2, 2, -1, -1, -1, -1, 0, "FF0000", "0000FF", 0, "12345678901234567890", "", 0, "ultra_fgbg_hvwsp2_box3.svg", "" },
/* 77*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.4, "", "", 180, "A", "", 0, "telepen_height0.4_rotate_180.svg", "" },
/* 78*/ { BARCODE_CODE49, -1, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "FF11157F", "", 0, "A", "", 0, "code49_comph_fgalpha.svg", "" },
/* 79*/ { BARCODE_CODABLOCKF, -1, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 2, 0, "00000033", "FFFFFF66", 0, "1234567890123456789012345678901234", "", 0, "codablockf_comph_sep2_fgbgalpha.svg", "" },
/* 80*/ { BARCODE_DPD, -1, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "008182709980000020028101276", "", 0, "dpd_compliant.svg", "" },
/* 81*/ { BARCODE_CHANNEL, -1, -1, CMYK_COLOUR | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "100,85,0,20", "FFFFFF00", 0, "123", "", 0, "channel_cmyk_nobg.svg", "" },
/* 10*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1.svg", "" },
/* 11*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1.svg", "" },
/* 12*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws.svg", "" },
/* 13*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws.svg", "" },
/* 14*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws_embed.svg", "" },
/* 15*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws_embed.svg", "" },
/* 16*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg", "" },
/* 17*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg", "" },
/* 18*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.svg", "" },
/* 19*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.svg", "" },
/* 20*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg", "" },
/* 21*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg", "" },
/* 22*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.svg", "" },
/* 23*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.svg", "" },
/* 24*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.svg", "" },
/* 25*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.svg", "" },
/* 26*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.svg", "" },
/* 27*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.svg", "" },
/* 28*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg", "" },
/* 29*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg", "" },
/* 30*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.svg", "" },
/* 31*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.svg", "" },
/* 32*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg", "" },
/* 33*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg", "" },
/* 34*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.svg", "" },
/* 35*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.svg", "" },
/* 36*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg", "" },
/* 37*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg", "" },
/* 38*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.svg", "" },
/* 39*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5_gws.svg", "" },
/* 40*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon.svg", "" },
/* 41*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_gws.svg", "" },
/* 42*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_bind3.svg", "" },
/* 43*/ { BARCODE_UPCA, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_small_bold.svg", "Note BOLD_TEXT ignored for UPC/EAN" },
/* 44*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.svg", "" },
/* 45*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4_gws.svg", "" },
/* 46*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.svg", "" },
/* 47*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_gws.svg", "" },
/* 48*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.svg", "" },
/* 49*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.svg", "" },
/* 50*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon.svg", "" },
/* 51*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon_gws.svg", "" },
/* 52*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon.svg", "" },
/* 53*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small.svg", "" },
/* 54*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small_gws.svg", "" },
/* 55*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, 0, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_notext.svg", "" },
/* 56*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.svg", "" },
/* 57*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_gws.svg", "" },
/* 58*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "FF0000EE", "0000FF11", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_fgbgalpha.svg", "" },
/* 59*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "FFFFFF00", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_nobg.svg", "" },
/* 60*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 270, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_rotate_270.svg", "" },
/* 61*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.svg", "" },
/* 62*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_gws.svg", "" },
/* 63*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.svg", "" },
/* 64*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1.svg", "" },
/* 65*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1.svg", "" },
/* 66*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1_gws.svg", "" },
/* 67*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1_gws.svg", "" },
/* 68*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.svg", "" },
/* 69*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.svg", "" },
/* 70*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.svg", "" },
/* 71*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.svg", "" },
/* 72*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.svg", "" },
/* 73*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.svg", "" },
/* 74*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.svg", "" },
/* 75*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.svg", "" },
/* 76*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.svg", "" },
/* 77*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.svg", "" },
/* 78*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.svg", "" },
/* 79*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.svg", "" },
/* 80*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.svg", "" },
/* 81*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.svg", "" },
/* 82*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.svg", "" },
/* 83*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.svg", "" },
/* 84*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5.svg", "" },
/* 85*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5.svg", "" },
/* 86*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_gws.svg", "" },
/* 87*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_gws.svg", "" },
/* 88*/ { BARCODE_EAN_5ADDON, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_bind2.svg", "" },
/* 89*/ { BARCODE_EANX, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_bind2.svg", "" },
/* 90*/ { BARCODE_EAN_2ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2.svg", "" },
/* 91*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2.svg", "" },
/* 92*/ { BARCODE_EAN_2ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_gws.svg", "" },
/* 93*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_gws.svg", "" },
/* 94*/ { BARCODE_EAN_2ADDON, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_box1.svg", "" },
/* 95*/ { BARCODE_EANX, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_box1.svg", "" },
/* 96*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "123", "", 0, "code39_small.svg", "" },
/* 97*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "postnet_zip.svg", "" },
/* 98*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_box2.svg", "" },
/* 99*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.svg", "" },
/*100*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "121212DD", "EEEEEE22", 90, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_fgbg_rotate_90.svg", "" },
/*101*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_vwsp1_bind1_dotty.svg", "" },
/*102*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_hvwsp1_bind1_dotty.svg", "" },
/*103*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345678909", "", 0, "dbar_ltd.svg", "" },
/*104*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, "", "", 0, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.svg", "" },
/*105*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, "", "", 0, "12345678901234567890", "", 0, "imail_height7.75.svg", "" },
/*106*/ { BARCODE_ULTRA, -1, 3, BARCODE_BOX, 2, 2, -1, -1, -1, -1, 0, "FF0000", "0000FF", 0, "12345678901234567890", "", 0, "ultra_fgbg_hvwsp2_box3.svg", "" },
/*107*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.4, "", "", 180, "A", "", 0, "telepen_height0.4_rotate_180.svg", "" },
/*108*/ { BARCODE_CODE49, -1, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "FF11157F", "", 0, "A", "", 0, "code49_comph_fgalpha.svg", "" },
/*109*/ { BARCODE_CODABLOCKF, -1, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 2, 0, "00000033", "FFFFFF66", 0, "1234567890123456789012345678901234", "", 0, "codablockf_comph_sep2_fgbgalpha.svg", "" },
/*110*/ { BARCODE_DPD, -1, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "008182709980000020028101276", "", 0, "dpd_compliant.svg", "" },
/*111*/ { BARCODE_CHANNEL, -1, -1, CMYK_COLOUR | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "100,85,0,20", "FFFFFF00", 0, "123", "", 0, "channel_cmyk_nobg.svg", "" },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;

View file

@ -205,8 +205,10 @@ static void test_print(const testCtx *const p_ctx) {
/* 19*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, 32, 0, 0, "4BE055", "", "1", "", "aztec_v32_fg.tif", "" },
/* 20*/ { BARCODE_DAFT, -1, -1, -1, -1, -1, -1, -1, -1, 8, 0.5f, "", "", "F", "", "daft_height8_scale0.5.tif", "" },
/* 21*/ { BARCODE_DAFT, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0.5f, "", "", "DAFT", "", "daft_height1_scale0.5.tif", "" },
/* 22*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9501234", "", "ean8_gss_5.2.2.2-1.tif", "" },
/* 23*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, "", "", "9501234", "", "ean8_gss_5.2.2.2-1_gws.tif", "" },
/* 22*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9501234", "", "ean8_gss_5.2.2.2-1.tif", "" },
/* 23*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9501234", "", "ean8_gss_5.2.2.2-1.tif", "" },
/* 24*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, "", "", "9501234", "", "ean8_gss_5.2.2.2-1_gws.tif", "" },
/* 25*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0, 0, "", "", "9501234", "", "ean8_gss_5.2.2.2-1_gws.tif", "" },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -2306,12 +2306,12 @@ static const char *testUtilBwippName(int index, const struct zint_symbol *symbol
{ "industrial2of5", BARCODE_C25IND, 7, 0, 1, 0, 0, 0, },
{ "code39", BARCODE_CODE39, 8, 0, 1, 0, 0, 0, },
{ "code39ext", BARCODE_EXCODE39, 9, 0, 1, 0, 0, 0, },
{ "", -1, 10, 0, 0, 0, 0, 0, },
{ "", -1, 11, 0, 0, 0, 0, 0, },
{ "", -1, 12, 0, 0, 0, 0, 0, },
{ "ean8", BARCODE_EAN8, 10, 0, 1, 0, 0, 1 /*gs1_cvt*/, },
{ "ean2", BARCODE_EAN_2ADDON, 11, 0, 1, 0, 0, 1 /*gs1_cvt*/, },
{ "ean5", BARCODE_EAN_5ADDON, 12, 0, 1, 0, 0, 1 /*gs1_cvt*/, },
{ "ean13", BARCODE_EANX, 13, 0, 1, 0, 0, 1 /*gs1_cvt*/, },
{ "ean13", BARCODE_EANX_CHK, 14, 0, 1, 0, 0, 1, },
{ "", -1, 15, 0, 0, 0, 0, 0, },
{ "ean13", BARCODE_EAN13, 15, 0, 1, 0, 0, 1, },
{ "gs1-128", BARCODE_GS1_128, 16, 0, 0, 0, 0, 1 /*gs1_cvt*/, },
{ "", -1, 17, 0, 0, 0, 0, 0, },
{ "rationalizedCodabar", BARCODE_CODABAR, 18, 0, 1, 0, 0, 0, },
@ -2443,6 +2443,9 @@ static const char *testUtilBwippName(int index, const struct zint_symbol *symbol
{ "ultracode", BARCODE_ULTRA, 144, 1, 1, 0, 0, 0, },
{ "rectangularmicroqrcode", BARCODE_RMQR, 145, 1, 1, 1, 0, 0, },
{ "bc412", BARCODE_BC412, 146, 1, 1, 0, 0, 0, },
{ "", BARCODE_DXFILMEDGE, 147, 0, 0, 0, 0, 0, },
{ "ean8composite", BARCODE_EAN8_CC, 148, 1, 1, 0, 72 /*linear_row_height*/, 1 /*gs1_cvt*/, },
{ "ean13composite", BARCODE_EAN13_CC, 149, 1, 1, 0, 72 /*linear_row_height*/, 1 /*gs1_cvt*/, },
};
const int data_size = ARRAY_SIZE(data);
@ -2584,7 +2587,7 @@ static void testUtilBwippCvtGS1Data(char *bwipp_data, const int upcean, const in
*b = '(';
} else if (!parens_mode && *b == ']') {
*b = ')';
} else if (*b == '+' && upcean && !pipe) {
} else if ((*b == '+' || *b == ' ') && upcean && !pipe) {
*b = ' ';
*addon_posn = b - bwipp_data;
}
@ -2915,10 +2918,9 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
if (upcean) {
if (symbology == BARCODE_EANX_CC && (primary_len <= 8 || (addon_posn && addon_posn <= 8))) {
bwipp_barcode = "ean8composite";
if (addon_posn) {
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%spermitaddon",
strlen(bwipp_opts_buf) ? " " : "");
}
}
if (addon_posn && strcmp(bwipp_barcode, "ean8composite") == 0) {
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%spermitaddon", strlen(bwipp_opts_buf) ? " " : "");
}
if (addon_posn) {
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%saddongap=%d",
@ -2955,10 +2957,10 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
if ((symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK)
&& (data_len <= 8 || (addon_posn && addon_posn <= 8))) {
bwipp_barcode = data_len <= 3 ? "ean2" : data_len <= 5 ? "ean5" : "ean8";
if (addon_posn) {
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%spermitaddon",
strlen(bwipp_opts_buf) ? " " : "");
}
}
if (addon_posn && strcmp(bwipp_barcode, "ean8") == 0) {
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%spermitaddon",
strlen(bwipp_opts_buf) ? " " : "");
}
if (symbology == BARCODE_ISBNX) {
testUtilISBNHyphenate(bwipp_data, addon_posn);
@ -3812,12 +3814,12 @@ static const char *testUtilZXingCPPName(int index, const struct zint_symbol *sym
{ "", BARCODE_C25IND, 7, },
{ "Code39", BARCODE_CODE39, 8, },
{ "Code39", BARCODE_EXCODE39, 9, }, /* TODO: Code39 with specially encoded chars */
{ "", -1, 10, },
{ "", -1, 11, },
{ "", -1, 12, },
{ "EAN-13", BARCODE_EANX, 13, },
{ "EAN-13", BARCODE_EANX_CHK, 14, },
{ "", -1, 15, },
{ "EAN8", BARCODE_EAN8, 10, },
{ "", BARCODE_EAN_2ADDON, 11, },
{ "", BARCODE_EAN_5ADDON, 12, },
{ "EAN13", BARCODE_EANX, 13, },
{ "EAN13", BARCODE_EANX_CHK, 14, },
{ "EAN13", BARCODE_EAN13, 15, },
{ "Code128", BARCODE_GS1_128, 16, },
{ "", -1, 17, },
{ "Codabar", BARCODE_CODABAR, 18, },
@ -3871,7 +3873,7 @@ static const char *testUtilZXingCPPName(int index, const struct zint_symbol *sym
{ "", BARCODE_AUSREPLY, 66, },
{ "", BARCODE_AUSROUTE, 67, },
{ "", BARCODE_AUSREDIRECT, 68, },
{ "EAN-13", BARCODE_ISBNX, 69, },
{ "EAN13", BARCODE_ISBNX, 69, },
{ "", BARCODE_RM4SCC, 70, },
{ "DataMatrix", BARCODE_DATAMATRIX, 71, },
{ "Code128", BARCODE_EAN14, 72, },
@ -3950,6 +3952,8 @@ static const char *testUtilZXingCPPName(int index, const struct zint_symbol *sym
{ "RMQRCode", BARCODE_RMQR, 145, },
{ "", BARCODE_BC412, 146, },
{ "DXFilmEdge", BARCODE_DXFILMEDGE, 147, },
{ "", BARCODE_EAN8_CC, 148, },
{ "", BARCODE_EAN13_CC, 149, },
};
const int data_size = ARRAY_SIZE(data);
@ -3987,10 +3991,10 @@ static const char *testUtilZXingCPPName(int index, const struct zint_symbol *sym
index, testUtilBarcodeName(symbology));
return NULL;
}
return "EAN-8";
return "EAN8";
}
if (strchr(source, '+') != NULL && length < 15) {
return "EAN-8";
if ((strchr(source, '+') != NULL || strchr(source, ' ') != NULL) && length < 15) {
return "EAN8";
}
}
}
@ -4183,17 +4187,17 @@ static int textUtilZXingCPPDX(const char *expected, const int expected_len, cons
/* Helper to append add-on if any to EAN-13, returning expected length */
static int textUtilZXingCPPEAN13AddOn(const char *expected, const int expected_len, char *out) {
char *plus;
if ((plus = strchr(expected, '+')) != NULL) {
const int addon_len = expected_len - (plus + 1 - expected);
char *sep;
if ((sep = strchr(expected, '+')) != NULL || (sep = strchr(expected, ' ')) != NULL) {
const int addon_len = expected_len - (sep + 1 - expected);
if (addon_len <= 2) {
memset(out + 13, '0', 2 - addon_len);
memcpy(out + 13 + (2 - addon_len), plus + 1, addon_len);
memcpy(out + 13 + (2 - addon_len), sep + 1, addon_len);
return 15;
}
assert(addon_len <= 5);
memset(out + 13, '0', 5 - addon_len);
memcpy(out + 13 + (5 - addon_len), plus + 1, addon_len);
memcpy(out + 13 + (5 - addon_len), sep + 1, addon_len);
return 18;
}
return 13;
@ -4433,7 +4437,7 @@ int testUtilZXingCPPCmp(struct zint_symbol *symbol, char *msg, char *cmp_buf, in
expected = dbar_nonexp;
expected_len += 2;
} else if (is_upcean) {
const char *plus;
const char *sep;
if (symbology == BARCODE_UPCA || symbology == BARCODE_UPCA_CHK) {
assert(expected_len >= 11);
upcean[0] = '0';
@ -4478,16 +4482,17 @@ int testUtilZXingCPPCmp(struct zint_symbol *symbol, char *msg, char *cmp_buf, in
upcean[expected_len] = '\0';
expected = upcean;
/* EAN-8 with add-on check must happen before other EANX checks */
} else if ((symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK)
&& (plus = strchr(expected, '+')) != NULL && (plus - expected) <= 8) {
const int ean7_len = (int) (plus - expected) - (symbology == BARCODE_EANX_CHK);
} else if ((symbology == BARCODE_EAN8 || symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK)
&& ((sep = strchr(expected, '+')) != NULL || (sep = strchr(expected, ' ')) != NULL)
&& (sep - expected) <= 8) {
const int ean7_len = sep - expected < 7 ? (int) (sep - expected) : 7;
memset(upcean, '0', 12 - ean7_len);
memcpy(upcean + (12 - ean7_len), expected, ean7_len);
upcean[12] = gs1_check_digit(ZCUCP(upcean), 12);
expected_len = textUtilZXingCPPEAN13AddOn(expected, expected_len, upcean);
upcean[expected_len] = '\0';
expected = upcean;
} else if ((symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK)
} else if ((symbology == BARCODE_EAN8 || symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK)
&& (expected_len == 7 || expected_len == 8)) {
if (expected_len == 7) {
memcpy(upcean, expected, 7);
@ -4496,8 +4501,8 @@ int testUtilZXingCPPCmp(struct zint_symbol *symbol, char *msg, char *cmp_buf, in
expected_len = 8;
upcean[expected_len] = '\0';
expected = upcean;
} else if ((symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK || symbology == BARCODE_ISBNX)
&& expected_len >= 12) {
} else if ((symbology == BARCODE_EAN13 || symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK
|| symbology == BARCODE_ISBNX) && expected_len >= 12) {
memcpy(upcean, expected, 12);
upcean[12] = gs1_check_digit(ZCUCP(upcean), 12);
expected_len = textUtilZXingCPPEAN13AddOn(expected, expected_len, upcean);

View file

@ -30,56 +30,57 @@
*/
/* SPDX-License-Identifier: BSD-3-Clause */
#define SODIUM_PLS_F (IS_NUM_F | IS_PLS_F) /* SODIUM "0123456789+" */
#define SODIUM_PLS_SPC_F (IS_NUM_F | IS_PLS_F | IS_SPC_F) /* SODIUM "0123456789+ " */
#define ISBNX_SANE_F (IS_NUM_F | IS_UX__F) /* ISBNX_SANE "0123456789X" */
#define ISBNX_ADDON_SANE_F (IS_NUM_F | IS_UX__F | IS_LX__F | IS_PLS_F) /* ISBNX_ADDON_SANE "0123456789Xx+" */
/* ISBNX_ADDON_SANE "0123456789Xx+ " */
#define ISBNX_ADDON_SANE_F (IS_NUM_F | IS_UX__F | IS_LX__F | IS_PLS_F | IS_SPC_F)
#include <assert.h>
#include <stdio.h>
#include "common.h"
#include "gs1.h"
/* UPC and EAN tables checked against EN 797:1996 */
/* UPC and EAN tables from ISO/IEC 15420:2009 */
/* Number set for UPC-E Symbol (Table 4) */
static const char UPCParity0[10][6] = {
/* Number set for UPC-E symbol (EN Table 4) */
{'B','B','B','A','A','A'}, {'B','B','A','B','A','A'}, {'B','B','A','A','B','A'}, {'B','B','A','A','A','B'},
{'B','A','B','B','A','A'}, {'B','A','A','B','B','A'}, {'B','A','A','A','B','B'}, {'B','A','B','A','B','A'},
{'B','A','B','A','A','B'}, {'B','A','A','B','A','B'}
};
/* Number set for UPC-E number system 1 (not in ISO/IEC 15420:2009, Table 4 inverted) */
static const char UPCParity1[10][6] = {
/* Not covered by BS EN 797:1995 */
{'A','A','A','B','B','B'}, {'A','A','B','A','B','B'}, {'A','A','B','B','A','B'}, {'A','A','B','B','B','A'},
{'A','B','A','A','B','B'}, {'A','B','B','A','A','B'}, {'A','B','B','B','A','A'}, {'A','B','A','B','A','B'},
{'A','B','A','B','B','A'}, {'A','B','B','A','B','A'}
};
/* Number sets for 2-digit add-on (Table 6) */
static const char EAN2Parity[4][2] = {
/* Number sets for 2-digit add-on (EN Table 6) */
{'A','A'}, {'A','B'}, {'B','A'}, {'B','B'}
};
/* Number sets for 5-digit add-on (Table 7) */
static const char EAN5Parity[10][5] = {
/* Number set for 5-digit add-on (EN Table 7) */
{'B','B','A','A','A'}, {'B','A','B','A','A'}, {'B','A','A','B','A'}, {'B','A','A','A','B'}, {'A','B','B','A','A'},
{'A','A','B','B','A'}, {'A','A','A','B','B'}, {'A','B','A','B','A'}, {'A','B','A','A','B'}, {'A','A','B','A','B'}
};
/* Left half of EAN-13 symbol (Table 3) */
static const char EAN13Parity[10][5] = {
/* Left hand of the EAN-13 symbol (EN Table 3) */
{'A','A','A','A','A'}, {'A','B','A','B','B'}, {'A','B','B','A','B'}, {'A','B','B','B','A'}, {'B','A','A','B','B'},
{'B','B','A','A','B'}, {'B','B','B','A','A'}, {'B','A','B','A','B'}, {'B','A','B','B','A'}, {'B','B','A','B','A'}
};
/* Number set A (and C, which is identical) (Table 1) */
static const char EANsetA[10][4] = {
/* Representation set A and C (EN Table 1) */
{'3','2','1','1'}, {'2','2','2','1'}, {'2','1','2','2'}, {'1','4','1','1'}, {'1','1','3','2'},
{'1','2','3','1'}, {'1','1','1','4'}, {'1','3','1','2'}, {'1','2','1','3'}, {'3','1','1','2'}
};
/* Number set B (Table 1) */
static const char EANsetB[10][4] = {
/* Representation set B (EN Table 1) */
{'1','1','2','3'}, {'1','2','2','2'}, {'2','2','1','2'}, {'1','1','4','1'}, {'2','3','1','1'},
{'1','3','2','1'}, {'4','1','1','1'}, {'2','1','3','1'}, {'3','1','2','1'}, {'2','1','1','3'}
};
@ -130,7 +131,7 @@ static int upca_cc(struct zint_symbol *symbol, const unsigned char source[], int
upca_set_dest(gtin, symbol->text_length, dest);
if (symbol->output_options & COMPLIANT_HEIGHT) {
/* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
/* ISO/IEC 15420:2009 4.3.3 Bar height UPC-A 22.85mm / 0.33mm (X) ~ 69.24,
same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
const float height = 69.242424f; /* 22.85 / 0.33 */
if (symbol->symbology == BARCODE_UPCA_CC) {
@ -150,15 +151,16 @@ static int upca_cc(struct zint_symbol *symbol, const unsigned char source[], int
return error_number;
}
/* UPC-A */
/* Make a UPC-A */
static int upca(struct zint_symbol *symbol, const unsigned char source[], int length, char dest[]) {
return upca_cc(symbol, source, length, dest, 0 /*cc_rows*/);
}
/* UPC-E, allowing for composite if `cc_rows` set */
/* Make a UPC-E, allowing for composite if `cc_rows` set */
static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int length, char *d, int cc_rows,
unsigned char equivalent[12]) {
int i, num_system;
int i;
int num_system = 0;
char emode, check_digit;
const char *parity;
char src_check_digit = '\0';
@ -170,11 +172,10 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
src_check_digit = source[--length];
}
/* Two number systems can be used - system 0 and system 1 */
/* Two number systems can be used - number system 0 (standard) and number system 1 (non-standard) */
if (length == 7) {
switch (source[0]) {
case '0':
num_system = 0;
hrt_cpy_nochk(symbol, source, length);
break;
case '1':
@ -182,11 +183,10 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
hrt_cpy_nochk(symbol, source, length);
break;
default:
num_system = 0;
/* Overwrite HRT first char with '0' to correct TODO: error/warn in future */
hrt_cpy_chr(symbol, '0');
/* First source char ignored */
hrt_cat_nochk(symbol, source + 1, length - 1);
/* Overwrite HRT first char with '0' and ignore first source char */
hrt_cpy_cat_nochk(symbol, NULL, 0, '0', source + 1, length - 1);
error_number = errtxt(ZINT_WARN_INVALID_OPTION, symbol, 851,
"Ignoring first digit which is not '0' or '1'");
break;
}
for (i = 1; i <= length; i++) {
@ -195,12 +195,10 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
length--;
} else {
/* Length 6, insert leading zero */
num_system = 0;
hrt_cpy_chr(symbol, '0');
hrt_cat_nochk(symbol, source, length);
hrt_cpy_cat_nochk(symbol, NULL, 0, '0', source, length);
}
/* Expand the zero-compressed UPCE code to make a UPCA equivalent (EN Table 5) */
/* Expand the zero-compressed UPC-E code to make a UPC-A equivalent (Table 5) */
emode = source[5];
memset(equivalent, '0', 11);
if (num_system == 1) {
@ -258,7 +256,7 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
break;
}
/* Get the check digit from the expanded UPCA code */
/* Get the check digit from the expanded UPC-A code */
check_digit = gs1_check_digit(equivalent, 11);
@ -302,13 +300,16 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
}
if (symbol->output_options & COMPLIANT_HEIGHT) {
/* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
/* ISO/IEC 15420:2009 4.3.3 Bar height UPC-E 22.85mm / 0.33mm (X) ~ 69.24,
same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
const float height = 69.242424f; /* 22.85 / 0.33 */
if (symbol->symbology == BARCODE_UPCE_CC) {
symbol->height = height; /* Pass back min row == default height */
} else {
error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
int warn_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
if (warn_number) {
error_number = warn_number; /* Trump first char not '0' or '1' warning if any */
}
}
} else {
const float height = 50.0f;
@ -387,6 +388,7 @@ static void ean_add_on(const unsigned char source[], const int length, char dest
/* ************************ EAN-13 ****************** */
/* Make an EAN-13, allowing for composite if `cc_rows` set */
static int ean13_cc(struct zint_symbol *symbol, const unsigned char source[], int length, char *d,
int cc_rows) {
int i, half_way;
@ -438,17 +440,19 @@ static int ean13_cc(struct zint_symbol *symbol, const unsigned char source[], in
memcpy(d, "111", 4); /* Include terminating NUL */
if (symbol->output_options & COMPLIANT_HEIGHT) {
/* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
/* ISO/IEC 15420:2009 4.3.3 Bar height EAN-13 22.85mm / 0.33mm (X) ~ 69.24,
same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
const float height = 69.242424f; /* 22.85 / 0.33 */
if (symbol->symbology == BARCODE_EANX_CC) {
if (symbol->symbology == BARCODE_EANX_CC || symbol->symbology == BARCODE_EAN8_CC
|| symbol->symbology == BARCODE_EAN13_CC) {
symbol->height = height; /* Pass back min row == default height */
} else {
error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
}
} else {
const float height = 50.0f;
if (symbol->symbology == BARCODE_EANX_CC) {
if (symbol->symbology == BARCODE_EANX_CC || symbol->symbology == BARCODE_EAN8_CC
|| symbol->symbology == BARCODE_EAN13_CC) {
symbol->height = height - cc_rows * 2 - 6.0f;
} else {
(void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
@ -458,10 +462,12 @@ static int ean13_cc(struct zint_symbol *symbol, const unsigned char source[], in
return error_number;
}
/* Make an EAN-13 */
static int ean13(struct zint_symbol *symbol, const unsigned char source[], int length, char dest[]) {
return ean13_cc(symbol, source, length, dest, 0 /*cc_rows*/);
}
/* Make an EAN-8, allowing for composite if `cc_rows` set */
static int ean8_cc(struct zint_symbol *symbol, const unsigned char source[], int length, char dest[], int cc_rows) {
/* EAN-8 is basically the same as UPC-A but with fewer digits */
const unsigned char *gtin = symbol->text;
@ -486,17 +492,19 @@ static int ean8_cc(struct zint_symbol *symbol, const unsigned char source[], int
upca_set_dest(gtin, symbol->text_length, dest);
if (symbol->output_options & COMPLIANT_HEIGHT) {
/* BS EN 797:1996 4.5.1 Nominal dimensions 18.23mm / 0.33mm (X) ~ 55.24,
/* ISO/IEC 15420:2009 4.3.3 Bar height EAN-8 18.23mm / 0.33mm (X) ~ 55.24,
same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
const float height = 55.242424f; /* 18.23 / 0.33 */
if (symbol->symbology == BARCODE_EANX_CC) {
if (symbol->symbology == BARCODE_EANX_CC || symbol->symbology == BARCODE_EAN8_CC
|| symbol->symbology == BARCODE_EAN13_CC) {
symbol->height = height; /* Pass back min row == default height */
} else {
error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
}
} else {
const float height = 50.0f;
if (symbol->symbology == BARCODE_EANX_CC) {
if (symbol->symbology == BARCODE_EANX_CC || symbol->symbology == BARCODE_EAN8_CC
|| symbol->symbology == BARCODE_EAN13_CC) {
symbol->height = height - cc_rows * 2 - 6.0f;
} else {
(void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
@ -506,7 +514,7 @@ static int ean8_cc(struct zint_symbol *symbol, const unsigned char source[], int
return error_number;
}
/* Make an EAN-8 barcode when we haven't been given the check digit */
/* Make an EAN-8 barcode */
static int ean8(struct zint_symbol *symbol, const unsigned char source[], int length, char dest[]) {
return ean8_cc(symbol, source, length, dest, 0 /*cc_rows*/);
}
@ -600,16 +608,102 @@ static int isbnx(struct zint_symbol *symbol, unsigned char source[], const int l
return ean13(symbol, source, 12, dest);
}
/* Add leading zeroes to EAN and UPC strings */
/* Check if GTIN-13 `source` is UPC-E compatible and convert as UPC-E into `out` if so */
static int ean_is_upce(const unsigned char source[], unsigned char *out) {
static const char zeroes[5] = "00000";
if (source[0] != '0' || source[1] > '1') {
return 0;
}
out[0] = source[1];
out[7] = source[12];
out[8] = '\0';
if (source[11] >= '5' && source[6] != '0' && memcmp(source + 7, zeroes, 4) == 0) {
memcpy(out + 1, source + 2, 5);
out[6] = source[11];
return 1;
}
if (source[5] != '0' && memcmp(source + 6, zeroes, 5) == 0) {
memcpy(out + 1, source + 2, 4);
out[5] = source[11];
out[6] = '4';
return 1;
}
if (source[4] <= '2' && memcmp(source + 5, zeroes, 4) == 0) {
out[1] = source[2];
out[2] = source[3];
memcpy(out + 3, source + 9, 3);
out[6] = source[4];
return 1;
}
if (source[4] >= '3' && memcmp(source + 5, zeroes, 5) == 0) {
memcpy(out + 1, source + 2, 3);
out[4] = source[10];
out[5] = source[11];
out[6] = '3';
return 1;
}
return 0;
}
/* Add leading zeroes to EAN and UPC strings and split into parts (second part add-on if any) */
INTERNAL int ean_leading_zeroes(struct zint_symbol *symbol, const unsigned char source[], const int length,
unsigned char local_source[], int *p_with_addon, unsigned char *zfirst_part,
unsigned char *zsecond_part) {
unsigned char first_part[14], second_part[6];
int with_addon = 0;
int first_len = 0, second_len = 0, zfirst_len = 0, zsecond_len = 0, i;
const int symbology = symbol->symbology;
const int max = symbology == BARCODE_EAN8 || symbology == BARCODE_EAN8_CC ? 8 :
symbology == BARCODE_EAN_2ADDON ? 2 : symbology == BARCODE_EAN_5ADDON ? 5 : 13;
/* Accept GINT-13 with correct check digit, with or without 2/5-digit (no separator) */
if ((length == 13 || length == 15 || length == 18) && !not_sane(NEON_F, source, length)
&& gs1_check_digit(ZCUCP(source), 12) == source[12]) {
int local_length = 0;
if (symbology == BARCODE_EAN13 || symbology == BARCODE_EAN13_CC
|| symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK || symbology == BARCODE_EANX_CC) {
memcpy(local_source, source, 13);
local_length = 13;
} else if ((symbology == BARCODE_EAN8 || symbology == BARCODE_EAN8_CC) && memcmp(source, "00000", 5) == 0) {
memcpy(local_source, source + 5, 8);
local_length = 8;
} else if ((symbology == BARCODE_UPCA || symbology == BARCODE_UPCA_CHK || symbology == BARCODE_UPCA_CC)
&& source[0] == '0') {
memcpy(local_source, source + 1, 12);
local_length = 12;
} else if ((symbology == BARCODE_UPCE || symbology == BARCODE_UPCE_CHK || symbology == BARCODE_UPCE_CC)
&& ean_is_upce(source, local_source)) {
local_length = 8;
}
if (local_length) {
if (length > 13) {
local_source[local_length] = '+';
memcpy(local_source + local_length + 1, source + 13, length - 13);
local_source[local_length + 1 + (length - 13)] = '\0';
} else {
local_source[local_length] = '\0';
}
if (zfirst_part) {
memcpy(zfirst_part, local_source, local_length);
zfirst_part[local_length] = '\0';
}
if (zsecond_part) {
if (length > 13) {
memcpy(zsecond_part, source + 13, length - 13);
}
zsecond_part[length - 13] = '\0';
}
if (p_with_addon) {
*p_with_addon = length > 13;
}
return 1; /* Success */
}
}
/* Standard input, with +/space separated add-on if any */
for (i = 0; i < length; i++) {
if (source[i] == '+') {
if (source[i] == '+' || source[i] == ' ') {
with_addon = 1;
} else {
if (with_addon == 0) {
@ -619,12 +713,12 @@ INTERNAL int ean_leading_zeroes(struct zint_symbol *symbol, const unsigned char
}
}
}
if (first_len > 13 || second_len > 5) {
if (first_len > 13) {
if (!second_len) {
errtxtf(0, symbol, 294, "Input length %d too long (maximum 13)", first_len);
if (first_len > max || second_len > 5) {
if (first_len > max) {
if (!second_len || symbology == BARCODE_EAN_2ADDON || symbology == BARCODE_EAN_5ADDON) {
ZEXT errtxtf(0, symbol, 294, "Input length %1$d too long (maximum %2$d)", first_len, max);
} else {
errtxtf(0, symbol, 298, "Input EAN length %d too long (maximum 13)", first_len);
ZEXT errtxtf(0, symbol, 298, "Input EAN length %1$d too long (maximum %2$d)", first_len, max);
}
} else {
errtxtf(0, symbol, 297, "Input add-on length %d too long (maximum 5)", second_len);
@ -654,7 +748,21 @@ INTERNAL int ean_leading_zeroes(struct zint_symbol *symbol, const unsigned char
} else {
zsecond_len = 5;
}
switch (symbol->symbology) {
switch (symbology) {
case BARCODE_EAN8:
case BARCODE_EAN8_CC:
zfirst_len = first_len <= 7 ? 7 : 8;
break;
case BARCODE_EAN_2ADDON:
zfirst_len = 2;
break;
case BARCODE_EAN_5ADDON:
zfirst_len = 5;
break;
case BARCODE_EAN13:
case BARCODE_EAN13_CC:
zfirst_len = first_len <= 12 ? 12 : 13;
break;
case BARCODE_EANX:
case BARCODE_EANX_CC:
if (first_len <= 12) {
@ -664,7 +772,7 @@ INTERNAL int ean_leading_zeroes(struct zint_symbol *symbol, const unsigned char
zfirst_len = 12;
}
}
if (second_len == 0 && symbol->symbology == BARCODE_EANX) { /* No composite EAN-2/5 */
if (second_len == 0 && symbology == BARCODE_EANX) { /* No composite EAN-2/5 */
if (first_len <= 5) {
if (first_len <= 2) {
zfirst_len = 2;
@ -753,13 +861,14 @@ INTERNAL int ean_leading_zeroes(struct zint_symbol *symbol, const unsigned char
return 1; /* Success */
}
/* Make EAN/UPC and ISBN, allowing for composite if `cc_rows` set */
INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int length, int cc_rows) {
unsigned char first_part[14], second_part[6];
unsigned char local_source[20]; /* Allow 13 + "+" + 5 + 1 */
unsigned char equivalent[12] = {0}; /* For UPC-E - GTIN-12 equivalent */
char dest[1000] = {0};
int with_addon;
int error_number = 0, i, plus_count;
int error_number = 0, i, sep_count;
int addon_gap = 0;
int first_part_len, second_part_len;
const int raw_text = symbol->output_options & BARCODE_RAW_TEXT;
@ -767,27 +876,31 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
if (length > 19) {
return errtxtf(ZINT_ERROR_TOO_LONG, symbol, 283, "Input length %d too long (maximum 19)", length);
}
if (symbol->symbology != BARCODE_ISBNX) {
if (symbol->symbology == BARCODE_ISBNX) {
/* ISBN has its own sanity routine */
if ((i = not_sane(SODIUM_PLS_F, source, length))) {
return errtxtf(ZINT_ERROR_INVALID_DATA, symbol, 284,
"Invalid character at position %d in input (digits and \"+\" only)", i);
}
} else {
if ((i = not_sane(ISBNX_ADDON_SANE_F, source, length))) {
return errtxtf(ZINT_ERROR_INVALID_DATA, symbol, 285,
"Invalid character at position %d in input (digits, \"X\" and \"+\" only)", i);
"Invalid character at position %d in input (digits, \"X\" and \"+\" or space only)", i);
}
/* Add-on will be checked separately to be numeric only below */
} else if (symbol->symbology == BARCODE_EAN_2ADDON || symbol->symbology == BARCODE_EAN_5ADDON) {
if ((i = not_sane(NEON_F, source, length))) {
return errtxtf(ZINT_ERROR_INVALID_DATA, symbol, 852,
"Invalid character at position %d in input (digits only)", i);
}
} else {
if ((i = not_sane(SODIUM_PLS_SPC_F, source, length))) {
return errtxtf(ZINT_ERROR_INVALID_DATA, symbol, 284,
"Invalid character at position %d in input (digits and \"+\" or space only)", i);
}
}
/* Check for multiple '+' characters */
plus_count = 0;
/* Check for multiple separator characters */
sep_count = 0;
for (i = 0; i < length; i++) {
if (source[i] == '+') {
plus_count++;
if (plus_count > 1) {
return errtxt(ZINT_ERROR_INVALID_DATA, symbol, 293, "Invalid add-on data (one \"+\" only)");
if (source[i] == '+' || source[i] == ' ') {
if (++sep_count > 1) {
return errtxt(ZINT_ERROR_INVALID_DATA, symbol, 293, "Invalid add-on data (one \"+\" or space only)");
}
}
}
@ -809,8 +922,12 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
first_part_len = (int) ustrlen(first_part);
switch (symbol->symbology) {
case BARCODE_EAN8:
case BARCODE_EAN_2ADDON:
case BARCODE_EAN_5ADDON:
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EAN13:
switch (first_part_len) {
case 2:
case 5:
@ -833,14 +950,18 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
error_number = ean13(symbol, first_part, first_part_len, dest);
break;
default:
assert(symbol->symbology == BARCODE_EANX || symbol->symbology == BARCODE_EANX_CHK);
return errtxtf(ZINT_ERROR_TOO_LONG, symbol, 286,
"Input length %d wrong (2, 5, 7, 8, 12 or 13 characters required)", first_part_len);
break;
}
break;
case BARCODE_EANX_CC:
case BARCODE_EAN8_CC:
case BARCODE_EAN13_CC:
switch (first_part_len) { /* Adds vertical separator bars according to ISO/IEC 24723 section 11.4 */
case 7:
case 8:
set_module(symbol, symbol->rows, 1);
set_module(symbol, symbol->rows, 67);
set_module(symbol, symbol->rows + 1, 0);
@ -868,6 +989,7 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
error_number = ean13_cc(symbol, first_part, first_part_len, dest, cc_rows);
break;
default:
assert(symbol->symbology == BARCODE_EANX_CC);
return errtxtf(ZINT_ERROR_TOO_LONG, symbol, 287,
"Input length %d wrong (7, 12 or 13 characters required)", first_part_len);
break;
@ -875,15 +997,15 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
break;
case BARCODE_UPCA:
case BARCODE_UPCA_CHK:
if ((first_part_len == 11) || (first_part_len == 12)) {
if (first_part_len <= 12) {
error_number = upca(symbol, first_part, first_part_len, dest);
} else {
return errtxtf(ZINT_ERROR_TOO_LONG, symbol, 288,
"Input length %d wrong (11 or 12 characters required)", first_part_len);
"Input length %d too long (maximum 12)", first_part_len);
}
break;
case BARCODE_UPCA_CC:
if (first_part_len == 11 || first_part_len == 12) {
if (first_part_len <= 12) {
set_module(symbol, symbol->rows, 1);
set_module(symbol, symbol->rows, 95);
set_module(symbol, symbol->rows + 1, 0);
@ -897,20 +1019,20 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
error_number = upca_cc(symbol, first_part, first_part_len, dest, cc_rows);
} else {
return errtxtf(ZINT_ERROR_TOO_LONG, symbol, 289,
"Input length %d wrong (11 or 12 characters required)", first_part_len);
"Input length %d too long (maximum 12)", first_part_len);
}
break;
case BARCODE_UPCE:
case BARCODE_UPCE_CHK:
if ((first_part_len >= 6) && (first_part_len <= 8)) {
if (first_part_len <= 8) {
error_number = upce(symbol, first_part, first_part_len, dest, equivalent);
} else {
return errtxtf(ZINT_ERROR_TOO_LONG, symbol, 290,
"Input length %d wrong (6, 7 or 8 characters required)", first_part_len);
"Input length %d too long (maximum 8)", first_part_len);
}
break;
case BARCODE_UPCE_CC:
if ((first_part_len >= 6) && (first_part_len <= 8)) {
if (first_part_len <= 8) {
set_module(symbol, symbol->rows, 1);
set_module(symbol, symbol->rows, 51);
set_module(symbol, symbol->rows + 1, 0);
@ -924,7 +1046,7 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
error_number = upce_cc(symbol, first_part, first_part_len, dest, cc_rows, equivalent);
} else {
return errtxtf(ZINT_ERROR_TOO_LONG, symbol, 291,
"Input length %d wrong (6, 7 or 8 characters required)", first_part_len);
"Input length %d too long (maximum 8)", first_part_len);
}
break;
case BARCODE_ISBNX:
@ -948,24 +1070,24 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
ean_add_on(second_part, second_part_len, dest, addon_gap);
hrt_cat_chr_nochk(symbol, '+');
hrt_cat_nochk(symbol, second_part, second_part_len);
if (first_part_len <= 8 && (symbol->symbology == BARCODE_EANX || symbol->symbology == BARCODE_EANX_CHK
|| symbol->symbology == BARCODE_EANX_CC)) {
if (first_part_len <= 8 && (symbol->symbology == BARCODE_EAN8 || symbol->symbology == BARCODE_EANX
|| symbol->symbology == BARCODE_EANX_CHK || symbol->symbology == BARCODE_EANX_CC
|| symbol->symbology == BARCODE_EAN8_CC)) {
error_number = errtxt(ZINT_WARN_NONCOMPLIANT, symbol, 292, "EAN-8 with add-on is non-standard");
}
}
if (raw_text) {
const int is_ean = symbol->symbology == BARCODE_EANX || symbol->symbology == BARCODE_EANX_CHK
|| symbol->symbology == BARCODE_EANX_CC || symbol->symbology == BARCODE_ISBNX;
const int ean = is_ean(symbol->symbology);
/* EAN-8 with no add-on, EAN-2, EAN-5 */
if (is_ean && symbol->text_length <= 8 && !second_part_len) {
if (ean && symbol->text_length <= 8 && !second_part_len) {
if (rt_cpy(symbol, symbol->text, symbol->text_length)) { /* Just use the HRT */
return ZINT_ERROR_MEMORY; /* `rt_cpy()` only fails with OOM */
}
} else { /* Expand to GTIN-13 (UPC-A, UPC-E, EAN-8 with add-on) */
unsigned char gtin13[13];
/* EAN-13, ISBNX */
if (is_ean && symbol->text_length >= 13) {
if (ean && symbol->text_length >= 13) {
memcpy(gtin13, symbol->text, 13);
/* UPC-E */
} else if (*equivalent) {
@ -988,6 +1110,8 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
switch (symbol->symbology) {
case BARCODE_EANX_CC:
case BARCODE_EAN8_CC:
case BARCODE_EAN13_CC:
case BARCODE_UPCA_CC:
case BARCODE_UPCE_CC:
/* Shift the symbol to the right one space to allow for separator bars */
@ -1006,7 +1130,7 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int len
return error_number;
}
/* Handle UPC, EAN, ISBN */
/* Handle UPC (UPC-A/E), EAN (EAN-13, EAN-8, EAN 2-digit add-on, EAN 5-digit add-on), ISBN */
INTERNAL int eanx(struct zint_symbol *symbol, unsigned char source[], int length) {
return eanx_cc(symbol, source, length, 0 /*cc_rows*/);
}

View file

@ -138,7 +138,7 @@ extern "C" {
int width; /* Width of the generated symbol (output only) */
unsigned char encoded_data[200][144]; /* Encoded data (output only). Allows for rows of 1152 modules */
float row_height[200]; /* Heights of rows (output only). Allows for 200 row DotCode */
char errtxt[100]; /* Error message if an error or warning occurs, NUL-terminated (output only) */
char errtxt[160]; /* Error message if an error or warning occurs, NUL-terminated (output only) */
unsigned char *bitmap; /* Stored bitmap image (raster output only) */
int bitmap_width; /* Width of bitmap image (raster output only) */
int bitmap_height; /* Height of bitmap image (raster output only) */
@ -161,8 +161,12 @@ extern "C" {
#define BARCODE_C25IND 7 /* 2 of 5 Industrial */
#define BARCODE_CODE39 8 /* Code 39 */
#define BARCODE_EXCODE39 9 /* Extended Code 39 */
#define BARCODE_EANX 13 /* EAN (European Article Number) */
#define BARCODE_EANX_CHK 14 /* EAN + Check Digit */
#define BARCODE_EAN8 10 /* EAN-8 (European Article Number) GTIN-8 */
#define BARCODE_EAN_2ADDON 11 /* EAN/UPC 2-digit add-on (standalone) */
#define BARCODE_EAN_5ADDON 12 /* EAN/UPC 5-digit add-on (standalone) */
#define BARCODE_EANX 13 /* Legacy */
#define BARCODE_EANX_CHK 14 /* Legacy */
#define BARCODE_EAN13 15 /* EAN-13 (European Article Number) GTIN-13 */
#define BARCODE_GS1_128 16 /* GS1-128 */
#define BARCODE_EAN128 16 /* Legacy */
#define BARCODE_CODABAR 18 /* Codabar */
@ -181,9 +185,9 @@ extern "C" {
#define BARCODE_RSS_EXP 31 /* Legacy */
#define BARCODE_TELEPEN 32 /* Telepen Alpha */
#define BARCODE_UPCA 34 /* UPC-A */
#define BARCODE_UPCA_CHK 35 /* UPC-A + Check Digit */
#define BARCODE_UPCA_CHK 35 /* UPC-A including check digit */
#define BARCODE_UPCE 37 /* UPC-E */
#define BARCODE_UPCE_CHK 38 /* UPC-E + Check Digit */
#define BARCODE_UPCE_CHK 38 /* UPC-E including check digit */
#define BARCODE_POSTNET 40 /* USPS (U.S. Postal Service) POSTNET */
#define BARCODE_MSI_PLESSEY 47 /* MSI Plessey */
#define BARCODE_FIM 49 /* Facing Identification Mark */
@ -256,7 +260,7 @@ extern "C" {
/* Zint specific */
#define BARCODE_AZRUNE 128 /* Aztec Runes */
#define BARCODE_CODE32 129 /* Code 32 */
#define BARCODE_EANX_CC 130 /* EAN Composite */
#define BARCODE_EANX_CC 130 /* Legacy */
#define BARCODE_GS1_128_CC 131 /* GS1-128 Composite */
#define BARCODE_EAN128_CC 131 /* Legacy */
#define BARCODE_DBAR_OMN_CC 132 /* GS1 DataBar Omnidirectional Composite */
@ -281,7 +285,9 @@ extern "C" {
#define BARCODE_RMQR 145 /* Rectangular Micro QR Code (rMQR) */
#define BARCODE_BC412 146 /* IBM BC412 (SEMI T1-95) */
#define BARCODE_DXFILMEDGE 147 /* DX Film Edge Barcode on 35mm and APS films */
#define BARCODE_LAST 147 /* Max barcode number marker, not barcode */
#define BARCODE_EAN8_CC 148 /* EAN-8 Composite */
#define BARCODE_EAN13_CC 149 /* EAN-13 Composite */
#define BARCODE_LAST 149 /* Max barcode number marker, not barcode */
/* Output options (`symbol->output_options`) */
#define BARCODE_BIND_TOP 0x00001 /* Boundary bar above the symbol only (not below), does not affect stacking */

View file

@ -910,7 +910,8 @@ namespace Zint {
return true;
break;
default:
return symbology >= BARCODE_EANX_CC && symbology <= BARCODE_DBAR_EXPSTK_CC;
return (symbology >= BARCODE_EANX_CC && symbology <= BARCODE_DBAR_EXPSTK_CC)
|| symbology == BARCODE_EAN8_CC || symbology == BARCODE_EAN13_CC;
break;
}
}

View file

@ -387,12 +387,30 @@ private slots:
<< (ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_BINDABLE);
QTest::newRow("BARCODE_CODE128") << BARCODE_CODE128
<< (ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_READER_INIT | ZINT_CAP_BINDABLE);
QTest::newRow("BARCODE_EAN8") << BARCODE_EAN8
<< (ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_EXTENDABLE | ZINT_CAP_QUIET_ZONES
| ZINT_CAP_COMPLIANT_HEIGHT | ZINT_CAP_BINDABLE);
QTest::newRow("BARCODE_EAN_2ADDON") << BARCODE_EAN_2ADDON
<< (ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_EXTENDABLE | ZINT_CAP_QUIET_ZONES
| ZINT_CAP_COMPLIANT_HEIGHT | ZINT_CAP_BINDABLE);
QTest::newRow("BARCODE_EAN_5ADDON") << BARCODE_EAN_5ADDON
<< (ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_EXTENDABLE | ZINT_CAP_QUIET_ZONES
| ZINT_CAP_COMPLIANT_HEIGHT | ZINT_CAP_BINDABLE);
QTest::newRow("BARCODE_EANX") << BARCODE_EANX
<< (ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_EXTENDABLE | ZINT_CAP_QUIET_ZONES
| ZINT_CAP_COMPLIANT_HEIGHT | ZINT_CAP_BINDABLE);
QTest::newRow("BARCODE_EAN13") << BARCODE_EAN13
<< (ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_EXTENDABLE | ZINT_CAP_QUIET_ZONES
| ZINT_CAP_COMPLIANT_HEIGHT | ZINT_CAP_BINDABLE);
QTest::newRow("BARCODE_EANX_CC") << BARCODE_EANX_CC
<< (ZINT_CAP_HRT | ZINT_CAP_EXTENDABLE | ZINT_CAP_COMPOSITE | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES
| ZINT_CAP_COMPLIANT_HEIGHT);
QTest::newRow("BARCODE_EAN8_CC") << BARCODE_EAN8_CC
<< (ZINT_CAP_HRT | ZINT_CAP_EXTENDABLE | ZINT_CAP_COMPOSITE | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES
| ZINT_CAP_COMPLIANT_HEIGHT);
QTest::newRow("BARCODE_EAN13_CC") << BARCODE_EAN13_CC
<< (ZINT_CAP_HRT | ZINT_CAP_EXTENDABLE | ZINT_CAP_COMPOSITE | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES
| ZINT_CAP_COMPLIANT_HEIGHT);
QTest::newRow("BARCODE_QRCODE") << BARCODE_QRCODE
<< (ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_FULL_MULTIBYTE
| ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP);
@ -900,6 +918,20 @@ private slots:
<< "" << "" << ""
<< "zint -b 96 --compliantheight -d '1234567890123456789012345678' --scalexdimdp=0.375mm,600dpi";
QTest::newRow("BARCODE_EAN13") << true << 0.0f << ""
<< BARCODE_EAN13 << UNICODE_MODE // symbology-inputMode
<< "123456789012+12" << "" // text-primary
<< 0.0f << -1 << 8 << 0 << 1.0f << 0.0f << true << 0.8f << 1.0f // height-textGap
<< 0.0f << 0 << 0 << "" // guardDescent-structAppID
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
<< 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 15 --addongap=8 --compliantheight -d '123456789012+12' --guarddescent=0"
<< "zint.exe -b 15 --addongap=8 --compliantheight -d \"123456789012+12\" --guarddescent=0"
<< "" << "" << "" << "";
QTest::newRow("BARCODE_EANX") << true << 0.0f << ""
<< BARCODE_EANX << UNICODE_MODE // symbology-inputMode
<< "123456789012+12" << "" // text-primary
@ -914,6 +946,20 @@ private slots:
<< "zint.exe -b 13 --addongap=8 --compliantheight -d \"123456789012+12\" --guarddescent=0"
<< "" << "" << "" << "";
QTest::newRow("BARCODE_EAN13 (guardWhitespace/embedVectorFont") << true << 0.0f << ""
<< BARCODE_EAN13 << UNICODE_MODE // symbology-inputMode
<< "123456789012+12" << "" // text-primary
<< 0.0f << -1 << 8 << 0 << 1.0f << 0.0f << true << 0.8f << 1.0f // height-textGap
<< 0.0f << 0 << 0 << "" // guardDescent-structAppID
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
<< 0 << false << false << false << true << true << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 15 --addongap=8 --compliantheight -d '123456789012+12' --embedfont --guarddescent=0 --guardwhitespace"
<< "zint.exe -b 15 --addongap=8 --compliantheight -d \"123456789012+12\" --embedfont --guarddescent=0 --guardwhitespace"
<< "" << "" << "" << "";
QTest::newRow("BARCODE_EANX (guardWhitespace/embedVectorFont") << true << 0.0f << ""
<< BARCODE_EANX << UNICODE_MODE // symbology-inputMode
<< "123456789012+12" << "" // text-primary

View file

@ -182,6 +182,8 @@
- MSVC: suppress warning 4996 (_CRT_SECURE_NO_WARNINGS)
2025-02-15 GL
- strcpy() -> memcpy(); sizeof(primary); tabs -> spaces
2025-04-16 GL
- Added: EAN8, EAN_2ADDON, EAN_5ADDON, EAN13, EAN8_CC, EAN13_CC, DMFILMEDGE
*/
#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
@ -269,8 +271,12 @@ static const char *s_code_list[] = {
"Ind2of5",
"Code39",
"Code39Extended",
"EAN8",
"EAN-2AddOn",
"EAN-5AddOn",
"EAN",
"EAN+Check",
"EAN13",
"GS1-128",
"Codabar",
"Code128",
@ -361,6 +367,9 @@ static const char *s_code_list[] = {
"UltraCode",
"rMQR",
"BC412",
"DMFilmEdge",
"EAN8-CC",
"EAN13-CC",
NULL};
static const int s_code_number[] = {
@ -372,8 +381,12 @@ static const int s_code_number[] = {
BARCODE_C25IND,
BARCODE_CODE39,
BARCODE_EXCODE39,
BARCODE_EAN8,
BARCODE_EAN_2ADDON,
BARCODE_EAN_5ADDON,
BARCODE_EANX,
BARCODE_EANX_CHK,
BARCODE_EAN13,
BARCODE_GS1_128,
BARCODE_CODABAR,
BARCODE_CODE128,
@ -464,6 +477,9 @@ static const int s_code_number[] = {
BARCODE_ULTRA,
BARCODE_RMQR,
BARCODE_BC412,
BARCODE_DXFILMEDGE,
BARCODE_EAN8_CC,
BARCODE_EAN13_CC,
0};
/* ECI TCL encoding names.

View file

@ -65,9 +65,13 @@ IMAGES = \
images/upca.svg \
images/upca_5.svg \
images/upce.svg \
images/eanx13.svg \
images/eanx5.svg \
images/eanx8_5.svg \
images/ean13.svg \
images/ean13_2.svg \
images/ean13_gd_gws.svg \
images/ean8.svg \
images/ean8_gws.svg \
images/ean_2addon.svg \
images/ean_5addon_gws.svg \
images/isbnx.svg \
images/plessey.svg \
images/msi_plessey.svg \
@ -109,8 +113,8 @@ IMAGES = \
images/dbar_omnstk.svg \
images/dbar_expstk.svg \
images/code49.svg \
images/eanx_cc_a.svg \
images/eanx_cc_b.svg \
images/ean13_cc_a.svg \
images/ean13_cc_b.svg \
images/gs1_128_cc_c.svg \
images/pharma_two.svg \
images/postnet.svg \

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

21
docs/images/ean13_2.svg Normal file
View file

@ -0,0 +1,21 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="552" height="313" version="1.1" xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="552" height="313" fill="#FFFFFF"/>
<path d="M44 0h4v296.97h-4ZM52 0h4v296.97h-4ZM60 0h8v276.97h-8ZM80 0h4v276.97h-4ZM88 0h8v276.97h-8ZM104 0h8v276.97h-8ZM120 0h4v276.97h-4ZM132 0h8v276.97h-8ZM144 0h16v276.97h-16ZM164 0h4v276.97h-4ZM176 0h12v276.97h-12ZM192 0h4v276.97h-4ZM200 0h12v276.97h-12ZM220 0h4v276.97h-4ZM228 0h4v296.97h-4ZM236 0h4v296.97h-4ZM244 0h4v276.97h-4ZM252 0h4v276.97h-4ZM272 0h4v276.97h-4ZM288 0h4v276.97h-4ZM300 0h4v276.97h-4ZM312 0h4v276.97h-4ZM328 0h12v276.97h-12ZM344 0h4v276.97h-4ZM356 0h12v276.97h-12ZM376 0h4v276.97h-4ZM384 0h4v276.97h-4ZM392 0h4v276.97h-4ZM412 0h4v296.97h-4ZM420 0h4v296.97h-4ZM452 36h4v260.97h-4ZM460 36h8v260.97h-8ZM476 36h4v260.97h-4ZM488 36h8v260.97h-8ZM500 36h4v260.97h-4ZM508 36h8v260.97h-8ZM524 36h8v260.97h-8Z"/>
<text x="24.4" y="311.37" text-anchor="end" font-family="OCRB, monospace" font-size="40">
4
</text>
<text x="142" y="311.37" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
512345
</text>
<text x="326" y="311.37" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
678906
</text>
<text x="492" y="31.2" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
21
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Before After
Before After

View file

@ -0,0 +1,21 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="452" height="313" version="1.1" xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="452" height="313" fill="#FFFFFF"/>
<path d="M44 0h4v286.97h-4ZM52 0h4v286.97h-4ZM60 0h8v276.97h-8ZM80 0h4v276.97h-4ZM88 0h8v276.97h-8ZM104 0h8v276.97h-8ZM120 0h4v276.97h-4ZM132 0h8v276.97h-8ZM144 0h16v276.97h-16ZM164 0h4v276.97h-4ZM176 0h12v276.97h-12ZM192 0h4v276.97h-4ZM200 0h12v276.97h-12ZM220 0h4v276.97h-4ZM228 0h4v286.97h-4ZM236 0h4v286.97h-4ZM244 0h4v276.97h-4ZM252 0h4v276.97h-4ZM272 0h4v276.97h-4ZM288 0h4v276.97h-4ZM300 0h4v276.97h-4ZM312 0h4v276.97h-4ZM328 0h12v276.97h-12ZM344 0h4v276.97h-4ZM356 0h12v276.97h-12ZM376 0h4v276.97h-4ZM384 0h4v276.97h-4ZM392 0h4v276.97h-4ZM412 0h4v286.97h-4ZM420 0h4v286.97h-4Z"/>
<text x="24.4" y="311.37" text-anchor="end" font-family="OCRB, monospace" font-size="40">
4
</text>
<text x="142" y="311.37" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
512345
</text>
<text x="326" y="311.37" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
678906
</text>
<text x="454" y="311.37" text-anchor="end" font-family="OCRB, monospace" font-size="40">
&gt;
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -1,18 +1,15 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="532" height="257" version="1.1" xmlns="http://www.w3.org/2000/svg">
<svg width="324" height="257" version="1.1" xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="532" height="257" fill="#FFFFFF"/>
<path d="M28 0h4v240.97h-4ZM36 0h4v240.97h-4ZM44 0h12v220.97h-12ZM60 0h8v220.97h-8ZM72 0h4v220.97h-4ZM88 0h8v220.97h-8ZM100 0h16v220.97h-16ZM120 0h4v220.97h-4ZM132 0h4v220.97h-4ZM144 0h8v220.97h-8ZM156 0h4v240.97h-4ZM164 0h4v240.97h-4ZM172 0h4v220.97h-4ZM192 0h4v220.97h-4ZM200 0h4v220.97h-4ZM208 0h4v220.97h-4ZM228 0h4v220.97h-4ZM240 0h12v220.97h-12ZM256 0h4v220.97h-4ZM264 0h12v220.97h-12ZM284 0h4v240.97h-4ZM292 0h4v240.97h-4ZM324 36h4v204.97h-4ZM332 36h8v204.97h-8ZM344 36h12v204.97h-12ZM364 36h4v204.97h-4ZM372 36h4v204.97h-4ZM380 36h4v204.97h-4ZM396 36h8v204.97h-8ZM408 36h4v204.97h-4ZM416 36h4v204.97h-4ZM436 36h4v204.97h-4ZM444 36h4v204.97h-4ZM456 36h4v204.97h-4ZM468 36h8v204.97h-8ZM480 36h4v204.97h-4ZM492 36h8v204.97h-8ZM508 36h4v204.97h-4Z"/>
<rect x="0" y="0" width="324" height="257" fill="#FFFFFF"/>
<path d="M28 0h4v240.97h-4ZM36 0h4v240.97h-4ZM44 0h12v220.97h-12ZM60 0h8v220.97h-8ZM72 0h4v220.97h-4ZM88 0h8v220.97h-8ZM100 0h16v220.97h-16ZM120 0h4v220.97h-4ZM132 0h4v220.97h-4ZM144 0h8v220.97h-8ZM156 0h4v240.97h-4ZM164 0h4v240.97h-4ZM172 0h4v220.97h-4ZM192 0h4v220.97h-4ZM200 0h4v220.97h-4ZM208 0h4v220.97h-4ZM228 0h4v220.97h-4ZM240 0h12v220.97h-12ZM256 0h4v220.97h-4ZM264 0h12v220.97h-12ZM284 0h4v240.97h-4ZM292 0h4v240.97h-4Z"/>
<text x="98" y="255.37" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
7432
</text>
<text x="226" y="255.37" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
3654
</text>
<text x="420" y="31.2" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
54321
</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1,019 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

View file

@ -0,0 +1,12 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100" height="302" version="1.1" xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="100" height="302" fill="#FFFFFF"/>
<path d="M0 36h4v265.45h-4ZM8 36h8v265.45h-8ZM24 36h8v265.45h-8ZM40 36h4v265.45h-4ZM48 36h4v265.45h-4ZM60 36h4v265.45h-4ZM72 36h8v265.45h-8Z"/>
<text x="40" y="31.2" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
12
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 614 B

View file

@ -8,5 +8,8 @@
<text x="94" y="31.2" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
54321
</text>
<text x="210" y="31.2" text-anchor="end" font-family="OCRB, monospace" font-size="40">
&gt;
</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 797 B

After

Width:  |  Height:  |  Size: 904 B

Before After
Before After

View file

@ -4,15 +4,15 @@
<desc>Zint Generated Symbol</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="268" height="313" fill="#FFFFFF"/>
<path d="M36 0h4v296.97h-4ZM44 0h4v296.97h-4ZM56 0h8v276.97h-8ZM72 0h4v276.97h-4ZM84 0h4v276.97h-4ZM96 0h8v276.97h-8ZM108 0h4v276.97h-4ZM128 0h4v276.97h-4ZM140 0h12v276.97h-12ZM156 0h4v276.97h-4ZM164 0h8v276.97h-8ZM184 0h4v276.97h-4ZM204 0h4v276.97h-4ZM212 0h4v276.97h-4ZM220 0h4v296.97h-4ZM228 0h4v296.97h-4ZM236 0h4v296.97h-4Z"/>
<path d="M36 0h4v296.97h-4ZM44 0h4v296.97h-4ZM52 0h8v276.97h-8ZM68 0h8v276.97h-8ZM84 0h4v276.97h-4ZM96 0h8v276.97h-8ZM108 0h16v276.97h-16ZM128 0h4v276.97h-4ZM140 0h12v276.97h-12ZM156 0h4v276.97h-4ZM164 0h12v276.97h-12ZM184 0h4v276.97h-4ZM192 0h4v276.97h-4ZM200 0h16v276.97h-16ZM220 0h4v296.97h-4ZM228 0h4v296.97h-4ZM236 0h4v296.97h-4Z"/>
<text x="17.4" y="311.37" text-anchor="end" font-family="OCRB, monospace" font-size="28">
1
0
</text>
<text x="134" y="311.37" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
123456
</text>
<text x="246.6" y="311.37" text-anchor="start" font-family="OCRB, monospace" font-size="28">
2
5
</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

@ -4,15 +4,15 @@
<desc>Zint Generated Symbol</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="368" height="313" fill="#FFFFFF"/>
<path d="M36 0h4v296.97h-4ZM44 0h4v296.97h-4ZM56 0h8v276.97h-8ZM72 0h4v276.97h-4ZM84 0h4v276.97h-4ZM96 0h8v276.97h-8ZM108 0h4v276.97h-4ZM128 0h4v276.97h-4ZM140 0h12v276.97h-12ZM156 0h4v276.97h-4ZM164 0h8v276.97h-8ZM184 0h4v276.97h-4ZM204 0h4v276.97h-4ZM212 0h4v276.97h-4ZM220 0h4v296.97h-4ZM228 0h4v296.97h-4ZM236 0h4v296.97h-4ZM268 36h4v260.97h-4ZM276 36h8v260.97h-8ZM292 36h8v260.97h-8ZM308 36h4v260.97h-4ZM316 36h4v260.97h-4ZM328 36h4v260.97h-4ZM340 36h8v260.97h-8Z"/>
<path d="M36 0h4v296.97h-4ZM44 0h4v296.97h-4ZM52 0h8v276.97h-8ZM68 0h8v276.97h-8ZM84 0h4v276.97h-4ZM96 0h8v276.97h-8ZM108 0h16v276.97h-16ZM128 0h4v276.97h-4ZM140 0h12v276.97h-12ZM156 0h4v276.97h-4ZM164 0h12v276.97h-12ZM184 0h4v276.97h-4ZM192 0h4v276.97h-4ZM200 0h16v276.97h-16ZM220 0h4v296.97h-4ZM228 0h4v296.97h-4ZM236 0h4v296.97h-4ZM268 36h4v260.97h-4ZM276 36h8v260.97h-8ZM292 36h8v260.97h-8ZM308 36h4v260.97h-4ZM316 36h4v260.97h-4ZM328 36h4v260.97h-4ZM340 36h8v260.97h-8Z"/>
<text x="17.4" y="311.37" text-anchor="end" font-family="OCRB, monospace" font-size="28">
1
0
</text>
<text x="134" y="311.37" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
123456
</text>
<text x="246.6" y="311.37" text-anchor="start" font-family="OCRB, monospace" font-size="28">
2
5
</text>
<text x="308" y="31.2" text-anchor="middle" font-family="OCRB, monospace" font-size="40">
12

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

File diff suppressed because it is too large Load diff

View file

@ -654,227 +654,237 @@ Names are treated case-insensitively by the CLI, and the `BARCODE_` prefix and
any underscores are optional.
-----------------------------------------------------------------------------
Numeric Name[^3] Barcode Name
Numeric Name[^3] Barcode Name
Value
------- ------------------------ ------------------------------------------
1 `BARCODE_CODE11` Code 11
------- -------------------------- ---------------------------------------
1 `BARCODE_CODE11` Code 11
2`*` `BARCODE_C25STANDARD` Standard Code 2 of 5
2 `BARCODE_C25STANDARD *` Standard Code 2 of 5
3 `BARCODE_C25INTER` Interleaved 2 of 5
3 `BARCODE_C25INTER` Interleaved 2 of 5
4 `BARCODE_C25IATA` Code 2 of 5 IATA
4 `BARCODE_C25IATA` Code 2 of 5 IATA
6 `BARCODE_C25LOGIC` Code 2 of 5 Data Logic
6 `BARCODE_C25LOGIC` Code 2 of 5 Data Logic
7 `BARCODE_C25IND` Code 2 of 5 Industrial
7 `BARCODE_C25IND` Code 2 of 5 Industrial
8 `BARCODE_CODE39` Code 3 of 9 (Code 39)
8 `BARCODE_CODE39` Code 3 of 9 (Code 39)
9 `BARCODE_EXCODE39` Extended Code 3 of 9 (Code 39+)
9 `BARCODE_EXCODE39` Extended Code 3 of 9 (Code 39+)
13 `BARCODE_EANX` EAN (EAN-2, EAN-5, EAN-8 and EAN-13)
10 `BARCODE_EAN8 †` EAN-8 (European Article Number) GTIN-8
14 `BARCODE_EANX_CHK` EAN + Check Digit
11 `BARCODE_EAN_2ADDON †` EAN/UPC 2-digit add-on (standalone)
16`*` `BARCODE_GS1_128` GS1-128 (UCC.EAN-128)
12 `BARCODE_EAN_5ADDON †` EAN/UPC 5-digit add-on (standalone)
18 `BARCODE_CODABAR` Codabar
15 `BARCODE_EAN13 †` EAN-13 (European Article Number)
GTIN-13
20 `BARCODE_CODE128` Code 128 (automatic Code Set switching)
16 `BARCODE_GS1_128 *` GS1-128 (UCC.EAN-128)
21 `BARCODE_DPLEIT` Deutsche Post Leitcode
18 `BARCODE_CODABAR` Codabar
22 `BARCODE_DPIDENT` Deutsche Post Identcode
20 `BARCODE_CODE128` Code 128 (automatic Code Set switching)
23 `BARCODE_CODE16K` Code 16K
21 `BARCODE_DPLEIT` Deutsche Post Leitcode
24 `BARCODE_CODE49` Code 49
22 `BARCODE_DPIDENT` Deutsche Post Identcode
25 `BARCODE_CODE93` Code 93
23 `BARCODE_CODE16K` Code 16K
28 `BARCODE_FLAT` Flattermarken
24 `BARCODE_CODE49` Code 49
29`*` `BARCODE_DBAR_OMN` GS1 DataBar Omnidirectional (including GS1
DataBar Truncated)
25 `BARCODE_CODE93` Code 93
30`*` `BARCODE_DBAR_LTD` GS1 DataBar Limited
28 `BARCODE_FLAT` Flattermarken
31`*` `BARCODE_DBAR_EXP` GS1 DataBar Expanded
29 `BARCODE_DBAR_OMN *` GS1 DataBar Omnidirectional (including
GS1 DataBar Truncated)
32 `BARCODE_TELEPEN` Telepen Alpha
30 `BARCODE_DBAR_LTD *` GS1 DataBar Limited
34 `BARCODE_UPCA` UPC-A
31 `BARCODE_DBAR_EXP *` GS1 DataBar Expanded
35 `BARCODE_UPCA_CHK` UPC-A + Check Digit
32 `BARCODE_TELEPEN` Telepen Alpha
37 `BARCODE_UPCE` UPC-E
34 `BARCODE_UPCA` UPC-A
38 `BARCODE_UPCE_CHK` UPC-E + Check Digit
35 `BARCODE_UPCA_CHK` UPC-A with check digit
40 `BARCODE_POSTNET` POSTNET
37 `BARCODE_UPCE` UPC-E
47 `BARCODE_MSI_PLESSEY` MSI Plessey
38 `BARCODE_UPCE_CHK` UPC-E with check digit
49 `BARCODE_FIM` FIM
40 `BARCODE_POSTNET` POSTNET
50 `BARCODE_LOGMARS` LOGMARS
47 `BARCODE_MSI_PLESSEY` MSI Plessey
51 `BARCODE_PHARMA` Pharmacode One-Track
49 `BARCODE_FIM` FIM
52 `BARCODE_PZN` PZN
50 `BARCODE_LOGMARS` LOGMARS
53 `BARCODE_PHARMA_TWO` Pharmacode Two-Track
51 `BARCODE_PHARMA` Pharmacode One-Track
54 `BARCODE_CEPNET` Brazilian CEPNet
52 `BARCODE_PZN` PZN
55 `BARCODE_PDF417` PDF417
53 `BARCODE_PHARMA_TWO` Pharmacode Two-Track
56`*` `BARCODE_PDF417COMP` Compact PDF417 (Truncated PDF417)
54 `BARCODE_CEPNET` Brazilian CEPNet
57 `BARCODE_MAXICODE` MaxiCode
55 `BARCODE_PDF417` PDF417
58 `BARCODE_QRCODE` QR Code
56 `BARCODE_PDF417COMP *` Compact PDF417 (Truncated PDF417)
60 `BARCODE_CODE128AB` Code 128 (Suppress Code Set C)
57 `BARCODE_MAXICODE` MaxiCode
63 `BARCODE_AUSPOST` Australia Post Standard Customer
58 `BARCODE_QRCODE` QR Code
66 `BARCODE_AUSREPLY` Australia Post Reply Paid
60 `BARCODE_CODE128AB` Code 128 (Suppress Code Set C)
67 `BARCODE_AUSROUTE` Australia Post Routing
63 `BARCODE_AUSPOST` Australia Post Standard Customer
68 `BARCODE_AUSDIRECT` Australia Post Redirection
66 `BARCODE_AUSREPLY` Australia Post Reply Paid
69 `BARCODE_ISBNX` ISBN (EAN-13 with verification stage)
67 `BARCODE_AUSROUTE` Australia Post Routing
70 `BARCODE_RM4SCC` Royal Mail 4-State Customer Code (RM4SCC)
68 `BARCODE_AUSDIRECT` Australia Post Redirection
71 `BARCODE_DATAMATRIX` Data Matrix (ECC 200)
69 `BARCODE_ISBNX` ISBN (EAN-13 with verification stage)
72 `BARCODE_EAN14` EAN-14
70 `BARCODE_RM4SCC` Royal Mail 4-State Customer Code
(RM4SCC)
73 `BARCODE_VIN` Vehicle Identification Number
71 `BARCODE_DATAMATRIX` Data Matrix (ECC 200)
74 `BARCODE_CODABLOCKF` Codablock-F
72 `BARCODE_EAN14` EAN-14
75 `BARCODE_NVE18` NVE-18 (SSCC-18)
73 `BARCODE_VIN` Vehicle Identification Number
76 `BARCODE_JAPANPOST` Japanese Postal Code
74 `BARCODE_CODABLOCKF` Codablock-F
77 `BARCODE_KOREAPOST` Korea Post
75 `BARCODE_NVE18` NVE-18 (SSCC-18)
79`*` `BARCODE_DBAR_STK` GS1 DataBar Stacked
76 `BARCODE_JAPANPOST` Japanese Postal Code
80`*` `BARCODE_DBAR_OMNSTK` GS1 DataBar Stacked Omnidirectional
77 `BARCODE_KOREAPOST` Korea Post
81`*` `BARCODE_DBAR_EXPSTK` GS1 DataBar Expanded Stacked
79 `BARCODE_DBAR_STK *` GS1 DataBar Stacked
82 `BARCODE_PLANET` PLANET
80 `BARCODE_DBAR_OMNSTK *` GS1 DataBar Stacked Omnidirectional
84 `BARCODE_MICROPDF417` MicroPDF417
81 `BARCODE_DBAR_EXPSTK *` GS1 DataBar Expanded Stacked
85`*` `BARCODE_USPS_IMAIL` USPS Intelligent Mail (OneCode)
82 `BARCODE_PLANET` PLANET
86 `BARCODE_PLESSEY` UK Plessey
84 `BARCODE_MICROPDF417` MicroPDF417
87 `BARCODE_TELEPEN_NUM` Telepen Numeric
85 `BARCODE_USPS_IMAIL *` USPS Intelligent Mail (OneCode)
89 `BARCODE_ITF14` ITF-14
86 `BARCODE_PLESSEY` UK Plessey
90 `BARCODE_KIX` Dutch Post KIX Code
87 `BARCODE_TELEPEN_NUM` Telepen Numeric
92 `BARCODE_AZTEC` Aztec Code
89 `BARCODE_ITF14` ITF-14
93 `BARCODE_DAFT` DAFT Code
90 `BARCODE_KIX` Dutch Post KIX Code
96 `BARCODE_DPD` DPD Code
92 `BARCODE_AZTEC` Aztec Code
97 `BARCODE_MICROQR` Micro QR Code
93 `BARCODE_DAFT` DAFT Code
98 `BARCODE_HIBC_128` HIBC Code 128
96 `BARCODE_DPD` DPD Code
99 `BARCODE_HIBC_39` HIBC Code 39
97 `BARCODE_MICROQR` Micro QR Code
102 `BARCODE_HIBC_DM` HIBC Data Matrix
98 `BARCODE_HIBC_128` HIBC Code 128
104 `BARCODE_HIBC_QR` HIBC QR Code
99 `BARCODE_HIBC_39` HIBC Code 39
106 `BARCODE_HIBC_PDF` HIBC PDF417
102 `BARCODE_HIBC_DM` HIBC Data Matrix
108 `BARCODE_HIBC_MICPDF` HIBC MicroPDF417
104 `BARCODE_HIBC_QR` HIBC QR Code
110 `BARCODE_HIBC_BLOCKF` HIBC Codablock-F
106 `BARCODE_HIBC_PDF` HIBC PDF417
112 `BARCODE_HIBC_AZTEC` HIBC Aztec Code
108 `BARCODE_HIBC_MICPDF` HIBC MicroPDF417
115 `BARCODE_DOTCODE` DotCode
110 `BARCODE_HIBC_BLOCKF` HIBC Codablock-F
116 `BARCODE_HANXIN` Han Xin (Chinese Sensible) Code
112 `BARCODE_HIBC_AZTEC` HIBC Aztec Code
119 `BARCODE_MAILMARK_2D` Royal Mail 2D Mailmark (CMDM) (Data
Matrix)
115 `BARCODE_DOTCODE` DotCode
121 `BARCODE_MAILMARK_4S` Royal Mail 4-State Mailmark
116 `BARCODE_HANXIN` Han Xin (Chinese Sensible) Code
128 `BARCODE_AZRUNE` Aztec Runes
119 `BARCODE_MAILMARK_2D` Royal Mail 2D Mailmark (CMDM) (Data
Matrix)
129 `BARCODE_CODE32` Code 32
121 `BARCODE_MAILMARK_4S` Royal Mail 4-State Mailmark
130 `BARCODE_EANX_CC` GS1 Composite Symbol with EAN linear
component
128 `BARCODE_AZRUNE` Aztec Runes
131`*` `BARCODE_GS1_128_CC` GS1 Composite Symbol with GS1-128 linear
component
129 `BARCODE_CODE32` Code 32
132`*` `BARCODE_DBAR_OMN_CC` GS1 Composite Symbol with GS1 DataBar
Omnidirectional linear component
131 `BARCODE_GS1_128_CC *` GS1 Composite Symbol with GS1-128
linear component
133`*` `BARCODE_DBAR_LTD_CC` GS1 Composite Symbol with GS1 DataBar
Limited linear component
132 `BARCODE_DBAR_OMN_CC *` GS1 Composite Symbol with GS1 DataBar
Omnidirectional linear component
134`*` `BARCODE_DBAR_EXP_CC` GS1 Composite Symbol with GS1 DataBar
Expanded linear component
133 `BARCODE_DBAR_LTD_CC *` GS1 Composite Symbol with GS1 DataBar
Limited linear component
135 `BARCODE_UPCA_CC` GS1 Composite Symbol with UPC-A linear
component
134 `BARCODE_DBAR_EXP_CC *` GS1 Composite Symbol with GS1 DataBar
Expanded linear component
136 `BARCODE_UPCE_CC` GS1 Composite Symbol with UPC-E linear
component
135 `BARCODE_UPCA_CC` GS1 Composite Symbol with UPC-A linear
component
137`*` `BARCODE_DBAR_STK_CC` GS1 Composite Symbol with GS1 DataBar
Stacked component
136 `BARCODE_UPCE_CC` GS1 Composite Symbol with UPC-E linear
component
138`*` `BARCODE_DBAR_OMNSTK_CC` GS1 Composite Symbol with GS1 DataBar
Stacked Omnidirectional component
137 `BARCODE_DBAR_STK_CC *` GS1 Composite Symbol with GS1 DataBar
Stacked component
139`*` `BARCODE_DBAR_EXPSTK_CC` GS1 Composite Symbol with GS1 DataBar
Expanded Stacked component
138 `BARCODE_DBAR_OMNSTK_CC *` GS1 Composite Symbol with GS1 DataBar
Stacked Omnidirectional component
140 `BARCODE_CHANNEL` Channel Code
139 `BARCODE_DBAR_EXPSTK_CC *` GS1 Composite Symbol with GS1 DataBar
Expanded Stacked component
141 `BARCODE_CODEONE` Code One
140 `BARCODE_CHANNEL` Channel Code
142 `BARCODE_GRIDMATRIX` Grid Matrix
141 `BARCODE_CODEONE` Code One
143 `BARCODE_UPNQR` UPNQR (Univerzalnega Plačilnega Naloga QR)
142 `BARCODE_GRIDMATRIX` Grid Matrix
144 `BARCODE_ULTRA` Ultracode
143 `BARCODE_UPNQR` UPNQR (Univerzalnega Plačilnega Naloga
QR Code)
145 `BARCODE_RMQR` Rectangular Micro QR Code (rMQR)
144 `BARCODE_ULTRA` Ultracode
146 `BARCODE_BC412` IBM BC412 (SEMI T1-95)
145 `BARCODE_RMQR` Rectangular Micro QR Code (rMQR)
147 `BARCODE_DXFILMEDGE` DX Film Edge Barcode
146 `BARCODE_BC412` IBM BC412 (SEMI T1-95)
147 `BARCODE_DXFILMEDGE` DX Film Edge Barcode
148 `BARCODE_EAN8_CC †` GS1 Composite symbol with EAN-8 linear
component
149 `BARCODE_EAN13_CC †` GS1 Composite symbol with EAN-13 linear
component
-----------------------------------------------------------------------------
Table: {#tbl:barcode_types tag=": Barcode Types (Symbologies)"}
[^3]: The symbologies marked with an asterisk (`*`) in Table
{@tbl:barcode_types} above used different names in Zint before version 2.9.0.
For example, symbology 29 used the name `BARCODE_RSS14`. These names are now
deprecated but are still recognised by Zint and will continue to be supported in
future versions.
[^3]: The symbology names marked with an asterisk (`*`) in Table
{@tbl:barcode_types} above used different names in previous versions of Zint.
These names are now deprecated but are still recognised by Zint. Those marked
with a dagger (`†`) are replacements for `BARCODE_EANX` (13), `BARCODE_EANX_CHK`
(14) and `BARCODE_EANX_CC` (130), which are still recognised by Zint.
## 4.4 Adjusting Height
@ -953,9 +963,9 @@ A `--quietzones` option is also available which adds quiet zones compliant with
the symbology's specification. This is in addition to any whitespace specified
with the `--whitesp` or `--vwhitesp` switches.
Note that Codablock-F, Code 16K, Code 49, ITF-14, EAN-2 to EAN-13, ISBN, UPC-A
and UPC-E have compliant quiet zones added by default. This can be disabled with
the option `--noquietzones`.
Note that Codablock-F, Code 16K, Code 49, ITF-14, EAN-13, EAN-8, EAN/UPC
add-ons, ISBN, UPC-A and UPC-E have compliant quiet zones added by default. This
can be disabled with the option `--noquietzones`.
## 4.6 Adding Boundary Bars and Boxes
@ -1058,19 +1068,11 @@ background's alpha channel is set to zero (fully transparent).
## 4.8 Rotating the Symbol
The symbol can be rotated through four orientations using the `--rotate` option
followed by the angle of rotation as shown below.
```
--rotate=0 (default)
--rotate=90
--rotate=180
--rotate=270
```
![`zint -d "This Text" --rotate=90`](images/code128_rotate90.svg){.lin}
\clearpage
The symbol can be rotated through four orientations using the `--rotate` option
followed by the angle of rotation, valid values being 0 (the default), 90, 180
and 270.
## 4.9 Adjusting Image Size (X-dimension)
@ -1154,14 +1156,14 @@ print that example as a PNG at 12 dpmm, the approximate equivalent of 300 dpi
4 pixels rounding to the nearest pixel:
```bash
zint -b EANX -d "501234567890" --compliantheight --scale=2
zint -b EAN13 -d "501234567890" --compliantheight --scale=2
```
This will result in output of 37.29mm x 25.56mm (WxH) at 12 dpmm. The same
result can be achieved using the `--scalexdimdp` option with
```bash
zint -b EANX -d "501234567890" --compliantheight --scalexdimdp=0
zint -b EAN13 -d "501234567890" --compliantheight --scalexdimdp=0
```
as 0.33mm is the default X-dimension for EAN, and 12 dpmm the default
@ -1457,7 +1459,7 @@ separate barcode image for each line of text in that file. To do this use the
data. For example
```bash
zint -b EANX --batch -i ean13nos.txt
zint -b EAN13 --batch -i ean13nos.txt
```
where `"ean13nos.txt"` contains a list of EAN-13 numbers (GTINs), each on its
@ -1485,7 +1487,7 @@ Table: {#tbl:batch_filename_formatting tag=": Batch Filename Formatting"}
For instance
```bash
zint -b EANX --batch -i ean13nos.txt -o file~~~.svg
zint -b EAN13 --batch -i ean13nos.txt -o file~~~.svg
```
The following table shows some examples to clarify this method:
@ -1506,7 +1508,7 @@ a large number of barcodes:
Input Filenames Generated
-------------------- ------------------------------------------------------
`-o dir~/file~~~.svg` `"dir0/file001.svg"`, `"dir0/file002.svg"`, ...
, `"dir0/file999.svg"`, `"dir1/file000.svg"`, ...
`"dir0/file999.svg"`, `"dir1/file000.svg"`, ...
Table: {#tbl:batch_dir_examples tag=": Batch Directory Examples"}
@ -2353,8 +2355,8 @@ Code].
[^12]: The `BARCODE_BIND` flag is always set for Codablock-F, Code 16K and Code
49. Special considerations apply to ITF-14 - see [6.1.2.6 ITF-14].
[^13]: Codablock-F, Code 16K, Code 49, EAN-2 to EAN-13, ISBN, ITF-14, UPC-A and
UPC-E have compliant quiet zones added by default.
[^13]: Codablock-F, Code 16K, Code 49, EAN-13, EAN-8, EAN/UPC add-ons, ISBN,
ITF-14, UPC-A and UPC-E have compliant quiet zones added by default.
## 5.11 Setting the Input Mode
@ -2868,33 +2870,41 @@ Zint adds a check digit.
![`zint -b UPCA --compliantheight -d "72527270270"`](images/upca.svg){.upcean}
UPC-A is used in the United States for retail applications. The symbol requires
an 11-digit article number. The check digit is calculated by Zint. In addition
EAN-2 and EAN-5 add-on symbols can be added using the `+` character. For
example, to draw a UPC-A symbol with the data 72527270270 with an EAN-5 add-on
showing the data 12345 use the command:
UPC-A is used in the United States for retail applications, and encodes a
GTIN-12, a 12-digit Global Trade Item Number that includes a standard GS1 check
digit.
Input up to 11 digits may be given, to which a check digit will be added by
Zint. A 12-digit input including the check digit may also be supplied, in which
case Zint will verify the check digit, or you may use symbology
`BARCODE_UPCA_CHK` (35), which verifies that the last digit is a check digit.
Input less than 11 digits will be zero-filled.
In addition 2-digit and 5-digit add-on symbols can be added, their data
separated from the main data by a `+` character or a space. For example, to draw
a UPC-A symbol with the data "72527270270" and 5-digit add-on data "12345" use
the command:
```bash
zint -b UPCA -d "72527270270+12345"
```
or using the API encode a data string with the `+` character included:
or using the API:
```c
my_symbol->symbology = BARCODE_UPCA;
/* Using '+' */
error = ZBarcode_Encode_and_Print(my_symbol, "72527270270+12345", 0, 0);
/* Or a space */
error = ZBarcode_Encode_and_Print(my_symbol, "72527270270 12345", 0, 0);
```
![`zint -b UPCA --compliantheight -d
"72527270270+12345"`](images/upca_5.svg){.upcean}
If your input data already includes the check digit symbology `BARCODE_UPCA_CHK`
(35) can be used which takes a 12-digit input and validates the check digit
before encoding.
A quiet zone indicator can be added to the HRT by setting `--guardwhitespace`
(API `output_options |= EANUPC_GUARD_WHITESPACE`). For UPC, this is only
relevant when there is add-on:
relevant when there is an add-on:
```bash
zint -b UPCA -d "72527270270+12345" --guardwhitespace
@ -2919,37 +2929,28 @@ descend below the main bars can be adjusted by setting `--guarddescent` (API
#### 6.1.3.2 UPC Version E
![`zint -b UPCE --compliantheight -d "1123456"`](images/upce.svg){.upcean}
![`zint -b UPCE --compliantheight -d "123456"`](images/upce.svg){.upcean}
UPC-E is a zero-compressed version of UPC-A developed for smaller packages. The
code requires a 6-digit article number (digits 0-9). The check digit is
calculated by Zint. EAN-2 and EAN-5 add-on symbols can be added using the `+`
character as with UPC-A. In addition Zint also supports Number System 1 encoding
by entering a 7-digit article number starting with the digit 1. For example:
UPC-E is a zero-compressed version of UPC-A developed for smaller packages,
which takes up to 7 digits as input. A standard GS1 check digit will be added by
Zint. If 7 digits are given then the first must be '0' or '1' (the latter is
known as number system 1 and is non-standard). Input less than 7 digits will be
zero-filled.
An 8-digit input including the check digit may also be supplied, in which case
Zint will verify the check digit, or the symbology `BARCODE_UPCE_CHK` (38) may
be used, which will verify that the last digit is a check digit before encoding.
As with UPC-A, 2-digit and 5-digit add-on symbols can be added using a `+`
character or a space as a separator, and a quiet zone indicator can be added
when there is an add-on by setting `--guardwhitespace` (API `output_options |=
EANUPC_GUARD_WHITESPACE`):
```bash
zint -b UPCE -d "1123456"
zint -b UPCE -d "123456+12" --guardwhitespace
```
or
```c
my_symbol->symbology = BARCODE_UPCE;
error = ZBarcode_Encode_and_Print(my_symbol, "1123456", 0, 0);
```
If your input data already includes the check digit symbology `BARCODE_UPCE_CHK`
(38) can be used which takes a 7 or 8-digit input and validates the check digit
before encoding.
As with UPC-A, a quiet zone indicator can be added when there is an add-on by
setting `--guardwhitespace` (API `output_options |= EANUPC_GUARD_WHITESPACE`):
```bash
zint -b UPCE -d "1123456+12" --guardwhitespace
```
![`zint -b UPCE --compliantheight -d "1123456+12"
![`zint -b UPCE --compliantheight -d "123456+12"
--guardwhitespace`](images/upce_2_gws.svg){.upcean}
You can adjust the gap between the main symbol and an add-on in integral
@ -2960,60 +2961,84 @@ descend below the main bars can be adjusted by setting `--guarddescent` (API
### 6.1.4 EAN (European Article Number) (ISO 15420)
#### 6.1.4.1 EAN-2, EAN-5, EAN-8 and EAN-13
The EAN system, which stands for European Article Number but it is also known as
International Article Number, is a backward-compatible extension of UPC, used in
retail across Europe and internationally. It defines the symbologies EAN-13,
EAN-8 and ISBN (a subset of EAN-13).
![`zint -b EANX --compliantheight -d
"4512345678906"`](images/eanx13.svg){.upcean}
#### 6.1.4.1 EAN-13
The EAN system is used in retail across Europe and includes standards for EAN-2,
EAN-5, EAN-8 and EAN-13 which encode 2, 5, 7 or 12-digit numbers respectively.
Zint will decide which symbology to use depending on the length of the input
data. In addition EAN-2 and EAN-5 add-on symbols can be added to EAN-8 and
EAN-13 symbols using the `+` character as with UPC symbols. For example:
![`zint -b EAN13 --compliantheight -d
"451234567890"`](images/ean13.svg){.upcean}
EAN-13 encodes a GTIN-13, a 13-digit Global Trade Item Number that includes a
standard GS1 check digit. Input up to 12 digits may be given, to which a check
digit will be added by Zint, or a 13-digit input can be supplied in which case
Zint will validate the check digit. Input less than 12 digits will be
zero-filled.
A 2-digit or 5-digit add-on can be added by using a '+' or space character as
with UPC symbols. For example:
```bash
zint -b EANX -d "54321"
zint -b EAN13 -d "451234567890+21"
```
![`zint -b EANX --compliantheight -d "54321"`](images/eanx5.svg){.upcean}
will encode a stand-alone EAN-5, whereas
```bash
zint -b EANX -d "7432365+54321"
```
will encode an EAN-8 symbol with an EAN-5 add-on. As before these results can be
achieved using the API:
will encode an EAN-13 symbol with a 2-digit add-on. As before these results
can be achieved using the API:
```c
my_symbol->symbology = BARCODE_EANX;
error = ZBarcode_Encode_and_Print(my_symbol, "54321", 0, 0);
error = ZBarcode_Encode_and_Print(my_symbol, "7432365+54321", 0, 0);
my_symbol->symbology = BARCODE_EAN13;
error = ZBarcode_Encode_and_Print(my_symbol, "451234567890+21", 0, 0);
```
![`zint -b EANX --compliantheight -d
"7432365+54321"`](images/eanx8_5.svg){.upcean}
All of the EAN symbols include check digits which are added by Zint.
If you are encoding an EAN-8 or EAN-13 symbol and your data already includes the
check digit then you can use symbology `BARCODE_EANX_CHK` (14) which takes an 8
or 13-digit input and validates the check digit before encoding.
![`zint -b EAN13 --compliantheight -d
"451234567890+21"`](images/ean13_2.svg){.upcean}
Options to add quiet zone indicators and to adjust the add-on gap and the guard
bar descent height are the same as for [6.1.3.2 UPC Version E]. For instance:
```bash
zint -b EANX_CHK -d "74323654" --guardwhitespace
zint -b EAN13 -d "4512345678906" --guarddescent=2.5 --guardwhitespace
```
![`zint -b EANX_CHK --compliantheight -d "74323654"`
--guardwhitespace](images/eanx8_gws.svg){.upcean}
![`zint -b EAN13 --compliantheight -d "4512345678906"`
--guarddescent=2.5 --guardwhitespace](images/ean13_gd_gws.svg){.upcean}
#### 6.1.4.2 SBN, ISBN and ISBN-13
#### 6.1.4.2 EAN-8
![`zint -b EAN8 --compliantheight -d "7432365"`](images/ean8.svg){.upcean}
EAN-8 is a shortened version of EAN-13, encoding a GTIN-8 (a GTIN-13 with 5
leading zeroes implied), for use with small packages.
Input up to 7 digits may be supplied, to which Zint will add a standard GS1
check digit. An 8-digit input including the check digit may also be given, in
which case Zint will verify the check digit. Input less than 7 digits will be
zero-filled.
Options to add quiet zone indicators and to adjust the guard bar descent height
are the same as for [6.1.3.2 UPC Version E]. For instance:
```bash
zint -b EAN8 -d "7432365" --guardwhitespace
```
or using the API:
```c
my_symbol->symbology = BARCODE_EAN8;
my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
error = ZBarcode_Encode_and_Print(my_symbol, "7432365", 0, 0);
```
![`zint -b EAN8 --compliantheight -d "7432365"`
--guardwhitespace](images/ean8_gws.svg){.upcean}
2-digit and 5-digit add-ons may also be added, and the gap adjusted, as with
EAN-13, but this usage is non-standard and Zint will issue a warning on use.
#### 6.1.4.3 ISBN (including SBN and ISBN-13)
![`zint -b ISBNX --compliantheight -d
"9789295055124"`](images/isbnx.svg){.upcean}
@ -3028,9 +3053,35 @@ As with EAN-13, a quiet zone indicator can be added using `--guardwhitespace`:
![`zint -b ISBNX --compliantheight -d "9789295055124"
--guardwhitespace`](images/isbnx_gws.svg){.upcean}
EAN-2 and EAN-5 add-on symbols can be added using the `+` character, and there
are options to adjust the add-on gap and the guard bar descent height - see
[6.1.3.2 UPC Version E].
2-digit and 5-digit add-on symbols can be added using a `+` or space character,
and there are options to adjust the add-on gap and the guard bar descent height
- see [6.1.3.2 UPC Version E].
#### 6.1.4.4 EAN/UPC Add-Ons (standalone)
![`zint -b EAN_2ADDON --compliantheight
-d "12"`](images/ean_2addon.svg){.upcean}
As a convenience, 2-digit and 5-digit add-ons may be generated as standalone
symbols using the symbologies `BARCODE_EAN_2ADDON` (11) and `BARCODE_EAN_5ADDON`
(12), and as with the main EAN/UPC symbols a quiet zone indicator can be added
using `---guardwhitespace`. For instance
```bash
zint -b EAN_5ADDON -d '54321' --guardwhitespace
```
will generate a standalone 5-digit add-on with quiet zone guards, or using the
API:
```c
my_symbol->symbology = BARCODE_EAN_5ADDON;
my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
error = ZBarcode_Encode_and_Print(my_symbol, "54321", 0, 0);
```
![`zint -b EAN_5ADDON --compliantheight -d "54321"`
--guardwhitespace](images/ean_5addon_gws.svg){.upcean}
### 6.1.5 Plessey
@ -3105,8 +3156,6 @@ digit can be added if desired by setting `--vers=1` (API `option_2 = 1`). To add
a check digit but not show it in the Human Readable Text, set `--vers=2` (API
`option_2 = 2`).
\clearpage
#### 6.1.7.2 Extended Code 39
![`zint -b EXCODE39 --compliantheight -d
@ -3505,11 +3554,8 @@ once on a symbol. For example:
```c
my_symbol->symbology = BARCODE_CODE128;
error = ZBarcode_Encode(my_symbol, "This", 0);
error = ZBarcode_Encode(my_symbol, "That", 0);
error = ZBarcode_Print(my_symbol);
```
@ -3693,9 +3739,6 @@ encoding methods. Valid values are shown below.
Numeric Name Barcode Name
Value
------- ------------------------ ----------------------------------------
130 `BARCODE_EANX_CC` GS1 Composite Symbol with EAN linear
component
131 `BARCODE_GS1_128_CC` GS1 Composite Symbol with GS1-128 linear
component
@ -3722,6 +3765,12 @@ Value
139 `BARCODE_DBAR_EXPSTK_CC` GS1 Composite Symbol with GS1 DataBar
Expanded Stacked component
148 `BARCODE_EAN8_CC` GS1 Composite Symbol with EAN-8 linear
component
149 `BARCODE_EAN13_CC` GS1 Composite Symbol with EAN-13 linear
component
---------------------------------------------------------------------------
Table: {#tbl:composite_symbologies tag=": GS1 Composite Symbology Values"}
@ -3732,7 +3781,7 @@ in the normal way. To do this at the command prompt use the `--primary` switch
(API `primary`). For example:
```bash
zint -b EANX_CC --mode=1 --primary=331234567890 -d "[99]1234-abcd"
zint -b EAN13_CC --mode=1 --primary=331234567890 -d "[99]1234-abcd"
```
This creates an EAN-13 linear component with the data `"331234567890"` and a 2D
@ -3740,18 +3789,15 @@ CC-A (see [below][6.3.1 CC-A]) component with the data `"(99)1234-abcd"`. The
same results can be achieved using the API as shown below:
```c
my_symbol->symbology = BARCODE_EANX_CC;
my_symbol->symbology = BARCODE_EAN13_CC;
my_symbol->option_1 = 1;
strcpy(my_symbol->primary, "331234567890");
ZBarcode_Encode_and_Print(my_symbol, "[99]1234-abcd", 0, 0);
```
EAN-2 and EAN-5 add-on data can be used with EAN and UPC symbols using the `+`
character as described in sections [6.1.3 UPC (Universal Product Code)
(ISO 15420)] and [6.1.4 EAN (European Article Number) (ISO 15420)].
2-digit and 5-digit add-on data can be used with EAN and UPC symbols using the
`+` character as described in sections [6.1.3 UPC (Universal Product Code) (ISO
15420)] and [6.1.4 EAN (European Article Number) (ISO 15420)].
The 2D component of a composite symbol can use one of three systems: CC-A, CC-B
and CC-C, as described below. The 2D component type can be selected
@ -3761,8 +3807,8 @@ followed by 1, 2 or 3 for CC-A, CC-B or CC-C respectively.
### 6.3.1 CC-A
![`zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=1
--primary=331234567890`](images/eanx_cc_a.svg){.upcean}
![`zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1
--primary=331234567890`](images/ean13_cc_a.svg){.upcean}
This system uses a variation of MicroPDF417 which is optimised to fit into a
small space. The size of the 2D component and the amount of error correction is
@ -3772,8 +3818,8 @@ string of shorter length. To select CC-A use `--mode=1` (API `option_1 = 1`).
### 6.3.2 CC-B
![`zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=2
--primary=331234567890`](images/eanx_cc_b.svg){.upcean}
![`zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2
--primary=331234567890`](images/ean13_cc_b.svg){.upcean}
This system uses MicroPDF417 to encode the 2D component. The size of the 2D
component and the amount of error correction is determined by the amount of data
@ -4151,28 +4197,28 @@ Customer Data 6, 45 or 29 Anything (Latin-1)
Table: {#tbl:mailmark_2d_input_fields
tag=": Royal Mail 2D Mailmark Input Fields"}
The 13 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
The 12 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
patterns are similar to those for the 4-state except that the alphabetic
limitation (`'L'` versus `'A'`) does not apply, only the initial "outward" part
is required (the rest can be blank), and the whole field can be blank:
----------- ----------- ----------- ----------- ----------- ----------- -----------
`ANNAANASS` `AANNAANAS` `ANNNAANAS` `AANNNAANA` `ANANAANAS` `AANANAANA` `SSSSSSSSS`
----------- ----------- ----------- ----------- ----------- -----------
`ANNAANASS` `AANNAANAS` `ANNNAANAS` `AANNNAANA` `ANANAANAS` `AANANAANA`
`ANSSSSSSS` `AANSSSSSS` `ANNSSSSSS` `AANNSSSSS` `ANASSSSSS` `AANASSSSS`
----------- ----------- ----------- ----------- ----------- ----------- -----------
----------- ----------- ----------- ----------- ----------- -----------
Table: {#tbl:mailmark_2d_destination_dps
tag=": Royal Mail 2D Mailmark Destination+DPS Patterns"}
where `'A'` is alphabetic (A-Z), `'N'` numeric (0-9), and `'S'` space.
The 7 RTS (Return to Sender) Post Code patterns are similar to above except
The 6 RTS (Return to Sender) Post Code patterns are similar to above except
without the DPS (`'NA'`), and the trailing "inward" part cannot be blank
(although the whole field can be):
--------- --------- --------- --------- --------- --------- ---------
`ANNAASS` `AANNAAS` `ANNNAAS` `AANNNAA` `ANANAAS` `AANANAA` `SSSSSSS`
--------- --------- --------- --------- --------- --------- ---------
--------- --------- --------- --------- --------- ---------
`ANNAASS` `AANNAAS` `ANNNAAS` `AANNNAA` `ANANAAS` `AANANAA`
--------- --------- --------- --------- --------- ---------
Table: {#tbl:mailmark_2d_rts
tag=": Royal Mail 2D Mailmark RTS Patterns"}
@ -4256,6 +4302,7 @@ QR Code has eight different masks designed to minimize unwanted patterns. The
best mask to use is selected automatically by Zint but may be manually specified
by using the `--mask` switch with values 0-7, or in the API by setting
`option_3 = (N + 1) << 8` where N is 0-7. To use with `ZINT_FULL_MULTIBYTE` set
```c
option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8
```
@ -4328,6 +4375,7 @@ Micro QR Code has four different masks designed to minimize unwanted patterns.
The best mask to use is selected automatically by Zint but may be manually
specified by using the `--mask` switch with values 0-3, or in the API by setting
`option_3 = (N + 1) << 8` where N is 0-3. To use with `ZINT_FULL_MULTIBYTE` set
```c
option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8
```
@ -4790,6 +4838,7 @@ Han Xin has four different masks designed to minimize unwanted patterns. The
best mask to use is selected automatically by Zint but may be manually specified
by using the `--mask` switch with values 0-3, or in the API by setting
`option_3 = (N + 1) << 8` where N is 0-3. To use with `ZINT_FULL_MULTIBYTE` set
```c
option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8
```
@ -5180,8 +5229,8 @@ which will display the following window.
![Tcl/Tk demonstration program window](images/tcl_demo.png){.pop}
You can select the symbology, enter the data to encode, and set options (which
are the same as those given in the usage message). A raster preview of the
configured barcode is displayed once the `"Generate"` button is pressed.
are the same as those given in the usage message). The raster preview of the
configured barcode is updated when the `"Generate"` button is pressed.
# Annex D. Man Page ZINT(1)

View file

@ -91,8 +91,10 @@ April 2025
- 6.1.3.1 UPC Version A
- 6.1.3.2 UPC Version E
- 6.1.4 EAN (European Article Number) (ISO 15420)
- 6.1.4.1 EAN-2, EAN-5, EAN-8 and EAN-13
- 6.1.4.2 SBN, ISBN and ISBN-13
- 6.1.4.1 EAN-13
- 6.1.4.2 EAN-8
- 6.1.4.3 ISBN (including SBN and ISBN-13)
- 6.1.4.4 EAN/UPC Add-Ons (standalone)
- 6.1.5 Plessey
- 6.1.5.1 UK Plessey
- 6.1.5.2 MSI Plessey
@ -790,220 +792,230 @@ or
Names are treated case-insensitively by the CLI, and the BARCODE_ prefix and any
underscores are optional.
------------------------------------------------------------------------------
Numeric Name[3] Barcode Name
-----------------------------------------------------------------------------
Numeric Name[3] Barcode Name
Value
--------- ------------------------- ------------------------------------------
1 BARCODE_CODE11 Code 11
--------- --------------------------- ---------------------------------------
1 BARCODE_CODE11 Code 11
2* BARCODE_C25STANDARD Standard Code 2 of 5
2 BARCODE_C25STANDARD * Standard Code 2 of 5
3 BARCODE_C25INTER Interleaved 2 of 5
3 BARCODE_C25INTER Interleaved 2 of 5
4 BARCODE_C25IATA Code 2 of 5 IATA
4 BARCODE_C25IATA Code 2 of 5 IATA
6 BARCODE_C25LOGIC Code 2 of 5 Data Logic
6 BARCODE_C25LOGIC Code 2 of 5 Data Logic
7 BARCODE_C25IND Code 2 of 5 Industrial
7 BARCODE_C25IND Code 2 of 5 Industrial
8 BARCODE_CODE39 Code 3 of 9 (Code 39)
8 BARCODE_CODE39 Code 3 of 9 (Code 39)
9 BARCODE_EXCODE39 Extended Code 3 of 9 (Code 39+)
9 BARCODE_EXCODE39 Extended Code 3 of 9 (Code 39+)
13 BARCODE_EANX EAN (EAN-2, EAN-5, EAN-8 and EAN-13)
10 BARCODE_EAN8 † EAN-8 (European Article Number) GTIN-8
14 BARCODE_EANX_CHK EAN + Check Digit
11 BARCODE_EAN_2ADDON † EAN/UPC 2-digit add-on (standalone)
16* BARCODE_GS1_128 GS1-128 (UCC.EAN-128)
12 BARCODE_EAN_5ADDON † EAN/UPC 5-digit add-on (standalone)
18 BARCODE_CODABAR Codabar
15 BARCODE_EAN13 † EAN-13 (European Article Number)
GTIN-13
20 BARCODE_CODE128 Code 128 (automatic Code Set switching)
16 BARCODE_GS1_128 * GS1-128 (UCC.EAN-128)
21 BARCODE_DPLEIT Deutsche Post Leitcode
18 BARCODE_CODABAR Codabar
22 BARCODE_DPIDENT Deutsche Post Identcode
20 BARCODE_CODE128 Code 128 (automatic Code Set switching)
23 BARCODE_CODE16K Code 16K
21 BARCODE_DPLEIT Deutsche Post Leitcode
24 BARCODE_CODE49 Code 49
22 BARCODE_DPIDENT Deutsche Post Identcode
25 BARCODE_CODE93 Code 93
23 BARCODE_CODE16K Code 16K
28 BARCODE_FLAT Flattermarken
24 BARCODE_CODE49 Code 49
29* BARCODE_DBAR_OMN GS1 DataBar Omnidirectional (including GS1
DataBar Truncated)
25 BARCODE_CODE93 Code 93
30* BARCODE_DBAR_LTD GS1 DataBar Limited
28 BARCODE_FLAT Flattermarken
31* BARCODE_DBAR_EXP GS1 DataBar Expanded
29 BARCODE_DBAR_OMN * GS1 DataBar Omnidirectional (including
GS1 DataBar Truncated)
32 BARCODE_TELEPEN Telepen Alpha
30 BARCODE_DBAR_LTD * GS1 DataBar Limited
34 BARCODE_UPCA UPC-A
31 BARCODE_DBAR_EXP * GS1 DataBar Expanded
35 BARCODE_UPCA_CHK UPC-A + Check Digit
32 BARCODE_TELEPEN Telepen Alpha
37 BARCODE_UPCE UPC-E
34 BARCODE_UPCA UPC-A
38 BARCODE_UPCE_CHK UPC-E + Check Digit
35 BARCODE_UPCA_CHK UPC-A with check digit
40 BARCODE_POSTNET POSTNET
37 BARCODE_UPCE UPC-E
47 BARCODE_MSI_PLESSEY MSI Plessey
38 BARCODE_UPCE_CHK UPC-E with check digit
49 BARCODE_FIM FIM
40 BARCODE_POSTNET POSTNET
50 BARCODE_LOGMARS LOGMARS
47 BARCODE_MSI_PLESSEY MSI Plessey
51 BARCODE_PHARMA Pharmacode One-Track
49 BARCODE_FIM FIM
52 BARCODE_PZN PZN
50 BARCODE_LOGMARS LOGMARS
53 BARCODE_PHARMA_TWO Pharmacode Two-Track
51 BARCODE_PHARMA Pharmacode One-Track
54 BARCODE_CEPNET Brazilian CEPNet
52 BARCODE_PZN PZN
55 BARCODE_PDF417 PDF417
53 BARCODE_PHARMA_TWO Pharmacode Two-Track
56* BARCODE_PDF417COMP Compact PDF417 (Truncated PDF417)
54 BARCODE_CEPNET Brazilian CEPNet
57 BARCODE_MAXICODE MaxiCode
55 BARCODE_PDF417 PDF417
58 BARCODE_QRCODE QR Code
56 BARCODE_PDF417COMP * Compact PDF417 (Truncated PDF417)
60 BARCODE_CODE128AB Code 128 (Suppress Code Set C)
57 BARCODE_MAXICODE MaxiCode
63 BARCODE_AUSPOST Australia Post Standard Customer
58 BARCODE_QRCODE QR Code
66 BARCODE_AUSREPLY Australia Post Reply Paid
60 BARCODE_CODE128AB Code 128 (Suppress Code Set C)
67 BARCODE_AUSROUTE Australia Post Routing
63 BARCODE_AUSPOST Australia Post Standard Customer
68 BARCODE_AUSDIRECT Australia Post Redirection
66 BARCODE_AUSREPLY Australia Post Reply Paid
69 BARCODE_ISBNX ISBN (EAN-13 with verification stage)
67 BARCODE_AUSROUTE Australia Post Routing
70 BARCODE_RM4SCC Royal Mail 4-State Customer Code (RM4SCC)
68 BARCODE_AUSDIRECT Australia Post Redirection
71 BARCODE_DATAMATRIX Data Matrix (ECC 200)
69 BARCODE_ISBNX ISBN (EAN-13 with verification stage)
72 BARCODE_EAN14 EAN-14
70 BARCODE_RM4SCC Royal Mail 4-State Customer Code
(RM4SCC)
73 BARCODE_VIN Vehicle Identification Number
71 BARCODE_DATAMATRIX Data Matrix (ECC 200)
74 BARCODE_CODABLOCKF Codablock-F
72 BARCODE_EAN14 EAN-14
75 BARCODE_NVE18 NVE-18 (SSCC-18)
73 BARCODE_VIN Vehicle Identification Number
76 BARCODE_JAPANPOST Japanese Postal Code
74 BARCODE_CODABLOCKF Codablock-F
77 BARCODE_KOREAPOST Korea Post
75 BARCODE_NVE18 NVE-18 (SSCC-18)
79* BARCODE_DBAR_STK GS1 DataBar Stacked
76 BARCODE_JAPANPOST Japanese Postal Code
80* BARCODE_DBAR_OMNSTK GS1 DataBar Stacked Omnidirectional
77 BARCODE_KOREAPOST Korea Post
81* BARCODE_DBAR_EXPSTK GS1 DataBar Expanded Stacked
79 BARCODE_DBAR_STK * GS1 DataBar Stacked
82 BARCODE_PLANET PLANET
80 BARCODE_DBAR_OMNSTK * GS1 DataBar Stacked Omnidirectional
84 BARCODE_MICROPDF417 MicroPDF417
81 BARCODE_DBAR_EXPSTK * GS1 DataBar Expanded Stacked
85* BARCODE_USPS_IMAIL USPS Intelligent Mail (OneCode)
82 BARCODE_PLANET PLANET
86 BARCODE_PLESSEY UK Plessey
84 BARCODE_MICROPDF417 MicroPDF417
87 BARCODE_TELEPEN_NUM Telepen Numeric
85 BARCODE_USPS_IMAIL * USPS Intelligent Mail (OneCode)
89 BARCODE_ITF14 ITF-14
86 BARCODE_PLESSEY UK Plessey
90 BARCODE_KIX Dutch Post KIX Code
87 BARCODE_TELEPEN_NUM Telepen Numeric
92 BARCODE_AZTEC Aztec Code
89 BARCODE_ITF14 ITF-14
93 BARCODE_DAFT DAFT Code
90 BARCODE_KIX Dutch Post KIX Code
96 BARCODE_DPD DPD Code
92 BARCODE_AZTEC Aztec Code
97 BARCODE_MICROQR Micro QR Code
93 BARCODE_DAFT DAFT Code
98 BARCODE_HIBC_128 HIBC Code 128
96 BARCODE_DPD DPD Code
99 BARCODE_HIBC_39 HIBC Code 39
97 BARCODE_MICROQR Micro QR Code
102 BARCODE_HIBC_DM HIBC Data Matrix
98 BARCODE_HIBC_128 HIBC Code 128
104 BARCODE_HIBC_QR HIBC QR Code
99 BARCODE_HIBC_39 HIBC Code 39
106 BARCODE_HIBC_PDF HIBC PDF417
102 BARCODE_HIBC_DM HIBC Data Matrix
108 BARCODE_HIBC_MICPDF HIBC MicroPDF417
104 BARCODE_HIBC_QR HIBC QR Code
110 BARCODE_HIBC_BLOCKF HIBC Codablock-F
106 BARCODE_HIBC_PDF HIBC PDF417
112 BARCODE_HIBC_AZTEC HIBC Aztec Code
108 BARCODE_HIBC_MICPDF HIBC MicroPDF417
115 BARCODE_DOTCODE DotCode
110 BARCODE_HIBC_BLOCKF HIBC Codablock-F
116 BARCODE_HANXIN Han Xin (Chinese Sensible) Code
112 BARCODE_HIBC_AZTEC HIBC Aztec Code
119 BARCODE_MAILMARK_2D Royal Mail 2D Mailmark (CMDM) (Data
Matrix)
115 BARCODE_DOTCODE DotCode
121 BARCODE_MAILMARK_4S Royal Mail 4-State Mailmark
116 BARCODE_HANXIN Han Xin (Chinese Sensible) Code
128 BARCODE_AZRUNE Aztec Runes
119 BARCODE_MAILMARK_2D Royal Mail 2D Mailmark (CMDM) (Data
Matrix)
129 BARCODE_CODE32 Code 32
121 BARCODE_MAILMARK_4S Royal Mail 4-State Mailmark
130 BARCODE_EANX_CC GS1 Composite Symbol with EAN linear
component
128 BARCODE_AZRUNE Aztec Runes
131* BARCODE_GS1_128_CC GS1 Composite Symbol with GS1-128 linear
component
129 BARCODE_CODE32 Code 32
132* BARCODE_DBAR_OMN_CC GS1 Composite Symbol with GS1 DataBar
Omnidirectional linear component
131 BARCODE_GS1_128_CC * GS1 Composite Symbol with GS1-128
linear component
133* BARCODE_DBAR_LTD_CC GS1 Composite Symbol with GS1 DataBar
Limited linear component
132 BARCODE_DBAR_OMN_CC * GS1 Composite Symbol with GS1 DataBar
Omnidirectional linear component
134* BARCODE_DBAR_EXP_CC GS1 Composite Symbol with GS1 DataBar
Expanded linear component
133 BARCODE_DBAR_LTD_CC * GS1 Composite Symbol with GS1 DataBar
Limited linear component
135 BARCODE_UPCA_CC GS1 Composite Symbol with UPC-A linear
component
134 BARCODE_DBAR_EXP_CC * GS1 Composite Symbol with GS1 DataBar
Expanded linear component
136 BARCODE_UPCE_CC GS1 Composite Symbol with UPC-E linear
component
135 BARCODE_UPCA_CC GS1 Composite Symbol with UPC-A linear
component
137* BARCODE_DBAR_STK_CC GS1 Composite Symbol with GS1 DataBar
Stacked component
136 BARCODE_UPCE_CC GS1 Composite Symbol with UPC-E linear
component
138* BARCODE_DBAR_OMNSTK_CC GS1 Composite Symbol with GS1 DataBar
Stacked Omnidirectional component
137 BARCODE_DBAR_STK_CC * GS1 Composite Symbol with GS1 DataBar
Stacked component
139* BARCODE_DBAR_EXPSTK_CC GS1 Composite Symbol with GS1 DataBar
Expanded Stacked component
138 BARCODE_DBAR_OMNSTK_CC * GS1 Composite Symbol with GS1 DataBar
Stacked Omnidirectional component
140 BARCODE_CHANNEL Channel Code
139 BARCODE_DBAR_EXPSTK_CC * GS1 Composite Symbol with GS1 DataBar
Expanded Stacked component
141 BARCODE_CODEONE Code One
140 BARCODE_CHANNEL Channel Code
142 BARCODE_GRIDMATRIX Grid Matrix
141 BARCODE_CODEONE Code One
143 BARCODE_UPNQR UPNQR (Univerzalnega Plačilnega Naloga QR)
142 BARCODE_GRIDMATRIX Grid Matrix
144 BARCODE_ULTRA Ultracode
143 BARCODE_UPNQR UPNQR (Univerzalnega Plačilnega Naloga
QR Code)
145 BARCODE_RMQR Rectangular Micro QR Code (rMQR)
144 BARCODE_ULTRA Ultracode
146 BARCODE_BC412 IBM BC412 (SEMI T1-95)
145 BARCODE_RMQR Rectangular Micro QR Code (rMQR)
147 BARCODE_DXFILMEDGE DX Film Edge Barcode
------------------------------------------------------------------------------
146 BARCODE_BC412 IBM BC412 (SEMI T1-95)
147 BARCODE_DXFILMEDGE DX Film Edge Barcode
148 BARCODE_EAN8_CC † GS1 Composite symbol with EAN-8 linear
component
149 BARCODE_EAN13_CC † GS1 Composite symbol with EAN-13 linear
component
-----------------------------------------------------------------------------
Table : Barcode Types (Symbologies)
@ -1069,9 +1081,9 @@ A --quietzones option is also available which adds quiet zones compliant with
the symbologys specification. This is in addition to any whitespace specified
with the --whitesp or --vwhitesp switches.
Note that Codablock-F, Code 16K, Code 49, ITF-14, EAN-2 to EAN-13, ISBN, UPC-A
and UPC-E have compliant quiet zones added by default. This can be disabled with
the option --noquietzones.
Note that Codablock-F, Code 16K, Code 49, ITF-14, EAN-13, EAN-8, EAN/UPC
add-ons, ISBN, UPC-A and UPC-E have compliant quiet zones added by default. This
can be disabled with the option --noquietzones.
4.6 Adding Boundary Bars and Boxes
@ -1158,16 +1170,12 @@ which case they will be converted formulaically to CMYK approximations.
4.8 Rotating the Symbol
The symbol can be rotated through four orientations using the --rotate option
followed by the angle of rotation as shown below.
--rotate=0 (default)
--rotate=90
--rotate=180
--rotate=270
[zint -d "This Text" --rotate=90]
The symbol can be rotated through four orientations using the --rotate option
followed by the angle of rotation, valid values being 0 (the default), 90, 180
and 270.
4.9 Adjusting Image Size (X-dimension)
The size of the image can be altered using the --scale option, which sets the
@ -1243,12 +1251,12 @@ print that example as a PNG at 12 dpmm, the approximate equivalent of 300 dpi
(dpi = dpmm * 25.4), specify a scale of 2, since 0.33 * 12 = 3.96 pixels, or 4
pixels rounding to the nearest pixel:
zint -b EANX -d "501234567890" --compliantheight --scale=2
zint -b EAN13 -d "501234567890" --compliantheight --scale=2
This will result in output of 37.29mm x 25.56mm (WxH) at 12 dpmm. The same
result can be achieved using the --scalexdimdp option with
zint -b EANX -d "501234567890" --compliantheight --scalexdimdp=0
zint -b EAN13 -d "501234567890" --compliantheight --scalexdimdp=0
as 0.33mm is the default X-dimension for EAN, and 12 dpmm the default
resolution.
@ -1510,7 +1518,7 @@ barcode image for each line of text in that file. To do this use the --batch
switch together with -i to select the input file from which to read data. For
example
zint -b EANX --batch -i ean13nos.txt
zint -b EAN13 --batch -i ean13nos.txt
where "ean13nos.txt" contains a list of EAN-13 numbers (GTINs), each on its own
line. Zint will automatically detect the end of a line of text (in either Unix
@ -1535,7 +1543,7 @@ characters in the output filename as shown in the table below:
For instance
zint -b EANX --batch -i ean13nos.txt -o file~~~.svg
zint -b EAN13 --batch -i ean13nos.txt -o file~~~.svg
The following table shows some examples to clarify this method:
@ -1553,9 +1561,9 @@ The special characters can span directories also, which is useful when creating
a large number of barcodes:
Input Filenames Generated
--------------------- ---------------------------------------------
--------------------- -------------------------------------------
-o dir~/file~~~.svg "dir0/file001.svg", "dir0/file002.svg", …
, "dir0/file999.svg", "dir1/file000.svg", …
"dir0/file999.svg", "dir1/file000.svg", …
Table : Batch Directory Examples
@ -2786,28 +2794,36 @@ Zint adds a check digit.
[zint -b UPCA --compliantheight -d "72527270270"]
UPC-A is used in the United States for retail applications. The symbol requires
an 11-digit article number. The check digit is calculated by Zint. In addition
EAN-2 and EAN-5 add-on symbols can be added using the + character. For example,
to draw a UPC-A symbol with the data 72527270270 with an EAN-5 add-on showing
the data 12345 use the command:
UPC-A is used in the United States for retail applications, and encodes a
GTIN-12, a 12-digit Global Trade Item Number that includes a standard GS1 check
digit.
Input up to 11 digits may be given, to which a check digit will be added by
Zint. A 12-digit input including the check digit may also be supplied, in which
case Zint will verify the check digit, or you may use symbology BARCODE_UPCA_CHK
(35), which verifies that the last digit is a check digit. Input less than 11
digits will be zero-filled.
In addition 2-digit and 5-digit add-on symbols can be added, their data
separated from the main data by a + character or a space. For example, to draw a
UPC-A symbol with the data “72527270270” and 5-digit add-on data “12345” use the
command:
zint -b UPCA -d "72527270270+12345"
or using the API encode a data string with the + character included:
or using the API:
my_symbol->symbology = BARCODE_UPCA;
/* Using '+' */
error = ZBarcode_Encode_and_Print(my_symbol, "72527270270+12345", 0, 0);
/* Or a space */
error = ZBarcode_Encode_and_Print(my_symbol, "72527270270 12345", 0, 0);
[zint -b UPCA --compliantheight -d "72527270270+12345"]
If your input data already includes the check digit symbology BARCODE_UPCA_CHK
(35) can be used which takes a 12-digit input and validates the check digit
before encoding.
A quiet zone indicator can be added to the HRT by setting --guardwhitespace (API
output_options |= EANUPC_GUARD_WHITESPACE). For UPC, this is only relevant when
there is add-on:
there is an add-on:
zint -b UPCA -d "72527270270+12345" --guardwhitespace
@ -2827,31 +2843,26 @@ guard_descent) to a value between 0.0 and 20.0 (default 5.0).
6.1.3.2 UPC Version E
[zint -b UPCE --compliantheight -d "1123456"]
[zint -b UPCE --compliantheight -d "123456"]
UPC-E is a zero-compressed version of UPC-A developed for smaller packages. The
code requires a 6-digit article number (digits 0-9). The check digit is
calculated by Zint. EAN-2 and EAN-5 add-on symbols can be added using the +
character as with UPC-A. In addition Zint also supports Number System 1 encoding
by entering a 7-digit article number starting with the digit 1. For example:
UPC-E is a zero-compressed version of UPC-A developed for smaller packages,
which takes up to 7 digits as input. A standard GS1 check digit will be added by
Zint. If 7 digits are given then the first must be 0 or 1 (the latter is
known as number system 1 and is non-standard). Input less than 7 digits will be
zero-filled.
zint -b UPCE -d "1123456"
An 8-digit input including the check digit may also be supplied, in which case
Zint will verify the check digit, or the symbology BARCODE_UPCE_CHK (38) may be
used, which will verify that the last digit is a check digit before encoding.
or
As with UPC-A, 2-digit and 5-digit add-on symbols can be added using a +
character or a space as a separator, and a quiet zone indicator can be added
when there is an add-on by setting --guardwhitespace (API
output_options |= EANUPC_GUARD_WHITESPACE):
my_symbol->symbology = BARCODE_UPCE;
error = ZBarcode_Encode_and_Print(my_symbol, "1123456", 0, 0);
zint -b UPCE -d "123456+12" --guardwhitespace
If your input data already includes the check digit symbology BARCODE_UPCE_CHK
(38) can be used which takes a 7 or 8-digit input and validates the check digit
before encoding.
As with UPC-A, a quiet zone indicator can be added when there is an add-on by
setting --guardwhitespace (API output_options |= EANUPC_GUARD_WHITESPACE):
zint -b UPCE -d "1123456+12" --guardwhitespace
[zint -b UPCE --compliantheight -d "1123456+12" --guardwhitespace]
[zint -b UPCE --compliantheight -d "123456+12" --guardwhitespace]
You can adjust the gap between the main symbol and an add-on in integral
multiples of the X-dimension by setting --addongap (API option_2) to a value
@ -2861,49 +2872,71 @@ guard_descent) to a value between 0.0 and 20.0 (default 5.0).
6.1.4 EAN (European Article Number) (ISO 15420)
6.1.4.1 EAN-2, EAN-5, EAN-8 and EAN-13
The EAN system, which stands for European Article Number but it is also known as
International Article Number, is a backward-compatible extension of UPC, used in
retail across Europe and internationally. It defines the symbologies EAN-13,
EAN-8 and ISBN (a subset of EAN-13).
[zint -b EANX --compliantheight -d "4512345678906"]
6.1.4.1 EAN-13
The EAN system is used in retail across Europe and includes standards for EAN-2,
EAN-5, EAN-8 and EAN-13 which encode 2, 5, 7 or 12-digit numbers respectively.
Zint will decide which symbology to use depending on the length of the input
data. In addition EAN-2 and EAN-5 add-on symbols can be added to EAN-8 and
EAN-13 symbols using the + character as with UPC symbols. For example:
[zint -b EAN13 --compliantheight -d "451234567890"]
zint -b EANX -d "54321"
EAN-13 encodes a GTIN-13, a 13-digit Global Trade Item Number that includes a
standard GS1 check digit. Input up to 12 digits may be given, to which a check
digit will be added by Zint, or a 13-digit input can be supplied in which case
Zint will validate the check digit. Input less than 12 digits will be
zero-filled.
[zint -b EANX --compliantheight -d "54321"]
A 2-digit or 5-digit add-on can be added by using a + or space character as
with UPC symbols. For example:
will encode a stand-alone EAN-5, whereas
zint -b EAN13 -d "451234567890+21"
zint -b EANX -d "7432365+54321"
will encode an EAN-13 symbol with a 2-digit add-on. As before these results can
be achieved using the API:
will encode an EAN-8 symbol with an EAN-5 add-on. As before these results can be
achieved using the API:
my_symbol->symbology = BARCODE_EAN13;
error = ZBarcode_Encode_and_Print(my_symbol, "451234567890+21", 0, 0);
my_symbol->symbology = BARCODE_EANX;
error = ZBarcode_Encode_and_Print(my_symbol, "54321", 0, 0);
error = ZBarcode_Encode_and_Print(my_symbol, "7432365+54321", 0, 0);
[zint -b EANX --compliantheight -d "7432365+54321"]
All of the EAN symbols include check digits which are added by Zint.
If you are encoding an EAN-8 or EAN-13 symbol and your data already includes the
check digit then you can use symbology BARCODE_EANX_CHK (14) which takes an 8 or
13-digit input and validates the check digit before encoding.
[zint -b EAN13 --compliantheight -d "451234567890+21"]
Options to add quiet zone indicators and to adjust the add-on gap and the guard
bar descent height are the same as for 6.1.3.2 UPC Version E. For instance:
zint -b EANX_CHK -d "74323654" --guardwhitespace
zint -b EAN13 -d "4512345678906" --guarddescent=2.5 --guardwhitespace
[zint -b EANX_CHK --compliantheight -d "74323654" guardwhitespace]
[zint -b EAN13 --compliantheight -d "4512345678906" guarddescent=2.5
guardwhitespace]
6.1.4.2 SBN, ISBN and ISBN-13
6.1.4.2 EAN-8
[zint -b EAN8 --compliantheight -d "7432365"]
EAN-8 is a shortened version of EAN-13, encoding a GTIN-8 (a GTIN-13 with 5
leading zeroes implied), for use with small packages.
Input up to 7 digits may be supplied, to which Zint will add a standard GS1
check digit. An 8-digit input including the check digit may also be given, in
which case Zint will verify the check digit. Input less than 7 digits will be
zero-filled.
Options to add quiet zone indicators and to adjust the guard bar descent height
are the same as for 6.1.3.2 UPC Version E. For instance:
zint -b EAN8 -d "7432365" --guardwhitespace
or using the API:
my_symbol->symbology = BARCODE_EAN8;
my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
error = ZBarcode_Encode_and_Print(my_symbol, "7432365", 0, 0);
[zint -b EAN8 --compliantheight -d "7432365" guardwhitespace]
2-digit and 5-digit add-ons may also be added, and the gap adjusted, as with
EAN-13, but this usage is non-standard and Zint will issue a warning on use.
6.1.4.3 ISBN (including SBN and ISBN-13)
[zint -b ISBNX --compliantheight -d "9789295055124"]
@ -2916,9 +2949,29 @@ As with EAN-13, a quiet zone indicator can be added using --guardwhitespace:
[zint -b ISBNX --compliantheight -d "9789295055124" --guardwhitespace]
EAN-2 and EAN-5 add-on symbols can be added using the + character, and there are
options to adjust the add-on gap and the guard bar descent height - see 6.1.3.2
UPC Version E.
2-digit and 5-digit add-on symbols can be added using a + or space character,
and there are options to adjust the add-on gap and the guard bar descent
height - see 6.1.3.2 UPC Version E.
6.1.4.4 EAN/UPC Add-Ons (standalone)
[zint -b EAN_2ADDON --compliantheight -d "12"]
As a convenience, 2-digit and 5-digit add-ons may be generated as standalone
symbols using the symbologies BARCODE_EAN_2ADDON (11) and BARCODE_EAN_5ADDON
(12), and as with the main EAN/UPC symbols a quiet zone indicator can be added
using ---guardwhitespace. For instance
zint -b EAN_5ADDON -d '54321' --guardwhitespace
will generate a standalone 5-digit add-on with quiet zone guards, or using the
API:
my_symbol->symbology = BARCODE_EAN_5ADDON;
my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
error = ZBarcode_Encode_and_Print(my_symbol, "54321", 0, 0);
[zint -b EAN_5ADDON --compliantheight -d "54321" guardwhitespace]
6.1.5 Plessey
@ -3355,11 +3408,8 @@ achieved using the API by executing the ZBarcode_Encode() function more than
once on a symbol. For example:
my_symbol->symbology = BARCODE_CODE128;
error = ZBarcode_Encode(my_symbol, "This", 0);
error = ZBarcode_Encode(my_symbol, "That", 0);
error = ZBarcode_Print(my_symbol);
[zint -d "This" -d "That"]
@ -3531,9 +3581,6 @@ encoding methods. Valid values are shown below.
Numeric Name Barcode Name
Value
--------- ------------------------- ----------------------------------------
130 BARCODE_EANX_CC GS1 Composite Symbol with EAN linear
component
131 BARCODE_GS1_128_CC GS1 Composite Symbol with GS1-128 linear
component
@ -3560,6 +3607,12 @@ encoding methods. Valid values are shown below.
139 BARCODE_DBAR_EXPSTK_CC GS1 Composite Symbol with GS1 DataBar
Expanded Stacked component
148 BARCODE_EAN8_CC GS1 Composite Symbol with EAN-8 linear
component
149 BARCODE_EAN13_CC GS1 Composite Symbol with EAN-13 linear
component
----------------------------------------------------------------------------
Table : GS1 Composite Symbology Values
@ -3569,21 +3622,18 @@ entered into a primary string with the data for the 2D component being entered
in the normal way. To do this at the command prompt use the --primary switch
(API primary). For example:
zint -b EANX_CC --mode=1 --primary=331234567890 -d "[99]1234-abcd"
zint -b EAN13_CC --mode=1 --primary=331234567890 -d "[99]1234-abcd"
This creates an EAN-13 linear component with the data "331234567890" and a 2D
CC-A (see below) component with the data "(99)1234-abcd". The same results can
be achieved using the API as shown below:
my_symbol->symbology = BARCODE_EANX_CC;
my_symbol->symbology = BARCODE_EAN13_CC;
my_symbol->option_1 = 1;
strcpy(my_symbol->primary, "331234567890");
ZBarcode_Encode_and_Print(my_symbol, "[99]1234-abcd", 0, 0);
EAN-2 and EAN-5 add-on data can be used with EAN and UPC symbols using the +
2-digit and 5-digit add-on data can be used with EAN and UPC symbols using the +
character as described in sections 6.1.3 UPC (Universal Product Code) (ISO
15420) and 6.1.4 EAN (European Article Number) (ISO 15420).
@ -3595,8 +3645,8 @@ followed by 1, 2 or 3 for CC-A, CC-B or CC-C respectively.
6.3.1 CC-A
[zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=3312345
67890]
[zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234
567890]
This system uses a variation of MicroPDF417 which is optimised to fit into a
small space. The size of the 2D component and the amount of error correction is
@ -3606,8 +3656,8 @@ string of shorter length. To select CC-A use --mode=1 (API option_1 = 1).
6.3.2 CC-B
[zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=3312345
67890]
[zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=331234
567890]
This system uses MicroPDF417 to encode the 2D component. The size of the 2D
component and the amount of error correction is determined by the amount of data
@ -3959,31 +4009,28 @@ section, as summarized below.
Table : Royal Mail 2D Mailmark Input Fields
The 13 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
The 12 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
patterns are similar to those for the 4-state except that the alphabetic
limitation ('L' versus 'A') does not apply, only the initial “outward” part is
required (the rest can be blank), and the whole field can be blank:
----------- ----------- ----------- ----------- ----------- ----------- ------
-----
ANNAANASS AANNAANAS ANNNAANAS AANNNAANA ANANAANAS AANANAANA SSSSSS
SSS
----------- ----------- ----------- ----------- ----------- -----------
ANNAANASS AANNAANAS ANNNAANAS AANNNAANA ANANAANAS AANANAANA
ANSSSSSSS AANSSSSSS ANNSSSSSS AANNSSSSS ANASSSSSS AANASSSSS
----------- ----------- ----------- ----------- ----------- ----------- ------
-----
----------- ----------- ----------- ----------- ----------- -----------
Table : Royal Mail 2D Mailmark Destination+DPS Patterns
where 'A' is alphabetic (A-Z), 'N' numeric (0-9), and 'S' space.
The 7 RTS (Return to Sender) Post Code patterns are similar to above except
The 6 RTS (Return to Sender) Post Code patterns are similar to above except
without the DPS ('NA'), and the trailing “inward” part cannot be blank (although
the whole field can be):
--------- --------- --------- --------- --------- --------- ---------
ANNAASS AANNAAS ANNNAAS AANNNAA ANANAAS AANANAA SSSSSSS
--------- --------- --------- --------- --------- --------- ---------
--------- --------- --------- --------- --------- ---------
ANNAASS AANNAAS ANNNAAS AANNNAA ANANAAS AANANAA
--------- --------- --------- --------- --------- ---------
Table : Royal Mail 2D Mailmark RTS Patterns
@ -4951,8 +4998,8 @@ which will display the following window.
[Tcl/Tk demonstration program window]
You can select the symbology, enter the data to encode, and set options (which
are the same as those given in the usage message). A raster preview of the
configured barcode is displayed once the "Generate" button is pressed.
are the same as those given in the usage message). The raster preview of the
configured barcode is updated when the "Generate" button is pressed.
Annex D. Man Page ZINT(1)
@ -5247,8 +5294,8 @@ OPTIONS
5 Enhanced ECC for all of the message
6 Reader Initialisation (Programming)
For GS1 Composite symbols (names end in _CC, i.e. EANX_CC, GS1_128_CC,
DBAR_OMN_CC etc.):
For GS1 Composite symbols (names end in _CC, i.e. EAN8_CC, EAN13_CC,
GS1_128_CC, DBAR_OMN_CC etc.):
1 CC-A
2 CC-B
@ -5625,7 +5672,7 @@ Use batch mode to read from an input file “ean13nos.txt” containing a list o
formatting the output filenames to “ean001.gif”, “ean002.gif” etc. using the
special character “~”.
zint -b EANX --batch -i 'ean13nos.txt' -o 'ean~~~.gif'
zint -b EAN13 --batch -i 'ean13nos.txt' -o 'ean~~~.gif'
BUGS
@ -5669,11 +5716,12 @@ Robin Stuart robin@zint.org.uk
codeset from U+0000 to U+D7FF and U+E000 to U+FFFF (i.e. excluding surrogates).
Not to be confused with the Windows Bitmap file format BMP!
[3] The symbologies marked with an asterisk (*) in Table
: Barcode Types (Symbologies) above used different names in Zint before version
2.9.0. For example, symbology 29 used the name BARCODE_RSS14. These names are
now deprecated but are still recognised by Zint and will continue to be
supported in future versions.
[3] The symbology names marked with an asterisk (*) in Table
: Barcode Types (Symbologies) above used different names in previous versions of
Zint. These names are now deprecated but are still recognised by Zint. Those
marked with a dagger (†) are replacements for BARCODE_EANX (13),
BARCODE_EANX_CHK (14) and BARCODE_EANX_CC (130), which are still recognised by
Zint.
[4] The background is omitted for vector outputs EMF, EPS and SVG when
--nobackground is given. For raster outputs GIF, PCX, PNG and TIF, the
@ -5710,8 +5758,8 @@ Code.
[12] The BARCODE_BIND flag is always set for Codablock-F, Code 16K and Code 49.
Special considerations apply to ITF-14 - see 6.1.2.6 ITF-14.
[13] Codablock-F, Code 16K, Code 49, EAN-2 to EAN-13, ISBN, ITF-14, UPC-A and
UPC-E have compliant quiet zones added by default.
[13] Codablock-F, Code 16K, Code 49, EAN-13, EAN-8, EAN/UPC add-ons, ISBN,
ITF-14, UPC-A and UPC-E have compliant quiet zones added by default.
[14] ZINT_CAP_EANUPC was previously named ZINT_CAP_EXTENDABLE, which is still
recognised.

View file

@ -293,8 +293,9 @@ postcode, 3\-digit ISO 3166\-1 country code, 3\-digit service code):
6 Reader Initialisation (Programming)
.EE
.PP
For GS1 Composite symbols (names end in \f[CR]_CC\f[R], i.e.\ EANX_CC,
GS1_128_CC, DBAR_OMN_CC etc.):
For GS1 Composite symbols (names end in \f[CR]_CC\f[R],
i.e.\ \f[CR]EAN8_CC\f[R], \f[CR]EAN13_CC\f[R], \f[CR]GS1_128_CC\f[R],
\f[CR]DBAR_OMN_CC\f[R] etc.):
.IP
.EX
1 CC\-A
@ -704,7 +705,7 @@ a series of EAN\-13 barcodes, formatting the output filenames to
using the special character \[lq]\[ti]\[rq].
.IP
.EX
zint \-b EANX \-\-batch \-i \[aq]ean13nos.txt\[aq] \-o \[aq]ean\[ti]\[ti]\[ti].gif\[aq]
zint \-b EAN13 \-\-batch \-i \[aq]ean13nos.txt\[aq] \-o \[aq]ean\[ti]\[ti]\[ti].gif\[aq]
.EE
.SH BUGS
Please send bug reports to https://sourceforge.net/p/zint/tickets/.

View file

@ -263,7 +263,7 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S
5 Enhanced ECC for all of the message
6 Reader Initialisation (Programming)
For GS1 Composite symbols (names end in `_CC`, i.e. EANX_CC, GS1_128_CC, DBAR_OMN_CC etc.):
For GS1 Composite symbols (names end in `_CC`, i.e. `EAN8_CC`, `EAN13_CC`, `GS1_128_CC`, `DBAR_OMN_CC` etc.):
1 CC-A
2 CC-B
@ -627,7 +627,7 @@ to create a series of EAN-13 barcodes, formatting the output filenames to "ean00
special character "~".
```bash
zint -b EANX --batch -i 'ean13nos.txt' -o 'ean~~~.gif'
zint -b EAN13 --batch -i 'ean13nos.txt' -o 'ean~~~.gif'
```
# BUGS

View file

@ -49,14 +49,17 @@ zint -b DPIDENT -d "91232096712" --scale=$SCALE_LINEAR -o images/dpident.svg
zint -b UPCA --compliantheight -d "72527270270" --scale=$SCALE_UPCEAN -o images/upca.svg
zint -b UPCA --compliantheight -d "72527270270+12345" --scale=$SCALE_UPCEAN -o images/upca_5.svg
zint -b UPCA --compliantheight -d "72527270270+12345" --guardwhitespace --scale=$SCALE_UPCEAN -o images/upca_5_gws.svg
zint -b UPCE --compliantheight -d "1123456" --scale=$SCALE_UPCEAN -o images/upce.svg
zint -b UPCE --compliantheight -d "1123456+12" --guardwhitespace --scale=$SCALE_UPCEAN -o images/upce_2_gws.svg
zint -b EANX --compliantheight -d "4512345678906" --scale=$SCALE_UPCEAN -o images/eanx13.svg
zint -b EANX --compliantheight -d "54321" --scale=$SCALE_UPCEAN -o images/eanx5.svg
zint -b EANX --compliantheight -d "7432365+54321" --scale=$SCALE_UPCEAN -o images/eanx8_5.svg
zint -b EANX_CHK --compliantheight -d "74323654" --guardwhitespace --scale=$SCALE_UPCEAN -o images/eanx8_gws.svg
zint -b UPCE --compliantheight -d "123456" --scale=$SCALE_UPCEAN -o images/upce.svg
zint -b UPCE --compliantheight -d "123456+12" --guardwhitespace --scale=$SCALE_UPCEAN -o images/upce_2_gws.svg
zint -b EAN13 --compliantheight -d "451234567890" --scale=$SCALE_UPCEAN -o images/ean13.svg
zint -b EAN13 --compliantheight -d "451234567890+21" --scale=$SCALE_UPCEAN -o images/ean13_2.svg
zint -b EAN13 --compliantheight -d "451234567890" --guarddescent=2.5 --guardwhitespace --scale=$SCALE_UPCEAN -o images/ean13_gd_gws.svg
zint -b EAN8 --compliantheight -d "7432365" --scale=$SCALE_UPCEAN -o images/ean8.svg
zint -b EAN8 --compliantheight -d "7432365" --guardwhitespace --scale=$SCALE_UPCEAN -o images/ean8_gws.svg
zint -b ISBNX --compliantheight -d "9789295055124" --scale=$SCALE_UPCEAN -o images/isbnx.svg
zint -b ISBNX --compliantheight -d "9789295055124" --guardwhitespace --scale=$SCALE_UPCEAN -o images/isbnx_gws.svg
zint -b EAN_2ADDON --compliantheight -d "12" --scale=$SCALE_UPCEAN -o images/ean_2addon.svg
zint -b EAN_5ADDON --compliantheight -d "54321" --guardwhitespace --scale=$SCALE_UPCEAN -o images/ean_5addon_gws.svg
zint -b PLESSEY -d "C64" --scale=$SCALE_LINEAR -o images/plessey.svg
zint -b MSI_PLESSEY -d "6502" --vers=2 --scale=$SCALE_LINEAR -o images/msi_plessey.svg
zint -b TELEPEN --compliantheight -d "Z80" --scale=$SCALE_LINEAR -o images/telepen.svg
@ -97,8 +100,8 @@ zint -b DBAR_STK --compliantheight -d "9889876543210" --scale=$SCALE_LINEAR -o i
zint -b DBAR_OMNSTK --compliantheight -d "9889876543210" --scale=$SCALE_LINEAR -o images/dbar_omnstk.svg
zint -b DBAR_EXPSTK --compliantheight -d "[01]98898765432106[3202]012345[15]991231" --scale=$SCALE_LINEAR -o images/dbar_expstk.svg
zint -b CODE49 --compliantheight -d "MULTIPLE ROWS IN CODE 49" --scale=$SCALE_LINEAR -o images/code49.svg
zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234567890 --scale=$SCALE_UPCEAN -o images/eanx_cc_a.svg
zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=331234567890 --scale=$SCALE_UPCEAN -o images/eanx_cc_b.svg
zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234567890 --scale=$SCALE_UPCEAN -o images/ean13_cc_a.svg
zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=331234567890 --scale=$SCALE_UPCEAN -o images/ean13_cc_b.svg
zint -b GS1_128_CC --compliantheight -d "[99]1234-abcd" --mode=3 --primary="[01]03312345678903" --scale=$SCALE_UPCEAN -o images/gs1_128_cc_c.svg
zint -b PHARMA_TWO --compliantheight -d "29876543" --scale=$SCALE_TRACK -o images/pharma_two.svg
zint -b POSTNET --compliantheight -d "12345678901" --scale=$SCALE_TRACK -o images/postnet.svg

View file

@ -75,48 +75,50 @@ static void types(void) {
" 7 C25IND Industrial 2 of 5 81 DBAR_EXPSTK GS1 DataBar Exp Stack\n"
" 8 CODE39 Code 39 82 PLANET USPS PLANET\n"
" 9 EXCODE39 Extended Code 39 84 MICROPDF417 MicroPDF417\n"
"13 EANX EAN-2 to EAN-13 85 USPS_IMAIL USPS Intelligent Mail\n", stdout);
fputs("14 EANX_CHK EAN + Check Digit 86 PLESSEY UK Plessey\n"
"16 GS1_128 GS1-128 87 TELEPEN_NUM Telepen Numeric\n"
"18 CODABAR Codabar 89 ITF14 ITF-14\n"
"20 CODE128 Code 128 90 KIX Dutch Post KIX Code\n"
"21 DPLEIT Deutsche Post Leitcode 92 AZTEC Aztec Code\n", stdout);
fputs("22 DPIDENT Deutsche Post Identcode 93 DAFT DAFT Code\n"
"23 CODE16K Code 16K 96 DPD DPD Parcel Code 128\n"
"24 CODE49 Code 49 97 MICROQR Micro QR Code\n"
"25 CODE93 Code 93 98 HIBC_128 HIBC Code 128\n"
"28 FLAT Flattermarken 99 HIBC_39 HIBC Code 39\n", stdout);
fputs("29 DBAR_OMN GS1 DataBar Omni 102 HIBC_DM HIBC Data Matrix\n"
"30 DBAR_LTD GS1 DataBar Limited 104 HIBC_QR HIBC QR Code\n"
"31 DBAR_EXP GS1 DataBar Expanded 106 HIBC_PDF HIBC PDF417\n"
"32 TELEPEN Telepen Alpha 108 HIBC_MICPDF HIBC MicroPDF417\n"
"34 UPCA UPC-A 110 HIBC_BLOCKF HIBC Codablock-F\n", stdout);
fputs("35 UPCA_CHK UPC-A + Check Digit 112 HIBC_AZTEC HIBC Aztec Code\n"
"37 UPCE UPC-E 115 DOTCODE DotCode\n"
"38 UPCE_CHK UPC-E + Check Digit 116 HANXIN Han Xin Code\n"
"40 POSTNET USPS POSTNET 119 MAILMARK_2D Royal Mail 2D Mailmark\n"
"47 MSI_PLESSEY MSI Plessey 120 UPU_S10 UPU S10\n", stdout);
fputs("49 FIM Facing Ident Mark 121 MAILMARK_4S RM 4-State Mailmark\n"
"50 LOGMARS LOGMARS Code 39 128 AZRUNE Aztec Runes\n"
"51 PHARMA Pharmacode One-Track 129 CODE32 Code 32 (Ital. Pharma)\n"
"52 PZN Pharmazentralnummer 130 EANX_CC Composite EAN\n"
"53 PHARMA_TWO Pharmacode Two-Track 131 GS1_128_CC Composite GS1-128\n", stdout);
fputs("54 CEPNET Brazilian CEPNet 132 DBAR_OMN_CC Comp DataBar Omni\n"
"55 PDF417 PDF417 133 DBAR_LTD_CC Comp DataBar Limited\n"
"56 PDF417COMP Compact PDF417 134 DBAR_EXP_CC Comp DataBar Expanded\n"
"57 MAXICODE MaxiCode 135 UPCA_CC Composite UPC-A\n"
"58 QRCODE QR Code 136 UPCE_CC Composite UPC-E\n", stdout);
fputs("60 CODE128AB Code 128 (Suppress C) 137 DBAR_STK_CC Comp DataBar Stacked\n"
"63 AUSPOST AP Standard Customer 138 DBAR_OMNSTK_CC Comp DataBar Stack Omn\n"
"66 AUSREPLY AP Reply Paid 139 DBAR_EXPSTK_CC Comp DataBar Exp Stack\n"
"67 AUSROUTE AP Routing 140 CHANNEL Channel Code\n"
"68 AUSREDIRECT AP Redirection 141 CODEONE Code One\n", stdout);
fputs("69 ISBNX ISBN 142 GRIDMATRIX Grid Matrix\n"
"70 RM4SCC Royal Mail 4SCC 143 UPNQR UPN QR Code\n"
"71 DATAMATRIX Data Matrix 144 ULTRA Ultracode\n"
"72 EAN14 EAN-14 145 RMQR Rectangular Micro QR\n"
"73 VIN Vehicle Information No. 146 BC412 BC412\n", stdout);
fputs("74 CODABLOCKF Codablock-F 147 DXFILMEDGE DX Film Edge Barcode\n", stdout);
"10 EAN8 EAN-8 85 USPS_IMAIL USPS Intelligent Mail\n", stdout);
fputs("11 EAN_2ADDON EAN 2-digit add-on 86 PLESSEY UK Plessey\n"
"12 EAN_5ADDON EAN 5-digit add-on 87 TELEPEN_NUM Telepen Numeric\n"
"15 EAN13 EAN-13 89 ITF14 ITF-14\n"
"16 GS1_128 GS1-128 90 KIX Dutch Post KIX Code\n"
"18 CODABAR Codabar 92 AZTEC Aztec Code\n", stdout);
fputs("20 CODE128 Code 128 93 DAFT DAFT Code\n"
"21 DPLEIT Deutsche Post Leitcode 96 DPD DPD Parcel Code 128\n"
"22 DPIDENT Deutsche Post Identcode 97 MICROQR Micro QR Code\n"
"23 CODE16K Code 16K 98 HIBC_128 HIBC Code 128\n"
"24 CODE49 Code 49 99 HIBC_39 HIBC Code 39\n", stdout);
fputs("25 CODE93 Code 93 102 HIBC_DM HIBC Data Matrix\n"
"28 FLAT Flattermarken 104 HIBC_QR HIBC QR Code\n"
"29 DBAR_OMN GS1 DataBar Omni 106 HIBC_PDF HIBC PDF417\n"
"30 DBAR_LTD GS1 DataBar Limited 108 HIBC_MICPDF HIBC MicroPDF417\n"
"31 DBAR_EXP GS1 DataBar Expanded 110 HIBC_BLOCKF HIBC Codablock-F\n", stdout);
fputs("32 TELEPEN Telepen Alpha 112 HIBC_AZTEC HIBC Aztec Code\n"
"34 UPCA UPC-A 115 DOTCODE DotCode\n"
"35 UPCA_CHK UPC-A + Check Digit 116 HANXIN Han Xin Code\n"
"37 UPCE UPC-E 119 MAILMARK_2D Royal Mail 2D Mailmark\n"
"38 UPCE_CHK UPC-E + Check Digit 120 UPU_S10 UPU S10\n", stdout);
fputs("40 POSTNET USPS POSTNET 121 MAILMARK_4S RM 4-State Mailmark\n"
"47 MSI_PLESSEY MSI Plessey 128 AZRUNE Aztec Runes\n"
"49 FIM Facing Ident Mark 129 CODE32 Code 32 (Ital. Pharma)\n"
"50 LOGMARS LOGMARS Code 39 131 GS1_128_CC Composite GS1-128\n"
"51 PHARMA Pharmacode One-Track 132 DBAR_OMN_CC Comp DataBar Omni\n", stdout);
fputs("52 PZN Pharmazentralnummer 133 DBAR_LTD_CC Comp DataBar Limited\n"
"53 PHARMA_TWO Pharmacode Two-Track 134 DBAR_EXP_CC Comp DataBar Expanded\n"
"54 CEPNET Brazilian CEPNet 135 UPCA_CC Composite UPC-A\n"
"55 PDF417 PDF417 136 UPCE_CC Composite UPC-E\n"
"56 PDF417COMP Compact PDF417 137 DBAR_STK_CC Comp DataBar Stacked\n", stdout);
fputs("57 MAXICODE MaxiCode 138 DBAR_OMNSTK_CC Comp DataBar Stack Omn\n"
"58 QRCODE QR Code 139 DBAR_EXPSTK_CC Comp DataBar Exp Stack\n"
"60 CODE128AB Code 128 (Suppress C) 140 CHANNEL Channel Code\n"
"63 AUSPOST AP Standard Customer 141 CODEONE Code One\n"
"66 AUSREPLY AP Reply Paid 142 GRIDMATRIX Grid Matrix\n", stdout);
fputs("67 AUSROUTE AP Routing 143 UPNQR UPN QR Code\n"
"68 AUSREDIRECT AP Redirection 144 ULTRA Ultracode\n"
"69 ISBNX ISBN 145 RMQR Rectangular Micro QR\n"
"70 RM4SCC Royal Mail 4SCC 146 BC412 BC412\n"
"71 DATAMATRIX Data Matrix 147 DXFILMEDGE DX Film Edge Barcode\n", stdout);
fputs("72 EAN14 EAN-14 (GS1-128 based) 148 EAN8_CC Composite EAN-8\n"
"73 VIN Vehicle Information No. 149 EAN13_CC Composite EAN-13\n"
"74 CODABLOCKF Codablock-F\n", stdout);
}
/* Output version information */
@ -501,7 +503,15 @@ static int get_barcode_name(const char *barcode_name) {
{ BARCODE_EANX, "ean" }, /* Synonym */
{ BARCODE_GS1_128, "ean128" }, /* Synonym */
{ BARCODE_GS1_128_CC, "ean128cc" }, /* Synonym */
{ BARCODE_EAN13, "ean13" },
{ BARCODE_EAN13_CC, "ean13cc" },
{ BARCODE_EAN14, "ean14" },
{ BARCODE_EAN_2ADDON, "ean2" }, /* Synonym */
{ BARCODE_EAN_2ADDON, "ean2addon" },
{ BARCODE_EAN_5ADDON, "ean5" }, /* Synonym */
{ BARCODE_EAN_5ADDON, "ean5addon" },
{ BARCODE_EAN8, "ean8" },
{ BARCODE_EAN8_CC, "ean8cc" },
{ BARCODE_EANX_CC, "eancc" }, /* Synonym */
{ BARCODE_EANX_CHK, "eanchk" }, /* Synonym */
{ BARCODE_EANX, "eanx" },

View file

@ -1,5 +1,5 @@
# Copyright (C) 2008 by BogDan Vatra < bogdan@licentia.eu >
# Copyright (C) 2009-2024 Robin Stuart <rstuart114@gmail.com>
# Copyright (C) 2009-2025 Robin Stuart <rstuart114@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later
# vim: set ts=4 sw=4 et :
@ -19,12 +19,6 @@ else()
qt5_wrap_ui(zint-qt_SRCS mainWindow.ui extCLI.ui extData.ui extScale.ui extSequence.ui extExport.ui)
endif()
# grpAztec.ui grpC39.ui grpCodablockF.ui grpDotCode.ui grpMailmark2D.ui grpPDF417.ui grpUltra.ui
# grpC11.ui grpC49.ui grpCodeOne.ui grpDPD.ui grpMaxicode.ui grpPlessey.ui grpUPCA.ui
# grpC128.ui grpC93.ui grpDAFT.ui grpGrid.ui grpMicroPDF.ui grpPZN.ui grpUPCEAN.ui
# grpC16k.ui grpChannel.ui grpDBExtend.ui grpHX.ui grpMQR.ui grpQR.ui grpUPNQR.ui
# grpC25.ui grpCodabar.ui grpDM.ui grpITF14.ui grpMSICheck.ui grpRMQR.ui grpVIN.ui
if(APPLE)
# https://doc.qt.io/qt-5/appicon.html
set(MACOSX_BUNDLE_ICON_FILE zint-qt.icns)
@ -35,7 +29,7 @@ if(APPLE)
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME "Zint Barcode Studio"
MACOSX_BUNDLE_BUNDLE_VERSION ${ZINT_VERSION}
MACOSX_BUNDLE_COPYRIGHT "Copyright © 2006-2022 Robin Stuart and others"
MACOSX_BUNDLE_COPYRIGHT "Copyright © 2006-2025 Robin Stuart and others"
MACOSX_BUNDLE_GUI_IDENTIFIER "uk.org.zint.zint-qt"
MACOSX_BUNDLE_INFO_STRING "A free barcode generator"
MACOSX_BUNDLE_SHORT_VERSION_STRING ${ZINT_VERSION})
@ -58,5 +52,4 @@ target_link_libraries(${PROJECT_NAME} QZint
Qt${QT_VERSION_MAJOR}::UiTools Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Svg
Qt${QT_VERSION_MAJOR}::Core)
install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" RUNTIME)

View file

@ -43,6 +43,7 @@ FORMS += extCLI.ui \
grpDM.ui \
grpDotCode.ui \
grpDPD.ui \
grpEANAddOn.ui \
grpGrid.ui \
grpHX.ui \
grpITF14.ui \

View file

@ -35,6 +35,7 @@ FORMS += extCLI.ui \
grpDM.ui \
grpDotCode.ui \
grpDPD.ui \
grpEANAddOn.ui \
grpGrid.ui \
grpHX.ui \
grpITF14.ui \

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpEANAddOn</class>
<widget class="QWidget" name="grpEANAddOn">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>310</width>
<height>78</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>600</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayoutEANAddOn">
<property name="contentMargins">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="chkEANAddOnNoQuietZones">
<property name="text">
<string>No Quiet &amp;Zones</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Do not add quiet zones to whitespace</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkEANAddOnGuardWhitespace">
<property name="text">
<string>Guard &amp;Whitespace</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Add quiet zone indicators ("&lt;", "&gt;") to Human Readable Text (HRT)
(ignored if disabled)</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -148,8 +148,11 @@ static const struct bstyle_item bstyle_items[] = {
{ QSL("DPD Code"), BARCODE_DPD },
{ QSL("Dutch Post KIX"), BARCODE_KIX },
{ QSL("DX Film Edge"), BARCODE_DXFILMEDGE },
{ QSL("EAN (EAN-2, EAN-5, EAN-8 and EAN-13) (ISO 15420)"), BARCODE_EANX },
{ QSL("EAN-13 European Article Number (ISO 15420)"), BARCODE_EAN13 },
{ QSL("EAN-14"), BARCODE_EAN14 },
{ QSL("EAN-8 European Article Number (ISO 15420)"), BARCODE_EAN8 },
{ QSL("EAN/UPC 2-digit add-on (standalone)"), BARCODE_EAN_2ADDON },
{ QSL("EAN/UPC 5-digit add-on (standalone)"), BARCODE_EAN_5ADDON },
{ QSL("FIM (Facing Identification Mark)"), BARCODE_FIM },
{ QSL("Flattermarken"), BARCODE_FLAT },
{ QSL("Grid Matrix"), BARCODE_GRIDMATRIX },
@ -1176,6 +1179,7 @@ void MainWindow::HRTShow_ui_set()
text_gap_ui_set();
upcean_no_quiet_zones_ui_set();
upcae_no_quiet_zones_ui_set();
eanaddon_no_quiet_zones_ui_set();
}
void MainWindow::text_gap_ui_set()
@ -1258,6 +1262,22 @@ void MainWindow::upcae_no_quiet_zones_ui_set()
}
}
void MainWindow::eanaddon_no_quiet_zones_ui_set()
{
int symbology = bstyle_items[bstyle->currentIndex()].symbology;
if (symbology != BARCODE_EAN_2ADDON && symbology != BARCODE_EAN_5ADDON)
return;
bool showHRT = chkHRTShow->isEnabled() && chkHRTShow->isChecked();
QCheckBox *noQZs, *guardWS;
noQZs = m_optionWidget ? m_optionWidget->findChild<QCheckBox*>(QSL("chkEANAddOnNoQuietZones")) : nullptr;
guardWS = m_optionWidget ? m_optionWidget->findChild<QCheckBox*>(QSL("chkEANAddOnGuardWhitespace")) : nullptr;
if (noQZs && guardWS) {
guardWS->setEnabled(!noQZs->isChecked() && showHRT);
}
}
void MainWindow::structapp_ui_set()
{
int symbology = bstyle_items[bstyle->currentIndex()].symbology;
@ -1583,7 +1603,7 @@ void MainWindow::height_per_row_default()
bool MainWindow::have_addon()
{
const QRegularExpression addonRE(QSL("^[0-9X]+[+][0-9]+$"));
const QRegularExpression addonRE(QSL("^[0-9X]+[+ ][0-9]+$"));
return txtData->text().contains(addonRE);
}
@ -2257,7 +2277,8 @@ void MainWindow::change_options()
connect(get_widget(QSL("chkUPCANoQuietZones")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("chkUPCAGuardWhitespace")), SIGNAL(toggled(bool)), SLOT(update_preview()));
} else if (symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK || symbology == BARCODE_EANX_CC
} else if (symbology == BARCODE_EAN8 || symbology == BARCODE_EAN8_CC
|| symbology == BARCODE_EAN13 || symbology == BARCODE_EAN13_CC
|| symbology == BARCODE_UPCE || symbology == BARCODE_UPCE_CHK || symbology == BARCODE_UPCE_CC
|| symbology == BARCODE_ISBNX) {
QFile file(QSL(":/grpUPCEAN.ui"));
@ -2271,11 +2292,10 @@ void MainWindow::change_options()
if (is_upce) {
tabMain->insertTab(1, m_optionWidget, tr("UPC-&E"));
upcae_no_quiet_zones_ui_set();
} else if (symbology == BARCODE_ISBNX) {
tabMain->insertTab(1, m_optionWidget, tr("ISBN"));
upcean_no_quiet_zones_ui_set();
} else {
tabMain->insertTab(1, m_optionWidget, tr("&EAN"));
tabMain->insertTab(1, m_optionWidget,
symbology == BARCODE_ISBNX ? tr("ISBN") :
symbology == BARCODE_EAN8 || symbology == BARCODE_EAN8_CC ? tr("&EAN-8") : tr("&EAN-13"));
upcean_no_quiet_zones_ui_set();
}
combobox_item_enabled(cmbFontSetting, 1, false); // Disable bold options
@ -2296,6 +2316,21 @@ void MainWindow::change_options()
connect(get_widget(QSL("chkUPCEANNoQuietZones")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("chkUPCEANGuardWhitespace")), SIGNAL(toggled(bool)), SLOT(update_preview()));
} else if (symbology == BARCODE_EAN_2ADDON || symbology == BARCODE_EAN_5ADDON) {
QFile file(QSL(":/grpEANAddOn.ui"));
if (file.open(QIODevice::ReadOnly)) {
m_optionWidget = uiload.load(&file);
file.close();
load_sub_settings(settings, symbology);
vLayoutSpecific->addWidget(m_optionWidget);
grpSpecific->show();
eanaddon_no_quiet_zones_ui_set();
connect(get_widget(QSL("chkEANAddOnNoQuietZones")), SIGNAL(toggled(bool)),
SLOT(eanaddon_no_quiet_zones_ui_set()));
connect(get_widget(QSL("chkEANAddOnNoQuietZones")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("chkEANAddOnGuardWhitespace")), SIGNAL(toggled(bool)), SLOT(update_preview()));
}
} else if (symbology == BARCODE_VIN) {
QFile file(QSL(":/grpVIN.ui"));
if (!file.open(QIODevice::ReadOnly))
@ -2314,7 +2349,8 @@ void MainWindow::change_options()
switch (symbology) {
case BARCODE_CODE128:
case BARCODE_EANX:
case BARCODE_EAN8:
case BARCODE_EAN13:
case BARCODE_UPCA:
case BARCODE_UPCE:
case BARCODE_DBAR_OMN:
@ -2708,14 +2744,33 @@ void MainWindow::update_preview()
}
break;
case BARCODE_EANX:
m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_EANX_CC : BARCODE_EANX);
{
bool have_addon = upcean_addon_gap(QSL("cmbUPCEANAddonGap"), QSL("lblUPCEANAddonGap"), 7 /*base*/);
bool enable_guard = have_addon || txtData->text().length() > 5;
upcean_guard_descent(QSL("spnUPCEANGuardDescent"), QSL("lblUPCEANGuardDescent"),
QSL("btnUPCEANGuardDefault"), enable_guard);
case BARCODE_EAN8:
m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_EAN8_CC : BARCODE_EAN8);
upcean_addon_gap(QSL("cmbUPCEANAddonGap"), QSL("lblUPCEANAddonGap"), 7 /*base*/);
upcean_guard_descent(QSL("spnUPCEANGuardDescent"), QSL("lblUPCEANGuardDescent"),
QSL("btnUPCEANGuardDefault"));
if (get_chk_val(QSL("chkUPCEANNoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
} else if (get_chk_val(QSL("chkUPCEANGuardWhitespace"))) {
m_bc.bc.setGuardWhitespace(true);
}
break;
case BARCODE_EAN_2ADDON:
case BARCODE_EAN_5ADDON:
m_bc.bc.setSymbol(symbology);
if (get_chk_val(QSL("chkEANAddOnNoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
} else if (get_chk_val(QSL("chkEANAddOnGuardWhitespace"))) {
m_bc.bc.setGuardWhitespace(true);
}
break;
case BARCODE_EAN13:
m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_EAN13_CC : BARCODE_EAN13);
upcean_addon_gap(QSL("cmbUPCEANAddonGap"), QSL("lblUPCEANAddonGap"), 7 /*base*/);
upcean_guard_descent(QSL("spnUPCEANGuardDescent"), QSL("lblUPCEANGuardDescent"),
QSL("btnUPCEANGuardDefault"));
if (get_chk_val(QSL("chkUPCEANNoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
} else if (get_chk_val(QSL("chkUPCEANGuardWhitespace"))) {
@ -4002,9 +4057,11 @@ QString MainWindow::get_setting_name(int symbology)
case BARCODE_UPCA_CC:
symbology = BARCODE_UPCA;
break;
case BARCODE_EANX_CHK:
case BARCODE_EANX_CC:
symbology = BARCODE_EANX;
case BARCODE_EAN8_CC:
symbology = BARCODE_EAN8;
break;
case BARCODE_EAN13_CC:
symbology = BARCODE_EAN13;
break;
case BARCODE_UPCE_CHK:
case BARCODE_UPCE_CC:
@ -4502,14 +4559,37 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
settings.setValue(QSL("studio/bc/upca/chk_guard_whitespace"), get_chk_val(QSL("chkUPCAGuardWhitespace")));
break;
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EANX_CC:
settings.setValue(QSL("studio/bc/eanx/addongap"), get_cmb_index(QSL("cmbUPCEANAddonGap")));
settings.setValue(QSL("studio/bc/eanx/guard_descent"),
case BARCODE_EAN8:
case BARCODE_EAN8_CC:
settings.setValue(QSL("studio/bc/ean8/addongap"), get_cmb_index(QSL("cmbUPCEANAddonGap")));
settings.setValue(QSL("studio/bc/ean8/guard_descent"),
QString::number(get_dspn_val(QSL("spnUPCEANGuardDescent")), 'f', 3 /*precision*/));
settings.setValue(QSL("studio/bc/eanx/chk_no_quiet_zones"), get_chk_val(QSL("chkUPCEANNoQuietZones")));
settings.setValue(QSL("studio/bc/eanx/chk_guard_whitespace"),
settings.setValue(QSL("studio/bc/ean8/chk_no_quiet_zones"), get_chk_val(QSL("chkUPCEANNoQuietZones")));
settings.setValue(QSL("studio/bc/ean8/chk_guard_whitespace"),
get_chk_val(QSL("chkUPCEANGuardWhitespace")));
break;
case BARCODE_EAN_2ADDON:
settings.setValue(QSL("studio/bc/ean2addon/chk_no_quiet_zones"),
get_chk_val(QSL("chkEANAddOnNoQuietZones")));
settings.setValue(QSL("studio/bc/ean2addon/chk_guard_whitespace"),
get_chk_val(QSL("chkEANAddOnGuardWhitespace")));
break;
case BARCODE_EAN_5ADDON:
settings.setValue(QSL("studio/bc/ean5addon/chk_no_quiet_zones"),
get_chk_val(QSL("chkEANAddOnNoQuietZones")));
settings.setValue(QSL("studio/bc/ean5addon/chk_guard_whitespace"),
get_chk_val(QSL("chkEANAddOnGuardWhitespace")));
break;
case BARCODE_EAN13:
case BARCODE_EAN13_CC:
settings.setValue(QSL("studio/bc/ean13/addongap"), get_cmb_index(QSL("cmbUPCEANAddonGap")));
settings.setValue(QSL("studio/bc/ean13/guard_descent"),
QString::number(get_dspn_val(QSL("spnUPCEANGuardDescent")), 'f', 3 /*precision*/));
settings.setValue(QSL("studio/bc/ean13/chk_no_quiet_zones"), get_chk_val(QSL("chkUPCEANNoQuietZones")));
settings.setValue(QSL("studio/bc/ean13/chk_guard_whitespace"),
get_chk_val(QSL("chkUPCEANGuardWhitespace")));
break;
@ -4944,13 +5024,35 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
set_chk_from_setting(settings, QSL("studio/bc/upca/chk_guard_whitespace"), QSL("chkUPCAGuardWhitespace"));
break;
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EANX_CC:
set_cmb_from_setting(settings, QSL("studio/bc/eanx/addongap"), QSL("cmbUPCEANAddonGap"));
set_dspn_from_setting(settings, QSL("studio/bc/eanx/guard_descent"), QSL("spnUPCEANGuardDescent"), 5.0f);
set_chk_from_setting(settings, QSL("studio/bc/eanx/chk_no_quiet_zones"), QSL("chkUPCEANNoQuietZones"));
set_chk_from_setting(settings, QSL("studio/bc/eanx/chk_guard_whitespace"),
case BARCODE_EAN8:
case BARCODE_EAN8_CC:
set_cmb_from_setting(settings, QSL("studio/bc/ean8/addongap"), QSL("cmbUPCEANAddonGap"));
set_dspn_from_setting(settings, QSL("studio/bc/ean8/guard_descent"), QSL("spnUPCEANGuardDescent"), 5.0f);
set_chk_from_setting(settings, QSL("studio/bc/ean8/chk_no_quiet_zones"), QSL("chkUPCEANNoQuietZones"));
set_chk_from_setting(settings, QSL("studio/bc/ean8/chk_guard_whitespace"),
QSL("chkUPCEANGuardWhitespace"));
break;
case BARCODE_EAN_2ADDON:
set_chk_from_setting(settings, QSL("studio/bc/ean2addon/chk_no_quiet_zones"),
QSL("chkEANAddOnNoQuietZones"));
set_chk_from_setting(settings, QSL("studio/bc/ean2addon/chk_guard_whitespace"),
QSL("chkEANAddOnGuardWhitespace"));
break;
case BARCODE_EAN_5ADDON:
set_chk_from_setting(settings, QSL("studio/bc/ean5addon/chk_no_quiet_zones"),
QSL("chkEANAddOnNoQuietZones"));
set_chk_from_setting(settings, QSL("studio/bc/ean5addon/chk_guard_whitespace"),
QSL("chkEANAddOnGuardWhitespace"));
break;
case BARCODE_EAN13:
case BARCODE_EAN13_CC:
set_cmb_from_setting(settings, QSL("studio/bc/ean13/addongap"), QSL("cmbUPCEANAddonGap"));
set_dspn_from_setting(settings, QSL("studio/bc/ean13/guard_descent"), QSL("spnUPCEANGuardDescent"), 5.0f);
set_chk_from_setting(settings, QSL("studio/bc/ean13/chk_no_quiet_zones"), QSL("chkUPCEANNoQuietZones"));
set_chk_from_setting(settings, QSL("studio/bc/ean13/chk_guard_whitespace"),
QSL("chkUPCEANGuardWhitespace"));
break;

View file

@ -74,6 +74,7 @@ public slots:
void codeone_ui_set();
void upcean_no_quiet_zones_ui_set();
void upcae_no_quiet_zones_ui_set();
void eanaddon_no_quiet_zones_ui_set();
void structapp_ui_set();
void clear_text_gap();
void on_encoded();

View file

@ -17,6 +17,7 @@
<file>grpDM.ui</file>
<file>grpDotCode.ui</file>
<file>grpDPD.ui</file>
<file>grpEANAddOn.ui</file>
<file>grpGrid.ui</file>
<file>grpHX.ui</file>
<file>grpITF14.ui</file>