diff --git a/ChangeLog b/ChangeLog
index ca4fe260..220dec46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,10 @@ Changes
- Add Structured Append support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, MAXICODE, MICROPDF417, PDF417, QRCODE, ULTRA
- ULTRA: add revision 2 support (based on BWIPP 2021-09-28 update)
+- Add compliant height
+- GUI: add Menu, copy to clipboard EMF/GIF/PNG/TIF, errtxt bar and status bar,
+ icons (feathericons)
+- CODABAR: add show check digit option
Bugs
----
@@ -41,7 +45,8 @@ Bugs
platform variation (#204 ARM-Cortex crash)
- raster/vector.c: use new stripf() func to workaround gcc 32-bit
float variations
-- raster.c: Don't allow for text if scale < 1.0
+- raster.c: Don't add height offset for text if scale < 1.0 (as won't print)
+- ISBNX: fix not returning error number (warning) correctly
Version 2.10.0 2021-08-14
diff --git a/backend/2of5.c b/backend/2of5.c
index cb817017..64d6aa84 100644
--- a/backend/2of5.c
+++ b/backend/2of5.c
@@ -64,7 +64,7 @@ static char check_digit(const unsigned int count) {
static int c25_common(struct zint_symbol *symbol, const unsigned char source[], int length, const int max,
const char *table[10], const char *start_stop[2], const int error_base) {
- int i, error_number;
+ int i;
char dest[512]; /* Largest destination 6 + (80 + 1) * 6 + 5 + 1 = 498 */
unsigned char temp[80 + 1 + 1]; /* Largest maximum 80 */
int have_checkdigit = symbol->option_2 == 1 || symbol->option_2 == 2;
@@ -74,11 +74,10 @@ static int c25_common(struct zint_symbol *symbol, const unsigned char source[],
sprintf(symbol->errtxt, "%d: Input too long (%d character maximum)", error_base, max);
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
/* errtxt 302: 304: 306: 308: */
sprintf(symbol->errtxt, "%d: Invalid character in data (digits only)", error_base + 1);
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
ustrcpy(temp, source);
@@ -107,46 +106,44 @@ static int c25_common(struct zint_symbol *symbol, const unsigned char source[],
symbol->text[length - 1] = '\0';
}
- return error_number;
+ return 0;
}
/* Code 2 of 5 Standard (Code 2 of 5 Matrix) */
-INTERNAL int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int c25standard(struct zint_symbol *symbol, unsigned char source[], int length) {
return c25_common(symbol, source, length, 80, C25MatrixTable, C25MatrixStartStop, 301);
}
/* Code 2 of 5 Industrial */
-INTERNAL int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int c25ind(struct zint_symbol *symbol, unsigned char source[], int length) {
return c25_common(symbol, source, length, 45, C25IndustTable, C25IndustStartStop, 303);
}
/* Code 2 of 5 IATA */
-INTERNAL int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int c25iata(struct zint_symbol *symbol, unsigned char source[], int length) {
return c25_common(symbol, source, length, 45, C25IndustTable, C25IataLogicStartStop, 305);
}
/* Code 2 of 5 Data Logic */
-INTERNAL int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int c25logic(struct zint_symbol *symbol, unsigned char source[], int length) {
return c25_common(symbol, source, length, 80, C25MatrixTable, C25IataLogicStartStop, 307);
}
/* Common to Interleaved, ITF-14, DP Leitcode, DP Identcode */
static int c25inter_common(struct zint_symbol *symbol, unsigned char source[], int length,
const int dont_set_height) {
- int i, j, error_number;
+ int i, j, error_number = 0;
char bars[7], spaces[7], mixed[14], dest[512]; /* 4 + (90 + 2) * 5 + 3 + 1 = 468 */
unsigned char temp[90 + 2 + 1];
int have_checkdigit = symbol->option_2 == 1 || symbol->option_2 == 2;
- float height;
if (length > 90) {
strcpy(symbol->errtxt, "309: Input too long (90 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "310: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
temp[0] = '\0';
@@ -199,26 +196,29 @@ static int c25inter_common(struct zint_symbol *symbol, unsigned char source[], i
}
if (!dont_set_height) {
-#ifdef COMPLIANT_HEIGHTS
- /* ISO/IEC 16390:2007 Section 4.4 min height 5mm or 15% of symbol width whichever greater where
- (P = character pairs, N = wide/narrow ratio = 3) width = (P(4N + 6) + N + 6)X = (length / 2) * 18 + 9 */
- height = (float) ((18.0 * (length / 2) + 9.0) * 0.15);
- if (height < (float) (5.0 / 0.33)) { /* Taking X = 0.330mm from Annex D.3.1 (application specification) */
- height = (float) (5.0 / 0.33);
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* ISO/IEC 16390:2007 Section 4.4 min height 5mm or 15% of symbol width whichever greater where
+ (P = character pairs, N = wide/narrow ratio = 3)
+ width = (P(4N + 6) + N + 6)X = (length / 2) * 18 + 9 */
+ /* Taking X = 0.330mm from Annex D.3.1 (application specification) */
+ const float min_height_min = stripf(5.0f / 0.33f);
+ float min_height = stripf((18.0f * (length / 2) + 9.0f) * 0.15f);
+ if (min_height < min_height_min) {
+ min_height = min_height_min;
+ }
+ /* Using 50 as default as none recommended */
+ error_number = set_height(symbol, min_height, min_height > 50.0f ? min_height : 50.0f, 0.0f,
+ 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
}
- /* Using 50 as default as none recommended */
- error_number = set_height(symbol, height, height > 50.0f ? height : 50.0f, 0.0f, 0 /*no_errtxt*/);
-#else
- height = 50.0f;
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
-#endif
}
return error_number;
}
/* Code 2 of 5 Interleaved ISO/IEC 16390:2007 */
-INTERNAL int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int c25inter(struct zint_symbol *symbol, unsigned char source[], int length) {
return c25inter_common(symbol, source, length, 0 /*dont_set_height*/);
}
@@ -232,10 +232,9 @@ INTERNAL int itf14(struct zint_symbol *symbol, unsigned char source[], int lengt
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "312: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
/* Add leading zeros as required */
@@ -261,14 +260,14 @@ INTERNAL int itf14(struct zint_symbol *symbol, unsigned char source[], int lengt
}
if (error_number < ZINT_ERROR) {
-#ifdef COMPLIANT_HEIGHTS
- /* GS1 General Specifications 21.0.1 5.12.3.2 table 2, including footnote (**): (note bind/box additional to
- symbol->height), same as GS1-128: "in case of further space constraints"
- height 5.8mm / 1.016mm (X max) ~ 5.7; default 31.75mm / 0.495mm ~ 64.14 */
- warn_number = set_height(symbol, (float) (5.8 / 1.016), (float) (31.75 / 0.495), 0.0f, 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* GS1 General Specifications 21.0.1 5.12.3.2 table 2, including footnote (**): (note bind/box additional
+ to symbol->height), same as GS1-128: "in case of further space constraints"
+ height 5.8mm / 1.016mm (X max) ~ 5.7; default 31.75mm / 0.495mm ~ 64.14 */
+ warn_number = set_height(symbol, stripf(5.8f / 1.016f), stripf(31.75f / 0.495f), 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
}
return error_number ? error_number : warn_number;
@@ -286,10 +285,9 @@ INTERNAL int dpleit(struct zint_symbol *symbol, unsigned char source[], int leng
strcpy(symbol->errtxt, "313: Input wrong length (13 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "314: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
zeroes = 13 - length;
@@ -325,10 +323,9 @@ INTERNAL int dpident(struct zint_symbol *symbol, unsigned char source[], int len
strcpy(symbol->errtxt, "315: Input wrong length (11 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "316: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
zeroes = 11 - length;
diff --git a/backend/auspost.c b/backend/auspost.c
index 74ef8ee0..f9a52d3f 100644
--- a/backend/auspost.c
+++ b/backend/auspost.c
@@ -88,7 +88,7 @@ static void rs_error(char data_pattern[]) {
INTERNAL int daft_set_height(struct zint_symbol *symbol, float min_height, float max_height);
/* Handles Australia Posts's 4 State Codes */
-INTERNAL int australia_post(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int auspost(struct zint_symbol *symbol, unsigned char source[], int length) {
/* Customer Standard Barcode, Barcode 2 or Barcode 3 system determined automatically
(i.e. the FCC doesn't need to be specified by the user) dependent
on the length of the input string */
@@ -108,10 +108,9 @@ INTERNAL int australia_post(struct zint_symbol *symbol, unsigned char source[],
char localstr[30];
/* Check input immediately to catch nuls */
- error_number = is_sane(GDSET, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(GDSET, source, length) != 0) {
strcpy(symbol->errtxt, "404: Invalid character in data (alphanumerics, space and \"#\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
strcpy(localstr, "");
@@ -127,23 +126,25 @@ INTERNAL int australia_post(struct zint_symbol *symbol, unsigned char source[],
break;
case 16:
strcpy(fcc, "59");
- error_number = is_sane(NEON, source, length);
+ if (is_sane(NEON, source, length) != 0) {
+ strcpy(symbol->errtxt, "402: Invalid character in data (digits only for length 16)");
+ return ZINT_ERROR_INVALID_DATA;
+ }
break;
case 18:
strcpy(fcc, "62");
break;
case 23:
strcpy(fcc, "62");
- error_number = is_sane(NEON, source, length);
+ if (is_sane(NEON, source, length) != 0) {
+ strcpy(symbol->errtxt, "406: Invalid character in data (digits only for length 23)");
+ return ZINT_ERROR_INVALID_DATA;
+ }
break;
default:
strcpy(symbol->errtxt, "401: Auspost input is wrong length (8, 13, 16, 18 or 23 characters only)");
return ZINT_ERROR_TOO_LONG;
}
- if (error_number == ZINT_ERROR_INVALID_DATA) {
- strcpy(symbol->errtxt, "402: Invalid character in data (digits only for lengths 16 and 23)");
- return error_number;
- }
} else {
int zeroes;
if (length > 8) {
@@ -174,10 +175,9 @@ INTERNAL int australia_post(struct zint_symbol *symbol, unsigned char source[],
/* Verify that the first 8 characters are numbers */
memcpy(dpid, localstr, 8);
dpid[8] = '\0';
- error_number = is_sane(NEON, (unsigned char *) dpid, 8);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, (unsigned char *) dpid, 8) != 0) {
strcpy(symbol->errtxt, "405: Invalid character in DPID (first 8 characters) (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
/* Start character */
@@ -238,21 +238,23 @@ INTERNAL int australia_post(struct zint_symbol *symbol, unsigned char source[],
writer += 2;
}
-#ifdef COMPLIANT_HEIGHTS
- /* Australia Post Customer Barcoding Technical Specifications (Revised Aug 2012) Dimensions, placement and
- printing p.12
- https://auspost.com.au/content/dam/auspost_corp/media/documents/customer-barcode-technical-specifications-aug2012.pdf
- X 0.5mm (average of 0.4mm - 0.6mm), min height 4.2mm / 0.6mm (X max) = 7, max 5.6mm / 0.4mm (X min) = 14
- Tracker 1.3mm (average of 1mm - 1.6mm), Ascender/Descender 3.15mm (average of 2.6mm - 3.7mm) less T = 1.85mm
- */
- symbol->row_height[0] = 1.85f / 0.5f; /* 3.7 */
- symbol->row_height[1] = 1.3f / 0.5f; /* 2.6 */
- error_number = daft_set_height(symbol, 7.0f, 14.0f); /* Note using max X for minimum and min X for maximum */
-#else
- symbol->row_height[0] = 3.0f;
- symbol->row_height[1] = 2.0f;
- error_number = daft_set_height(symbol, 0.0f, 0.0f);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Australia Post Customer Barcoding Technical Specifications (Revised Aug 2012) Dimensions, placement and
+ printing p.12
+ (https://auspost.com.au/content/dam/auspost_corp/media/documents/
+ customer-barcode-technical-specifications-aug2012.pdf)
+ X 0.5mm (average of 0.4mm - 0.6mm), min height 4.2mm / 0.6mm (X max) = 7, max 5.6mm / 0.4mm (X min) = 14
+ Tracker 1.3mm (average of 1mm - 1.6mm)
+ Ascender/Descender 3.15mm (average of 2.6mm - 3.7mm) less T = 1.85mm
+ */
+ symbol->row_height[0] = 3.7f; /* 1.85f / 0.5f */
+ symbol->row_height[1] = 2.6f; /* 1.3f / 0.5f */
+ error_number = daft_set_height(symbol, 7.0f, 14.0f); /* Note using max X for minimum and min X for maximum */
+ } else {
+ symbol->row_height[0] = 3.0f;
+ symbol->row_height[1] = 2.0f;
+ error_number = daft_set_height(symbol, 0.0f, 0.0f);
+ }
symbol->rows = 3;
symbol->width = writer - 1;
diff --git a/backend/aztec.c b/backend/aztec.c
index fd0223ee..9bfdd244 100644
--- a/backend/aztec.c
+++ b/backend/aztec.c
@@ -1445,7 +1445,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
}
/* Encodes Aztec runes as specified in ISO/IEC 24778:2008 Annex A */
-INTERNAL int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int azrune(struct zint_symbol *symbol, unsigned char source[], int length) {
unsigned int input_value;
int error_number, i, y, x, r;
char binary_string[28];
diff --git a/backend/codablock.c b/backend/codablock.c
index e31ad786..f16c1d27 100644
--- a/backend/codablock.c
+++ b/backend/codablock.c
@@ -39,7 +39,7 @@
#include
#include "common.h"
-INTERNAL int code_128(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int code128(struct zint_symbol *symbol, unsigned char source[], int length);
#define uchar unsigned char
@@ -601,7 +601,7 @@ static void SumASCII(uchar **ppOutPos, int Sum, int CharacterSet)
/* Main function called by zint framework
*/
-INTERNAL int codablock(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int codablockf(struct zint_symbol *symbol, unsigned char source[], int length) {
int charCur, dataLength;
int error_number;
int rows, columns, useColumns;
@@ -613,7 +613,6 @@ INTERNAL int codablock(struct zint_symbol *symbol, unsigned char source[], int l
int emptyColumns;
char dest[1000];
int r, c;
- float min_row_height = 0.0f;
#ifdef _MSC_VER
CharacterSetTable *T;
unsigned char *data;
@@ -627,20 +626,20 @@ INTERNAL int codablock(struct zint_symbol *symbol, unsigned char source[], int l
/* option1: rows <= 0: automatic, 1..44 */
rows = symbol->option_1;
if (rows == 1) {
- error_number = code_128(symbol, source, length); /* Only returns errors, not warnings */
+ error_number = code128(symbol, source, length); /* Only returns errors, not warnings */
if (error_number < ZINT_ERROR) {
symbol->output_options |= BARCODE_BIND;
if (symbol->border_width == 0) { /* Allow override if non-zero */
symbol->border_width = 1; /* AIM ISS-X-24 Section 4.6.1 b) (note change from previous default 2) */
}
symbol->text[0] = '\0'; /* Disable HRT for compatibility with CODABLOCKF */
-#ifdef COMPLIANT_HEIGHTS
- /* AIM ISS-X-24 Section 4.5.1 minimum row height 8 (for compatibility with CODABLOCKF, not specced for
- CODE128) */
- error_number = set_height(symbol, 8.0f, 10.0f, 0.0f, 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 5.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* AIM ISS-X-24 Section 4.5.1 minimum row height 8 (for compatibility with CODABLOCKF, not specced for
+ CODE128) */
+ error_number = set_height(symbol, 8.0f, 10.0f, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 5.0f, 0.0f, 1 /*no_errtxt*/);
+ }
}
return error_number;
}
@@ -961,17 +960,17 @@ INTERNAL int codablock(struct zint_symbol *symbol, unsigned char source[], int l
expand(symbol, dest);
}
-#ifdef COMPLIANT_HEIGHTS
- /* AIM ISS-X-24 Section 4.6.1 minimum row height; use 10 * rows as default for back-compatibility */
- min_row_height = (float) (0.55 * useColumns + 3.0);
- if (min_row_height < 8.0f) {
- min_row_height = 8.0f;
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* AIM ISS-X-24 Section 4.6.1 minimum row height; use 10 * rows as default */
+ float min_row_height = stripf(0.55f * useColumns + 3.0f);
+ if (min_row_height < 8.0f) {
+ min_row_height = 8.0f;
+ }
+ error_number = set_height(symbol, min_row_height, (min_row_height > 10.0f ? min_row_height : 10.0f) * rows,
+ 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 10.0f * rows, 0.0f, 1 /*no_errtxt*/);
}
- error_number = set_height(symbol, min_row_height, (min_row_height > 10.0f ? min_row_height : 10.0f) * rows, 0.0f,
- 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, min_row_height, 10.0f * rows, 0.0f, 1 /*no_errtxt*/);
-#endif
symbol->output_options |= BARCODE_BIND;
diff --git a/backend/code.c b/backend/code.c
index e4affb36..f05cf163 100644
--- a/backend/code.c
+++ b/backend/code.c
@@ -1,7 +1,8 @@
/* code.c - Handles Code 11, 39, 39+, 93, PZN, Channel and VIN */
/* LOGMARS MIL-STD-1189 Rev. B https://apps.dtic.mil/dtic/tr/fulltext/u2/a473534.pdf */
/* PZN https://www.ifaffm.de/mandanten/1/documents/04_ifa_coding_system/IFA_Info_Code_39_EN.pdf */
-/* PZN https://www.ifaffm.de/mandanten/1/documents/04_ifa_coding_system/IFA-Info_Check_Digit_Calculations_PZN_PPN_UDI_EN.pdf */
+/* PZN https://www.ifaffm.de/mandanten/1/documents/04_ifa_coding_system/
+ IFA-Info_Check_Digit_Calculations_PZN_PPN_UDI_EN.pdf */
/*
libzint - the open source barcode library
@@ -98,11 +99,11 @@ static const char *C93Table[47] = {
};
/* *********************** CODE 11 ******************** */
-INTERNAL int code_11(struct zint_symbol *symbol, unsigned char source[], int length) { /* Code 11 */
+INTERNAL int code11(struct zint_symbol *symbol, unsigned char source[], int length) { /* Code 11 */
int i;
int h, c_digit, c_weight, c_count, k_digit, k_weight, k_count;
- int weight[122], error_number;
+ int weight[122], error_number = 0;
char dest[750]; /* 6 + 121 * 6 + 2 * 6 + 5 + 1 == 750 */
char checkstr[3];
int num_check_digits;
@@ -114,10 +115,9 @@ INTERNAL int code_11(struct zint_symbol *symbol, unsigned char source[], int len
strcpy(symbol->errtxt, "320: Input too long (121 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(SODIUM, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(SODIUM, source, length) != 0) {
strcpy(symbol->errtxt, "321: Invalid character in data (digits and \"-\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
if (symbol->option_2 < 0 || symbol->option_2 > 2) {
@@ -215,13 +215,12 @@ INTERNAL int code_11(struct zint_symbol *symbol, unsigned char source[], int len
}
/* Code 39 */
-INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int code39(struct zint_symbol *symbol, unsigned char source[], int length) {
int i;
int counter;
- int error_number;
+ int error_number = 0;
char dest[880]; /* 10 (Start) + 85 * 10 + 10 (Check) + 9 (Stop) + 1 = 880 */
char localstr[2] = {0};
- float height;
counter = 0;
@@ -242,10 +241,9 @@ INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length)
return ZINT_ERROR_TOO_LONG;
}
to_upper(source);
- error_number = is_sane(SILVER, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(SILVER, source, length) != 0) {
strcpy(symbol->errtxt, "324: Invalid character in data (alphanumerics, space and \"-.$/+%\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
/* Start character */
@@ -291,26 +289,27 @@ INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length)
expand(symbol, dest);
-#ifdef COMPLIANT_HEIGHTS
- if (symbol->symbology == BARCODE_LOGMARS) {
- /* MIL-STD-1189 Rev. B Section 5.2
- Min height 0.25" / 0.04" (X max) = 6.25
- Default height 0.625" (average of 0.375" - 0.875") / 0.01375" (average of 0.0075" - 0.02") ~ 45.45 */
- height = (float) (0.625 / 0.01375);
- error_number = set_height(symbol, 6.25f, height, (float) (0.875 / 0.0075), 0 /*no_errtxt*/);
- } else if (symbol->symbology == BARCODE_CODE39 || symbol->symbology == BARCODE_EXCODE39
- || symbol->symbology == BARCODE_HIBC_39) {
- /* ISO/IEC 16388:2007 4.4 (e) recommended min height 5.0mm or 15% of width excluding quiet zones;
- as X left to application specification use
- width = (C + 2) * (3 * N + 6) * X + (C + 1) * I = (C + 2) * 9 + C + 1) * X = (10 * C + 19) */
- height = (float) ((10.0 * (symbol->option_2 == 1 ? length + 1 : length) + 19.0) * 0.15);
- /* Using 50 as default as none recommended */
- error_number = set_height(symbol, height, height > 50.0f ? height : 50.0f, 0.0f, 0 /*no_errtxt*/);
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ if (symbol->symbology == BARCODE_LOGMARS) {
+ /* MIL-STD-1189 Rev. B Section 5.2
+ Min height 0.25" / 0.04" (X max) = 6.25
+ Default height 0.625" (average of 0.375" - 0.875") / 0.01375" (average of 0.0075" - 0.02") ~ 45.45 */
+ error_number = set_height(symbol, 6.25f, stripf(0.625f / 0.01375f), stripf(0.875f / 0.0075f),
+ 0 /*no_errtxt*/);
+ } else if (symbol->symbology == BARCODE_CODE39 || symbol->symbology == BARCODE_EXCODE39
+ || symbol->symbology == BARCODE_HIBC_39) {
+ /* ISO/IEC 16388:2007 4.4 (e) recommended min height 5.0mm or 15% of width excluding quiet zones;
+ as X left to application specification use
+ width = (C + 2) * (3 * N + 6) * X + (C + 1) * I = (C + 2) * 9 + C + 1) * X = (10 * C + 19);
+ use 50 as default as none recommended */
+ const float min_height = stripf((10.0f * (symbol->option_2 == 1 ? length + 1 : length) + 19.0f) * 0.15f);
+ error_number = set_height(symbol, min_height, min_height > 50.0f ? min_height : 50.0f, 0.0f,
+ 0 /*no_errtxt*/);
+ }
+ // PZN and CODE32 set their own heights
+ } else {
+ (void) set_height(symbol, 0.0f, 50.f, 0.0f, 1 /*no_errtxt*/);
}
-#else
- height = 50.0f;
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
-#endif
if (symbol->symbology == BARCODE_CODE39) {
ustrcpy(symbol->text, "*");
@@ -325,7 +324,7 @@ INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length)
}
/* Pharmazentral Nummer (PZN) */
-INTERNAL int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int pzn(struct zint_symbol *symbol, unsigned char source[], int length) {
int i, error_number, zeroes;
unsigned int count, check_digit;
@@ -335,10 +334,9 @@ INTERNAL int pharmazentral(struct zint_symbol *symbol, unsigned char source[], i
strcpy(symbol->errtxt, "325: Input wrong length (7 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "326: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
localstr[0] = '-';
@@ -364,29 +362,29 @@ INTERNAL int pharmazentral(struct zint_symbol *symbol, unsigned char source[], i
}
localstr[8] = itoc(check_digit);
localstr[9] = '\0';
- error_number = c39(symbol, (unsigned char *) localstr, 9);
+ error_number = code39(symbol, (unsigned char *) localstr, 9);
ustrcpy(symbol->text, "PZN ");
ustrcat(symbol->text, localstr);
-#ifdef COMPLIANT_HEIGHTS
- /* Technical Information regarding PZN Coding V 2.1 (25 Feb 2019) Code size
- https://www.ifaffm.de/mandanten/1/documents/04_ifa_coding_system/IFA_Info_Code_39_EN.pdf
- "normal" X 0.25mm (0.187mm - 0.45mm), height 8mm - 20mm for 0.25mm X, 10mm mentioned so use that as default,
- 10mm / 0.25mm = 40 */
- if (error_number < ZINT_ERROR) {
- error_number = set_height(symbol, (float) (8.0 / 0.45), 40.0f, (float) (20.0 / 0.187), 0 /*no_errtxt*/);
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Technical Information regarding PZN Coding V 2.1 (25 Feb 2019) Code size
+ https://www.ifaffm.de/mandanten/1/documents/04_ifa_coding_system/IFA_Info_Code_39_EN.pdf
+ "normal" X 0.25mm (0.187mm - 0.45mm), height 8mm - 20mm for 0.25mm X, 10mm mentioned so use that
+ as default, 10mm / 0.25mm = 40 */
+ if (error_number < ZINT_ERROR) {
+ error_number = set_height(symbol, stripf(8.0f / 0.45f), 40.0f, stripf(20.0f / 0.187f), 0 /*no_errtxt*/);
+ }
+ } else {
+ if (error_number < ZINT_ERROR) {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
}
-#else
- if (error_number < ZINT_ERROR) {
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
- }
-#endif
return error_number;
}
/* Extended Code 39 - ISO/IEC 16388:2007 Annex A */
-INTERNAL int ec39(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int excode39(struct zint_symbol *symbol, unsigned char source[], int length) {
unsigned char buffer[85 * 2 + 1] = {0};
int i;
@@ -408,21 +406,21 @@ INTERNAL int ec39(struct zint_symbol *symbol, unsigned char source[], int length
}
/* Then sends the buffer to the C39 function */
- error_number = c39(symbol, buffer, (int) ustrlen(buffer));
+ error_number = code39(symbol, buffer, (int) ustrlen(buffer));
for (i = 0; i < length; i++)
symbol->text[i] = source[i] >= ' ' && source[i] != 0x7F ? source[i] : ' ';
- symbol->text[length] = '\0';
+ symbol->text[length] = '\0'; /* Chops off check digit */
return error_number;
}
/* Code 93 is an advancement on Code 39 and the definition is a lot tighter */
-INTERNAL int c93(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int code93(struct zint_symbol *symbol, unsigned char source[], int length) {
/* SILVER includes the extra characters a, b, c and d to represent Code 93 specific
shift characters 1, 2, 3 and 4 respectively. These characters are never used by
- c39() and ec39() */
+ `code39()` and `excode39()` */
int i;
int h, weight, c, k, error_number = 0;
@@ -430,7 +428,6 @@ INTERNAL int c93(struct zint_symbol *symbol, unsigned char source[], int length)
char buffer[216]; /* 107*2 (107 full ASCII) + 1 = 215 */
char dest[668]; /* 6 (Start) + 107*6 + 2*6 (Checks) + 7 (Stop) + 1 (NUL) = 668 */
char set_copy[] = SILVER;
- float height;
/* Suppresses clang-tidy clang-analyzer-core.CallAndMessage warning */
assert(length > 0);
@@ -503,19 +500,15 @@ INTERNAL int c93(struct zint_symbol *symbol, unsigned char source[], int length)
strcat(dest, "1111411");
expand(symbol, dest);
-#ifdef COMPLIANT_HEIGHTS
- /* ANSI/AIM BC5-1995 Section 2.6 minimum height 0.2" or 15% of symbol length, whichever is greater
- 0.2" / 0.0075" (min X) = ~26.66; symbol length = (9 * (C + 4) + 1) * X + 2 * Q = symbol->width + 20 */
- height = (float) ((symbol->width + 20) * 0.15);
- if (height < 0.2f / 0.0075f) {
- height = 0.2f / 0.0075f;
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* ANSI/AIM BC5-1995 Section 2.6 minimum height 0.2" or 15% of symbol length, whichever is greater
+ no max X given so for min height use symbol length = (9 * (C + 4) + 1) * X + 2 * Q = symbol->width + 20;
+ use 40 as default height based on figures in spec */
+ float min_height = stripf((symbol->width + 20) * 0.15f);
+ error_number = set_height(symbol, min_height, min_height > 40.0f ? min_height : 40.0f, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
}
- /* Using 50 as default for back-compatibility */
- error_number = set_height(symbol, height, height > 50.0f ? height : 50.0f, 0.0f, 0 /*no_errtxt*/);
-#else
- height = 50.0f;
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
-#endif
if (symbol->option_2 == 1) {
symbol->text[length] = set_copy[c];
@@ -578,12 +571,18 @@ static void CHNCHR(int channels, long target_value, int B[8], int S[8]) {
/* Use of initial pre-calculations taken from Barcode Writer in Pure PostScript (BWIPP)
* Copyright (c) 2004-2020 Terry Burton (MIT/X-Consortium license) */
static channel_precalc initial_precalcs[6] = {
- { 0, { 1, 1, 1, 1, 1, 2, 1, 2, }, { 1, 1, 1, 1, 1, 1, 1, 3, }, { 1, 1, 1, 1, 1, 3, 2, }, { 1, 1, 1, 1, 1, 3, 3, }, },
- { 0, { 1, 1, 1, 1, 2, 1, 1, 3, }, { 1, 1, 1, 1, 1, 1, 1, 4, }, { 1, 1, 1, 1, 4, 3, 3, }, { 1, 1, 1, 1, 4, 4, 4, }, },
- { 0, { 1, 1, 1, 2, 1, 1, 2, 3, }, { 1, 1, 1, 1, 1, 1, 1, 5, }, { 1, 1, 1, 5, 4, 4, 4, }, { 1, 1, 1, 5, 5, 5, 5, }, },
- { 0, { 1, 1, 2, 1, 1, 2, 1, 4, }, { 1, 1, 1, 1, 1, 1, 1, 6, }, { 1, 1, 6, 5, 5, 5, 4, }, { 1, 1, 6, 6, 6, 6, 6, }, },
- { 0, { 1, 2, 1, 1, 2, 1, 1, 5, }, { 1, 1, 1, 1, 1, 1, 1, 7, }, { 1, 7, 6, 6, 6, 5, 5, }, { 1, 7, 7, 7, 7, 7, 7, }, },
- { 0, { 2, 1, 1, 2, 1, 1, 2, 5, }, { 1, 1, 1, 1, 1, 1, 1, 8, }, { 8, 7, 7, 7, 6, 6, 6, }, { 8, 8, 8, 8, 8, 8, 8, }, },
+ { 0, { 1, 1, 1, 1, 1, 2, 1, 2, }, { 1, 1, 1, 1, 1, 1, 1, 3, }, { 1, 1, 1, 1, 1, 3, 2, },
+ { 1, 1, 1, 1, 1, 3, 3, }, },
+ { 0, { 1, 1, 1, 1, 2, 1, 1, 3, }, { 1, 1, 1, 1, 1, 1, 1, 4, }, { 1, 1, 1, 1, 4, 3, 3, },
+ { 1, 1, 1, 1, 4, 4, 4, }, },
+ { 0, { 1, 1, 1, 2, 1, 1, 2, 3, }, { 1, 1, 1, 1, 1, 1, 1, 5, }, { 1, 1, 1, 5, 4, 4, 4, },
+ { 1, 1, 1, 5, 5, 5, 5, }, },
+ { 0, { 1, 1, 2, 1, 1, 2, 1, 4, }, { 1, 1, 1, 1, 1, 1, 1, 6, }, { 1, 1, 6, 5, 5, 5, 4, },
+ { 1, 1, 6, 6, 6, 6, 6, }, },
+ { 0, { 1, 2, 1, 1, 2, 1, 1, 5, }, { 1, 1, 1, 1, 1, 1, 1, 7, }, { 1, 7, 6, 6, 6, 5, 5, },
+ { 1, 7, 7, 7, 7, 7, 7, }, },
+ { 0, { 2, 1, 1, 2, 1, 1, 2, 5, }, { 1, 1, 1, 1, 1, 1, 1, 8, }, { 8, 7, 7, 7, 6, 6, 6, },
+ { 8, 8, 8, 8, 8, 8, 8, }, },
};
int bmax[7], smax[7];
long value = 0;
@@ -655,24 +654,22 @@ nb0: if (++B[0] <= bmax[0]) goto lb0;
}
/* Channel Code - According to ANSI/AIM BC12-1998 */
-INTERNAL int channel_code(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int channel(struct zint_symbol *symbol, unsigned char source[], int length) {
static int max_ranges[] = { -1, -1, -1, 26, 292, 3493, 44072, 576688, 7742862 };
int S[8] = {0}, B[8] = {0};
long target_value = 0;
char pattern[30];
int channels, i;
- int error_number, zeroes;
+ int error_number = 0, zeroes;
char hrt[9];
- float height;
if (length > 7) {
strcpy(symbol->errtxt, "333: Input too long (7 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "334: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
if ((symbol->option_2 < 3) || (symbol->option_2 > 8)) {
@@ -735,17 +732,15 @@ INTERNAL int channel_code(struct zint_symbol *symbol, unsigned char source[], in
expand(symbol, pattern);
-#ifdef COMPLIANT_HEIGHTS
- /* ANSI/AIM BC12-1998 gives min height as 5mm or 15% of length but X left as application specification so use
- 15% of length where
- length = (3 (quiet zones) + 9 (finder) + 4 * channels - 2) * X */
- height = (float) ((10 + 4 * channels) * 0.15);
- /* Using 50 as default for back-compatibility */
- error_number = set_height(symbol, height > 50.0f ? height : 50.0f, height, 0.0f, 0 /*no_errtxt*/);
-#else
- height = 50.0f;
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* ANSI/AIM BC12-1998 gives min height as 5mm or 15% of length; X left as application specification so use
+ length = 1X (left qz) + (9 (finder) + 4 * 8 - 2) * X + 2X (right qz);
+ use 20 as default based on figures in spec */
+ const float min_height = stripf((1 + 9 + 4 * channels - 2 + 2) * 0.15f);
+ error_number = set_height(symbol, min_height, 20.0f, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
return error_number;
}
@@ -771,7 +766,7 @@ INTERNAL int vin(struct zint_symbol *symbol, unsigned char source[], int length)
}
// Check input characters, I, O and Q are not allowed
- if (is_sane(ARSENIC, source, length) == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(ARSENIC, source, length) != 0) {
sprintf(symbol->errtxt, "337: Invalid character in data (\"%s\" only)", ARSENIC);
return ZINT_ERROR_INVALID_DATA;
}
diff --git a/backend/code1.c b/backend/code1.c
index b04b5afe..f0f1cf74 100644
--- a/backend/code1.c
+++ b/backend/code1.c
@@ -957,7 +957,7 @@ static void block_copy(struct zint_symbol *symbol, char datagrid[136][120], cons
}
}
-INTERNAL int code_one(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int codeone(struct zint_symbol *symbol, unsigned char source[], int length) {
int size = 1, i, j;
char datagrid[136][120];
@@ -972,6 +972,10 @@ INTERNAL int code_one(struct zint_symbol *symbol, unsigned char source[], int le
}
if (symbol->structapp.count) {
+ if (symbol->option_2 == 9) { /* Version S */
+ strcpy(symbol->errtxt, "714: Structured Append not available for Version S");
+ return ZINT_ERROR_INVALID_OPTION;
+ }
if ((symbol->input_mode & 0x07) == GS1_MODE) {
strcpy(symbol->errtxt, "710: Cannot have Structured Append and GS1 mode at the same time");
return ZINT_ERROR_INVALID_OPTION;
@@ -997,15 +1001,11 @@ INTERNAL int code_one(struct zint_symbol *symbol, unsigned char source[], int le
unsigned int data[30], ecc[15];
int block_width;
- if (symbol->structapp.count) { /* Version S */
- strcpy(symbol->errtxt, "714: Structured Append not supported for Version S");
- return ZINT_ERROR_INVALID_OPTION;
- }
if (length > 18) {
strcpy(symbol->errtxt, "514: Input data too long for Version S");
return ZINT_ERROR_TOO_LONG;
}
- if (is_sane(NEON, source, length) == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "515: Invalid input data (Version S encodes numeric input only)");
return ZINT_ERROR_INVALID_DATA;
}
diff --git a/backend/code128.c b/backend/code128.c
index 75c0451e..147f10da 100644
--- a/backend/code128.c
+++ b/backend/code128.c
@@ -300,7 +300,7 @@ STATIC_UNLESS_ZINT_TEST int hrt_cpy_iso8859_1(struct zint_symbol *symbol, const
}
/* Handle Code 128, 128B and HIBC 128 */
-INTERNAL int code_128(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int code128(struct zint_symbol *symbol, unsigned char source[], int length) {
int i, j, k, values[C128_MAX] = {0}, bar_characters, read, total_sum;
int error_number, indexchaine, indexliste, f_state;
int sourcelen;
@@ -705,7 +705,7 @@ INTERNAL int code_128(struct zint_symbol *symbol, unsigned char source[], int le
}
/* Handle EAN-128 (Now known as GS1-128), and composite version if `cc_mode` set */
-INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_mode,
+INTERNAL int gs1_128_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_mode,
const int cc_rows) {
int i, j, values[C128_MAX] = {0}, bar_characters, read, total_sum;
int error_number, warn_number = 0, indexchaine, indexliste;
@@ -1014,23 +1014,26 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
}
}
-#ifdef COMPLIANT_HEIGHTS
- /* GS1 General Specifications 21.0.1 5.12.3.2 table 2, including footnote (**):
- same as ITF-14: "in case of further space constraints" height 5.8mm / 1.016mm (X max) ~ 5.7;
- default 31.75mm / 0.495mm ~ 64.14 */
- if (symbol->symbology == BARCODE_GS1_128_CC) {
- /* Pass back via temporary linear structure */
- symbol->height = symbol->height ? (float) (5.8 / 1.016) : (float) (31.75 / 0.495);
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* GS1 General Specifications 21.0.1 5.12.3.2 table 2, including footnote (**):
+ same as ITF-14: "in case of further space constraints" height 5.8mm / 1.016mm (X max) ~ 5.7;
+ default 31.75mm / 0.495mm ~ 64.14 */
+ const float min_height = stripf(5.8f / 1.016f);
+ const float default_height = stripf(31.75f / 0.495f);
+ if (symbol->symbology == BARCODE_GS1_128_CC) {
+ /* Pass back via temporary linear structure */
+ symbol->height = symbol->height ? min_height : default_height;
+ } else {
+ warn_number = set_height(symbol, min_height, default_height, 0.0f, 0 /*no_errtxt*/);
+ }
} else {
- warn_number = set_height(symbol, (float) (5.8 / 1.016), (float) (31.75 / 0.495), 0.0f, 0 /*no_errtxt*/);
+ const float height = 50.0f;
+ if (symbol->symbology == BARCODE_GS1_128_CC) {
+ symbol->height = height - cc_rows * (cc_mode == 3 ? 3 : 2) - 1.0f;
+ } else {
+ (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
+ }
}
-#else
- if (symbol->symbology == BARCODE_GS1_128_CC) {
- symbol->height = 50.0f - cc_rows * (cc_mode == 3 ? 3 : 2) - 1.0f;
- } else {
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
- }
-#endif
for (i = 0; i < length; i++) {
if (source[i] == '[') {
@@ -1046,12 +1049,12 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
}
/* Handle EAN-128 (Now known as GS1-128) */
-INTERNAL int ean_128(struct zint_symbol *symbol, unsigned char source[], int length) {
- return ean_128_cc(symbol, source, length, 0 /*cc_mode*/, 0 /*cc_rows*/);
+INTERNAL int gs1_128(struct zint_symbol *symbol, unsigned char source[], int length) {
+ return gs1_128_cc(symbol, source, length, 0 /*cc_mode*/, 0 /*cc_rows*/);
}
/* Add check digit if encoding an NVE18 symbol */
-INTERNAL int nve_18(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int nve18(struct zint_symbol *symbol, unsigned char source[], int length) {
int i, count, check_digit;
int error_number, zeroes;
unsigned char ean128_equiv[23];
@@ -1061,10 +1064,9 @@ INTERNAL int nve_18(struct zint_symbol *symbol, unsigned char source[], int leng
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "346: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
zeroes = 17 - length;
@@ -1083,13 +1085,13 @@ INTERNAL int nve_18(struct zint_symbol *symbol, unsigned char source[], int leng
ean128_equiv[21] = itoc(check_digit);
ean128_equiv[22] = '\0';
- error_number = ean_128(symbol, ean128_equiv, 22);
+ error_number = gs1_128(symbol, ean128_equiv, 22);
return error_number;
}
/* EAN-14 - A version of EAN-128 */
-INTERNAL int ean_14(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int ean14(struct zint_symbol *symbol, unsigned char source[], int length) {
int i, count, check_digit;
int error_number, zeroes;
unsigned char ean128_equiv[19];
@@ -1099,10 +1101,9 @@ INTERNAL int ean_14(struct zint_symbol *symbol, unsigned char source[], int leng
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "348: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
zeroes = 13 - length;
@@ -1121,7 +1122,7 @@ INTERNAL int ean_14(struct zint_symbol *symbol, unsigned char source[], int leng
ean128_equiv[17] = itoc(check_digit);
ean128_equiv[18] = '\0';
- error_number = ean_128(symbol, ean128_equiv, 18);
+ error_number = gs1_128(symbol, ean128_equiv, 18);
return error_number;
}
@@ -1129,7 +1130,7 @@ INTERNAL int ean_14(struct zint_symbol *symbol, unsigned char source[], int leng
/* DPD (Deutsher Paket Dienst) Code */
/* Specification at ftp://dpd.at/Datenspezifikationen/EN/gbs_V4.0.2_hauptdokument.pdf
* or https://docplayer.net/33728877-Dpd-parcel-label-specification.html */
-INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int dpd(struct zint_symbol *symbol, unsigned char source[], int length) {
int error_number = 0;
int i, p;
unsigned char identifier;
@@ -1144,10 +1145,9 @@ INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int
identifier = source[0];
to_upper(source + 1);
- error_number = is_sane(KRSET, source + 1, length - 1);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(KRSET, source + 1, length - 1) != 0) {
strcpy(symbol->errtxt, "300: Invalid character in DPD data (alphanumerics only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
if ((identifier < 32) || (identifier > 127)) {
@@ -1155,16 +1155,16 @@ INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int
return ZINT_ERROR_INVALID_DATA;
}
- error_number = code_128(symbol, source, length); /* Only returns errors, not warnings */
+ error_number = code128(symbol, source, length); /* Only returns errors, not warnings */
if (error_number < ZINT_ERROR) {
-#ifdef COMPLIANT_HEIGHTS
- /* Specification DPD and primetime Parcel Despatch 4.0.2 Section 5.5.1
- 25mm / 0.4mm (X max) = 62.5 min, 25mm / 0.375 (X) ~ 66.66 default */
- error_number = set_height(symbol, 62.5f, (float) (25.0 / 0.375), 0.0f, 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Specification DPD and primetime Parcel Despatch 4.0.2 Section 5.5.1
+ 25mm / 0.4mm (X max) = 62.5 min, 25mm / 0.375 (X) ~ 66.66 default */
+ error_number = set_height(symbol, 62.5f, stripf(25.0f / 0.375f), 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
cd = mod;
diff --git a/backend/code16k.c b/backend/code16k.c
index e62d2ce4..a4de2bbe 100644
--- a/backend/code16k.c
+++ b/backend/code16k.c
@@ -119,8 +119,6 @@ INTERNAL int code16k(struct zint_symbol *symbol, unsigned char source[], int len
int error_number = 0, first_sum, second_sum;
int input_length;
int gs1, c_count;
- int separator;
- float min_row_height = 0.0f;
/* Suppresses clang-analyzer-core.UndefinedBinaryOperatorResult warning on fset which is fully set */
assert(length > 0);
@@ -490,16 +488,17 @@ INTERNAL int code16k(struct zint_symbol *symbol, unsigned char source[], int len
symbol->rows = rows;
symbol->width = 70;
-#ifdef COMPLIANT_HEIGHTS
- separator = symbol->option_3 >= 1 && symbol->option_3 <= 4 ? symbol->option_3 : 1;
- /* BS EN 12323:2005 Section 4.5 (d) minimum 8X; use 10 * rows as default for back-compatibility */
- min_row_height = 8.0f + separator;
- error_number = set_height(symbol, min_row_height, (min_row_height > 10.0f ? min_row_height : 10.0f) * rows, 0.0f,
- 0 /*no_errtxt*/);
-#else
- (void)&separator;
- (void) set_height(symbol, min_row_height, 10.0f * rows, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* BS EN 12323:2005 Section 4.5 (d) minimum 8X; use 10X as default
+ Section 4.5 (b) H = X[r(h + g) + g] = rows * row_height + (rows - 1) * separator as borders not included
+ in symbol->height (added on) */
+ const int separator = symbol->option_3 >= 1 && symbol->option_3 <= 4 ? symbol->option_3 : 1;
+ const float min_row_height = stripf((8.0f * rows + separator * (rows - 1)) / rows);
+ const float default_height = 10.0f * rows + separator * (rows - 1);
+ error_number = set_height(symbol, min_row_height, default_height, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 10.0f * rows, 0.0f, 1 /*no_errtxt*/);
+ }
symbol->output_options |= BARCODE_BIND;
diff --git a/backend/code49.c b/backend/code49.c
index c046129a..50f69aaf 100644
--- a/backend/code49.c
+++ b/backend/code49.c
@@ -39,7 +39,7 @@
/* "!" represents Shift 1 and "&" represents Shift 2, "*" represents FNC1 */
-INTERNAL int code_49(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int code49(struct zint_symbol *symbol, unsigned char source[], int length) {
int i, j, rows, M, x_count, y_count, z_count, posn_val, local_value;
char intermediate[170] = "";
int codewords[170], codeword_count;
@@ -49,8 +49,6 @@ INTERNAL int code_49(struct zint_symbol *symbol, unsigned char source[], int len
char pattern[80];
int gs1;
int h, len;
- int separator;
- float min_row_height = 0.0f;
int error_number = 0;
if (length > 81) {
@@ -351,16 +349,17 @@ INTERNAL int code_49(struct zint_symbol *symbol, unsigned char source[], int len
symbol->rows = rows;
symbol->width = (int) strlen(pattern);
-#ifdef COMPLIANT_HEIGHTS
- separator = symbol->option_3 >= 1 && symbol->option_3 <= 4 ? symbol->option_3 : 1;
- /* ANSI/AIM BC6-2000 Section 2.6 minimum 8X; use 10 * rows as default for back-compatibility */
- min_row_height = 8.0f + separator;
- error_number = set_height(symbol, min_row_height, (min_row_height > 10.0f ? min_row_height : 10.0f) * rows, 0.0f,
- 0 /*no_errtxt*/);
-#else
- (void)&separator;
- (void) set_height(symbol, min_row_height, 10.0f * rows, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* ANSI/AIM BC6-2000 Section 2.6 minimum 8X; use 10X as default
+ Formula 2 H = ((h + g)r + g)X = rows * row_height + (rows - 1) * separator as borders not included
+ in symbol->height (added on) */
+ const int separator = symbol->option_3 >= 1 && symbol->option_3 <= 4 ? symbol->option_3 : 1;
+ const float min_row_height = stripf((8.0f * rows + separator * (rows - 1)) / rows);
+ const float default_height = 10.0f * rows + separator * (rows - 1);
+ error_number = set_height(symbol, min_row_height, default_height, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 10.0f * rows, 0.0f, 1 /*no_errtxt*/);
+ }
symbol->output_options |= BARCODE_BIND;
diff --git a/backend/common.c b/backend/common.c
index 8fc5a763..dc45dd01 100644
--- a/backend/common.c
+++ b/backend/common.c
@@ -406,11 +406,11 @@ INTERNAL int set_height(struct zint_symbol *symbol, const float min_row_height,
if (zero_count) {
if (symbol->height) {
- row_height = (symbol->height - fixed_height) / zero_count;
+ row_height = stripf((symbol->height - fixed_height) / zero_count);
} else if (default_height) {
- row_height = default_height / zero_count;
+ row_height = stripf(default_height / zero_count);
} else {
- row_height = min_row_height;
+ row_height = stripf(min_row_height);
}
if (row_height < 0.5f) { /* Absolute minimum */
row_height = 0.5f;
@@ -421,9 +421,9 @@ INTERNAL int set_height(struct zint_symbol *symbol, const float min_row_height,
strcpy(symbol->errtxt, "247: Height not compliant with standards");
}
}
- symbol->height = row_height * zero_count + fixed_height;
+ symbol->height = stripf(row_height * zero_count + fixed_height);
} else {
- symbol->height = fixed_height; /* Ignore any given height */
+ symbol->height = stripf(fixed_height); /* Ignore any given height */
}
if (max_height && symbol->height > max_height) {
error_number = ZINT_WARN_NONCOMPLIANT;
diff --git a/backend/composite.c b/backend/composite.c
index 5d37781f..2febeedf 100644
--- a/backend/composite.c
+++ b/backend/composite.c
@@ -63,18 +63,18 @@
#define UINT unsigned short
#include "composite.h"
-INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_mode,
+INTERNAL int gs1_128_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_mode,
const int cc_rows);
INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_rows);
INTERNAL int ean_leading_zeroes(struct zint_symbol *symbol, const unsigned char source[],
unsigned char local_source[], int *p_with_addon);
-INTERNAL int rss14_stk_set_height(struct zint_symbol *symbol, const int first_row);
-INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_rows);
-INTERNAL int rsslimited_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_rows);
-INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_rows);
-INTERNAL int rss_date(const unsigned char source[], const int src_posn);
+INTERNAL int dbar_omnstk_set_height(struct zint_symbol *symbol, const int first_row);
+INTERNAL int dbar_omn_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_rows);
+INTERNAL int dbar_ltd_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_rows);
+INTERNAL int dbar_exp_cc(struct zint_symbol *symbol, unsigned char source[], int length, const int cc_rows);
+INTERNAL int dbar_date(const unsigned char source[], const int src_posn);
static int _min(const int first, const int second) {
@@ -889,7 +889,7 @@ static int cc_binary_string(struct zint_symbol *symbol, const unsigned char sour
if ((source[0] == '1') && ((source[1] == '0') || (source[1] == '1') || (source[1] == '7'))) {
/* Source starts (10), (11) or (17) */
- if (source[1] == '0' || rss_date(source, 2) >= 0) { /* Check date valid if (11) or (17) */
+ if (source[1] == '0' || dbar_date(source, 2) >= 0) { /* Check date valid if (11) or (17) */
encoding_method = 2;
}
} else if ((source[0] == '9') && (source[1] == '0')) {
@@ -913,7 +913,7 @@ static int cc_binary_string(struct zint_symbol *symbol, const unsigned char sour
} else {
/* Production Date (11) or Expiration Date (17) */
- bp = bin_append_posn(rss_date(source, 2), 16, binary_string, bp);
+ bp = bin_append_posn(dbar_date(source, 2), 16, binary_string, bp);
if (source[1] == '1') {
/* Production Date AI 11 */
@@ -1257,7 +1257,7 @@ static int linear_dummy_run(int input_mode, unsigned char *source, const int len
dummy = ZBarcode_Create();
dummy->symbology = BARCODE_GS1_128_CC;
dummy->input_mode = input_mode;
- error_number = ean_128_cc(dummy, source, length, 3 /*cc_mode*/, 0 /*cc_rows*/);
+ error_number = gs1_128_cc(dummy, source, length, 3 /*cc_mode*/, 0 /*cc_rows*/);
linear_width = dummy->width;
if (error_number >= ZINT_ERROR) {
strcpy(errtxt, dummy->errtxt);
@@ -1434,6 +1434,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
linear->symbology = symbol->symbology;
linear->input_mode = symbol->input_mode;
+ linear->output_options = symbol->output_options;
linear->option_2 = symbol->option_2;
/* If symbol->height given minimum row height will be returned, else default height */
linear->height = symbol->height;
@@ -1450,16 +1451,16 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
break;
case BARCODE_GS1_128_CC:
/* GS1-128 needs to know which type of 2D component is used */
- error_number = ean_128_cc(linear, (unsigned char *) symbol->primary, pri_len, cc_mode, symbol->rows);
+ error_number = gs1_128_cc(linear, (unsigned char *) symbol->primary, pri_len, cc_mode, symbol->rows);
break;
case BARCODE_DBAR_OMN_CC:
- error_number = rss14_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
+ error_number = dbar_omn_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
break;
case BARCODE_DBAR_LTD_CC:
- error_number = rsslimited_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
+ error_number = dbar_ltd_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
break;
case BARCODE_DBAR_EXP_CC:
- error_number = rssexpanded_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
+ error_number = dbar_exp_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
break;
case BARCODE_UPCA_CC:
error_number = eanx_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
@@ -1468,13 +1469,13 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
error_number = eanx_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
break;
case BARCODE_DBAR_STK_CC:
- error_number = rss14_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
+ error_number = dbar_omn_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
break;
case BARCODE_DBAR_OMNSTK_CC:
- error_number = rss14_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
+ error_number = dbar_omn_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
break;
case BARCODE_DBAR_EXPSTK_CC:
- error_number = rssexpanded_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
+ error_number = dbar_exp_cc(linear, (unsigned char *) symbol->primary, pri_len, symbol->rows);
break;
}
@@ -1605,23 +1606,23 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
symbol->width += top_shift;
}
symbol->rows += linear->rows;
-#ifdef COMPLIANT_HEIGHTS
- if (symbol->symbology == BARCODE_DBAR_STK_CC) {
- /* Databar Stacked needs special treatment due to asymmetric rows */
- warn_number = rss14_stk_set_height(symbol, symbol->rows - linear->rows + 1 /*first_row*/);
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ if (symbol->symbology == BARCODE_DBAR_STK_CC) {
+ /* Databar Stacked needs special treatment due to asymmetric rows */
+ warn_number = dbar_omnstk_set_height(symbol, symbol->rows - linear->rows + 1 /*first_row*/);
+ } else {
+ /* If symbol->height given then min row height was returned, else default height */
+ warn_number = set_height(symbol, symbol->height ? linear->height : 0.0f,
+ symbol->height ? 0.0f : linear->height, 0.0f, 0 /*no_errtxt*/);
+ }
} else {
- /* If symbol->height given then min row height was returned, else default height */
- warn_number = set_height(symbol, symbol->height ? linear->height : 0.0f,
- symbol->height ? 0.0f : linear->height, 0.0f, 0 /*no_errtxt*/);
+ if (symbol->symbology == BARCODE_DBAR_STK_CC) {
+ (void) dbar_omnstk_set_height(symbol, symbol->rows - linear->rows + 1 /*first_row*/);
+ } else {
+ (void) set_height(symbol, symbol->height ? linear->height : 0.0f, symbol->height ? 0.0f : linear->height,
+ 0.0f, 1 /*no_errtxt*/);
+ }
}
-#else
- if (symbol->symbology == BARCODE_DBAR_STK_CC) {
- (void) rss14_stk_set_height(symbol, symbol->rows - linear->rows + 1 /*first_row*/);
- } else {
- (void) set_height(symbol, symbol->height ? linear->height : 0.0f, symbol->height ? 0.0f : linear->height,
- 0.0f, 1 /*no_errtxt*/);
- }
-#endif
ustrcpy(symbol->text, linear->text);
diff --git a/backend/dmatrix.c b/backend/dmatrix.c
index 8250fe7f..44680a5f 100644
--- a/backend/dmatrix.c
+++ b/backend/dmatrix.c
@@ -1144,7 +1144,7 @@ static void add_tail(unsigned char target[], int tp, const int tail_length) {
}
}
-static int data_matrix_200(struct zint_symbol *symbol, const unsigned char source[], int inputlen) {
+static int datamatrix_200(struct zint_symbol *symbol, const unsigned char source[], int inputlen) {
int i, skew = 0;
unsigned char binary[2200];
int binlen;
@@ -1266,12 +1266,12 @@ static int data_matrix_200(struct zint_symbol *symbol, const unsigned char sourc
return error_number;
}
-INTERNAL int dmatrix(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int datamatrix(struct zint_symbol *symbol, unsigned char source[], int length) {
int error_number;
if (symbol->option_1 <= 1) {
/* ECC 200 */
- error_number = data_matrix_200(symbol, source, length);
+ error_number = datamatrix_200(symbol, source, length);
} else {
/* ECC 000 - 140 */
strcpy(symbol->errtxt, "524: Older Data Matrix standards are no longer supported");
diff --git a/backend/gridmtx.c b/backend/gridmtx.c
index 44a504cc..1f78960a 100644
--- a/backend/gridmtx.c
+++ b/backend/gridmtx.c
@@ -1006,7 +1006,7 @@ static void place_layer_id(char *grid, int size, int layers, int modules, int ec
}
}
-INTERNAL int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int gridmatrix(struct zint_symbol *symbol, unsigned char source[], int length) {
int size, modules, error_number;
int auto_layers, min_layers, layers, auto_ecc_level, min_ecc_level, ecc_level;
int x, y, i;
diff --git a/backend/hanxin.c b/backend/hanxin.c
index f7d9d1a6..3b7f6c25 100644
--- a/backend/hanxin.c
+++ b/backend/hanxin.c
@@ -1448,7 +1448,7 @@ static void hx_apply_bitmask(unsigned char *grid, const int size, const int vers
}
/* Han Xin Code - main */
-INTERNAL int han_xin(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int hanxin(struct zint_symbol *symbol, unsigned char source[], int length) {
int est_binlen;
int ecc_level = symbol->option_1;
int i, j, j_max, version;
diff --git a/backend/imail.c b/backend/imail.c
index 79a9cbfe..be2db805 100644
--- a/backend/imail.c
+++ b/backend/imail.c
@@ -244,7 +244,7 @@ static unsigned short USPS_MSB_Math_CRC11GenerateFrameCheckSequence(unsigned cha
INTERNAL int daft_set_height(struct zint_symbol *symbol, float min_height, float max_height);
-INTERNAL int imail(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int usps_imail(struct zint_symbol *symbol, unsigned char source[], int length) {
char data_pattern[200];
int error_number;
int i, j, read;
@@ -434,22 +434,22 @@ INTERNAL int imail(struct zint_symbol *symbol, unsigned char source[], int lengt
read += 2;
}
-#ifdef COMPLIANT_HEIGHTS
- /* USPS-B-3200 Section 2.3.1
- Using bar pitch as X (1" / 43) ~ 0.023" based on 22 bars + 21 spaces per inch (bar width 0.015" - 0.025"),
- height 0.125" - 0.165"
- Tracker 0.048" (average of 0.039" - 0.057")
- Ascender/descender 0.0965" (average of 0.082" - 0.111") less T = 0.0485"
- */
- symbol->row_height[0] = 0.0485f * 43; /* 2.0855 */
- symbol->row_height[1] = 0.048f * 43; /* 2.064 */
- /* Note using max X for minimum and min X for maximum */
- error_number = daft_set_height(symbol, 0.125f * 39 /*4.875*/, 0.165f * 47 /*7.755*/);
-#else
- symbol->row_height[0] = 3.0f;
- symbol->row_height[1] = 2.0f;
- daft_set_height(symbol, 0.0f, 0.0f);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* USPS-B-3200 Section 2.3.1
+ Using bar pitch as X (1" / 43) ~ 0.023" based on 22 bars + 21 spaces per inch (bar width 0.015" - 0.025"),
+ height 0.125" - 0.165"
+ Tracker 0.048" (average of 0.039" - 0.057")
+ Ascender/descender 0.0965" (average of 0.082" - 0.111") less T = 0.0485"
+ */
+ symbol->row_height[0] = stripf(0.0485f * 43); /* 2.0855 */
+ symbol->row_height[1] = stripf(0.048f * 43); /* 2.064 */
+ /* Note using max X for minimum and min X for maximum */
+ error_number = daft_set_height(symbol, stripf(0.125f * 39) /*4.875*/, stripf(0.165f * 47) /*7.755*/);
+ } else {
+ symbol->row_height[0] = 3.0f;
+ symbol->row_height[1] = 2.0f;
+ (void) daft_set_height(symbol, 0.0f, 0.0f);
+ }
symbol->rows = 3;
symbol->width = read - 1;
return error_number;
diff --git a/backend/library.c b/backend/library.c
index bd4098d0..67830bad 100644
--- a/backend/library.c
+++ b/backend/library.c
@@ -132,80 +132,75 @@ void ZBarcode_Delete(struct zint_symbol *symbol) {
}
INTERNAL int eanx(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN system barcodes */
-INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 3 from 9 (or Code 39) */
-/* Pharmazentral Nummer (PZN) */
-INTERNAL int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int code39(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 3 from 9 (or Code 39) */
+INTERNAL int pzn(struct zint_symbol *symbol, unsigned char source[], int length); /* Pharmazentral Nummer (PZN) */
/* Extended Code 3 from 9 (or Code 39+) */
-INTERNAL int ec39(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int excode39(struct zint_symbol *symbol, unsigned char source[], int length);
/* Codabar - a simple substitution cipher */
INTERNAL int codabar(struct zint_symbol *symbol, unsigned char source[], int length);
/* Code 2 of 5 Standard (& Matrix) */
-INTERNAL int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length);
-/* Code 2 of 5 Industrial */
-INTERNAL int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length);
-INTERNAL int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 IATA */
-/* Code 2 of 5 Interleaved */
-INTERNAL int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length);
-/* Code 2 of 5 Data Logic */
-INTERNAL int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int c25standard(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int c25ind(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Industrial */
+INTERNAL int c25iata(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 IATA */
+INTERNAL int c25inter(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Interleaved */
+INTERNAL int c25logic(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Data Logic */
INTERNAL int itf14(struct zint_symbol *symbol, unsigned char source[], int length); /* ITF-14 */
INTERNAL int dpleit(struct zint_symbol *symbol, unsigned char source[], int length); /* Deutsche Post Leitcode */
INTERNAL int dpident(struct zint_symbol *symbol, unsigned char source[], int length); /* Deutsche Post Identcode */
/* Code 93 - a re-working of Code 39+, generates 2 check digits */
-INTERNAL int c93(struct zint_symbol *symbol, unsigned char source[], int length);
-INTERNAL int code_128(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 128 and NVE-18 */
-INTERNAL int ean_128(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN-128 (GS1-128) */
-INTERNAL int code_11(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 11 */
-INTERNAL int msi_handle(struct zint_symbol *symbol, unsigned char source[], int length); /* MSI Plessey */
+INTERNAL int code93(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int code128(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 128 and NVE-18 */
+INTERNAL int gs1_128(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN-128 (GS1-128) */
+INTERNAL int code11(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 11 */
+INTERNAL int msi_plessey(struct zint_symbol *symbol, unsigned char source[], int length); /* MSI Plessey */
INTERNAL int telepen(struct zint_symbol *symbol, unsigned char source[], int length); /* Telepen ASCII */
INTERNAL int telepen_num(struct zint_symbol *symbol, unsigned char source[], int length); /* Telepen Numeric */
INTERNAL int plessey(struct zint_symbol *symbol, unsigned char source[], int length); /* Plessey Code */
-INTERNAL int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length); /* Pharmacode One Track */
-INTERNAL int flattermarken(struct zint_symbol *symbol, unsigned char source[], int length); /* Flattermarken */
+INTERNAL int pharma(struct zint_symbol *symbol, unsigned char source[], int length); /* Pharmacode One Track */
+INTERNAL int flat(struct zint_symbol *symbol, unsigned char source[], int length); /* Flattermarken */
INTERNAL int fim(struct zint_symbol *symbol, unsigned char source[], int length); /* Facing Identification Mark */
INTERNAL int pharma_two(struct zint_symbol *symbol, unsigned char source[], int length); /* Pharmacode Two Track */
-INTERNAL int post_plot(struct zint_symbol *symbol, unsigned char source[], int length); /* Postnet */
-INTERNAL int planet_plot(struct zint_symbol *symbol, unsigned char source[], int length); /* PLANET */
+INTERNAL int postnet(struct zint_symbol *symbol, unsigned char source[], int length); /* Postnet */
+INTERNAL int planet(struct zint_symbol *symbol, unsigned char source[], int length); /* PLANET */
/* Intelligent Mail (aka USPS OneCode) */
-INTERNAL int imail(struct zint_symbol *symbol, unsigned char source[], int length);
-INTERNAL int royal_plot(struct zint_symbol *symbol, unsigned char source[], int length); /* RM4SCC */
-/* Australia Post 4-state */
-INTERNAL int australia_post(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int usps_imail(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int rm4scc(struct zint_symbol *symbol, unsigned char source[], int length); /* RM4SCC */
+INTERNAL int auspost(struct zint_symbol *symbol, unsigned char source[], int length); /* Australia Post 4-state */
INTERNAL int code16k(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 16k */
-INTERNAL int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int length); /* PDF417 */
-INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length); /* Micro PDF417 */
+INTERNAL int pdf417(struct zint_symbol *symbol, unsigned char source[], int length); /* PDF417 */
+INTERNAL int micropdf417(struct zint_symbol *symbol, unsigned char chaine[], int length); /* Micro PDF417 */
INTERNAL int maxicode(struct zint_symbol *symbol, unsigned char source[], int length); /* Maxicode */
-INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS-14 */
-INTERNAL int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS Limited */
-INTERNAL int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS Expanded */
+INTERNAL int dbar_omn(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS-14 */
+INTERNAL int dbar_ltd(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS Limited */
+INTERNAL int dbar_exp(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS Expanded */
INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int length); /* Composite Symbology */
-INTERNAL int kix_code(struct zint_symbol *symbol, unsigned char source[], int length); /* TNT KIX Code */
+INTERNAL int kix(struct zint_symbol *symbol, unsigned char source[], int length); /* TNT KIX Code */
INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int length); /* Aztec Code */
INTERNAL int code32(struct zint_symbol *symbol, unsigned char source[], int length); /* Italian Pharmacode */
-INTERNAL int daft_code(struct zint_symbol *symbol, unsigned char source[], int length); /* DAFT Code */
-INTERNAL int ean_14(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN-14 */
-INTERNAL int nve_18(struct zint_symbol *symbol, unsigned char source[], int length); /* NVE-18 */
+INTERNAL int daft(struct zint_symbol *symbol, unsigned char source[], int length); /* DAFT Code */
+INTERNAL int ean14(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN-14 */
+INTERNAL int nve18(struct zint_symbol *symbol, unsigned char source[], int length); /* NVE-18 */
INTERNAL int microqr(struct zint_symbol *symbol, unsigned char source[], int length); /* Micro QR Code */
-INTERNAL int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int length); /* Aztec Runes */
-INTERNAL int korea_post(struct zint_symbol *symbol, unsigned char source[], int length); /* Korea Post */
-INTERNAL int japan_post(struct zint_symbol *symbol, unsigned char source[], int length); /* Japanese Post */
-INTERNAL int code_49(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 49 */
-INTERNAL int channel_code(struct zint_symbol *symbol, unsigned char source[], int length); /* Channel Code */
-INTERNAL int code_one(struct zint_symbol *symbol, unsigned char source[], int length); /* Code One */
-INTERNAL int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length); /* Grid Matrix */
-INTERNAL int han_xin(struct zint_symbol *symbol, unsigned char source[], int length); /* Han Xin */
+INTERNAL int azrune(struct zint_symbol *symbol, unsigned char source[], int length); /* Aztec Runes */
+INTERNAL int koreapost(struct zint_symbol *symbol, unsigned char source[], int length); /* Korea Post */
+INTERNAL int japanpost(struct zint_symbol *symbol, unsigned char source[], int length); /* Japanese Post */
+INTERNAL int code49(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 49 */
+INTERNAL int channel(struct zint_symbol *symbol, unsigned char source[], int length); /* Channel Code */
+INTERNAL int codeone(struct zint_symbol *symbol, unsigned char source[], int length); /* Code One */
+INTERNAL int gridmatrix(struct zint_symbol *symbol, unsigned char source[], int length); /* Grid Matrix */
+INTERNAL int hanxin(struct zint_symbol *symbol, unsigned char source[], int length); /* Han Xin */
INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int length); /* DotCode */
-INTERNAL int codablock(struct zint_symbol *symbol, unsigned char source[], int length); /* Codablock */
+INTERNAL int codablockf(struct zint_symbol *symbol, unsigned char source[], int length); /* Codablock */
INTERNAL int upnqr(struct zint_symbol *symbol, unsigned char source[], int length); /* UPNQR */
-INTERNAL int qr_code(struct zint_symbol *symbol, unsigned char source[], int length); /* QR Code */
-INTERNAL int dmatrix(struct zint_symbol *symbol, unsigned char source[], int length); /* Data Matrix (IEC16022) */
+INTERNAL int qrcode(struct zint_symbol *symbol, unsigned char source[], int length); /* QR Code */
+INTERNAL int datamatrix(struct zint_symbol *symbol, unsigned char source[], int length); /* Data Matrix (IEC16022) */
/* VIN Code (Vehicle Identification Number) */
INTERNAL int vin(struct zint_symbol *symbol, unsigned char source[], int length);
/* Royal Mail 4-state Mailmark */
INTERNAL int mailmark(struct zint_symbol *symbol, unsigned char source[], int length);
-INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int length); /* Ultracode */
+INTERNAL int ultra(struct zint_symbol *symbol, unsigned char source[], int length); /* Ultracode */
INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length); /* rMQR */
-INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int length); /* DPD Code */
+INTERNAL int dpd(struct zint_symbol *symbol, unsigned char source[], int length); /* DPD Code */
INTERNAL int plot_raster(struct zint_symbol *symbol, int rotate_angle, int file_type); /* Plot to PNG/BMP/PCX */
INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_type); /* Plot to EPS/EMF/SVG */
@@ -299,7 +294,7 @@ static int dump_plot(struct zint_symbol *symbol) {
/* Process health industry bar code data */
static int hibc(struct zint_symbol *symbol, unsigned char source[], int length) {
int i;
- int counter, error_number;
+ int counter, error_number = 0;
char to_process[113], check_digit;
/* without "+" and check: max 110 characters in HIBC 2.6 */
@@ -308,10 +303,9 @@ static int hibc(struct zint_symbol *symbol, unsigned char source[], int length)
return ZINT_ERROR_TOO_LONG;
}
to_upper(source);
- error_number = is_sane(TECHNETIUM, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(TECHNETIUM, source, length) != 0) {
strcpy(symbol->errtxt, "203: Invalid character in data (alphanumerics, space and \"-.$/+%\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
counter = 41;
@@ -355,35 +349,35 @@ static int hibc(struct zint_symbol *symbol, unsigned char source[], int length)
switch (symbol->symbology) {
case BARCODE_HIBC_128:
- error_number = code_128(symbol, (unsigned char *) to_process, length);
+ error_number = code128(symbol, (unsigned char *) to_process, length);
ustrcpy(symbol->text, "*");
ustrcat(symbol->text, to_process);
ustrcat(symbol->text, "*");
break;
case BARCODE_HIBC_39:
symbol->option_2 = 0;
- error_number = c39(symbol, (unsigned char *) to_process, length);
+ error_number = code39(symbol, (unsigned char *) to_process, length);
ustrcpy(symbol->text, "*");
ustrcat(symbol->text, to_process);
ustrcat(symbol->text, "*");
break;
case BARCODE_HIBC_DM:
- error_number = dmatrix(symbol, (unsigned char *) to_process, length);
+ error_number = datamatrix(symbol, (unsigned char *) to_process, length);
break;
case BARCODE_HIBC_QR:
- error_number = qr_code(symbol, (unsigned char *) to_process, length);
+ error_number = qrcode(symbol, (unsigned char *) to_process, length);
break;
case BARCODE_HIBC_PDF:
- error_number = pdf417enc(symbol, (unsigned char *) to_process, length);
+ error_number = pdf417(symbol, (unsigned char *) to_process, length);
break;
case BARCODE_HIBC_MICPDF:
- error_number = micro_pdf417(symbol, (unsigned char *) to_process, length);
+ error_number = micropdf417(symbol, (unsigned char *) to_process, length);
break;
case BARCODE_HIBC_AZTEC:
error_number = aztec(symbol, (unsigned char *) to_process, length);
break;
case BARCODE_HIBC_BLOCKF:
- error_number = codablock(symbol, (unsigned char *) to_process, length);
+ error_number = codablockf(symbol, (unsigned char *) to_process, length);
break;
}
@@ -542,6 +536,41 @@ static int has_hrt(const int symbology) {
return 1;
}
+/* Used for dispatching barcodes and for whether symbol id valid */
+typedef int (*barcode_func_t)(struct zint_symbol *, unsigned char *, int);
+static const barcode_func_t barcode_funcs[146] = {
+ 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*/
+ code128, dpleit, dpident, code16k, code49, /*20-24*/
+ code93, NULL, NULL, flat, dbar_omn, /*25-29*/
+ dbar_ltd, dbar_exp, telepen, NULL, eanx, /*30-34*/
+ eanx, NULL, eanx, eanx, NULL, /*35-39*/
+ postnet, NULL, NULL, NULL, NULL, /*40-44*/
+ NULL, NULL, msi_plessey, NULL, fim, /*45-49*/
+ code39, pharma, pzn, pharma_two, NULL, /*50-54*/
+ pdf417, pdf417, maxicode, qrcode, NULL, /*55-59*/
+ code128, NULL, NULL, auspost, NULL, /*60-64*/
+ NULL, auspost, auspost, auspost, eanx, /*65-69*/
+ rm4scc, datamatrix, ean14, vin, codablockf, /*70-74*/
+ nve18, japanpost, koreapost, NULL, dbar_omn, /*75-79*/
+ dbar_omn, dbar_exp, planet, NULL, micropdf417, /*80-84*/
+ usps_imail, plessey, telepen_num, NULL, itf14, /*85-89*/
+ kix, NULL, aztec, daft, NULL, /*90-94*/
+ NULL, dpd, microqr, hibc, hibc, /*95-99*/
+ NULL, NULL, hibc, NULL, hibc, /*100-104*/
+ NULL, hibc, NULL, hibc, NULL, /*105-109*/
+ hibc, NULL, hibc, NULL, NULL, /*110-114*/
+ dotcode, hanxin, NULL, NULL, NULL, /*115-119*/
+ NULL, mailmark, NULL, NULL, NULL, /*120-124*/
+ NULL, NULL, NULL, azrune, code32, /*125-129*/
+ composite, composite, composite, composite, composite, /*130-134*/
+ composite, composite, composite, composite, composite, /*135-139*/
+ channel, codeone, gridmatrix, upnqr, ultra, /*140-144*/
+ rmqr,
+};
+
static int reduced_charset(struct zint_symbol *symbol, unsigned char *source, int length);
static int extended_or_reduced_charset(struct zint_symbol *symbol, unsigned char *source, const int length) {
@@ -549,17 +578,13 @@ static int extended_or_reduced_charset(struct zint_symbol *symbol, unsigned char
switch (symbol->symbology) {
/* These are the "elite" standards which have support for specific character sets */
- case BARCODE_QRCODE: error_number = qr_code(symbol, source, length);
- break;
- case BARCODE_MICROQR: error_number = microqr(symbol, source, length);
- break;
- case BARCODE_GRIDMATRIX: error_number = grid_matrix(symbol, source, length);
- break;
- case BARCODE_HANXIN: error_number = han_xin(symbol, source, length);
- break;
- case BARCODE_UPNQR: error_number = upnqr(symbol, source, length);
- break;
- case BARCODE_RMQR: error_number = rmqr(symbol, source, length);
+ case BARCODE_QRCODE:
+ case BARCODE_MICROQR:
+ case BARCODE_GRIDMATRIX:
+ case BARCODE_HANXIN:
+ case BARCODE_UPNQR:
+ case BARCODE_RMQR:
+ error_number = (*barcode_funcs[symbol->symbology])(symbol, source, length);
break;
default: error_number = reduced_charset(symbol, source, length);
break;
@@ -568,8 +593,8 @@ static int extended_or_reduced_charset(struct zint_symbol *symbol, unsigned char
return error_number;
}
+/* These are the "norm" standards which only support Latin-1 at most, though a few support ECI */
static int reduced_charset(struct zint_symbol *symbol, unsigned char *source, int length) {
- /* These are the "norm" standards which only support Latin-1 at most, though a few support ECI */
int error_number = 0;
unsigned char *preprocessed = source;
@@ -594,169 +619,7 @@ static int reduced_charset(struct zint_symbol *symbol, unsigned char *source, in
}
}
- switch (symbol->symbology) {
- case BARCODE_C25STANDARD: error_number = matrix_two_of_five(symbol, preprocessed, length);
- break;
- case BARCODE_C25IND: error_number = industrial_two_of_five(symbol, preprocessed, length);
- break;
- case BARCODE_C25INTER: error_number = interleaved_two_of_five(symbol, preprocessed, length);
- break;
- case BARCODE_C25IATA: error_number = iata_two_of_five(symbol, preprocessed, length);
- break;
- case BARCODE_C25LOGIC: error_number = logic_two_of_five(symbol, preprocessed, length);
- break;
- case BARCODE_DPLEIT: error_number = dpleit(symbol, preprocessed, length);
- break;
- case BARCODE_DPIDENT: error_number = dpident(symbol, preprocessed, length);
- break;
- case BARCODE_UPCA:
- case BARCODE_UPCA_CHK:
- case BARCODE_UPCE:
- case BARCODE_UPCE_CHK:
- case BARCODE_EANX:
- case BARCODE_EANX_CHK:
- case BARCODE_ISBNX:
- error_number = eanx(symbol, preprocessed, length);
- break;
- case BARCODE_GS1_128: error_number = ean_128(symbol, preprocessed, length);
- break;
- case BARCODE_CODE39: error_number = c39(symbol, preprocessed, length);
- break;
- case BARCODE_PZN: error_number = pharmazentral(symbol, preprocessed, length);
- break;
- case BARCODE_EXCODE39: error_number = ec39(symbol, preprocessed, length);
- break;
- case BARCODE_CODABAR: error_number = codabar(symbol, preprocessed, length);
- break;
- case BARCODE_CODE93: error_number = c93(symbol, preprocessed, length);
- break;
- case BARCODE_LOGMARS: error_number = c39(symbol, preprocessed, length);
- break;
- case BARCODE_CODE128:
- case BARCODE_CODE128B:
- error_number = code_128(symbol, preprocessed, length);
- break;
- case BARCODE_NVE18: error_number = nve_18(symbol, preprocessed, length);
- break;
- case BARCODE_CODE11: error_number = code_11(symbol, preprocessed, length);
- break;
- case BARCODE_MSI_PLESSEY: error_number = msi_handle(symbol, preprocessed, length);
- break;
- case BARCODE_TELEPEN: error_number = telepen(symbol, preprocessed, length);
- break;
- case BARCODE_TELEPEN_NUM: error_number = telepen_num(symbol, preprocessed, length);
- break;
- case BARCODE_PHARMA: error_number = pharma_one(symbol, preprocessed, length);
- break;
- case BARCODE_PLESSEY: error_number = plessey(symbol, preprocessed, length);
- break;
- case BARCODE_ITF14: error_number = itf14(symbol, preprocessed, length);
- break;
- case BARCODE_FLAT: error_number = flattermarken(symbol, preprocessed, length);
- break;
- case BARCODE_FIM: error_number = fim(symbol, preprocessed, length);
- break;
- case BARCODE_POSTNET: error_number = post_plot(symbol, preprocessed, length);
- break;
- case BARCODE_PLANET: error_number = planet_plot(symbol, preprocessed, length);
- break;
- case BARCODE_RM4SCC: error_number = royal_plot(symbol, preprocessed, length);
- break;
- case BARCODE_AUSPOST:
- case BARCODE_AUSREPLY:
- case BARCODE_AUSROUTE:
- case BARCODE_AUSREDIRECT:
- error_number = australia_post(symbol, preprocessed, length);
- break;
- case BARCODE_CODE16K: error_number = code16k(symbol, preprocessed, length);
- break;
- case BARCODE_PHARMA_TWO: error_number = pharma_two(symbol, preprocessed, length);
- break;
- case BARCODE_USPS_IMAIL: error_number = imail(symbol, preprocessed, length);
- break;
- case BARCODE_DBAR_OMN:
- case BARCODE_DBAR_STK:
- case BARCODE_DBAR_OMNSTK:
- error_number = rss14(symbol, preprocessed, length);
- break;
- case BARCODE_DBAR_LTD: error_number = rsslimited(symbol, preprocessed, length);
- break;
- case BARCODE_DBAR_EXP:
- case BARCODE_DBAR_EXPSTK:
- error_number = rssexpanded(symbol, preprocessed, length);
- break;
- case BARCODE_EANX_CC:
- case BARCODE_GS1_128_CC:
- case BARCODE_DBAR_OMN_CC:
- case BARCODE_DBAR_LTD_CC:
- case BARCODE_DBAR_EXP_CC:
- case BARCODE_UPCA_CC:
- case BARCODE_UPCE_CC:
- case BARCODE_DBAR_STK_CC:
- case BARCODE_DBAR_OMNSTK_CC:
- case BARCODE_DBAR_EXPSTK_CC:
- error_number = composite(symbol, preprocessed, length);
- break;
- case BARCODE_KIX: error_number = kix_code(symbol, preprocessed, length);
- break;
- case BARCODE_CODE32: error_number = code32(symbol, preprocessed, length);
- break;
- case BARCODE_DAFT: error_number = daft_code(symbol, preprocessed, length);
- break;
- case BARCODE_EAN14:
- error_number = ean_14(symbol, preprocessed, length);
- break;
- case BARCODE_AZRUNE: error_number = aztec_runes(symbol, preprocessed, length);
- break;
- case BARCODE_KOREAPOST: error_number = korea_post(symbol, preprocessed, length);
- break;
- case BARCODE_HIBC_128:
- case BARCODE_HIBC_39:
- case BARCODE_HIBC_DM:
- case BARCODE_HIBC_QR:
- case BARCODE_HIBC_PDF:
- case BARCODE_HIBC_MICPDF:
- case BARCODE_HIBC_AZTEC:
- case BARCODE_HIBC_BLOCKF:
- error_number = hibc(symbol, preprocessed, length);
- break;
- case BARCODE_JAPANPOST: error_number = japan_post(symbol, preprocessed, length);
- break;
- case BARCODE_CODE49: error_number = code_49(symbol, preprocessed, length);
- break;
- case BARCODE_CHANNEL: error_number = channel_code(symbol, preprocessed, length);
- break;
- case BARCODE_CODEONE: error_number = code_one(symbol, preprocessed, length);
- break;
- case BARCODE_DATAMATRIX: error_number = dmatrix(symbol, preprocessed, length);
- break;
- case BARCODE_PDF417:
- case BARCODE_PDF417COMP:
- error_number = pdf417enc(symbol, preprocessed, length);
- break;
- case BARCODE_MICROPDF417: error_number = micro_pdf417(symbol, preprocessed, length);
- break;
- case BARCODE_MAXICODE: error_number = maxicode(symbol, preprocessed, length);
- break;
- case BARCODE_AZTEC: error_number = aztec(symbol, preprocessed, length);
- break;
- case BARCODE_DOTCODE: error_number = dotcode(symbol, preprocessed, length);
- break;
- case BARCODE_CODABLOCKF: error_number = codablock(symbol, preprocessed, length);
- break;
- case BARCODE_VIN: error_number = vin(symbol, preprocessed, length);
- break;
- case BARCODE_MAILMARK: error_number = mailmark(symbol, preprocessed, length);
- break;
- case BARCODE_ULTRA: error_number = ultracode(symbol, preprocessed, length);
- break;
- case BARCODE_DPD: error_number = dpd_parcel(symbol, preprocessed, length);
- break;
- default: /* Should never happen */
- strcpy(symbol->errtxt, "001: Internal error"); /* Not reached */
- error_number = ZINT_ERROR_ENCODING_PROBLEM;
- break;
- }
+ error_number = (*barcode_funcs[symbol->symbology])(symbol, preprocessed, length);
return error_number;
}
@@ -1484,31 +1347,14 @@ int ZBarcode_Encode_File_and_Buffer_Vector(struct zint_symbol *symbol, const cha
return error_number;
}
+/* Checks whether a symbology is supported */
int ZBarcode_ValidID(int symbol_id) {
- /* Checks whether a symbology is supported */
- static const unsigned char ids[146] = {
- 0, 1, 2, 3, 4, 0, 6, 7, 8, 9,
- 0, 0, 0, 13, 14, 0, 16, 0, 18, 0,
- 20, 21, 22, 23, 24, 25, 0, 0, 28, 29,
- 30, 31, 32, 0, 34, 35, 0, 37, 38, 0,
- 40, 0, 0, 0, 0, 0, 0, 47, 0, 49,
- 50, 51, 52, 53, 0, 55, 56, 57, 58, 0,
- 60, 0, 0, 63, 0, 0, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 77, 0, 79,
- 80, 81, 82, 0, 84, 85, 86, 87, 0, 89,
- 90, 0, 92, 93, 0, 0, 96, 97, 98, 99,
- 0, 0, 102, 0, 104, 0, 106, 0, 108, 0,
- 110, 0, 112, 0, 0, 115, 116, 0, 0, 0,
- 0, 121, 0, 0, 0, 0, 0, 0, 128, 129,
- 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
- 140, 141, 142, 143, 144, 145,
- };
if (symbol_id <= 0 || symbol_id > 145) {
return 0;
}
- return ids[symbol_id] != 0;
+ return barcode_funcs[symbol_id] != NULL;
}
/* Return the capability flags for symbology `symbol_id` that match `cap_flag` */
@@ -1628,6 +1474,36 @@ unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag) {
break;
}
}
+ if ((cap_flag & ZINT_CAP_COMPLIANT_HEIGHT) && !is_fixed_ratio(symbol_id)) {
+ switch (symbol_id) {
+ /* These don't have a compliant height defined */
+ case BARCODE_CODE11: /* TODO: Find doc */
+ case BARCODE_C25STANDARD: /* For C25 only have doc for C25INTER */
+ case BARCODE_C25IATA:
+ case BARCODE_C25LOGIC:
+ case BARCODE_C25IND:
+ case BARCODE_CODE128: /* Left to application */
+ case BARCODE_CODE128B:
+ case BARCODE_DPLEIT: /* TODO: Find doc */
+ case BARCODE_DPIDENT: /* TODO: Find doc */
+ case BARCODE_FLAT: /* TODO: Find doc */
+ case BARCODE_MSI_PLESSEY: /* TODO: Find doc */
+ case BARCODE_PDF417: /* Has compliant height but already warns & uses for default */
+ case BARCODE_PDF417COMP:
+ case BARCODE_VIN: /* Spec unlikely */
+ case BARCODE_KOREAPOST: /* TODO: Find doc */
+ case BARCODE_MICROPDF417: /* See PDF417 */
+ case BARCODE_PLESSEY: /* TODO: Find doc */
+ case BARCODE_DAFT: /* Generic */
+ case BARCODE_HIBC_128: /* See CODE128 */
+ case BARCODE_HIBC_PDF: /* See PDF417 */
+ case BARCODE_HIBC_MICPDF: /* See PDF417 */
+ break;
+ default:
+ result |= ZINT_CAP_COMPLIANT_HEIGHT;
+ break;
+ }
+ }
return result;
}
diff --git a/backend/mailmark.c b/backend/mailmark.c
index 3821f212..79a92610 100644
--- a/backend/mailmark.c
+++ b/backend/mailmark.c
@@ -33,9 +33,11 @@
/*
* Developed in accordance with "Royal Mail Mailmark barcode C encoding and deconding instructions"
- * (https://www.royalmail.com/sites/default/files/Mailmark-4-state-barcode-C-encoding-and-decoding-instructions-Sept-2015.pdf)
+ * (https://www.royalmail.com/sites/default/files/
+ * Mailmark-4-state-barcode-C-encoding-and-decoding-instructions-Sept-2015.pdf)
* and "Royal Mail Mailmark barcode L encoding and decoding"
- * (https://www.royalmail.com/sites/default/files/Mailmark-4-state-barcode-L-encoding-and-decoding-instructions-Sept-2015.pdf)
+ * (https://www.royalmail.com/sites/default/files/
+ * Mailmark-4-state-barcode-L-encoding-and-decoding-instructions-Sept-2015.pdf)
*
*/
@@ -182,21 +184,21 @@ INTERNAL int mailmark(struct zint_symbol *symbol, unsigned char source[], int le
// Format is in the range 0-4
format = ctoi(local_source[0]);
if ((format < 0) || (format > 4)) {
- strcpy(symbol->errtxt, "582: Format out of range (0 to 4)");
+ strcpy(symbol->errtxt, "582: Format (1st character) out of range (0 to 4)");
return ZINT_ERROR_INVALID_DATA;
}
// Version ID is in the range 1-4
version_id = ctoi(local_source[1]) - 1;
if ((version_id < 0) || (version_id > 3)) {
- strcpy(symbol->errtxt, "583: Version ID out of range (1 to 4)");
+ strcpy(symbol->errtxt, "583: Version ID (2nd character) out of range (1 to 4)");
return ZINT_ERROR_INVALID_DATA;
}
// Class is in the range 0-9,A-E
mail_class = ctoi(local_source[2]);
if ((mail_class < 0) || (mail_class > 14)) {
- strcpy(symbol->errtxt, "584: Class out of range (0 to 9 and A to E)");
+ strcpy(symbol->errtxt, "584: Class (3rd character) out of range (0 to 9 and A to E)");
return ZINT_ERROR_INVALID_DATA;
}
@@ -207,7 +209,7 @@ INTERNAL int mailmark(struct zint_symbol *symbol, unsigned char source[], int le
supply_chain_id *= 10;
supply_chain_id += ctoi(local_source[i]);
} else {
- strcpy(symbol->errtxt, "585: Invalid Supply Chain ID (digits only)");
+ sprintf(symbol->errtxt, "585: Invalid Supply Chain ID at character %d (digits only)", i);
return ZINT_ERROR_INVALID_DATA;
}
}
@@ -219,7 +221,7 @@ INTERNAL int mailmark(struct zint_symbol *symbol, unsigned char source[], int le
item_id *= 10;
item_id += ctoi(local_source[i]);
} else {
- strcpy(symbol->errtxt, "586: Invalid Item ID (digits only)");
+ sprintf(symbol->errtxt, "586: Invalid Item ID at character %d (digits only)", i);
return ZINT_ERROR_INVALID_DATA;
}
}
@@ -273,7 +275,7 @@ INTERNAL int mailmark(struct zint_symbol *symbol, unsigned char source[], int le
// Verify postcode type
if (postcode_type != 7) {
if (verify_postcode(postcode, postcode_type) != 0) {
- strcpy(symbol->errtxt, "587: Invalid postcode");
+ sprintf(symbol->errtxt, "587: Invalid postcode \"%s\"", postcode);
return ZINT_ERROR_INVALID_DATA;
}
}
@@ -487,22 +489,24 @@ INTERNAL int mailmark(struct zint_symbol *symbol, unsigned char source[], int le
j += 2;
}
-#ifdef COMPLIANT_HEIGHTS
- /* Royal Mail Mailmark Barcode Definition Document (15 Sept 2015) Section 3.5.1
- https://www.royalmail.com/sites/default/files/Royal-Mail-Mailmark-barcode-definition-document-September-2015.pdf
- Using bar pitch as X (25.4mm / 42.3) ~ 0.6mm based on 21.2 bars + 21.1 spaces per 25.4mm (bar width 0.38-63mm)
- Using recommended 1.9mm and 1.3mm heights for Ascender/Descenders and Trackers resp. as defaults
- Min height 4.22mm * 39 (max pitch) / 25.4mm ~ 6.47, max height 5.84mm * 47 (min pitch) / 25.4mm ~ 10.8
- */
- symbol->row_height[0] = (float) ((1.9 * 42.3) / 25.4); /* ~3.16 */
- symbol->row_height[1] = (float) ((1.3 * 42.3) / 25.4); /* ~2.16 */
- /* Note using max X for minimum and min X for maximum */
- error_number = daft_set_height(symbol, (float) ((4.22 * 39) / 25.4), (float) ((5.84 * 47) / 25.4));
-#else
- symbol->row_height[0] = 4.0f;
- symbol->row_height[1] = 2.0f;
- daft_set_height(symbol, 0.0f, 0.0f);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Royal Mail Mailmark Barcode Definition Document (15 Sept 2015) Section 3.5.1
+ (https://www.royalmail.com/sites/default/files/
+ Royal-Mail-Mailmark-barcode-definition-document-September-2015.pdf)
+ Using bar pitch as X (25.4mm / 42.3) ~ 0.6mm based on 21.2 bars + 21.1 spaces per 25.4mm (bar width
+ 0.38mm - 0.63mm)
+ Using recommended 1.9mm and 1.3mm heights for Ascender/Descenders and Trackers resp. as defaults
+ Min height 4.22mm * 39 (max pitch) / 25.4mm ~ 6.47, max height 5.84mm * 47 (min pitch) / 25.4mm ~ 10.8
+ */
+ symbol->row_height[0] = stripf((1.9f * 42.3f) / 25.4f); /* ~3.16 */
+ symbol->row_height[1] = stripf((1.3f * 42.3f) / 25.4f); /* ~2.16 */
+ /* Note using max X for minimum and min X for maximum */
+ error_number = daft_set_height(symbol, stripf((4.22f * 39) / 25.4f), stripf((5.84f * 47) / 25.4f));
+ } else {
+ symbol->row_height[0] = 4.0f;
+ symbol->row_height[1] = 2.0f;
+ (void) daft_set_height(symbol, 0.0f, 0.0f);
+ }
symbol->rows = 3;
symbol->width = j - 1;
diff --git a/backend/medical.c b/backend/medical.c
index 63b0c25a..a488c7d6 100644
--- a/backend/medical.c
+++ b/backend/medical.c
@@ -34,7 +34,7 @@
#include
#include "common.h"
-INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length);
+INTERNAL int code39(struct zint_symbol *symbol, unsigned char source[], int length);
/* Codabar table checked against EN 798:1995 */
@@ -47,7 +47,7 @@ static const char *CodaTable[20] = {
"21212111", "11212121", "11221211", "12121121", "11121221", "11122211"
};
-INTERNAL int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int pharma(struct zint_symbol *symbol, unsigned char source[], int length) {
/* "Pharmacode can represent only a single integer from 3 to 131070. Unlike other
commonly used one-dimensional barcode schemes, pharmacode does not store the data in a
form corresponding to the human-readable digits; the number is encoded in binary, rather
@@ -62,7 +62,7 @@ INTERNAL int pharma_one(struct zint_symbol *symbol, unsigned char source[], int
(http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdf) */
unsigned long int tester;
- int counter, error_number, h;
+ int counter, error_number = 0, h;
char inter[18] = {0}; /* 131070 -> 17 bits */
char dest[64]; /* 17 * 2 + 1 */
@@ -70,10 +70,9 @@ INTERNAL int pharma_one(struct zint_symbol *symbol, unsigned char source[], int
strcpy(symbol->errtxt, "350: Input too long (6 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "351: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
tester = atoi((char *) source);
@@ -105,12 +104,12 @@ INTERNAL int pharma_one(struct zint_symbol *symbol, unsigned char source[], int
expand(symbol, dest);
-#ifdef COMPLIANT_HEIGHTS
- /* Laetus Pharmacode Guide 1.2 Standard one-track height 8mm / 0.5mm (X) */
- error_number = set_height(symbol, 16.0f, 0.0f, 0.0f, 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Laetus Pharmacode Guide 1.2 Standard one-track height 8mm / 0.5mm (X) */
+ error_number = set_height(symbol, 16.0f, 0.0f, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
return error_number;
}
@@ -173,10 +172,9 @@ INTERNAL int pharma_two(struct zint_symbol *symbol, unsigned char source[], int
strcpy(symbol->errtxt, "354: Input too long (8 character maximum");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "355: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
error_number = pharma_two_calc(symbol, source, height_pattern);
if (error_number != 0) {
@@ -197,13 +195,13 @@ INTERNAL int pharma_two(struct zint_symbol *symbol, unsigned char source[], int
symbol->rows = 2;
symbol->width = writer - 1;
-#ifdef COMPLIANT_HEIGHTS
- /* Laetus Pharmacode Guide 1.4
- Two-track height min 8mm / 2mm (X max) = 4, standard 8mm / 1mm = 8, max 12mm / 0.8mm (X min) = 15 */
- error_number = set_height(symbol, 2.0f, 8.0f, 15.0f, 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 10.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Laetus Pharmacode Guide 1.4
+ Two-track height min 8mm / 2mm (X max) = 4, standard 8mm / 1mm = 8, max 12mm / 0.8mm (X min) = 15 */
+ error_number = set_height(symbol, 2.0f, 8.0f, 15.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 10.0f, 0.0f, 1 /*no_errtxt*/);
+ }
return error_number;
}
@@ -211,11 +209,11 @@ INTERNAL int pharma_two(struct zint_symbol *symbol, unsigned char source[], int
/* The Codabar system consisting of simple substitution */
INTERNAL int codabar(struct zint_symbol *symbol, unsigned char source[], int length) {
- int i, error_number;
+ static const char calcium[] = CALCIUM;
+ int i, error_number = 0;
char dest[512];
- int add_checksum, count = 0, checksum;
+ int add_checksum, count = 0, checksum = 0;
int d_chars = 0;
- float height;
strcpy(dest, "");
@@ -244,21 +242,23 @@ INTERNAL int codabar(struct zint_symbol *symbol, unsigned char source[], int len
}
/* And must not use A, B, C or D otherwise (BS EN 798:1995 4.3.2) */
- error_number = is_sane(CALCIUM_INNER, source + 1, length - 2);
- if (error_number) {
- if (is_sane(CALCIUM, source + 1, length - 2) == 0) {
+ if (is_sane(CALCIUM_INNER, source + 1, length - 2) != 0) {
+ if (is_sane(calcium, source + 1, length - 2) == 0) {
strcpy(symbol->errtxt, "363: Cannot contain \"A\", \"B\", \"C\" or \"D\"");
} else {
- sprintf(symbol->errtxt, "357: Invalid character in data (\"%s\" only)", CALCIUM);
+ sprintf(symbol->errtxt, "357: Invalid character in data (\"%s\" only)", calcium);
}
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
- add_checksum = symbol->option_2 == 1;
+ /* Add check character: 1 don't show to HRT, 2 do show to HRT
+ (unfortunately to maintain back-compatibility, this is reverse of C25) */
+ add_checksum = symbol->option_2 == 1 || symbol->option_2 == 2;
for (i = 0; i < length; i++) {
- static const char calcium[] = CALCIUM;
if (add_checksum) {
+ /* BS EN 798:1995 A.3 suggests using ISO 7064 algorithm but leaves it application defined.
+ Following BWIPP and TEC-IT, use this simple mod-16 algorithm (not in ISO 7064) */
count += strchr(calcium, source[i]) - calcium;
if (i + 1 == length) {
checksum = count % 16;
@@ -266,7 +266,7 @@ INTERNAL int codabar(struct zint_symbol *symbol, unsigned char source[], int len
checksum = 16 - checksum;
}
if (symbol->debug & ZINT_DEBUG_PRINT) {
- printf("Codabar: %s, count %d, checksum %d\n", source, count, checksum);
+ printf("Codabar: %s, count %d, checksum %d (%c)\n", source, count, checksum, calcium[checksum]);
}
strcat(dest, CodaTable[checksum]);
}
@@ -279,23 +279,29 @@ INTERNAL int codabar(struct zint_symbol *symbol, unsigned char source[], int len
expand(symbol, dest);
-#ifdef COMPLIANT_HEIGHTS
- /* BS EN 798:1995 4.4.1 (d) max of 5mm / 0.191mm (X) ~ 26.178 or 15% of width where (taking N = narrow/wide ratio
- as 2 and I = X) width = ((2 * N + 5) * C + (N – 1) * (D + 2)) * X + I * (C – 1) + 2Q
- = ((4 + 5) * C + (D + 2) + C - 1 + 2 * 10) * X = (10 * C + D + 21) * X
- Length (C) includes start/stop chars */
- height = (float) ((10.0 * ((add_checksum ? length + 1 : length) + 2.0) + d_chars + 21.0) * 0.15);
- if (height < (float) (5.0 / 0.191)) {
- height = (float) (5.0 / 0.191);
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* BS EN 798:1995 4.4.1 (d) max of 5mm / 0.191mm (X) ~ 26.178 or 15% of width where (taking N = narrow/wide
+ ratio as 2 and I = X) width = ((2 * N + 5) * C + (N – 1) * (D + 2)) * X + I * (C – 1) + 2Q
+ = ((4 + 5) * C + (D + 2) + C - 1 + 2 * 10) * X = (10 * C + D + 21) * X
+ Length (C) includes start/stop chars */
+ const float min_height_min = stripf(5.0f / 0.191f);
+ float min_height = stripf((10.0f * ((add_checksum ? length + 1 : length) + 2.0f) + d_chars + 21.0f) * 0.15f);
+ if (min_height < min_height_min) {
+ min_height = min_height_min;
+ }
+ /* Using 50 as default as none recommended */
+ error_number = set_height(symbol, min_height, min_height > 50.0f ? min_height : 50.0f, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
}
- /* Using 50 as default as none recommended */
- error_number = set_height(symbol, height, height > 50.0f ? height : 50.0f, 0.0f, 0 /*no_errtxt*/);
-#else
- height = 50.0f;
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
-#endif
ustrcpy(symbol->text, source);
+ if (symbol->option_2 == 2) {
+ symbol->text[length - 1] = calcium[checksum]; /* Place before final A/B/C/D character (BS EN 798:1995 A.3) */
+ symbol->text[length] = source[length - 1];
+ symbol->text[length + 1] = '\0';
+ }
+
return error_number;
}
@@ -312,10 +318,9 @@ INTERNAL int code32(struct zint_symbol *symbol, unsigned char source[], int leng
strcpy(symbol->errtxt, "360: Input too long (8 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "361: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
/* Add leading zeros as required */
@@ -361,20 +366,22 @@ INTERNAL int code32(struct zint_symbol *symbol, unsigned char source[], int leng
}
risultante[6] = '\0';
/* Plot the barcode using Code 39 */
- error_number = c39(symbol, (unsigned char *) risultante, (int) strlen(risultante));
+ error_number = code39(symbol, (unsigned char *) risultante, (int) strlen(risultante));
if (error_number != 0) { /* Should never happen */
return error_number; /* Not reached */
}
-#ifdef COMPLIANT_HEIGHTS
- /* Allegato A Caratteristiche tecniche del bollino farmaceutico
- https://www.gazzettaufficiale.it/do/atto/serie_generale/caricaPdf?cdimg=14A0566800100010110001&dgu=2014-07-18&art.dataPubblicazioneGazzetta=2014-07-18&art.codiceRedazionale=14A05668&art.num=1&art.tiposerie=SG
- X given as 0.250mm; height (and quiet zones) left to ISO/IEC 16388:2007 (Code 39)
- So min height 5mm = 5mm / 0.25mm = 20 > 15% of width, i.e. (10 * 8 + 19) * 0.15 = 14.85 */
- error_number = set_height(symbol, 20.0f, 20.0f, 0.0f, 0 /*no_errtxt*/); /* Use as default also */
-#else
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Allegato A Caratteristiche tecniche del bollino farmaceutico
+ (https://www.gazzettaufficiale.it/do/atto/serie_generale/caricaPdf?cdimg=14A0566800100010110001
+ &dgu=2014-07-18&art.dataPubblicazioneGazzetta=2014-07-18&art.codiceRedazionale=14A05668&art.num=1
+ &art.tiposerie=SG)
+ X given as 0.250mm; height (and quiet zones) left to ISO/IEC 16388:2007 (Code 39)
+ So min height 5mm = 5mm / 0.25mm = 20 > 15% of width, i.e. (10 * 8 + 19) * 0.15 = 14.85 */
+ error_number = set_height(symbol, 20.0f, 20.0f, 0.0f, 0 /*no_errtxt*/); /* Use as default also */
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
/* Override the normal text output with the Pharmacode number */
ustrcpy(symbol->text, "A");
diff --git a/backend/output.c b/backend/output.c
index 51f23c88..b0a563cb 100644
--- a/backend/output.c
+++ b/backend/output.c
@@ -611,7 +611,7 @@ INTERNAL float output_large_bar_height(struct zint_symbol *symbol, int si) {
if (zero_count) {
large_bar_height = (symbol->height - fixed_height) / zero_count;
if (large_bar_height <= 0.0f) { /* Shouldn't happen but protect against memory access violations */
- large_bar_height = 0.01f; /* Token positive value */
+ large_bar_height = 0.0078125f; /* Token positive value (exact float 2**-6) */
symbol->height = large_bar_height * zero_count + fixed_height;
}
if (si && !isfintf(large_bar_height * si)) {
diff --git a/backend/pdf417.c b/backend/pdf417.c
index 65fd4acf..4eda92cb 100644
--- a/backend/pdf417.c
+++ b/backend/pdf417.c
@@ -508,7 +508,7 @@ static void numbprocess(int *chainemc, int *mclength, const unsigned char chaine
}
}
-/* Initial processing of data, shared by `pdf417enc()` and `micro_pdf417()` */
+/* Initial processing of data, shared by `pdf417()` and `micropdf417()` */
static int pdf417_initial(struct zint_symbol *symbol, unsigned char chaine[], const int length, const int is_micro,
int chainemc[PDF417_MAX_LEN], int *p_mclength, int structapp_cws[18], int *p_structapp_cp) {
int i, indexchaine, indexliste, mode;
@@ -661,7 +661,7 @@ static int pdf417_initial(struct zint_symbol *symbol, unsigned char chaine[], co
}
/* 366 */
-static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int length) {
+static int pdf417_enc(struct zint_symbol *symbol, unsigned char chaine[], const int length) {
int i, k, j, longueur, loop, mccorrection[520] = {0}, offset;
int total, chainemc[PDF417_MAX_LEN], mclength, c1, c2, c3, dummy[35];
char pattern[580];
@@ -872,7 +872,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
}
/* 345 */
-INTERNAL int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int pdf417(struct zint_symbol *symbol, unsigned char source[], int length) {
int codeerr, error_number;
error_number = 0;
@@ -895,7 +895,7 @@ INTERNAL int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int l
}
/* 349 */
- codeerr = pdf417(symbol, source, length);
+ codeerr = pdf417_enc(symbol, source, length);
/* 352 */
if (codeerr != 0) {
@@ -907,7 +907,7 @@ INTERNAL int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int l
}
/* like PDF417 only much smaller! */
-INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length) {
+INTERNAL int micropdf417(struct zint_symbol *symbol, unsigned char chaine[], int length) {
int i, k, j, longueur, mccorrection[50] = {0}, offset;
int total, chainemc[PDF417_MAX_LEN], mclength, error_number = 0;
char pattern[580];
diff --git a/backend/plessey.c b/backend/plessey.c
index f904d60a..70322c8d 100644
--- a/backend/plessey.c
+++ b/backend/plessey.c
@@ -55,16 +55,15 @@ INTERNAL int plessey(struct zint_symbol *symbol, unsigned char source[], int len
unsigned char *checkptr;
static const char grid[9] = {1, 1, 1, 1, 0, 1, 0, 0, 1};
char dest[554]; /* 8 + 65 * 8 + 8 * 2 + 9 + 1 = 554 */
- int error_number;
+ int error_number = 0;
if (length > 65) {
strcpy(symbol->errtxt, "370: Input too long (65 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(SSET, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(SSET, source, length) != 0) {
strcpy(symbol->errtxt, "371: Invalid character in data (digits and \"ABCDEF\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
if (!(checkptr = (unsigned char *) calloc(1, length * 4 + 8))) {
@@ -155,7 +154,8 @@ static char msi_check_digit_mod11(const unsigned char source[], const int length
}
/* Plain MSI Plessey - does not calculate any check character */
-static void msi_plessey(struct zint_symbol *symbol, const unsigned char source[], const int length, char dest[]) {
+static void msi_plessey_nomod(struct zint_symbol *symbol, const unsigned char source[], const int length,
+ char dest[]) {
int i;
@@ -290,8 +290,8 @@ static void msi_plessey_mod1110(struct zint_symbol *symbol, const unsigned char
}
}
-INTERNAL int msi_handle(struct zint_symbol *symbol, unsigned char source[], int length) {
- int error_number;
+INTERNAL int msi_plessey(struct zint_symbol *symbol, unsigned char source[], int length) {
+ int error_number = 0;
char dest[550]; /* 2 + 65 * 8 + 3 * 8 + 3 + 1 = 550 */
int check_option = symbol->option_2;
int no_checktext = 0;
@@ -300,8 +300,7 @@ INTERNAL int msi_handle(struct zint_symbol *symbol, unsigned char source[], int
strcpy(symbol->errtxt, "372: Input too long (65 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number != 0) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "377: Invalid character in data (digits only)");
return ZINT_ERROR_INVALID_DATA;
}
@@ -318,7 +317,7 @@ INTERNAL int msi_handle(struct zint_symbol *symbol, unsigned char source[], int
strcpy(dest, "21");
switch (check_option) {
- case 0: msi_plessey(symbol, source, length, dest);
+ case 0: msi_plessey_nomod(symbol, source, length, dest);
break;
case 1: msi_plessey_mod10(symbol, source, length, no_checktext, dest);
break;
diff --git a/backend/postal.c b/backend/postal.c
index d6b59b14..7204b531 100644
--- a/backend/postal.c
+++ b/backend/postal.c
@@ -95,41 +95,39 @@ static int usps_set_height(struct zint_symbol *symbol, const int no_errtxt) {
int error_number = 0;
float h_ratio; /* Half ratio */
-#ifdef COMPLIANT_HEIGHTS
- symbol->row_height[0] = 0.075f * 43; /* 3.225 */
- symbol->row_height[1] = 0.05f * 43; /* 2.15 */
-#else
- symbol->row_height[0] = 6.0f;
- symbol->row_height[1] = 6.0f;
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ symbol->row_height[0] = stripf(0.075f * 43); /* 3.225 */
+ symbol->row_height[1] = stripf(0.05f * 43); /* 2.15 */
+ } else {
+ symbol->row_height[0] = 6.0f;
+ symbol->row_height[1] = 6.0f;
+ }
if (symbol->height) {
h_ratio = symbol->row_height[1] / (symbol->row_height[0] + symbol->row_height[1]); /* 0.4 */
- symbol->row_height[1] = symbol->height * h_ratio;
+ symbol->row_height[1] = stripf(symbol->height * h_ratio);
if (symbol->row_height[1] < 0.5f) { /* Absolute minimum */
symbol->row_height[1] = 0.5f;
- symbol->row_height[0] = 0.5f / h_ratio - 0.5f; /* 0.75 */
+ symbol->row_height[0] = stripf(0.5f / h_ratio - 0.5f); /* 0.75 */
} else {
- symbol->row_height[0] = symbol->height - symbol->row_height[1];
+ symbol->row_height[0] = stripf(symbol->height - symbol->row_height[1]);
}
}
- symbol->height = symbol->row_height[0] + symbol->row_height[1];
+ symbol->height = stripf(symbol->row_height[0] + symbol->row_height[1]);
-#ifdef COMPLIANT_HEIGHTS
- if (symbol->height < 4.6f || symbol->height > 9.0f) {
- error_number = ZINT_WARN_NONCOMPLIANT;
- if (!no_errtxt) {
- strcpy(symbol->errtxt, "498: Height not compliant with standards");
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ if (symbol->height < 4.6f || symbol->height > 9.0f) {
+ error_number = ZINT_WARN_NONCOMPLIANT;
+ if (!no_errtxt) {
+ strcpy(symbol->errtxt, "498: Height not compliant with standards");
+ }
}
}
-#else
- (void)&no_errtxt;
-#endif
return error_number;
}
/* Handles the PostNet system used for Zip codes in the US */
-static int postnet(struct zint_symbol *symbol, unsigned char source[], char dest[], int length) {
+static int postnet_enc(struct zint_symbol *symbol, unsigned char source[], char dest[], int length) {
int i, sum, check_digit;
int error_number = 0;
@@ -141,7 +139,7 @@ static int postnet(struct zint_symbol *symbol, unsigned char source[], char dest
strcpy(symbol->errtxt, "479: Input length is not standard (5, 9 or 11 characters)");
error_number = ZINT_WARN_NONCOMPLIANT;
}
- if (is_sane(NEON, source, length) == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "481: Invalid character in data (digits only)");
return ZINT_ERROR_INVALID_DATA;
}
@@ -165,13 +163,13 @@ static int postnet(struct zint_symbol *symbol, unsigned char source[], char dest
}
/* Puts PostNet barcodes into the pattern matrix */
-INTERNAL int post_plot(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int postnet(struct zint_symbol *symbol, unsigned char source[], int length) {
char height_pattern[256]; /* 5 + 38 * 5 + 5 + 5 + 1 = 206 */
unsigned int loopey, h;
int writer;
int error_number, warn_number;
- error_number = postnet(symbol, source, height_pattern, length);
+ error_number = postnet_enc(symbol, source, height_pattern, length);
if (error_number >= ZINT_ERROR) {
return error_number;
}
@@ -193,7 +191,7 @@ INTERNAL int post_plot(struct zint_symbol *symbol, unsigned char source[], int l
}
/* Handles the PLANET system used for item tracking in the US */
-static int planet(struct zint_symbol *symbol, unsigned char source[], char dest[], int length) {
+static int planet_enc(struct zint_symbol *symbol, unsigned char source[], char dest[], int length) {
int i, sum, check_digit;
int error_number = 0;
@@ -205,7 +203,7 @@ static int planet(struct zint_symbol *symbol, unsigned char source[], char dest[
strcpy(symbol->errtxt, "478: Input length is not standard (11 or 13 characters)");
error_number = ZINT_WARN_NONCOMPLIANT;
}
- if (is_sane(NEON, source, length) == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "483: Invalid character in data (digits only)");
return ZINT_ERROR_INVALID_DATA;
}
@@ -229,13 +227,13 @@ static int planet(struct zint_symbol *symbol, unsigned char source[], char dest[
}
/* Puts PLANET barcodes into the pattern matrix */
-INTERNAL int planet_plot(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int planet(struct zint_symbol *symbol, unsigned char source[], int length) {
char height_pattern[256]; /* 5 + 38 * 5 + 5 + 5 + 1 = 206 */
unsigned int loopey, h;
int writer;
int error_number, warn_number;
- error_number = planet(symbol, source, height_pattern, length);
+ error_number = planet_enc(symbol, source, height_pattern, length);
if (error_number >= ZINT_ERROR) {
return error_number;
}
@@ -257,18 +255,17 @@ INTERNAL int planet_plot(struct zint_symbol *symbol, unsigned char source[], int
}
/* Korean Postal Authority */
-INTERNAL int korea_post(struct zint_symbol *symbol, unsigned char source[], int length) {
- int total, loop, check, zeroes, error_number;
+INTERNAL int koreapost(struct zint_symbol *symbol, unsigned char source[], int length) {
+ int total, loop, check, zeroes, error_number = 0;
char localstr[8], dest[80];
if (length > 6) {
strcpy(symbol->errtxt, "484: Input too long (6 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "485: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
zeroes = 6 - length;
memset(localstr, '0', zeroes);
@@ -333,14 +330,14 @@ INTERNAL int fim(struct zint_symbol *symbol, unsigned char source[], int length)
expand(symbol, dest);
-#ifdef COMPLIANT_HEIGHTS
- /* USPS Domestic Mail Manual (USPS DMM 300) Jan 8, 2006 (updated 2011) 708.9.3
- X 0.03125" (1/32) +- 0.008" so X max 0.03925", height 0.625" (5/8) +- 0.125" (1/8) */
- error_number = set_height(symbol, (float) (0.5 / 0.03925), 20.0f /*0.625 / 0.03125*/, (float) (0.75 / 0.02415),
- 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* USPS Domestic Mail Manual (USPS DMM 300) Jan 8, 2006 (updated 2011) 708.9.3
+ X 0.03125" (1/32) +- 0.008" so X max 0.03925", height 0.625" (5/8) +- 0.125" (1/8) */
+ error_number = set_height(symbol, stripf(0.5f / 0.03925f), 20.0f /*0.625 / 0.03125*/,
+ stripf(0.75f / 0.02415f), 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
return error_number;
}
@@ -352,36 +349,34 @@ INTERNAL int daft_set_height(struct zint_symbol *symbol, float min_height, float
float t_ratio; /* Tracker ratio */
if (symbol->height) {
- t_ratio = symbol->row_height[1] / (symbol->row_height[0] * 2 + symbol->row_height[1]);
- symbol->row_height[1] = symbol->height * t_ratio;
+ t_ratio = stripf(symbol->row_height[1] / stripf(symbol->row_height[0] * 2 + symbol->row_height[1]));
+ symbol->row_height[1] = stripf(symbol->height * t_ratio);
if (symbol->row_height[1] < 0.5f) { /* Absolute minimum */
symbol->row_height[1] = 0.5f;
- symbol->row_height[0] = 0.25f / t_ratio - 0.25f;
+ symbol->row_height[0] = stripf(0.25f / t_ratio - 0.25f);
} else {
- symbol->row_height[0] = (symbol->height - symbol->row_height[1]) / 2.0f;
+ symbol->row_height[0] = stripf(stripf(symbol->height - symbol->row_height[1]) / 2.0f);
}
if (symbol->row_height[0] < 0.5f) {
symbol->row_height[0] = 0.5f;
- symbol->row_height[1] = t_ratio / (1.0f - t_ratio);
+ symbol->row_height[1] = stripf(t_ratio / (1.0f - t_ratio));
}
}
symbol->row_height[2] = symbol->row_height[0];
- symbol->height = symbol->row_height[0] + symbol->row_height[1] + symbol->row_height[2];
+ symbol->height = stripf(stripf(symbol->row_height[0] + symbol->row_height[1]) + symbol->row_height[2]);
-#ifdef COMPLIANT_HEIGHTS
- if ((min_height && symbol->height < min_height) || (max_height && symbol->height > max_height)) {
- error_number = ZINT_WARN_NONCOMPLIANT;
- strcpy(symbol->errtxt, "499: Height not compliant with standards");
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ if ((min_height && symbol->height < min_height) || (max_height && symbol->height > max_height)) {
+ error_number = ZINT_WARN_NONCOMPLIANT;
+ strcpy(symbol->errtxt, "499: Height not compliant with standards");
+ }
}
-#else
- (void)min_height; (void)max_height;
-#endif
return error_number;
}
/* Handles the 4 State barcodes used in the UK by Royal Mail */
-static char rm4scc(unsigned char source[], char dest[], int length) {
+static char rm4scc_enc(unsigned char source[], char dest[], int length) {
int i;
int top, bottom, row, column, check_digit;
char values[3], set_copy[] = KRSET;
@@ -418,11 +413,11 @@ static char rm4scc(unsigned char source[], char dest[], int length) {
}
/* Puts RM4SCC into the data matrix */
-INTERNAL int royal_plot(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int rm4scc(struct zint_symbol *symbol, unsigned char source[], int length) {
char height_pattern[210];
int loopey, h;
int writer;
- int error_number;
+ int error_number = 0;
strcpy(height_pattern, "");
if (length > 50) {
@@ -430,12 +425,11 @@ INTERNAL int royal_plot(struct zint_symbol *symbol, unsigned char source[], int
return ZINT_ERROR_TOO_LONG;
}
to_upper(source);
- error_number = is_sane(KRSET, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(KRSET, source, length) != 0) {
strcpy(symbol->errtxt, "489: Invalid character in data (alphanumerics only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
- /*check = */rm4scc(source, height_pattern, length);
+ /*check = */rm4scc_enc(source, height_pattern, length);
writer = 0;
h = (int) strlen(height_pattern);
@@ -450,21 +444,22 @@ INTERNAL int royal_plot(struct zint_symbol *symbol, unsigned char source[], int
writer += 2;
}
-#ifdef COMPLIANT_HEIGHTS
- /* Royal Mail Know How User's Manual Appendix C: using CBC
- https://web.archive.org/web/20120120060743/http://www.royalmail.com/sites/default/files/docs/pdf/Know How 2006 PIP vs 1.6a Accepted Changes.pdf
- Bar pitch and min/maxes same as Mailmark, so using recommendations from Royal Mail Mailmark Barcode Definition
- Document (15 Sept 2015) Section 3.5.1
- */
- symbol->row_height[0] = (float) ((1.9 * 42.3) / 25.4); /* ~3.16 */
- symbol->row_height[1] = (float) ((1.3 * 42.3) / 25.4); /* ~2.16 */
- /* Note using max X for minimum and min X for maximum */
- error_number = daft_set_height(symbol, (float) ((4.22 * 39) / 25.4), (float) ((5.84 * 47) / 25.4));
-#else
- symbol->row_height[0] = 3.0f;
- symbol->row_height[1] = 2.0f;
- error_number = daft_set_height(symbol, 0.0f, 0.0f);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Royal Mail Know How User's Manual Appendix C: using CBC
+ (https://web.archive.org/web/20120120060743/
+ http://www.royalmail.com/sites/default/files/docs/pdf/Know How 2006 PIP vs 1.6a Accepted Changes.pdf)
+ Bar pitch and min/maxes same as Mailmark, so using recommendations from
+ Royal Mail Mailmark Barcode Definition Document (15 Sept 2015) Section 3.5.1
+ */
+ symbol->row_height[0] = stripf((1.9f * 42.3f) / 25.4f); /* ~3.16 */
+ symbol->row_height[1] = stripf((1.3f * 42.3f) / 25.4f); /* ~2.16 */
+ /* Note using max X for minimum and min X for maximum */
+ error_number = daft_set_height(symbol, stripf((4.22f * 39) / 25.4f), stripf((5.84f * 47) / 25.4f));
+ } else {
+ symbol->row_height[0] = 3.0f;
+ symbol->row_height[1] = 2.0f;
+ (void) daft_set_height(symbol, 0.0f, 0.0f);
+ }
symbol->rows = 3;
symbol->width = writer - 1;
@@ -474,11 +469,11 @@ INTERNAL int royal_plot(struct zint_symbol *symbol, unsigned char source[], int
/* Handles Dutch Post TNT KIX symbols
The same as RM4SCC but without check digit
Specification at http://www.tntpost.nl/zakelijk/klantenservice/downloads/kIX_code/download.aspx */
-INTERNAL int kix_code(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int kix(struct zint_symbol *symbol, unsigned char source[], int length) {
char height_pattern[75], localstr[20];
int loopey;
int writer, i, h;
- int error_number;
+ int error_number = 0;
strcpy(height_pattern, "");
if (length > 18) {
@@ -486,10 +481,9 @@ INTERNAL int kix_code(struct zint_symbol *symbol, unsigned char source[], int le
return ZINT_ERROR_TOO_LONG;
}
to_upper(source);
- error_number = is_sane(KRSET, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(KRSET, source, length) != 0) {
strcpy(symbol->errtxt, "491: Invalid character in data (alphanumerics only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
ustrcpy(localstr, source);
@@ -512,17 +506,17 @@ INTERNAL int kix_code(struct zint_symbol *symbol, unsigned char source[], int le
writer += 2;
}
-#ifdef COMPLIANT_HEIGHTS
- /* Dimensions same as RM4SCC */
- symbol->row_height[0] = (float) ((1.9 * 42.3) / 25.4); /* ~3.16 */
- symbol->row_height[1] = (float) ((1.3 * 42.3) / 25.4); /* ~2.16 */
- /* Note using max X for minimum and min X for maximum */
- error_number = daft_set_height(symbol, (float) ((4.22 * 39) / 25.4), (float) ((5.84 * 47) / 25.4));
-#else
- symbol->row_height[0] = 3.0f;
- symbol->row_height[1] = 2.0f;
- error_number = daft_set_height(symbol, 0.0f, 0.0f);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Dimensions same as RM4SCC */
+ symbol->row_height[0] = stripf((1.9f * 42.3f) / 25.4f); /* ~3.16 */
+ symbol->row_height[1] = stripf((1.3f * 42.3f) / 25.4f); /* ~2.16 */
+ /* Note using max X for minimum and min X for maximum */
+ error_number = daft_set_height(symbol, stripf((4.22f * 39) / 25.4f), stripf((5.84f * 47) / 25.4f));
+ } else {
+ symbol->row_height[0] = 3.0f;
+ symbol->row_height[1] = 2.0f;
+ (void) daft_set_height(symbol, 0.0f, 0.0f);
+ }
symbol->rows = 3;
symbol->width = writer - 1;
@@ -530,10 +524,10 @@ INTERNAL int kix_code(struct zint_symbol *symbol, unsigned char source[], int le
}
/* Handles DAFT Code symbols */
-INTERNAL int daft_code(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int daft(struct zint_symbol *symbol, unsigned char source[], int length) {
char height_pattern[100];
unsigned int loopey, h;
- int writer, i, error_number;
+ int writer, i;
strcpy(height_pattern, "");
if (length > 50) {
@@ -541,11 +535,10 @@ INTERNAL int daft_code(struct zint_symbol *symbol, unsigned char source[], int l
return ZINT_ERROR_TOO_LONG;
}
to_upper(source);
- error_number = is_sane(DAFTSET, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(DAFTSET, source, length) != 0) {
strcpy(symbol->errtxt, "493: Invalid character in data (\"D\", \"A\", \"F\" and \"T\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
for (i = 0; i < length; i++) {
@@ -578,12 +571,12 @@ INTERNAL int daft_code(struct zint_symbol *symbol, unsigned char source[], int l
/* Allow ratio of tracker to be specified in thousandths */
if (symbol->option_2 >= 50 && symbol->option_2 <= 900) {
- float t_ratio = symbol->option_2 / 1000.0f;
+ const float t_ratio = symbol->option_2 / 1000.0f;
if (symbol->height < 0.5f) {
symbol->height = 8.0f;
}
- symbol->row_height[1] = symbol->height * t_ratio;
- symbol->row_height[0] = (float) ((symbol->height - symbol->row_height[1]) / 2.0);
+ symbol->row_height[1] = stripf(symbol->height * t_ratio);
+ symbol->row_height[0] = stripf((symbol->height - symbol->row_height[1]) / 2.0);
} else {
symbol->row_height[0] = 3.0f;
symbol->row_height[1] = 2.0f;
@@ -594,22 +587,21 @@ INTERNAL int daft_code(struct zint_symbol *symbol, unsigned char source[], int l
symbol->rows = 3;
symbol->width = writer - 1;
- return error_number;
+ return 0;
}
/* Flattermarken - Not really a barcode symbology! */
-INTERNAL int flattermarken(struct zint_symbol *symbol, unsigned char source[], int length) {
- int loop, error_number;
+INTERNAL int flat(struct zint_symbol *symbol, unsigned char source[], int length) {
+ int loop, error_number = 0;
char dest[512]; /* 90 * 4 + 1 ~ */
if (length > 90) {
strcpy(symbol->errtxt, "494: Input too long (90 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, length);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, length) != 0) {
strcpy(symbol->errtxt, "495: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
*dest = '\0';
for (loop = 0; loop < length; loop++) {
@@ -624,8 +616,8 @@ INTERNAL int flattermarken(struct zint_symbol *symbol, unsigned char source[], i
}
/* Japanese Postal Code (Kasutama Barcode) */
-INTERNAL int japan_post(struct zint_symbol *symbol, unsigned char source[], int length) {
- int error_number, h;
+INTERNAL int japanpost(struct zint_symbol *symbol, unsigned char source[], int length) {
+ int error_number = 0, h;
char pattern[69];
int writer, loopey, inter_posn, i, sum, check;
char check_char;
@@ -645,7 +637,7 @@ INTERNAL int japan_post(struct zint_symbol *symbol, unsigned char source[], int
ustrcpy(local_source, source);
to_upper(local_source);
- if (is_sane(SHKASUTSET, local_source, length) == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(SHKASUTSET, local_source, length) != 0) {
strcpy(symbol->errtxt, "497: Invalid character in data (alphanumerics and \"-\" only)");
return ZINT_ERROR_INVALID_DATA;
}
@@ -722,19 +714,19 @@ INTERNAL int japan_post(struct zint_symbol *symbol, unsigned char source[], int
symbol->rows = 3;
symbol->width = writer - 1;
-#ifdef COMPLIANT_HEIGHTS
- /* Japan Post Zip/Barcode Manual pp.11-12 https://www.post.japanpost.jp/zipcode/zipmanual/p11.html
- X 0.6mm (0.5mm - 0.7mm)
- Tracker height 1.2mm (1.05mm - 1.35mm) / 0.6mm = 2,
- Ascender/descender = 1.2mm (Full 3.6mm (3.4mm - 3.6mm, max preferred) less T divided by 2) / 0.6mm = 2 */
- symbol->row_height[0] = 2.0f;
- symbol->row_height[1] = 2.0f;
- error_number = daft_set_height(symbol, (float) (3.4 / 0.7) /*~4.857*/, 3.6f / 0.5f /*7.2*/);
-#else
- symbol->row_height[0] = 3.0f;
- symbol->row_height[1] = 2.0f;
- error_number = daft_set_height(symbol, 0.0f, 0.0f);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Japan Post Zip/Barcode Manual pp.11-12 https://www.post.japanpost.jp/zipcode/zipmanual/p11.html
+ X 0.6mm (0.5mm - 0.7mm)
+ Tracker height 1.2mm (1.05mm - 1.35mm) / 0.6mm = 2,
+ Ascender/descender = 1.2mm (Full 3.6mm (3.4mm - 3.6mm, max preferred) less T divided by 2) / 0.6mm = 2 */
+ symbol->row_height[0] = 2.0f;
+ symbol->row_height[1] = 2.0f;
+ error_number = daft_set_height(symbol, stripf(3.4f / 0.7f) /*~4.857*/, stripf(3.6f / 0.5f) /*7.2*/);
+ } else {
+ symbol->row_height[0] = 3.0f;
+ symbol->row_height[1] = 2.0f;
+ (void) daft_set_height(symbol, 0.0f, 0.0f);
+ }
return error_number;
}
diff --git a/backend/qr.c b/backend/qr.c
index 1b74f4ef..65ec479f 100644
--- a/backend/qr.c
+++ b/backend/qr.c
@@ -1538,7 +1538,7 @@ static int getBinaryLength(const int version, char inputMode[], const unsigned i
return count;
}
-INTERNAL int qr_code(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int qrcode(struct zint_symbol *symbol, unsigned char source[], int length) {
int i, j, est_binlen, prev_est_binlen;
int ecc_level, autosize, version, max_cw, target_codewords, blocks, size;
int bitmask, gs1;
diff --git a/backend/rss.c b/backend/rss.c
index 17a33653..cac8d13b 100644
--- a/backend/rss.c
+++ b/backend/rss.c
@@ -158,7 +158,7 @@ static void getRSSwidths(int widths[], int val, int n, const int elements, const
}
/* Set GTIN-14 human readable text */
-static void rss_set_gtin14_hrt(struct zint_symbol *symbol, const unsigned char *source, const int src_len) {
+static void dbar_set_gtin14_hrt(struct zint_symbol *symbol, const unsigned char *source, const int src_len) {
int i;
unsigned char *hrt = symbol->text + 4;
@@ -175,7 +175,7 @@ static void rss_set_gtin14_hrt(struct zint_symbol *symbol, const unsigned char *
}
/* Expand from a width pattern to a bit pattern */
-static int rss_expand(struct zint_symbol *symbol, int writer, int *p_latch, const int width) {
+static int dbar_expand(struct zint_symbol *symbol, int writer, int *p_latch, const int width) {
int j;
int latch = *p_latch;
@@ -194,7 +194,7 @@ static int rss_expand(struct zint_symbol *symbol, int writer, int *p_latch, cons
}
/* Adjust top/bottom separator for finder patterns */
-static void rss14_finder_adjust(struct zint_symbol *symbol, const int separator_row, const int above_below,
+static void dbar_omn_finder_adjust(struct zint_symbol *symbol, const int separator_row, const int above_below,
const int finder_start) {
int i, finder_end;
int module_row = separator_row + above_below;
@@ -219,7 +219,7 @@ static void rss14_finder_adjust(struct zint_symbol *symbol, const int separator_
}
/* Top/bottom separator for DataBar */
-static void rss14_separator(struct zint_symbol *symbol, int width, const int separator_row, const int above_below,
+static void dbar_omn_separator(struct zint_symbol *symbol, int width, const int separator_row, const int above_below,
const int finder_start, const int finder2_start, const int bottom_finder_value_3) {
int i, finder_end, finder_value_3_set;
int module_row = separator_row + above_below;
@@ -242,16 +242,16 @@ static void rss14_separator(struct zint_symbol *symbol, int width, const int sep
}
} else {
if (finder_start) {
- rss14_finder_adjust(symbol, separator_row, above_below, finder_start);
+ dbar_omn_finder_adjust(symbol, separator_row, above_below, finder_start);
}
if (finder2_start) {
- rss14_finder_adjust(symbol, separator_row, above_below, finder2_start);
+ dbar_omn_finder_adjust(symbol, separator_row, above_below, finder2_start);
}
}
}
/* Set Databar Stacked height, maintaining 5:7 ratio of the 2 main row heights */
-INTERNAL int rss14_stk_set_height(struct zint_symbol *symbol, const int first_row) {
+INTERNAL int dbar_omnstk_set_height(struct zint_symbol *symbol, const int first_row) {
int error_number = 0;
float fixed_height = 0.0f;
int second_row = first_row + 2; /* 2 row separator */
@@ -263,33 +263,33 @@ INTERNAL int rss14_stk_set_height(struct zint_symbol *symbol, const int first_ro
}
}
if (symbol->height) {
- symbol->row_height[first_row] = (symbol->height - fixed_height) * symbol->row_height[first_row] /
- (symbol->row_height[first_row] + symbol->row_height[second_row]);
+ symbol->row_height[first_row] = stripf((symbol->height - fixed_height) * symbol->row_height[first_row] /
+ (symbol->row_height[first_row] + symbol->row_height[second_row]));
if (symbol->row_height[first_row] < 0.5f) { /* Absolute minimum */
symbol->row_height[first_row] = 0.5f;
symbol->row_height[second_row] = 0.7f;
} else {
- symbol->row_height[second_row] = symbol->height - fixed_height - symbol->row_height[first_row];
+ symbol->row_height[second_row] = stripf(symbol->height - fixed_height - symbol->row_height[first_row]);
if (symbol->row_height[second_row] < 0.7f) {
symbol->row_height[second_row] = 0.7f;
}
}
}
- symbol->height = symbol->row_height[first_row] + symbol->row_height[second_row] + fixed_height;
+ symbol->height = stripf(stripf(symbol->row_height[first_row] + symbol->row_height[second_row]) + fixed_height);
-#ifdef COMPLIANT_HEIGHTS
- if (symbol->row_height[first_row] < 5.0f || symbol->row_height[second_row] < 7.0f) {
- error_number = ZINT_WARN_NONCOMPLIANT;
- strcpy(symbol->errtxt, "379: Height not compliant with standards");
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ if (symbol->row_height[first_row] < 5.0f || symbol->row_height[second_row] < 7.0f) {
+ error_number = ZINT_WARN_NONCOMPLIANT;
+ strcpy(symbol->errtxt, "379: Height not compliant with standards");
+ }
}
-#endif
return error_number;
}
/* GS1 DataBar Omnidirectional/Truncated/Stacked, allowing for composite if `cc_rows` set */
-INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int src_len, const int cc_rows) {
- int error_number, i;
+INTERNAL int dbar_omn_cc(struct zint_symbol *symbol, unsigned char source[], int src_len, const int cc_rows) {
+ int error_number = 0, i;
large_int accum;
uint64_t left_pair, right_pair;
int data_character[4] = {0}, data_group[4] = {0}, v_odd[4], v_even[4];
@@ -304,10 +304,9 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
strcpy(symbol->errtxt, "380: Input too long (14 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, src_len);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, src_len) != 0) {
strcpy(symbol->errtxt, "381: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
if (src_len == 14) { /* Verify check digit */
@@ -405,7 +404,7 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
v_odd[2] = (data_character[2] - g_sum_table[data_group[2]]) / t_table[data_group[2]];
v_even[2] = (data_character[2] - g_sum_table[data_group[2]]) % t_table[data_group[2]];
- /* Use RSS subset width algorithm */
+ /* Use DataBar subset width algorithm */
for (i = 0; i < 4; i++) {
if ((i == 0) || (i == 2)) {
getRSSwidths(widths, v_odd[i], modules_odd[data_group[i]], 4, widest_odd[data_group[i]], 1);
@@ -477,42 +476,42 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
writer = 0;
latch = 0;
for (i = 0; i < 46; i++) {
- writer = rss_expand(symbol, writer, &latch, total_widths[i]);
+ writer = dbar_expand(symbol, writer, &latch, total_widths[i]);
}
if (symbol->width < writer) {
symbol->width = writer;
}
if (symbol->symbology == BARCODE_DBAR_OMN_CC) {
/* separator pattern for composite symbol */
- rss14_separator(symbol, 96, separator_row, 1 /*above*/, 18, 63, 0 /*bottom_finder_value_3*/);
+ dbar_omn_separator(symbol, 96, separator_row, 1 /*above*/, 18, 63, 0 /*bottom_finder_value_3*/);
}
symbol->rows = symbol->rows + 1;
/* Set human readable text */
- rss_set_gtin14_hrt(symbol, source, src_len);
+ dbar_set_gtin14_hrt(symbol, source, src_len);
-#ifdef COMPLIANT_HEIGHTS
- /* Minimum height is 13X for truncated symbol ISO/IEC 24724:2011 5.3.1
- Default height is 33X for DataBar Omnidirectional ISO/IEC 24724:2011 5.2 */
- if (symbol->symbology == BARCODE_DBAR_OMN_CC) {
- symbol->height = symbol->height ? 13.0f : 33.0f; /* Pass back min row or default height */
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Minimum height is 13X for truncated symbol ISO/IEC 24724:2011 5.3.1
+ Default height is 33X for DataBar Omnidirectional ISO/IEC 24724:2011 5.2 */
+ if (symbol->symbology == BARCODE_DBAR_OMN_CC) {
+ symbol->height = symbol->height ? 13.0f : 33.0f; /* Pass back min row or default height */
+ } else {
+ error_number = set_height(symbol, 13.0f, 33.0f, 0.0f, 0 /*no_errtxt*/);
+ }
} else {
- error_number = set_height(symbol, 13.0f, 33.0f, 0.0f, 0 /*no_errtxt*/);
+ if (symbol->symbology == BARCODE_DBAR_OMN_CC) {
+ symbol->height = 14.0f; /* 14X truncated min row height used (should be 13X) */
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
}
-#else
- if (symbol->symbology == BARCODE_DBAR_OMN_CC) {
- symbol->height = 14.0f; /* 14X truncated min row height used (should be 13X) */
- } else {
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
- }
-#endif
} else if ((symbol->symbology == BARCODE_DBAR_STK) || (symbol->symbology == BARCODE_DBAR_STK_CC)) {
/* top row */
writer = 0;
latch = 0;
for (i = 0; i < 23; i++) {
- writer = rss_expand(symbol, writer, &latch, total_widths[i]);
+ writer = dbar_expand(symbol, writer, &latch, total_widths[i]);
}
set_module(symbol, symbol->rows, writer);
unset_module(symbol, symbol->rows, writer + 1);
@@ -525,7 +524,7 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
writer = 2;
latch = 1;
for (i = 23; i < 46; i++) {
- writer = rss_expand(symbol, writer, &latch, total_widths[i]);
+ writer = dbar_expand(symbol, writer, &latch, total_widths[i]);
}
symbol->row_height[symbol->rows] = 7.0f; /* ISO/IEC 24724:2011 5.3.2.1 set to 7X */
@@ -549,15 +548,15 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
if (symbol->symbology == BARCODE_DBAR_STK_CC) {
/* separator pattern for composite symbol */
- rss14_separator(symbol, 50, separator_row, 1 /*above*/, 18, 0, 0 /*bottom_finder_value_3*/);
+ dbar_omn_separator(symbol, 50, separator_row, 1 /*above*/, 18, 0, 0 /*bottom_finder_value_3*/);
}
symbol->rows = symbol->rows + 1;
if (symbol->width < 50) {
symbol->width = 50;
}
- if (symbol->symbology != BARCODE_DBAR_STK_CC) { /* Composite calls rss14_stk_set_height() itself */
- error_number = rss14_stk_set_height(symbol, 0 /*first_row*/);
+ if (symbol->symbology != BARCODE_DBAR_STK_CC) { /* Composite calls dbar_omnstk_set_height() itself */
+ error_number = dbar_omnstk_set_height(symbol, 0 /*first_row*/);
}
} else if ((symbol->symbology == BARCODE_DBAR_OMNSTK) || (symbol->symbology == BARCODE_DBAR_OMNSTK_CC)) {
@@ -565,7 +564,7 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
writer = 0;
latch = 0;
for (i = 0; i < 23; i++) {
- writer = rss_expand(symbol, writer, &latch, total_widths[i]);
+ writer = dbar_expand(symbol, writer, &latch, total_widths[i]);
}
set_module(symbol, symbol->rows, writer);
unset_module(symbol, symbol->rows, writer + 1);
@@ -577,7 +576,7 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
writer = 2;
latch = 1;
for (i = 23; i < 46; i++) {
- writer = rss_expand(symbol, writer, &latch, total_widths[i]);
+ writer = dbar_expand(symbol, writer, &latch, total_widths[i]);
}
/* middle separator */
@@ -587,12 +586,12 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
symbol->row_height[symbol->rows - 2] = 1;
/* top separator */
- rss14_separator(symbol, 50, symbol->rows - 3, -1 /*below*/, 18, 0, 0 /*bottom_finder_value_3*/);
+ dbar_omn_separator(symbol, 50, symbol->rows - 3, -1 /*below*/, 18, 0, 0 /*bottom_finder_value_3*/);
symbol->row_height[symbol->rows - 3] = 1;
/* bottom separator */
/* 17 == 2 (guard) + 15 (inner char); +2 to skip over finder elements 4 & 5 (right to left) */
- rss14_separator(symbol, 50, symbol->rows - 1, 1 /*above*/, 17 + 2, 0, c_right == 3);
+ dbar_omn_separator(symbol, 50, symbol->rows - 1, 1 /*above*/, 17 + 2, 0, c_right == 3);
symbol->row_height[symbol->rows - 1] = 1;
if (symbol->width < 50) {
symbol->width = 50;
@@ -600,7 +599,7 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
if (symbol->symbology == BARCODE_DBAR_OMNSTK_CC) {
/* separator pattern for composite symbol */
- rss14_separator(symbol, 50, separator_row, 1 /*above*/, 18, 0, 0 /*bottom_finder_value_3*/);
+ dbar_omn_separator(symbol, 50, separator_row, 1 /*above*/, 18, 0, 0 /*bottom_finder_value_3*/);
}
symbol->rows = symbol->rows + 1;
@@ -608,11 +607,11 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
if (symbol->symbology == BARCODE_DBAR_OMNSTK_CC) {
symbol->height = symbol->height ? 33.0f : 66.0f; /* Pass back min row or default height */
} else {
-#ifdef COMPLIANT_HEIGHTS
- error_number = set_height(symbol, 33.0f, 66.0f, 0.0f, 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 66.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ error_number = set_height(symbol, 33.0f, 66.0f, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 66.0f, 0.0f, 1 /*no_errtxt*/);
+ }
}
}
@@ -620,13 +619,13 @@ INTERNAL int rss14_cc(struct zint_symbol *symbol, unsigned char source[], int sr
}
/* GS1 DataBar Omnidirectional/Truncated/Stacked */
-INTERNAL int rss14(struct zint_symbol *symbol, unsigned char source[], int src_len) {
- return rss14_cc(symbol, source, src_len, 0 /*cc_rows*/);
+INTERNAL int dbar_omn(struct zint_symbol *symbol, unsigned char source[], int src_len) {
+ return dbar_omn_cc(symbol, source, src_len, 0 /*cc_rows*/);
}
/* GS1 DataBar Limited, allowing for composite if `cc_rows` set */
-INTERNAL int rsslimited_cc(struct zint_symbol *symbol, unsigned char source[], int src_len, const int cc_rows) {
- int error_number, i;
+INTERNAL int dbar_ltd_cc(struct zint_symbol *symbol, unsigned char source[], int src_len, const int cc_rows) {
+ int error_number = 0, i;
large_int accum;
uint64_t left_character, right_character;
int left_group, right_group, left_odd, left_even, right_odd, right_even;
@@ -642,10 +641,9 @@ INTERNAL int rsslimited_cc(struct zint_symbol *symbol, unsigned char source[], i
strcpy(symbol->errtxt, "382: Input too long (14 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
- error_number = is_sane(NEON, source, src_len);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, src_len) != 0) {
strcpy(symbol->errtxt, "383: Invalid character in data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
if (src_len == 14) { /* Verify check digit */
@@ -778,7 +776,7 @@ INTERNAL int rsslimited_cc(struct zint_symbol *symbol, unsigned char source[], i
writer = 0;
latch = 0;
for (i = 0; i < 47; i++) {
- writer = rss_expand(symbol, writer, &latch, total_widths[i]);
+ writer = dbar_expand(symbol, writer, &latch, total_widths[i]);
}
if (symbol->width < writer) {
symbol->width = writer;
@@ -795,29 +793,29 @@ INTERNAL int rsslimited_cc(struct zint_symbol *symbol, unsigned char source[], i
}
/* Set human readable text */
- rss_set_gtin14_hrt(symbol, source, src_len);
+ dbar_set_gtin14_hrt(symbol, source, src_len);
/* ISO/IEC 24724:2011 6.2 10X minimum height, use as default also */
if (symbol->symbology == BARCODE_DBAR_LTD_CC) {
symbol->height = 10.0f; /* Pass back min row == default height */
} else {
-#ifdef COMPLIANT_HEIGHTS
- error_number = set_height(symbol, 10.0f, 10.0f, 0.0f, 0 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ error_number = set_height(symbol, 10.0f, 10.0f, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
}
return error_number;
}
/* GS1 DataBar Limited */
-INTERNAL int rsslimited(struct zint_symbol *symbol, unsigned char source[], int src_len) {
- return rsslimited_cc(symbol, source, src_len, 0 /*cc_rows*/);
+INTERNAL int dbar_ltd(struct zint_symbol *symbol, unsigned char source[], int src_len) {
+ return dbar_ltd_cc(symbol, source, src_len, 0 /*cc_rows*/);
}
-/* Check and convert date to RSS date value */
-INTERNAL int rss_date(const unsigned char source[], const int src_posn) {
+/* Check and convert date to DataBar date value */
+INTERNAL int dbar_date(const unsigned char source[], const int src_posn) {
int yy = to_int(source + src_posn, 2);
int mm = to_int(source + src_posn + 2, 2);
int dd = to_int(source + src_posn + 4, 2);
@@ -831,7 +829,7 @@ INTERNAL int rss_date(const unsigned char source[], const int src_posn) {
}
/* Handles all data encodation from section 7.2.5 of ISO/IEC 24724 */
-static int rssexp_binary_string(struct zint_symbol *symbol, const unsigned char source[], char binary_string[],
+static int dbar_exp_binary_string(struct zint_symbol *symbol, const unsigned char source[], char binary_string[],
int cols_per_row, int *p_bp) {
int encoding_method, i, j, read_posn, debug = (symbol->debug & ZINT_DEBUG_PRINT), mode = NUMERIC;
char last_digit = '\0';
@@ -884,7 +882,7 @@ static int rssexp_binary_string(struct zint_symbol *symbol, const unsigned char
} else if ((length == 34) && (source[26] == '1')
&& (source[27] == '1' || source[27] == '3' || source[27] == '5' || source[27] == '7')
- && rss_date(source, 28) >= 0) {
+ && dbar_date(source, 28) >= 0) {
/* (01), (310x) and (11) - metric weight and production date */
/* (01), (310x) and (13) - metric weight and packaging date */
@@ -915,7 +913,7 @@ static int rssexp_binary_string(struct zint_symbol *symbol, const unsigned char
} else if ((length == 34) && (source[26] == '1')
&& (source[27] == '1' || source[27] == '3' || source[27] == '5' || source[27] == '7')
- && rss_date(source, 28) >= 0) {
+ && dbar_date(source, 28) >= 0) {
/* (01), (320x) and (11) - English weight and production date */
/* (01), (320x) and (13) - English weight and packaging date */
@@ -1045,7 +1043,7 @@ static int rssexp_binary_string(struct zint_symbol *symbol, const unsigned char
if (length == 34) {
/* Date information is included */
- group_val = rss_date(source, 28);
+ group_val = dbar_date(source, 28);
} else {
group_val = 38400;
}
@@ -1172,7 +1170,7 @@ static int rssexp_binary_string(struct zint_symbol *symbol, const unsigned char
}
/* Separator for DataBar Expanded Stacked and DataBar Expanded Composite */
-static void rssexp_separator(struct zint_symbol *symbol, int width, const int cols, const int separator_row,
+static void dbar_exp_separator(struct zint_symbol *symbol, int width, const int cols, const int separator_row,
const int above_below, const int special_case_row, const int left_to_right, const int odd_last_row,
int *p_v2_latch) {
int i, i_start, i_end, j, k;
@@ -1239,7 +1237,7 @@ static void rssexp_separator(struct zint_symbol *symbol, int width, const int co
}
/* GS1 DataBar Expanded, setting linkage for composite if `cc_rows` set */
-INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[], int src_len, const int cc_rows) {
+INTERNAL int dbar_exp_cc(struct zint_symbol *symbol, unsigned char source[], int src_len, const int cc_rows) {
int error_number, warn_number = 0;
int i, j, k, p, codeblocks, data_chars, vs, group, v_odd, v_even;
int latch;
@@ -1298,7 +1296,7 @@ INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[],
}
}
- error_number = rssexp_binary_string(symbol, reduced, binary_string, cols_per_row, &bp);
+ error_number = dbar_exp_binary_string(symbol, reduced, binary_string, cols_per_row, &bp);
if (error_number != 0) {
return error_number;
}
@@ -1431,7 +1429,7 @@ INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[],
writer = 0;
latch = 0;
for (i = 0; i < pattern_width; i++) {
- writer = rss_expand(symbol, writer, &latch, elements[i]);
+ writer = dbar_expand(symbol, writer, &latch, elements[i]);
}
if (symbol->width < writer) {
symbol->width = writer;
@@ -1534,7 +1532,7 @@ INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[],
writer = 0;
for (i = 0; i < elements_in_sub; i++) {
- writer = rss_expand(symbol, writer, &latch, sub_elements[i]);
+ writer = dbar_expand(symbol, writer, &latch, sub_elements[i]);
}
if (symbol->width < writer) {
symbol->width = writer;
@@ -1550,14 +1548,14 @@ INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[],
symbol->row_height[symbol->rows - 2] = 1;
/* bottom separator pattern (above current row) */
- rssexp_separator(symbol, writer, reader, symbol->rows - 1, 1 /*above*/, special_case_row,
+ dbar_exp_separator(symbol, writer, reader, symbol->rows - 1, 1 /*above*/, special_case_row,
left_to_right, odd_last_row, &v2_latch);
symbol->row_height[symbol->rows - 1] = 1;
}
if (current_row != stack_rows) {
/* top separator pattern (below current row) */
- rssexp_separator(symbol, writer, reader, symbol->rows + 1, -1 /*below*/, 0 /*special_case_row*/,
+ dbar_exp_separator(symbol, writer, reader, symbol->rows + 1, -1 /*below*/, 0 /*special_case_row*/,
left_to_right, 0 /*odd_last_row*/, &v2_latch);
symbol->row_height[symbol->rows + 1] = 1;
}
@@ -1569,7 +1567,7 @@ INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[],
if (symbol->symbology == BARCODE_DBAR_EXP_CC || symbol->symbology == BARCODE_DBAR_EXPSTK_CC) {
/* Composite separator */
- rssexp_separator(symbol, symbol->width, 4, separator_row, 1 /*above*/, 0 /*special_case_row*/,
+ dbar_exp_separator(symbol, symbol->width, 4, separator_row, 1 /*above*/, 0 /*special_case_row*/,
1 /*left_to_right*/, 0 /*odd_last_row*/, NULL);
}
@@ -1578,21 +1576,21 @@ INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[],
if (symbol->symbology == BARCODE_DBAR_EXP_CC || symbol->symbology == BARCODE_DBAR_EXPSTK_CC) {
symbol->height = symbol->height ? 34.0f : 34.0f * stack_rows; /* Pass back min row or default height */
} else {
-#ifdef COMPLIANT_HEIGHTS
- if (warn_number) {
- (void) set_height(symbol, 34.0f, 34.0f * stack_rows, 0.0f, 0 /*no_errtxt*/);
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ if (warn_number) {
+ (void) set_height(symbol, 34.0f, 34.0f * stack_rows, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ warn_number = set_height(symbol, 34.0f, 34.0f * stack_rows, 0.0f, 0 /*no_errtxt*/);
+ }
} else {
- warn_number = set_height(symbol, 34.0f, 34.0f * stack_rows, 0.0f, 0 /*no_errtxt*/);
+ (void) set_height(symbol, 0.0f, 34.0f * stack_rows, 0.0f, 1 /*no_errtxt*/);
}
-#else
- (void) set_height(symbol, 0.0f, 34.0f * stack_rows, 0.0f, 1 /*no_errtxt*/);
-#endif
}
return error_number ? error_number : warn_number;
}
/* GS1 DataBar Expanded */
-INTERNAL int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int src_len) {
- return rssexpanded_cc(symbol, source, src_len, 0 /*cc_rows*/);
+INTERNAL int dbar_exp(struct zint_symbol *symbol, unsigned char source[], int src_len) {
+ return dbar_exp_cc(symbol, source, src_len, 0 /*cc_rows*/);
}
diff --git a/backend/telepen.c b/backend/telepen.c
index 3d3d28cc..00895d0b 100644
--- a/backend/telepen.c
+++ b/backend/telepen.c
@@ -40,22 +40,38 @@
#include "common.h"
static char *TeleTable[] = {
- "31313131", "1131313111", "33313111", "1111313131", "3111313111", "11333131", "13133131", "111111313111",
- "31333111", "1131113131", "33113131", "1111333111", "3111113131", "1113133111", "1311133111", "111111113131",
- "3131113111", "11313331", "333331", "111131113111", "31113331", "1133113111", "1313113111", "1111113331",
- "31131331", "113111113111", "3311113111", "1111131331", "311111113111", "1113111331", "1311111331", "11111111113111",
- "31313311", "1131311131", "33311131", "1111313311", "3111311131", "11333311", "13133311", "111111311131",
- "31331131", "1131113311", "33113311", "1111331131", "3111113311", "1113131131", "1311131131", "111111113311",
- "3131111131", "1131131311", "33131311", "111131111131", "3111131311", "1133111131", "1313111131", "111111131311",
- "3113111311", "113111111131", "3311111131", "111113111311", "311111111131", "111311111311", "131111111311", "11111111111131",
- "3131311111", "11313133", "333133", "111131311111", "31113133", "1133311111", "1313311111", "1111113133",
- "313333", "113111311111", "3311311111", "11113333", "311111311111", "11131333", "13111333", "11111111311111",
- "31311133", "1131331111", "33331111", "1111311133", "3111331111", "11331133", "13131133", "111111331111",
- "3113131111", "1131111133", "33111133", "111113131111", "3111111133", "111311131111", "131111131111", "111111111133",
- "31311313", "113131111111", "3331111111", "1111311313", "311131111111", "11331313", "13131313", "11111131111111",
- "3133111111", "1131111313", "33111313", "111133111111", "3111111313", "111313111111", "131113111111", "111111111313",
- "313111111111", "1131131113", "33131113", "11113111111111", "3111131113", "113311111111", "131311111111", "111111131113",
- "3113111113", "11311111111111", "331111111111", "111113111113", "31111111111111", "111311111113", "131111111113", "1111111111111111",
+ "31313131", "1131313111", "33313111", "1111313131",
+ "3111313111", "11333131", "13133131", "111111313111",
+ "31333111", "1131113131", "33113131", "1111333111",
+ "3111113131", "1113133111", "1311133111", "111111113131",
+ "3131113111", "11313331", "333331", "111131113111",
+ "31113331", "1133113111", "1313113111", "1111113331",
+ "31131331", "113111113111", "3311113111", "1111131331",
+ "311111113111", "1113111331", "1311111331", "11111111113111",
+ "31313311", "1131311131", "33311131", "1111313311",
+ "3111311131", "11333311", "13133311", "111111311131",
+ "31331131", "1131113311", "33113311", "1111331131",
+ "3111113311", "1113131131", "1311131131", "111111113311",
+ "3131111131", "1131131311", "33131311", "111131111131",
+ "3111131311", "1133111131", "1313111131", "111111131311",
+ "3113111311", "113111111131", "3311111131", "111113111311",
+ "311111111131", "111311111311", "131111111311", "11111111111131",
+ "3131311111", "11313133", "333133", "111131311111",
+ "31113133", "1133311111", "1313311111", "1111113133",
+ "313333", "113111311111", "3311311111", "11113333",
+ "311111311111", "11131333", "13111333", "11111111311111",
+ "31311133", "1131331111", "33331111", "1111311133",
+ "3111331111", "11331133", "13131133", "111111331111",
+ "3113131111", "1131111133", "33111133", "111113131111",
+ "3111111133", "111311131111", "131111131111", "111111111133",
+ "31311313", "113131111111", "3331111111", "1111311313",
+ "311131111111", "11331313", "13131313", "11111131111111",
+ "3133111111", "1131111313", "33111313", "111133111111",
+ "3111111313", "111313111111", "131113111111", "111111111313",
+ "313111111111", "1131131113", "33131113", "11113111111111",
+ "3111131113", "113311111111", "131311111111", "111111131113",
+ "3113111113", "11311111111111", "331111111111", "111113111113",
+ "31111111111111", "111311111113", "131111111113", "1111111111111111",
};
INTERNAL int telepen(struct zint_symbol *symbol, unsigned char source[], int src_len) {
@@ -97,13 +113,13 @@ INTERNAL int telepen(struct zint_symbol *symbol, unsigned char source[], int src
expand(symbol, dest);
-#ifdef COMPLIANT_HEIGHTS
- /* Default height from various Telepen docs is based on default 26pt at X 0.01125" (average of 0.01" - 0.0125")
- = (26 / 72) / 0.01125 ~ 32; no min height specified */
- (void) set_height(symbol, 0.0f, 32.0f, 0, 1 /*no_errtxt*/);
-#else
- (void) set_height(symbol, 0.0f, 50.0f, 0, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* Default height from various Telepen docs is based on default 26pt at X 0.01125"
+ (average of 0.01" - 0.0125") = (26 / 72) / 0.01125 ~ 32; no min height specified */
+ (void) set_height(symbol, 0.0f, 32.0f, 0, 1 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0, 1 /*no_errtxt*/);
+ }
for (i = 0; i < src_len; i++) {
if (source[i] == '\0') {
@@ -118,7 +134,7 @@ INTERNAL int telepen(struct zint_symbol *symbol, unsigned char source[], int src
INTERNAL int telepen_num(struct zint_symbol *symbol, unsigned char source[], int src_len) {
int count, check_digit, glyph;
- int error_number;
+ int error_number = 0;
int i;
char dest[521]; /* 12 (start) + 30 * 16 (max for DELs) + 16 (check digit) + 12 (stop) + 1 = 521 */
unsigned char temp[64];
@@ -131,10 +147,9 @@ INTERNAL int telepen_num(struct zint_symbol *symbol, unsigned char source[], int
}
ustrcpy(temp, source);
to_upper(temp);
- error_number = is_sane(SODIUM, temp, src_len);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(SODIUM, temp, src_len) != 0) {
strcpy(symbol->errtxt, "393: Invalid character in data (digits and \"X\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
/* Add a leading zero if required */
@@ -178,11 +193,11 @@ INTERNAL int telepen_num(struct zint_symbol *symbol, unsigned char source[], int
expand(symbol, dest);
-#ifdef COMPLIANT_HEIGHTS
- (void) set_height(symbol, 0.0f, 32.0f, 0, 1 /*no_errtxt*/); /* Same as alphanumeric Telepen */
-#else
- (void) set_height(symbol, 0.0f, 50.0f, 0, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ (void) set_height(symbol, 0.0f, 32.0f, 0, 1 /*no_errtxt*/); /* Same as alphanumeric Telepen */
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0, 1 /*no_errtxt*/);
+ }
ustrcpy(symbol->text, temp);
return error_number;
diff --git a/backend/tests/test_auspost.c b/backend/tests/test_auspost.c
index 730c0301..f9c6b2c0 100644
--- a/backend/tests/test_auspost.c
+++ b/backend/tests/test_auspost.c
@@ -150,10 +150,10 @@ static void test_input(int index, int debug) {
/* 3*/ { BARCODE_AUSPOST, "12345678ABcd!", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 404: Invalid character in data (alphanumerics, space and \"#\" only)" },
/* 4*/ { BARCODE_AUSPOST, "12345678ABcd#", 0, 3, 103, "" },
/* 5*/ { BARCODE_AUSPOST, "1234567890123456", 0, 3, 103, "" },
- /* 6*/ { BARCODE_AUSPOST, "123456789012345A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 402: Invalid character in data (digits only for lengths 16 and 23)" },
+ /* 6*/ { BARCODE_AUSPOST, "123456789012345A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 402: Invalid character in data (digits only for length 16)" },
/* 7*/ { BARCODE_AUSPOST, "12345678ABCDefgh #", 0, 3, 133, "" }, // Length 18
/* 8*/ { BARCODE_AUSPOST, "12345678901234567890123", 0, 3, 133, "" },
- /* 9*/ { BARCODE_AUSPOST, "1234567890123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 402: Invalid character in data (digits only for lengths 16 and 23)" },
+ /* 9*/ { BARCODE_AUSPOST, "1234567890123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 406: Invalid character in data (digits only for length 23)" },
/* 10*/ { BARCODE_AUSPOST, "1234567", ZINT_ERROR_TOO_LONG, -1, -1, "Error 401: Auspost input is wrong length (8, 13, 16, 18 or 23 characters only)" }, // No leading zeroes added
/* 11*/ { BARCODE_AUSREPLY, "12345678", 0, 3, 73, "" },
/* 12*/ { BARCODE_AUSREPLY, "1234567", 0, 3, 73, "" }, // Leading zeroes added
diff --git a/backend/tests/test_code1.c b/backend/tests/test_code1.c
index cf37b800..f315436c 100644
--- a/backend/tests/test_code1.c
+++ b/backend/tests/test_code1.c
@@ -270,7 +270,8 @@ static void test_input(int index, int debug) {
/* 32*/ { -1, -1, -1, { 0, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 712: Structured Append index out of range (1-2)", },
/* 33*/ { -1, -1, -1, { 3, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 712: Structured Append index out of range (1-2)", },
/* 34*/ { -1, -1, -1, { 1, 2, "1" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 713: Structured Append ID not available for Code One", },
- /* 35*/ { -1, -1, 9, { 1, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 714: Structured Append not supported for Version S", },
+ /* 35*/ { -1, -1, 9, { 1, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 714: Structured Append not available for Version S", },
+ /* 36*/ { -1, -1, 9, { 3, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 714: Structured Append not available for Version S", }, // Trumps other checking
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
diff --git a/backend/tests/test_library.c b/backend/tests/test_library.c
index 67d93950..2ba465b2 100644
--- a/backend/tests/test_library.c
+++ b/backend/tests/test_library.c
@@ -471,10 +471,10 @@ static void test_cap(int index) {
/* 0*/ { BARCODE_CODE128, ZINT_CAP_HRT, ZINT_CAP_HRT },
/* 1*/ { BARCODE_CODE128, ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_GS1, ZINT_CAP_HRT | ZINT_CAP_STACKABLE },
/* 2*/ { BARCODE_PDF417, ZINT_CAP_HRT | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE, ZINT_CAP_ECI | ZINT_CAP_READER_INIT },
- /* 3*/ { BARCODE_QRCODE, ZINT_CAP_HRT | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP, ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP },
- /* 4*/ { BARCODE_EANX_CC, ZINT_CAP_HRT | ZINT_CAP_COMPOSITE | ZINT_CAP_EXTENDABLE | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES, ZINT_CAP_HRT | ZINT_CAP_COMPOSITE | ZINT_CAP_EXTENDABLE | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES },
+ /* 3*/ { BARCODE_QRCODE, ZINT_CAP_HRT | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP | ZINT_CAP_COMPLIANT_HEIGHT, ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP },
+ /* 4*/ { BARCODE_EANX_CC, ZINT_CAP_HRT | ZINT_CAP_COMPOSITE | ZINT_CAP_EXTENDABLE | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES | ZINT_CAP_COMPLIANT_HEIGHT, ZINT_CAP_HRT | ZINT_CAP_COMPOSITE | ZINT_CAP_EXTENDABLE | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES | ZINT_CAP_COMPLIANT_HEIGHT },
/* 5*/ { BARCODE_HANXIN, ZINT_CAP_DOTTY | ZINT_CAP_QUIET_ZONES | ZINT_CAP_FIXED_RATIO | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK, ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK },
- /* 6*/ { BARCODE_CODE11, ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_FIXED_RATIO | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE, 0 },
+ /* 6*/ { BARCODE_CODE11, ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_FIXED_RATIO | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_COMPLIANT_HEIGHT, 0 },
/* 7*/ { BARCODE_POSTNET, ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_EXTENDABLE | ZINT_CAP_COMPOSITE | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP, 0 },
/* 8*/ { 0, 0, 0 },
};
@@ -495,6 +495,95 @@ static void test_cap(int index) {
testFinish();
}
+static void test_cap_compliant_height() {
+ int symbol_id;
+ int ret;
+
+ testStart("test_cap_compliant_height");
+
+ for (symbol_id = 1; symbol_id <= BARCODE_RMQR; symbol_id++) {
+ if (!ZBarcode_ValidID(symbol_id)) continue;
+
+ ret = ZBarcode_Cap(symbol_id, ZINT_CAP_COMPLIANT_HEIGHT);
+
+ switch (symbol_id) {
+ //case BARCODE_CODE11: /* TODO: Find doc */
+ case BARCODE_C25INTER:
+ case BARCODE_CODE39:
+ case BARCODE_EXCODE39:
+ case BARCODE_EANX:
+ case BARCODE_EANX_CHK:
+ case BARCODE_GS1_128:
+ case BARCODE_CODABAR:
+ //case BARCODE_DPLEIT: /* TODO: Find doc */
+ //case BARCODE_DPIDENT: /* TODO: Find doc */
+ case BARCODE_CODE16K:
+ case BARCODE_CODE49:
+ case BARCODE_CODE93:
+ //case BARCODE_FLAT: /* TODO: Find doc */
+ case BARCODE_DBAR_OMN:
+ case BARCODE_DBAR_LTD:
+ case BARCODE_DBAR_EXP:
+ case BARCODE_TELEPEN:
+ case BARCODE_UPCA:
+ case BARCODE_UPCA_CHK:
+ case BARCODE_UPCE:
+ case BARCODE_UPCE_CHK:
+ case BARCODE_POSTNET:
+ //case BARCODE_MSI_PLESSEY: /* TODO: Find doc */
+ case BARCODE_FIM:
+ case BARCODE_LOGMARS:
+ case BARCODE_PHARMA:
+ case BARCODE_PZN:
+ case BARCODE_PHARMA_TWO:
+ case BARCODE_AUSPOST:
+ case BARCODE_AUSREPLY:
+ case BARCODE_AUSROUTE:
+ case BARCODE_AUSREDIRECT:
+ case BARCODE_ISBNX:
+ case BARCODE_RM4SCC:
+ case BARCODE_EAN14:
+ //case BARCODE_VIN: /* Spec unlikely */
+ case BARCODE_CODABLOCKF:
+ case BARCODE_NVE18:
+ case BARCODE_JAPANPOST:
+ //case BARCODE_KOREAPOST: /* TODO: Find doc */
+ case BARCODE_DBAR_STK:
+ case BARCODE_DBAR_OMNSTK:
+ case BARCODE_DBAR_EXPSTK:
+ case BARCODE_PLANET:
+ case BARCODE_USPS_IMAIL:
+ //case BARCODE_PLESSEY: /* TODO: Find doc */
+ case BARCODE_TELEPEN_NUM:
+ case BARCODE_ITF14:
+ case BARCODE_KIX:
+ case BARCODE_DPD:
+ case BARCODE_HIBC_39:
+ case BARCODE_HIBC_BLOCKF:
+ case BARCODE_MAILMARK:
+ case BARCODE_CODE32:
+ case BARCODE_EANX_CC:
+ case BARCODE_GS1_128_CC:
+ case BARCODE_DBAR_OMN_CC:
+ case BARCODE_DBAR_LTD_CC:
+ case BARCODE_DBAR_EXP_CC:
+ case BARCODE_UPCA_CC:
+ case BARCODE_UPCE_CC:
+ case BARCODE_DBAR_STK_CC:
+ case BARCODE_DBAR_OMNSTK_CC:
+ case BARCODE_DBAR_EXPSTK_CC:
+ case BARCODE_CHANNEL:
+ assert_equal(ret, ZINT_CAP_COMPLIANT_HEIGHT, "symbol_id %d (%s) ret 0x%X != ZINT_CAP_COMPLIANT_HEIGHT\n", symbol_id, testUtilBarcodeName(symbol_id), ret);
+ break;
+ default:
+ assert_zero(ret, "symbol_id %d (%s) ret 0x%X non-zero\n", symbol_id, testUtilBarcodeName(symbol_id), ret);
+ break;
+ }
+ }
+
+ testFinish();
+}
+
static void test_encode_file_empty(void) {
int ret;
struct zint_symbol *symbol;
@@ -950,6 +1039,7 @@ int main(int argc, char *argv[]) {
{ "test_input_mode", test_input_mode, 1, 0, 1 },
{ "test_escape_char_process", test_escape_char_process, 1, 1, 1 },
{ "test_cap", test_cap, 1, 0, 0 },
+ { "test_cap_compliant_height", test_cap_compliant_height, 0, 0, 0 },
{ "test_encode_file_empty", test_encode_file_empty, 0, 0, 0 },
{ "test_encode_file_too_large", test_encode_file_too_large, 0, 0, 0 },
{ "test_encode_file_unreadable", test_encode_file_unreadable, 0, 0, 0 },
diff --git a/backend/tests/test_medical.c b/backend/tests/test_medical.c
index 4756d721..bfbbd2cd 100644
--- a/backend/tests/test_medical.c
+++ b/backend/tests/test_medical.c
@@ -103,10 +103,13 @@ static void test_hrt(int index, int debug) {
/* 0*/ { BARCODE_CODABAR, -1, "A1234B", "A1234B" },
/* 1*/ { BARCODE_CODABAR, -1, "a1234c", "A1234C" }, // Converts to upper
/* 2*/ { BARCODE_CODABAR, 1, "A1234B", "A1234B" }, // Check not included
- /* 3*/ { BARCODE_PHARMA, -1, "123456", "" }, // None
- /* 4*/ { BARCODE_PHARMA_TWO, -1, "123456", "" }, // None
- /* 5*/ { BARCODE_CODE32, -1, "123456", "A001234564" },
- /* 6*/ { BARCODE_CODE32, -1, "12345678", "A123456788" },
+ /* 3*/ { BARCODE_CODABAR, 2, "A1234B", "A12345B" }, // Check included
+ /* 4*/ { BARCODE_CODABAR, 1, "A123456A", "A123456A" }, // Check not included
+ /* 5*/ { BARCODE_CODABAR, 2, "A123456A", "A123456$A" }, // Check included
+ /* 6*/ { BARCODE_PHARMA, -1, "123456", "" }, // None
+ /* 7*/ { BARCODE_PHARMA_TWO, -1, "123456", "" }, // None
+ /* 8*/ { BARCODE_CODE32, -1, "123456", "A001234564" },
+ /* 9*/ { BARCODE_CODE32, -1, "12345678", "A123456788" },
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
diff --git a/backend/tests/test_raster.c b/backend/tests/test_raster.c
index a973fca6..059f90ee 100644
--- a/backend/tests/test_raster.c
+++ b/backend/tests/test_raster.c
@@ -109,6 +109,7 @@ static void test_buffer(int index, int generate, int debug) {
struct item {
int symbology;
+ int output_options;
char *data;
char *composite;
@@ -119,134 +120,262 @@ static void test_buffer(int index, int generate, int debug) {
int expected_bitmap_height;
};
struct item data[] = {
- /* 0*/ { BARCODE_CODE11, "1234567890", "", 50, 1, 108, 216, 116 },
- /* 1*/ { BARCODE_C25STANDARD, "1234567890", "", 50, 1, 117, 234, 116 },
- /* 2*/ { BARCODE_C25INTER, "1234567890", "", 50, 1, 99, 198, 116 },
- /* 3*/ { BARCODE_C25IATA, "1234567890", "", 50, 1, 149, 298, 116 },
- /* 4*/ { BARCODE_C25LOGIC, "1234567890", "", 50, 1, 109, 218, 116 },
- /* 5*/ { BARCODE_C25IND, "1234567890", "", 50, 1, 159, 318, 116 },
- /* 6*/ { BARCODE_CODE39, "1234567890", "", 50, 1, 155, 310, 116 },
- /* 7*/ { BARCODE_EXCODE39, "1234567890", "", 50, 1, 155, 310, 116 },
- /* 8*/ { BARCODE_EANX, "123456789012", "", 50, 1, 95, 226, 116 },
- /* 9*/ { BARCODE_EANX_CHK, "1234567890128", "", 50, 1, 95, 226, 116 },
- /* 10*/ { BARCODE_EANX, "123456789012+12", "", 50, 1, 122, 276, 116 },
- /* 11*/ { BARCODE_EANX_CHK, "1234567890128+12", "", 50, 1, 122, 276, 116 },
- /* 12*/ { BARCODE_EANX, "123456789012+12345", "", 50, 1, 149, 330, 116 },
- /* 13*/ { BARCODE_EANX_CHK, "1234567890128+12345", "", 50, 1, 149, 330, 116 },
- /* 14*/ { BARCODE_EANX, "1234567", "", 50, 1, 67, 162, 116 },
- /* 15*/ { BARCODE_EANX_CHK, "12345670", "", 50, 1, 67, 162, 116 },
- /* 16*/ { BARCODE_EANX, "1234567+12", "", 50, 1, 94, 216, 116 },
- /* 17*/ { BARCODE_EANX_CHK, "12345670+12", "", 50, 1, 94, 216, 116 },
- /* 18*/ { BARCODE_EANX, "1234567+12345", "", 50, 1, 121, 270, 116 },
- /* 19*/ { BARCODE_EANX_CHK, "12345670+12345", "", 50, 1, 121, 270, 116 },
- /* 20*/ { BARCODE_EANX, "1234", "", 50, 1, 47, 118, 116 },
- /* 21*/ { BARCODE_EANX_CHK, "1234", "", 50, 1, 47, 118, 116 },
- /* 22*/ { BARCODE_EANX, "12", "", 50, 1, 20, 64, 116 },
- /* 23*/ { BARCODE_EANX_CHK, "12", "", 50, 1, 20, 64, 116 },
- /* 24*/ { BARCODE_GS1_128, "[01]12345678901231", "", 50, 1, 134, 268, 116 },
- /* 25*/ { BARCODE_CODABAR, "A00000000B", "", 50, 1, 102, 204, 116 },
- /* 26*/ { BARCODE_CODE128, "1234567890", "", 50, 1, 90, 180, 116 },
- /* 27*/ { BARCODE_DPLEIT, "1234567890123", "", 50, 1, 135, 270, 116 },
- /* 28*/ { BARCODE_DPIDENT, "12345678901", "", 50, 1, 117, 234, 116 },
- /* 29*/ { BARCODE_CODE16K, "1234567890", "", 20, 2, 70, 162, 44 },
- /* 30*/ { BARCODE_CODE49, "1234567890", "", 20, 2, 70, 162, 44 },
- /* 31*/ { BARCODE_CODE93, "1234567890", "", 50, 1, 127, 254, 116 },
- /* 32*/ { BARCODE_FLAT, "1234567890", "", 50, 1, 90, 180, 100 },
- /* 33*/ { BARCODE_DBAR_OMN, "1234567890123", "", 50, 1, 96, 192, 116 },
- /* 34*/ { BARCODE_DBAR_LTD, "1234567890123", "", 50, 1, 79, 158, 116 },
- /* 35*/ { BARCODE_DBAR_EXP, "[01]12345678901231", "", 34, 1, 134, 268, 84 },
- /* 36*/ { BARCODE_TELEPEN, "1234567890", "", 50, 1, 208, 416, 116 },
- /* 37*/ { BARCODE_UPCA, "12345678901", "", 50, 1, 95, 226, 116 },
- /* 38*/ { BARCODE_UPCA_CHK, "123456789012", "", 50, 1, 95, 226, 116 },
- /* 39*/ { BARCODE_UPCA, "12345678901+12", "", 50, 1, 124, 276, 116 },
- /* 40*/ { BARCODE_UPCA_CHK, "123456789012+12", "", 50, 1, 124, 276, 116 },
- /* 41*/ { BARCODE_UPCA, "12345678901+12345", "", 50, 1, 151, 330, 116 },
- /* 42*/ { BARCODE_UPCA_CHK, "123456789012+12345", "", 50, 1, 151, 330, 116 },
- /* 43*/ { BARCODE_UPCE, "1234567", "", 50, 1, 51, 134, 116 },
- /* 44*/ { BARCODE_UPCE_CHK, "12345670", "", 50, 1, 51, 134, 116 },
- /* 45*/ { BARCODE_UPCE, "1234567+12", "", 50, 1, 78, 184, 116 },
- /* 46*/ { BARCODE_UPCE_CHK, "12345670+12", "", 50, 1, 78, 184, 116 },
- /* 47*/ { BARCODE_UPCE, "1234567+12345", "", 50, 1, 105, 238, 116 },
- /* 48*/ { BARCODE_UPCE_CHK, "12345670+12345", "", 50, 1, 105, 238, 116 },
- /* 49*/ { BARCODE_POSTNET, "12345678901", "", 12, 2, 123, 246, 24 },
- /* 50*/ { BARCODE_MSI_PLESSEY, "1234567890", "", 50, 1, 127, 254, 116 },
- /* 51*/ { BARCODE_FIM, "A", "", 50, 1, 17, 34, 100 },
- /* 52*/ { BARCODE_LOGMARS, "1234567890", "", 50, 1, 191, 382, 116 },
- /* 53*/ { BARCODE_PHARMA, "123456", "", 50, 1, 58, 116, 100 },
- /* 54*/ { BARCODE_PZN, "123456", "", 50, 1, 142, 284, 116 },
- /* 55*/ { BARCODE_PHARMA_TWO, "12345678", "", 10, 2, 29, 58, 20 },
- /* 56*/ { BARCODE_PDF417, "1234567890", "", 21, 7, 103, 206, 42 },
- /* 57*/ { BARCODE_PDF417COMP, "1234567890", "", 21, 7, 69, 138, 42 },
- /* 58*/ { BARCODE_MAXICODE, "1234567890", "", 165, 33, 30, 299, 298 },
- /* 59*/ { BARCODE_QRCODE, "1234567890AB", "", 21, 21, 21, 42, 42 },
- /* 60*/ { BARCODE_CODE128B, "1234567890", "", 50, 1, 145, 290, 116 },
- /* 61*/ { BARCODE_AUSPOST, "12345678901234567890123", "", 8, 3, 133, 266, 16 },
- /* 62*/ { BARCODE_AUSREPLY, "12345678", "", 8, 3, 73, 146, 16 },
- /* 63*/ { BARCODE_AUSROUTE, "12345678", "", 8, 3, 73, 146, 16 },
- /* 64*/ { BARCODE_AUSREDIRECT, "12345678", "", 8, 3, 73, 146, 16 },
- /* 65*/ { BARCODE_ISBNX, "123456789", "", 50, 1, 95, 226, 116 },
- /* 66*/ { BARCODE_ISBNX, "123456789+12", "", 50, 1, 122, 276, 116 },
- /* 67*/ { BARCODE_ISBNX, "123456789+12345", "", 50, 1, 149, 330, 116 },
- /* 68*/ { BARCODE_RM4SCC, "1234567890", "", 8, 3, 91, 182, 16 },
- /* 69*/ { BARCODE_DATAMATRIX, "ABC", "", 10, 10, 10, 20, 20 },
- /* 70*/ { BARCODE_EAN14, "1234567890123", "", 50, 1, 134, 268, 116 },
- /* 71*/ { BARCODE_VIN, "12345678701234567", "", 50, 1, 246, 492, 116 },
- /* 72*/ { BARCODE_CODABLOCKF, "1234567890", "", 20, 2, 101, 242, 44 },
- /* 73*/ { BARCODE_NVE18, "12345678901234567", "", 50, 1, 156, 312, 116 },
- /* 74*/ { BARCODE_JAPANPOST, "1234567890", "", 8, 3, 133, 266, 16 },
- /* 75*/ { BARCODE_KOREAPOST, "123456", "", 50, 1, 167, 334, 116 },
- /* 76*/ { BARCODE_DBAR_STK, "1234567890123", "", 13, 3, 50, 100, 26 },
- /* 77*/ { BARCODE_DBAR_OMNSTK, "1234567890123", "", 69, 5, 50, 100, 138 },
- /* 78*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901231", "", 71, 5, 102, 204, 142 },
- /* 79*/ { BARCODE_PLANET, "12345678901", "", 12, 2, 123, 246, 24 },
- /* 80*/ { BARCODE_MICROPDF417, "1234567890", "", 12, 6, 82, 164, 24 },
- /* 81*/ { BARCODE_USPS_IMAIL, "12345678901234567890", "", 8, 3, 129, 258, 16 },
- /* 82*/ { BARCODE_PLESSEY, "1234567890", "", 50, 1, 227, 454, 116 },
- /* 83*/ { BARCODE_TELEPEN_NUM, "1234567890", "", 50, 1, 128, 256, 116 },
- /* 84*/ { BARCODE_ITF14, "1234567890", "", 50, 1, 135, 330, 136 },
- /* 85*/ { BARCODE_KIX, "123456ABCDE", "", 8, 3, 87, 174, 16 },
- /* 86*/ { BARCODE_AZTEC, "1234567890AB", "", 15, 15, 15, 30, 30 },
- /* 87*/ { BARCODE_DAFT, "DAFTDAFTDAFTDAFT", "", 8, 3, 31, 62, 16 },
- /* 88*/ { BARCODE_DPD, "0123456789012345678901234567", "", 50, 1, 189, 378, 116 },
- /* 89*/ { BARCODE_MICROQR, "12345", "", 11, 11, 11, 22, 22 },
- /* 90*/ { BARCODE_HIBC_128, "1234567890", "", 50, 1, 123, 246, 116 },
- /* 91*/ { BARCODE_HIBC_39, "1234567890", "", 50, 1, 223, 446, 116 },
- /* 92*/ { BARCODE_HIBC_DM, "ABC", "", 12, 12, 12, 24, 24 },
- /* 93*/ { BARCODE_HIBC_QR, "1234567890AB", "", 21, 21, 21, 42, 42 },
- /* 94*/ { BARCODE_HIBC_PDF, "1234567890", "", 24, 8, 103, 206, 48 },
- /* 95*/ { BARCODE_HIBC_MICPDF, "1234567890", "", 28, 14, 38, 76, 56 },
- /* 96*/ { BARCODE_HIBC_BLOCKF, "1234567890", "", 30, 3, 101, 242, 64 },
- /* 97*/ { BARCODE_HIBC_AZTEC, "1234567890AB", "", 19, 19, 19, 38, 38 },
- /* 98*/ { BARCODE_DOTCODE, "ABC", "", 11, 11, 16, 33, 23 },
- /* 99*/ { BARCODE_HANXIN, "1234567890AB", "", 23, 23, 23, 46, 46 },
- /*100*/ { BARCODE_MAILMARK, "01000000000000000AA00AA0A", "", 10, 3, 155, 310, 20 },
- /*101*/ { BARCODE_AZRUNE, "255", "", 11, 11, 11, 22, 22 },
- /*102*/ { BARCODE_CODE32, "12345678", "", 50, 1, 103, 206, 116 },
- /*103*/ { BARCODE_EANX_CC, "123456789012", "[20]01", 50, 7, 99, 234, 116 },
- /*104*/ { BARCODE_EANX_CC, "123456789012+12", "[20]01", 50, 7, 126, 284, 116 },
- /*105*/ { BARCODE_EANX_CC, "123456789012+12345", "[20]01", 50, 7, 153, 338, 116 },
- /*106*/ { BARCODE_EANX_CC, "1234567", "[20]01", 50, 8, 72, 172, 116 },
- /*107*/ { BARCODE_EANX_CC, "1234567+12", "[20]01", 50, 8, 99, 226, 116 },
- /*108*/ { BARCODE_EANX_CC, "1234567+12345", "[20]01", 50, 8, 126, 280, 116 },
- /*109*/ { BARCODE_GS1_128_CC, "[01]12345678901231", "[20]01", 50, 5, 145, 290, 116 },
- /*110*/ { BARCODE_DBAR_OMN_CC, "1234567890123", "[20]01", 21, 5, 100, 200, 58 },
- /*111*/ { BARCODE_DBAR_LTD_CC, "1234567890123", "[20]01", 19, 6, 79, 158, 54 },
- /*112*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901231", "[20]01", 41, 5, 134, 268, 98 },
- /*113*/ { BARCODE_UPCA_CC, "12345678901", "[20]01", 50, 7, 99, 234, 116 },
- /*114*/ { BARCODE_UPCA_CC, "12345678901+12", "[20]01", 50, 7, 128, 284, 116 },
- /*115*/ { BARCODE_UPCA_CC, "12345678901+12345", "[20]01", 50, 7, 155, 338, 116 },
- /*116*/ { BARCODE_UPCE_CC, "1234567", "[20]01", 50, 9, 55, 142, 116 },
- /*117*/ { BARCODE_UPCE_CC, "1234567+12", "[20]01", 50, 9, 82, 192, 116 },
- /*118*/ { BARCODE_UPCE_CC, "1234567+12345", "[20]01", 50, 9, 109, 246, 116 },
- /*119*/ { BARCODE_DBAR_STK_CC, "1234567890123", "[20]01", 24, 9, 56, 112, 48 },
- /*120*/ { BARCODE_DBAR_OMNSTK_CC, "1234567890123", "[20]01", 80, 11, 56, 112, 160 },
- /*121*/ { BARCODE_DBAR_EXPSTK_CC, "[01]12345678901231", "[20]01", 78, 9, 102, 204, 156 },
- /*122*/ { BARCODE_CHANNEL, "01", "", 50, 1, 19, 38, 116 },
- /*123*/ { BARCODE_CODEONE, "12345678901234567890", "", 16, 16, 18, 36, 32 },
- /*124*/ { BARCODE_GRIDMATRIX, "ABC", "", 18, 18, 18, 36, 36 },
- /*125*/ { BARCODE_UPNQR, "1234567890AB", "", 77, 77, 77, 154, 154 },
- /*126*/ { BARCODE_ULTRA, "1234567890", "", 13, 13, 18, 36, 26 },
- /*127*/ { BARCODE_RMQR, "12345", "", 11, 11, 27, 54, 22 },
+ /* 0*/ { BARCODE_CODE11, -1, "1234567890", "", 50, 1, 108, 216, 116 },
+ /* 1*/ { BARCODE_CODE11, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 108, 216, 116 },
+ /* 2*/ { BARCODE_C25STANDARD, -1, "1234567890", "", 50, 1, 117, 234, 116 },
+ /* 3*/ { BARCODE_C25STANDARD, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 117, 234, 116 },
+ /* 4*/ { BARCODE_C25INTER, -1, "1234567890", "", 50, 1, 99, 198, 116 },
+ /* 5*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 99, 198, 116 },
+ /* 6*/ { BARCODE_C25IATA, -1, "1234567890", "", 50, 1, 149, 298, 116 },
+ /* 7*/ { BARCODE_C25IATA, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 149, 298, 116 },
+ /* 8*/ { BARCODE_C25LOGIC, -1, "1234567890", "", 50, 1, 109, 218, 116 },
+ /* 9*/ { BARCODE_C25LOGIC, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 109, 218, 116 },
+ /* 10*/ { BARCODE_C25IND, -1, "1234567890", "", 50, 1, 159, 318, 116 },
+ /* 11*/ { BARCODE_C25IND, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 159, 318, 116 },
+ /* 12*/ { BARCODE_CODE39, -1, "1234567890", "", 50, 1, 155, 310, 116 },
+ /* 13*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 155, 310, 116 },
+ /* 14*/ { BARCODE_EXCODE39, -1, "1234567890", "", 50, 1, 155, 310, 116 },
+ /* 15*/ { BARCODE_EXCODE39, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 155, 310, 116 },
+ /* 16*/ { BARCODE_EANX, -1, "123456789012", "", 50, 1, 95, 226, 116 },
+ /* 17*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "123456789012", "", 69, 1, 95, 226, 154 },
+ /* 18*/ { BARCODE_EANX_CHK, -1, "1234567890128", "", 50, 1, 95, 226, 116 },
+ /* 19*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "1234567890128", "", 69, 1, 95, 226, 154 },
+ /* 20*/ { BARCODE_EANX, -1, "123456789012+12", "", 50, 1, 122, 276, 116 },
+ /* 21*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "123456789012+12", "", 69, 1, 122, 276, 154 },
+ /* 22*/ { BARCODE_EANX_CHK, -1, "1234567890128+12", "", 50, 1, 122, 276, 116 },
+ /* 23*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "1234567890128+12", "", 69, 1, 122, 276, 154 },
+ /* 24*/ { BARCODE_EANX, -1, "123456789012+12345", "", 50, 1, 149, 330, 116 },
+ /* 25*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "123456789012+12345", "", 69, 1, 149, 330, 154 },
+ /* 26*/ { BARCODE_EANX_CHK, -1, "1234567890128+12345", "", 50, 1, 149, 330, 116 },
+ /* 27*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "1234567890128+12345", "", 69, 1, 149, 330, 154 },
+ /* 28*/ { BARCODE_EANX, -1, "1234567", "", 50, 1, 67, 162, 116 },
+ /* 29*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "1234567", "", 55, 1, 67, 162, 126 },
+ /* 30*/ { BARCODE_EANX_CHK, -1, "12345670", "", 50, 1, 67, 162, 116 },
+ /* 31*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "12345670", "", 55, 1, 67, 162, 126 },
+ /* 32*/ { BARCODE_EANX, -1, "1234567+12", "", 50, 1, 94, 216, 116 },
+ /* 33*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "1234567+12", "", 55, 1, 94, 216, 126 },
+ /* 34*/ { BARCODE_EANX_CHK, -1, "12345670+12", "", 50, 1, 94, 216, 116 },
+ /* 35*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "12345670+12", "", 55, 1, 94, 216, 126 },
+ /* 36*/ { BARCODE_EANX, -1, "1234567+12345", "", 50, 1, 121, 270, 116 },
+ /* 37*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "1234567+12345", "", 55, 1, 121, 270, 126 },
+ /* 38*/ { BARCODE_EANX_CHK, -1, "12345670+12345", "", 50, 1, 121, 270, 116 },
+ /* 39*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "12345670+12345", "", 55, 1, 121, 270, 126 },
+ /* 40*/ { BARCODE_EANX, -1, "1234", "", 50, 1, 47, 118, 116 },
+ /* 41*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "1234", "", 66.5, 1, 47, 118, 149 },
+ /* 42*/ { BARCODE_EANX_CHK, -1, "1234", "", 50, 1, 47, 118, 116 },
+ /* 43*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "1234", "", 66.5, 1, 47, 118, 149 },
+ /* 44*/ { BARCODE_EANX, -1, "12", "", 50, 1, 20, 64, 116 },
+ /* 45*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "12", "", 66.5, 1, 20, 64, 149 },
+ /* 46*/ { BARCODE_EANX_CHK, -1, "12", "", 50, 1, 20, 64, 116 },
+ /* 47*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "12", "", 66.5, 1, 20, 64, 149 },
+ /* 48*/ { BARCODE_GS1_128, -1, "[01]12345678901231", "", 50, 1, 134, 268, 116 },
+ /* 49*/ { BARCODE_GS1_128, COMPLIANT_HEIGHT, "[01]12345678901231", "", 64, 1, 134, 268, 144 },
+ /* 50*/ { BARCODE_CODABAR, -1, "A00000000B", "", 50, 1, 102, 204, 116 },
+ /* 51*/ { BARCODE_CODABAR, COMPLIANT_HEIGHT, "A00000000B", "", 50, 1, 102, 204, 116 },
+ /* 52*/ { BARCODE_CODE128, -1, "1234567890", "", 50, 1, 90, 180, 116 },
+ /* 53*/ { BARCODE_CODE128, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 90, 180, 116 },
+ /* 54*/ { BARCODE_DPLEIT, -1, "1234567890123", "", 50, 1, 135, 270, 116 },
+ /* 55*/ { BARCODE_DPLEIT, COMPLIANT_HEIGHT, "1234567890123", "", 50, 1, 135, 270, 116 },
+ /* 56*/ { BARCODE_DPIDENT, -1, "12345678901", "", 50, 1, 117, 234, 116 },
+ /* 57*/ { BARCODE_DPIDENT, COMPLIANT_HEIGHT, "12345678901", "", 50, 1, 117, 234, 116 },
+ /* 58*/ { BARCODE_CODE16K, -1, "1234567890", "", 20, 2, 70, 162, 44 },
+ /* 59*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, "1234567890", "", 21, 2, 70, 162, 46 },
+ /* 60*/ { BARCODE_CODE49, -1, "1234567890", "", 20, 2, 70, 162, 44 },
+ /* 61*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, "1234567890", "", 21, 2, 70, 162, 46 },
+ /* 62*/ { BARCODE_CODE93, -1, "1234567890", "", 50, 1, 127, 254, 116 },
+ /* 63*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, "1234567890", "", 40, 1, 127, 254, 96 },
+ /* 64*/ { BARCODE_FLAT, -1, "1234567890", "", 50, 1, 90, 180, 100 },
+ /* 65*/ { BARCODE_FLAT, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 90, 180, 100 },
+ /* 66*/ { BARCODE_DBAR_OMN, -1, "1234567890123", "", 50, 1, 96, 192, 116 },
+ /* 67*/ { BARCODE_DBAR_OMN, COMPLIANT_HEIGHT, "1234567890123", "", 33, 1, 96, 192, 82 },
+ /* 68*/ { BARCODE_DBAR_LTD, -1, "1234567890123", "", 50, 1, 79, 158, 116 },
+ /* 69*/ { BARCODE_DBAR_LTD, COMPLIANT_HEIGHT, "1234567890123", "", 10, 1, 79, 158, 36 },
+ /* 70*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", "", 34, 1, 134, 268, 84 },
+ /* 71*/ { BARCODE_DBAR_EXP, COMPLIANT_HEIGHT, "[01]12345678901231", "", 34, 1, 134, 268, 84 },
+ /* 72*/ { BARCODE_TELEPEN, -1, "1234567890", "", 50, 1, 208, 416, 116 },
+ /* 73*/ { BARCODE_TELEPEN, COMPLIANT_HEIGHT, "1234567890", "", 32, 1, 208, 416, 80 },
+ /* 74*/ { BARCODE_UPCA, -1, "12345678901", "", 50, 1, 95, 226, 116 },
+ /* 75*/ { BARCODE_UPCA, COMPLIANT_HEIGHT, "12345678901", "", 69, 1, 95, 226, 154 },
+ /* 76*/ { BARCODE_UPCA_CHK, -1, "123456789012", "", 50, 1, 95, 226, 116 },
+ /* 77*/ { BARCODE_UPCA_CHK, COMPLIANT_HEIGHT, "123456789012", "", 69, 1, 95, 226, 154 },
+ /* 78*/ { BARCODE_UPCA, -1, "12345678901+12", "", 50, 1, 124, 276, 116 },
+ /* 79*/ { BARCODE_UPCA, COMPLIANT_HEIGHT, "12345678901+12", "", 69, 1, 124, 276, 154 },
+ /* 80*/ { BARCODE_UPCA_CHK, -1, "123456789012+12", "", 50, 1, 124, 276, 116 },
+ /* 81*/ { BARCODE_UPCA_CHK, COMPLIANT_HEIGHT, "123456789012+12", "", 69, 1, 124, 276, 154 },
+ /* 82*/ { BARCODE_UPCA, -1, "12345678901+12345", "", 50, 1, 151, 330, 116 },
+ /* 83*/ { BARCODE_UPCA, COMPLIANT_HEIGHT, "12345678901+12345", "", 69, 1, 151, 330, 154 },
+ /* 84*/ { BARCODE_UPCA_CHK, -1, "123456789012+12345", "", 50, 1, 151, 330, 116 },
+ /* 85*/ { BARCODE_UPCA_CHK, COMPLIANT_HEIGHT, "123456789012+12345", "", 69, 1, 151, 330, 154 },
+ /* 86*/ { BARCODE_UPCE, -1, "1234567", "", 50, 1, 51, 134, 116 },
+ /* 87*/ { BARCODE_UPCE, COMPLIANT_HEIGHT, "1234567", "", 69, 1, 51, 134, 154 },
+ /* 88*/ { BARCODE_UPCE_CHK, -1, "12345670", "", 50, 1, 51, 134, 116 },
+ /* 89*/ { BARCODE_UPCE_CHK, COMPLIANT_HEIGHT, "12345670", "", 69, 1, 51, 134, 154 },
+ /* 90*/ { BARCODE_UPCE, -1, "1234567+12", "", 50, 1, 78, 184, 116 },
+ /* 91*/ { BARCODE_UPCE, COMPLIANT_HEIGHT, "1234567+12", "", 69, 1, 78, 184, 154 },
+ /* 92*/ { BARCODE_UPCE_CHK, -1, "12345670+12", "", 50, 1, 78, 184, 116 },
+ /* 93*/ { BARCODE_UPCE_CHK, COMPLIANT_HEIGHT, "12345670+12", "", 69, 1, 78, 184, 154 },
+ /* 94*/ { BARCODE_UPCE, -1, "1234567+12345", "", 50, 1, 105, 238, 116 },
+ /* 95*/ { BARCODE_UPCE, COMPLIANT_HEIGHT, "1234567+12345", "", 69, 1, 105, 238, 154 },
+ /* 96*/ { BARCODE_UPCE_CHK, -1, "12345670+12345", "", 50, 1, 105, 238, 116 },
+ /* 97*/ { BARCODE_UPCE_CHK, COMPLIANT_HEIGHT, "12345670+12345", "", 69, 1, 105, 238, 154 },
+ /* 98*/ { BARCODE_POSTNET, -1, "12345678901", "", 12, 2, 123, 246, 24 },
+ /* 99*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, "12345678901", "", 5, 2, 123, 246, 10 },
+ /*100*/ { BARCODE_MSI_PLESSEY, -1, "1234567890", "", 50, 1, 127, 254, 116 },
+ /*101*/ { BARCODE_MSI_PLESSEY, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 127, 254, 116 },
+ /*102*/ { BARCODE_FIM, -1, "A", "", 50, 1, 17, 34, 100 },
+ /*103*/ { BARCODE_FIM, COMPLIANT_HEIGHT, "A", "", 20, 1, 17, 34, 40 },
+ /*104*/ { BARCODE_LOGMARS, -1, "1234567890", "", 50, 1, 191, 382, 116 },
+ /*105*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, "1234567890", "", 45.5, 1, 191, 382, 107 },
+ /*106*/ { BARCODE_PHARMA, -1, "123456", "", 50, 1, 58, 116, 100 },
+ /*107*/ { BARCODE_PHARMA, COMPLIANT_HEIGHT, "123456", "", 16, 1, 58, 116, 32 },
+ /*108*/ { BARCODE_PZN, -1, "123456", "", 50, 1, 142, 284, 116 },
+ /*109*/ { BARCODE_PZN, COMPLIANT_HEIGHT, "123456", "", 40, 1, 142, 284, 96 },
+ /*110*/ { BARCODE_PHARMA_TWO, -1, "12345678", "", 10, 2, 29, 58, 20 },
+ /*111*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, "12345678", "", 8, 2, 29, 58, 16 },
+ /*112*/ { BARCODE_PDF417, -1, "1234567890", "", 21, 7, 103, 206, 42 },
+ /*113*/ { BARCODE_PDF417, COMPLIANT_HEIGHT, "1234567890", "", 21, 7, 103, 206, 42 },
+ /*114*/ { BARCODE_PDF417COMP, -1, "1234567890", "", 21, 7, 69, 138, 42 },
+ /*115*/ { BARCODE_PDF417COMP, COMPLIANT_HEIGHT, "1234567890", "", 21, 7, 69, 138, 42 },
+ /*116*/ { BARCODE_MAXICODE, -1, "1234567890", "", 165, 33, 30, 299, 298 },
+ /*117*/ { BARCODE_MAXICODE, COMPLIANT_HEIGHT, "1234567890", "", 165, 33, 30, 299, 298 },
+ /*118*/ { BARCODE_QRCODE, -1, "1234567890AB", "", 21, 21, 21, 42, 42 },
+ /*119*/ { BARCODE_QRCODE, COMPLIANT_HEIGHT, "1234567890AB", "", 21, 21, 21, 42, 42 },
+ /*120*/ { BARCODE_CODE128B, -1, "1234567890", "", 50, 1, 145, 290, 116 },
+ /*121*/ { BARCODE_CODE128B, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 145, 290, 116 },
+ /*122*/ { BARCODE_AUSPOST, -1, "12345678901234567890123", "", 8, 3, 133, 266, 16 },
+ /*123*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, "12345678901234567890123", "", 9.5, 3, 133, 266, 19 },
+ /*124*/ { BARCODE_AUSREPLY, -1, "12345678", "", 8, 3, 73, 146, 16 },
+ /*125*/ { BARCODE_AUSREPLY, COMPLIANT_HEIGHT, "12345678", "", 9.5, 3, 73, 146, 19 },
+ /*126*/ { BARCODE_AUSROUTE, -1, "12345678", "", 8, 3, 73, 146, 16 },
+ /*127*/ { BARCODE_AUSROUTE, COMPLIANT_HEIGHT, "12345678", "", 9.5, 3, 73, 146, 19 },
+ /*128*/ { BARCODE_AUSREDIRECT, -1, "12345678", "", 8, 3, 73, 146, 16 },
+ /*129*/ { BARCODE_AUSREDIRECT, COMPLIANT_HEIGHT, "12345678", "", 9.5, 3, 73, 146, 19 },
+ /*130*/ { BARCODE_ISBNX, -1, "123456789", "", 50, 1, 95, 226, 116 },
+ /*131*/ { BARCODE_ISBNX, COMPLIANT_HEIGHT, "123456789", "", 69, 1, 95, 226, 154 },
+ /*132*/ { BARCODE_ISBNX, -1, "123456789+12", "", 50, 1, 122, 276, 116 },
+ /*133*/ { BARCODE_ISBNX, COMPLIANT_HEIGHT, "123456789+12", "", 69, 1, 122, 276, 154 },
+ /*134*/ { BARCODE_ISBNX, -1, "123456789+12345", "", 50, 1, 149, 330, 116 },
+ /*135*/ { BARCODE_ISBNX, COMPLIANT_HEIGHT, "123456789+12345", "", 69, 1, 149, 330, 154 },
+ /*136*/ { BARCODE_RM4SCC, -1, "1234567890", "", 8, 3, 91, 182, 16 },
+ /*137*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, "1234567890", "", 8, 3, 91, 182, 16 },
+ /*138*/ { BARCODE_DATAMATRIX, -1, "ABC", "", 10, 10, 10, 20, 20 },
+ /*139*/ { BARCODE_DATAMATRIX, COMPLIANT_HEIGHT, "ABC", "", 10, 10, 10, 20, 20 },
+ /*140*/ { BARCODE_EAN14, -1, "1234567890123", "", 50, 1, 134, 268, 116 },
+ /*141*/ { BARCODE_EAN14, COMPLIANT_HEIGHT, "1234567890123", "", 64, 1, 134, 268, 144 },
+ /*142*/ { BARCODE_VIN, -1, "12345678701234567", "", 50, 1, 246, 492, 116 },
+ /*143*/ { BARCODE_VIN, COMPLIANT_HEIGHT, "12345678701234567", "", 50, 1, 246, 492, 116 },
+ /*144*/ { BARCODE_CODABLOCKF, -1, "1234567890", "", 20, 2, 101, 242, 44 },
+ /*145*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, "1234567890", "", 20, 2, 101, 242, 44 },
+ /*146*/ { BARCODE_NVE18, -1, "12345678901234567", "", 50, 1, 156, 312, 116 },
+ /*147*/ { BARCODE_NVE18, COMPLIANT_HEIGHT, "12345678901234567", "", 64, 1, 156, 312, 144 },
+ /*148*/ { BARCODE_JAPANPOST, -1, "1234567890", "", 8, 3, 133, 266, 16 },
+ /*149*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, "1234567890", "", 6, 3, 133, 266, 12 },
+ /*150*/ { BARCODE_KOREAPOST, -1, "123456", "", 50, 1, 167, 334, 116 },
+ /*151*/ { BARCODE_KOREAPOST, COMPLIANT_HEIGHT, "123456", "", 50, 1, 167, 334, 116 },
+ /*152*/ { BARCODE_DBAR_STK, -1, "1234567890123", "", 13, 3, 50, 100, 26 },
+ /*153*/ { BARCODE_DBAR_STK, COMPLIANT_HEIGHT, "1234567890123", "", 13, 3, 50, 100, 26 },
+ /*154*/ { BARCODE_DBAR_OMNSTK, -1, "1234567890123", "", 69, 5, 50, 100, 138 },
+ /*155*/ { BARCODE_DBAR_OMNSTK, COMPLIANT_HEIGHT, "1234567890123", "", 69, 5, 50, 100, 138 },
+ /*156*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", "", 71, 5, 102, 204, 142 },
+ /*157*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, "[01]12345678901231", "", 71, 5, 102, 204, 142 },
+ /*158*/ { BARCODE_PLANET, -1, "12345678901", "", 12, 2, 123, 246, 24 },
+ /*159*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, "12345678901", "", 5, 2, 123, 246, 10 },
+ /*160*/ { BARCODE_MICROPDF417, -1, "1234567890", "", 12, 6, 82, 164, 24 },
+ /*161*/ { BARCODE_MICROPDF417, COMPLIANT_HEIGHT, "1234567890", "", 12, 6, 82, 164, 24 },
+ /*162*/ { BARCODE_USPS_IMAIL, -1, "12345678901234567890", "", 8, 3, 129, 258, 16 },
+ /*163*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, "12345678901234567890", "", 6, 3, 129, 258, 12 },
+ /*164*/ { BARCODE_PLESSEY, -1, "1234567890", "", 50, 1, 227, 454, 116 },
+ /*165*/ { BARCODE_PLESSEY, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 227, 454, 116 },
+ /*166*/ { BARCODE_TELEPEN_NUM, -1, "1234567890", "", 50, 1, 128, 256, 116 },
+ /*167*/ { BARCODE_TELEPEN_NUM, COMPLIANT_HEIGHT, "1234567890", "", 32, 1, 128, 256, 80 },
+ /*168*/ { BARCODE_ITF14, -1, "1234567890", "", 50, 1, 135, 330, 136 },
+ /*169*/ { BARCODE_ITF14, COMPLIANT_HEIGHT, "1234567890", "", 64, 1, 135, 330, 164 },
+ /*170*/ { BARCODE_KIX, -1, "123456ABCDE", "", 8, 3, 87, 174, 16 },
+ /*171*/ { BARCODE_KIX, COMPLIANT_HEIGHT, "123456ABCDE", "", 8, 3, 87, 174, 16 },
+ /*172*/ { BARCODE_AZTEC, -1, "1234567890AB", "", 15, 15, 15, 30, 30 },
+ /*173*/ { BARCODE_AZTEC, COMPLIANT_HEIGHT, "1234567890AB", "", 15, 15, 15, 30, 30 },
+ /*174*/ { BARCODE_DAFT, -1, "DAFTDAFTDAFTDAFT", "", 8, 3, 31, 62, 16 },
+ /*175*/ { BARCODE_DAFT, COMPLIANT_HEIGHT, "DAFTDAFTDAFTDAFT", "", 8, 3, 31, 62, 16 },
+ /*176*/ { BARCODE_DPD, -1, "0123456789012345678901234567", "", 50, 1, 189, 378, 116 },
+ /*177*/ { BARCODE_DPD, COMPLIANT_HEIGHT, "0123456789012345678901234567", "", 66.5, 1, 189, 378, 149 },
+ /*178*/ { BARCODE_MICROQR, -1, "12345", "", 11, 11, 11, 22, 22 },
+ /*179*/ { BARCODE_MICROQR, COMPLIANT_HEIGHT, "12345", "", 11, 11, 11, 22, 22 },
+ /*180*/ { BARCODE_HIBC_128, -1, "1234567890", "", 50, 1, 123, 246, 116 },
+ /*181*/ { BARCODE_HIBC_128, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 123, 246, 116 },
+ /*182*/ { BARCODE_HIBC_39, -1, "1234567890", "", 50, 1, 223, 446, 116 },
+ /*183*/ { BARCODE_HIBC_39, COMPLIANT_HEIGHT, "1234567890", "", 50, 1, 223, 446, 116 },
+ /*184*/ { BARCODE_HIBC_DM, -1, "ABC", "", 12, 12, 12, 24, 24 },
+ /*185*/ { BARCODE_HIBC_DM, COMPLIANT_HEIGHT, "ABC", "", 12, 12, 12, 24, 24 },
+ /*186*/ { BARCODE_HIBC_QR, -1, "1234567890AB", "", 21, 21, 21, 42, 42 },
+ /*187*/ { BARCODE_HIBC_QR, COMPLIANT_HEIGHT, "1234567890AB", "", 21, 21, 21, 42, 42 },
+ /*188*/ { BARCODE_HIBC_PDF, -1, "1234567890", "", 24, 8, 103, 206, 48 },
+ /*189*/ { BARCODE_HIBC_PDF, COMPLIANT_HEIGHT, "1234567890", "", 24, 8, 103, 206, 48 },
+ /*190*/ { BARCODE_HIBC_MICPDF, -1, "1234567890", "", 28, 14, 38, 76, 56 },
+ /*191*/ { BARCODE_HIBC_MICPDF, COMPLIANT_HEIGHT, "1234567890", "", 28, 14, 38, 76, 56 },
+ /*192*/ { BARCODE_HIBC_BLOCKF, -1, "1234567890", "", 30, 3, 101, 242, 64 },
+ /*193*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, "1234567890", "", 30, 3, 101, 242, 64 },
+ /*194*/ { BARCODE_HIBC_AZTEC, -1, "1234567890AB", "", 19, 19, 19, 38, 38 },
+ /*195*/ { BARCODE_HIBC_AZTEC, COMPLIANT_HEIGHT, "1234567890AB", "", 19, 19, 19, 38, 38 },
+ /*196*/ { BARCODE_DOTCODE, -1, "ABC", "", 11, 11, 16, 33, 23 },
+ /*197*/ { BARCODE_DOTCODE, COMPLIANT_HEIGHT, "ABC", "", 11, 11, 16, 33, 23 },
+ /*198*/ { BARCODE_HANXIN, -1, "1234567890AB", "", 23, 23, 23, 46, 46 },
+ /*199*/ { BARCODE_HANXIN, COMPLIANT_HEIGHT, "1234567890AB", "", 23, 23, 23, 46, 46 },
+ /*200*/ { BARCODE_MAILMARK, -1, "01000000000000000AA00AA0A", "", 10, 3, 155, 310, 20 },
+ /*201*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, "01000000000000000AA00AA0A", "", 8, 3, 155, 310, 16 },
+ /*202*/ { BARCODE_AZRUNE, -1, "255", "", 11, 11, 11, 22, 22 },
+ /*203*/ { BARCODE_AZRUNE, COMPLIANT_HEIGHT, "255", "", 11, 11, 11, 22, 22 },
+ /*204*/ { BARCODE_CODE32, -1, "12345678", "", 50, 1, 103, 206, 116 },
+ /*205*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, "12345678", "", 20, 1, 103, 206, 56 },
+ /*206*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01", 50, 7, 99, 234, 116 },
+ /*207*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, "123456789012", "[20]01", 81, 7, 99, 234, 178 },
+ /*208*/ { BARCODE_EANX_CC, -1, "123456789012+12", "[20]01", 50, 7, 126, 284, 116 },
+ /*209*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, "123456789012+12", "[20]01", 81, 7, 126, 284, 178 },
+ /*210*/ { BARCODE_EANX_CC, -1, "123456789012+12345", "[20]01", 50, 7, 153, 338, 116 },
+ /*211*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, "123456789012+12345", "[20]01", 81, 7, 153, 338, 178 },
+ /*212*/ { BARCODE_EANX_CC, -1, "1234567", "[20]01", 50, 8, 72, 172, 116 },
+ /*213*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, "1234567", "[20]01", 69, 8, 72, 172, 154 },
+ /*214*/ { BARCODE_EANX_CC, -1, "1234567+12", "[20]01", 50, 8, 99, 226, 116 },
+ /*215*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, "1234567+12", "[20]01", 69, 8, 99, 226, 154 },
+ /*216*/ { BARCODE_EANX_CC, -1, "1234567+12345", "[20]01", 50, 8, 126, 280, 116 },
+ /*217*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, "1234567+12345", "[20]01", 69, 8, 126, 280, 154 },
+ /*218*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01", 50, 5, 145, 290, 116 },
+ /*219*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, "[01]12345678901231", "[20]01", 71, 5, 145, 290, 158 },
+ /*220*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01", 21, 5, 100, 200, 58 },
+ /*221*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 40, 5, 100, 200, 96 },
+ /*222*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01", 19, 6, 79, 158, 54 },
+ /*223*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 19, 6, 79, 158, 54 },
+ /*224*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01", 41, 5, 134, 268, 98 },
+ /*225*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, "[01]12345678901231", "[20]01", 41, 5, 134, 268, 98 },
+ /*226*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]01", 50, 7, 99, 234, 116 },
+ /*227*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, "12345678901", "[20]01", 81, 7, 99, 234, 178 },
+ /*228*/ { BARCODE_UPCA_CC, -1, "12345678901+12", "[20]01", 50, 7, 128, 284, 116 },
+ /*229*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, "12345678901+12", "[20]01", 81, 7, 128, 284, 178 },
+ /*230*/ { BARCODE_UPCA_CC, -1, "12345678901+12345", "[20]01", 50, 7, 155, 338, 116 },
+ /*231*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, "12345678901+12345", "[20]01", 81, 7, 155, 338, 178 },
+ /*232*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01", 50, 9, 55, 142, 116 },
+ /*233*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, "1234567", "[20]01", 85, 9, 55, 142, 186 },
+ /*234*/ { BARCODE_UPCE_CC, -1, "1234567+12", "[20]01", 50, 9, 82, 192, 116 },
+ /*235*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, "1234567+12", "[20]01", 85, 9, 82, 192, 186 },
+ /*236*/ { BARCODE_UPCE_CC, -1, "1234567+12345", "[20]01", 50, 9, 109, 246, 116 },
+ /*237*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, "1234567+12345", "[20]01", 85, 9, 109, 246, 186 },
+ /*238*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]01", 24, 9, 56, 112, 48 },
+ /*239*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 24, 9, 56, 112, 48 },
+ /*240*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]01", 80, 11, 56, 112, 160 },
+ /*241*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 80, 11, 56, 112, 160 },
+ /*242*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "[20]01", 78, 9, 102, 204, 156 },
+ /*243*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, "[01]12345678901231", "[20]01", 78, 9, 102, 204, 156 },
+ /*244*/ { BARCODE_CHANNEL, -1, "01", "", 50, 1, 19, 38, 116 },
+ /*245*/ { BARCODE_CHANNEL, COMPLIANT_HEIGHT, "01", "", 20, 1, 19, 38, 56 },
+ /*246*/ { BARCODE_CODEONE, -1, "12345678901234567890", "", 16, 16, 18, 36, 32 },
+ /*247*/ { BARCODE_CODEONE, COMPLIANT_HEIGHT, "12345678901234567890", "", 16, 16, 18, 36, 32 },
+ /*248*/ { BARCODE_GRIDMATRIX, -1, "ABC", "", 18, 18, 18, 36, 36 },
+ /*249*/ { BARCODE_GRIDMATRIX, COMPLIANT_HEIGHT, "ABC", "", 18, 18, 18, 36, 36 },
+ /*250*/ { BARCODE_UPNQR, -1, "1234567890AB", "", 77, 77, 77, 154, 154 },
+ /*251*/ { BARCODE_UPNQR, COMPLIANT_HEIGHT, "1234567890AB", "", 77, 77, 77, 154, 154 },
+ /*252*/ { BARCODE_ULTRA, -1, "1234567890", "", 13, 13, 18, 36, 26 },
+ /*253*/ { BARCODE_ULTRA, COMPLIANT_HEIGHT, "1234567890", "", 13, 13, 18, 36, 26 },
+ /*254*/ { BARCODE_RMQR, -1, "12345", "", 11, 11, 27, 54, 22 },
+ /*255*/ { BARCODE_RMQR, COMPLIANT_HEIGHT, "12345", "", 11, 11, 27, 54, 22 },
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
@@ -264,17 +393,13 @@ static void test_buffer(int index, int generate, int debug) {
symbol = ZBarcode_Create();
assert_nonnull(symbol, "Symbol not created\n");
- symbol->symbology = data[i].symbology;
- symbol->input_mode = UNICODE_MODE;
- symbol->debug |= debug;
-
if (strlen(data[i].composite)) {
text = data[i].composite;
strcpy(symbol->primary, data[i].data);
} else {
text = data[i].data;
}
- length = (int) strlen(text);
+ length = testUtilSetSymbol(symbol, data[i].symbology, UNICODE_MODE, -1 /*eci*/, -1 /*option_1*/, -1, -1, data[i].output_options, text, -1, debug);
ret = ZBarcode_Encode(symbol, (unsigned char *) text, length);
assert_zero(ret, "i:%d ZBarcode_Encode(%s) ret %d != 0 (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt);
@@ -286,8 +411,9 @@ static void test_buffer(int index, int generate, int debug) {
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
if (generate) {
- printf(" /*%3d*/ { %s, \"%s\", \"%s\", %.8g, %d, %d, %d, %d },\n",
- i, testUtilBarcodeName(data[i].symbology), data[i].data, data[i].composite,
+ printf(" /*%3d*/ { %s, %s, \"%s\", \"%s\", %.8g, %d, %d, %d, %d },\n",
+ i, testUtilBarcodeName(data[i].symbology), testUtilOutputOptionsName(data[i].output_options),
+ data[i].data, data[i].composite,
symbol->height, symbol->rows, symbol->width, symbol->bitmap_width, symbol->bitmap_height);
} else {
assert_equal(symbol->height, data[i].expected_height, "i:%d (%s) symbol->height %.8g != %.8g\n", i, testUtilBarcodeName(data[i].symbology), symbol->height, data[i].expected_height);
@@ -1730,6 +1856,7 @@ static void test_height(int index, int generate, int debug) {
struct item {
int symbology;
+ int output_options;
float height;
char *data;
char *composite;
@@ -1744,408 +1871,585 @@ static void test_height(int index, int generate, int debug) {
const char *comment;
};
struct item data[] = {
- /* 0*/ { BARCODE_CODE11, 1, "1234567890", "", 0, 1, 1, 108, 216, 2, "" },
- /* 1*/ { BARCODE_CODE11, 4, "1234567890", "", 0, 4, 1, 108, 216, 8, "" },
- /* 2*/ { BARCODE_CODE11, 10, "1234567890", "", 0, 10, 1, 108, 216, 20, "" },
- /* 3*/ { BARCODE_C25STANDARD, 1, "1234567890", "", 0, 1, 1, 117, 234, 2, "" },
- /* 4*/ { BARCODE_C25STANDARD, 4, "1234567890", "", 0, 4, 1, 117, 234, 8, "" },
- /* 5*/ { BARCODE_C25STANDARD, 11, "1234567890", "", 0, 11, 1, 117, 234, 22, "" },
- /* 6*/ { BARCODE_C25INTER, 1, "1234567890", "", 0, 1, 1, 99, 198, 2, "" },
- /* 7*/ { BARCODE_C25INTER, 4, "1234567890", "", 0, 4, 1, 99, 198, 8, "" },
- /* 8*/ { BARCODE_C25INTER, 15, "1234567890", "", 0, 15, 1, 99, 198, 30, "" },
- /* 9*/ { BARCODE_C25IATA, 1, "1234567890", "", 0, 1, 1, 149, 298, 2, "" },
- /* 10*/ { BARCODE_C25IATA, 4, "1234567890", "", 0, 4, 1, 149, 298, 8, "" },
- /* 11*/ { BARCODE_C25IATA, 30, "1234567890", "", 0, 30, 1, 149, 298, 60, "" },
- /* 12*/ { BARCODE_C25LOGIC, 1, "1234567890", "", 0, 1, 1, 109, 218, 2, "" },
- /* 13*/ { BARCODE_C25LOGIC, 4, "1234567890", "", 0, 4, 1, 109, 218, 8, "" },
- /* 14*/ { BARCODE_C25LOGIC, 41, "1234567890", "", 0, 41, 1, 109, 218, 82, "" },
- /* 15*/ { BARCODE_C25IND, 1, "1234567890", "", 0, 1, 1, 159, 318, 2, "" },
- /* 16*/ { BARCODE_C25IND, 4, "1234567890", "", 0, 4, 1, 159, 318, 8, "" },
- /* 17*/ { BARCODE_C25IND, 21, "1234567890", "", 0, 21, 1, 159, 318, 42, "" },
- /* 18*/ { BARCODE_CODE39, 1, "1234567890", "", 0, 1, 1, 155, 310, 2, "" },
- /* 19*/ { BARCODE_CODE39, 4, "1", "", 0, 4, 1, 38, 76, 8, "" },
- /* 20*/ { BARCODE_CODE39, 17, "1234567890", "", 0, 17, 1, 155, 310, 34, "" },
- /* 21*/ { BARCODE_EXCODE39, 1, "1234567890", "", 0, 1, 1, 155, 310, 2, "" },
- /* 22*/ { BARCODE_EXCODE39, 4, "1234567890", "", 0, 4, 1, 155, 310, 8, "" },
- /* 23*/ { BARCODE_EXCODE39, 17, "1234567890", "", 0, 17, 1, 155, 310, 34, "" },
- /* 24*/ { BARCODE_EANX, 1, "123456789012", "", 0, 1, 1, 95, 226, 12, "EAN-13" },
- /* 25*/ { BARCODE_EANX, 4, "123456789012", "", 0, 4, 1, 95, 226, 18, "" },
- /* 26*/ { BARCODE_EANX, 69, "123456789012", "", 0, 69, 1, 95, 226, 148, "" },
- /* 27*/ { BARCODE_EANX, 55, "1234567", "", 0, 55, 1, 67, 162, 120, "EAN-8" },
- /* 28*/ { BARCODE_EANX, 66, "12345", "", 0, 66, 1, 47, 118, 132, "EAN-8" },
- /* 29*/ { BARCODE_EANX_CHK, 1, "1234567890128", "", 0, 1, 1, 95, 226, 12, "EAN-13" },
- /* 30*/ { BARCODE_EANX_CHK, 69, "1234567890128", "", 0, 69, 1, 95, 226, 148, "" },
- /* 31*/ { BARCODE_GS1_128, 1, "[01]12345678901231", "", 0, 1, 1, 134, 268, 2, "" },
- /* 32*/ { BARCODE_GS1_128, 4, "[01]12345678901231", "", 0, 4, 1, 134, 268, 8, "" },
- /* 33*/ { BARCODE_GS1_128, 5, "[01]12345678901231", "", 0, 5, 1, 134, 268, 10, "" },
- /* 34*/ { BARCODE_GS1_128, 50, "[01]12345678901231", "", 0, 50, 1, 134, 268, 100, "" },
- /* 35*/ { BARCODE_CODABAR, 1, "A0B", "", 0, 1, 1, 32, 64, 2, "" },
- /* 36*/ { BARCODE_CODABAR, 4, "A0B", "", 0, 4, 1, 32, 64, 8, "" },
- /* 37*/ { BARCODE_CODABAR, 26, "A0B", "", 0, 26, 1, 32, 64, 52, "" },
- /* 38*/ { BARCODE_CODE128, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
- /* 39*/ { BARCODE_CODE128, 4, "1234567890", "", 0, 4, 1, 90, 180, 8, "" },
- /* 40*/ { BARCODE_CODE128, 7, "1234567890", "", 0, 7, 1, 90, 180, 14, "" },
- /* 41*/ { BARCODE_DPLEIT, 1, "1234567890123", "", 0, 1, 1, 135, 270, 2, "" },
- /* 42*/ { BARCODE_DPLEIT, 4, "1234567890123", "", 0, 4, 1, 135, 270, 8, "" },
- /* 43*/ { BARCODE_DPIDENT, 1, "12345678901", "", 0, 1, 1, 117, 234, 2, "" },
- /* 44*/ { BARCODE_DPIDENT, 4, "12345678901", "", 0, 4, 1, 117, 234, 8, "" },
- /* 45*/ { BARCODE_CODE16K, -1, "1234567890", "", 0, 20, 2, 70, 162, 44, "2 rows" },
- /* 46*/ { BARCODE_CODE16K, 1, "1234567890", "", 0, 1, 2, 70, 162, 6, "" },
- /* 47*/ { BARCODE_CODE16K, 4, "1234567890", "", 0, 4, 2, 70, 162, 12, "" },
- /* 48*/ { BARCODE_CODE16K, 17, "1234567890", "", 0, 17, 2, 70, 162, 38, "" },
- /* 49*/ { BARCODE_CODE16K, 40, "1234567890", "", 0, 40, 2, 70, 162, 84, "" },
- /* 50*/ { BARCODE_CODE16K, -1, "12345678901234567890123456789012345678901234567890", "", 0, 60, 6, 70, 162, 124, "6 rows" },
- /* 51*/ { BARCODE_CODE16K, 30, "12345678901234567890123456789012345678901234567890", "", 0, 30, 6, 70, 162, 64, "" },
- /* 52*/ { BARCODE_CODE16K, 120, "12345678901234567890123456789012345678901234567890", "", 0, 120, 6, 70, 162, 244, "" },
- /* 53*/ { BARCODE_CODE49, -1, "1234567890", "", 0, 20, 2, 70, 162, 44, "2 rows" },
- /* 54*/ { BARCODE_CODE49, 1, "1234567890", "", 0, 1, 2, 70, 162, 6, "" },
- /* 55*/ { BARCODE_CODE49, 4, "1234567890", "", 0, 4, 2, 70, 162, 12, "" },
- /* 56*/ { BARCODE_CODE49, 18, "1234567890", "", 0, 18, 2, 70, 162, 40, "" },
- /* 57*/ { BARCODE_CODE49, 40, "1234567890", "", 0, 40, 2, 70, 162, 84, "" },
- /* 58*/ { BARCODE_CODE49, -1, "12345678901234567890", "", 0, 30, 3, 70, 162, 64, "3 rows" },
- /* 59*/ { BARCODE_CODE49, 15, "12345678901234567890", "", 0, 15, 3, 70, 162, 34, "" },
- /* 60*/ { BARCODE_CODE49, 45, "12345678901234567890", "", 0, 45, 3, 70, 162, 94, "" },
- /* 61*/ { BARCODE_CODE93, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "" },
- /* 62*/ { BARCODE_CODE93, 4, "1234567890", "", 0, 4, 1, 127, 254, 8, "" },
- /* 63*/ { BARCODE_CODE93, 26, "1234567890", "", 0, 26, 1, 127, 254, 52, "" },
- /* 64*/ { BARCODE_FLAT, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
- /* 65*/ { BARCODE_FLAT, 4, "1234567890", "", 0, 4, 1, 90, 180, 8, "" },
- /* 66*/ { BARCODE_DBAR_OMN, 1, "1234567890123", "", 0, 1, 1, 96, 192, 2, "" },
- /* 67*/ { BARCODE_DBAR_OMN, 4, "1234567890123", "", 0, 4, 1, 96, 192, 8, "" },
- /* 68*/ { BARCODE_DBAR_OMN, 12, "1234567890123", "", 0, 12, 1, 96, 192, 24, "" },
- /* 69*/ { BARCODE_DBAR_OMN, 33, "1234567890123", "", 0, 33, 1, 96, 192, 66, "" },
- /* 70*/ { BARCODE_DBAR_LTD, 1, "1234567890123", "", 0, 1, 1, 79, 158, 2, "" },
- /* 71*/ { BARCODE_DBAR_LTD, 4, "1234567890123", "", 0, 4, 1, 79, 158, 8, "" },
- /* 72*/ { BARCODE_DBAR_LTD, 9, "1234567890123", "", 0, 9, 1, 79, 158, 18, "" },
- /* 73*/ { BARCODE_DBAR_LTD, 10, "1234567890123", "", 0, 10, 1, 79, 158, 20, "" },
- /* 74*/ { BARCODE_DBAR_EXP, 1, "[01]12345678901231", "", 0, 1, 1, 134, 268, 2, "" },
- /* 75*/ { BARCODE_DBAR_EXP, 33, "[01]12345678901231", "", 0, 33, 1, 134, 268, 66, "" },
- /* 76*/ { BARCODE_DBAR_EXP, 34, "[01]12345678901231", "", 0, 34, 1, 134, 268, 68, "" },
- /* 77*/ { BARCODE_TELEPEN, 1, "1234567890", "", 0, 1, 1, 208, 416, 2, "" },
- /* 78*/ { BARCODE_TELEPEN, 4, "1234567890", "", 0, 4, 1, 208, 416, 8, "" },
- /* 79*/ { BARCODE_UPCA, 1, "12345678901", "", 0, 1, 1, 95, 226, 12, "" },
- /* 80*/ { BARCODE_UPCA, 4, "12345678901", "", 0, 4, 1, 95, 226, 18, "" },
- /* 81*/ { BARCODE_UPCA, 69, "12345678901", "", 0, 69, 1, 95, 226, 148, "" },
- /* 82*/ { BARCODE_UPCA_CHK, 1, "123456789012", "", 0, 1, 1, 95, 226, 12, "" },
- /* 83*/ { BARCODE_UPCE, 1, "1234567", "", 0, 1, 1, 51, 134, 12, "" },
- /* 84*/ { BARCODE_UPCE, 4, "1234567", "", 0, 4, 1, 51, 134, 18, "" },
- /* 85*/ { BARCODE_UPCE, 69, "1234567", "", 0, 69, 1, 51, 134, 148, "" },
- /* 86*/ { BARCODE_UPCE_CHK, 1, "12345670", "", 0, 1, 1, 51, 134, 12, "" },
- /* 87*/ { BARCODE_POSTNET, -1, "12345678901", "", 0, 12, 2, 123, 246, 24, "" },
- /* 88*/ { BARCODE_POSTNET, 1, "12345678901", "", 0, 1, 2, 123, 246, 2, "" },
- /* 89*/ { BARCODE_POSTNET, 4, "12345678901", "", 0, 4, 2, 123, 246, 8, "" },
- /* 90*/ { BARCODE_POSTNET, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
- /* 91*/ { BARCODE_POSTNET, 20, "12345678901", "", 0, 20, 2, 123, 246, 40, "" },
- /* 92*/ { BARCODE_MSI_PLESSEY, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "" },
- /* 93*/ { BARCODE_MSI_PLESSEY, 4, "1234567890", "", 0, 4, 1, 127, 254, 8, "" },
- /* 94*/ { BARCODE_FIM, 1, "A", "", 0, 1, 1, 17, 34, 2, "" },
- /* 95*/ { BARCODE_FIM, 4, "A", "", 0, 4, 1, 17, 34, 8, "" },
- /* 96*/ { BARCODE_FIM, 12, "A", "", 0, 12, 1, 17, 34, 24, "" },
- /* 97*/ { BARCODE_LOGMARS, 1, "1234567890", "", 0, 1, 1, 191, 382, 2, "" },
- /* 98*/ { BARCODE_LOGMARS, 4, "1234567890", "", 0, 4, 1, 191, 382, 8, "" },
- /* 99*/ { BARCODE_LOGMARS, 6, "1234567890", "", 0, 6, 1, 191, 382, 12, "" },
- /*100*/ { BARCODE_LOGMARS, 45, "1234567890", "", 0, 45, 1, 191, 382, 90, "" },
- /*101*/ { BARCODE_PHARMA, 1, "123456", "", 0, 1, 1, 58, 116, 2, "" },
- /*102*/ { BARCODE_PHARMA, 4, "123456", "", 0, 4, 1, 58, 116, 8, "" },
- /*103*/ { BARCODE_PHARMA, 15, "123456", "", 0, 15, 1, 58, 116, 30, "" },
- /*104*/ { BARCODE_PHARMA, 16, "123456", "", 0, 16, 1, 58, 116, 32, "" },
- /*105*/ { BARCODE_PZN, 1, "123456", "", 0, 1, 1, 142, 284, 2, "" },
- /*106*/ { BARCODE_PZN, 4, "123456", "", 0, 4, 1, 142, 284, 8, "" },
- /*107*/ { BARCODE_PZN, 17, "123456", "", 0, 17, 1, 142, 284, 34, "" },
- /*108*/ { BARCODE_PZN, 106, "123456", "", 0, 106, 1, 142, 284, 212, "" },
- /*109*/ { BARCODE_PHARMA_TWO, -1, "12345678", "", 0, 10, 2, 29, 58, 20, "" },
- /*110*/ { BARCODE_PHARMA_TWO, 1, "12345678", "", 0, 1, 2, 29, 58, 2, "" },
- /*111*/ { BARCODE_PHARMA_TWO, 4, "12345678", "", 0, 4, 2, 29, 58, 8, "" },
- /*112*/ { BARCODE_PHARMA_TWO, 15, "12345678", "", 0, 15, 2, 29, 58, 30, "" },
- /*113*/ { BARCODE_PHARMA_TWO, 20, "12345678", "", 0, 20, 2, 29, 58, 40, "" },
- /*114*/ { BARCODE_PHARMA_TWO, 30, "12345678", "", 0, 30, 2, 29, 58, 60, "" },
- /*115*/ { BARCODE_PDF417, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 4, 8, 120, 240, 8, "8 rows" },
- /*116*/ { BARCODE_PDF417, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 4, 8, 120, 240, 8, "" },
- /*117*/ { BARCODE_PDF417, 23, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 24, 8, 120, 240, 48, "" },
- /*118*/ { BARCODE_PDF417, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 24, 8, 120, 240, 48, "" },
- /*119*/ { BARCODE_PDF417, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 36, 12, 120, 240, 72, "12 rows" },
- /*120*/ { BARCODE_PDF417, 12, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 12, 12, 120, 240, 24, "" },
- /*121*/ { BARCODE_PDF417COMP, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", "", ZINT_WARN_NONCOMPLIANT, 4.5, 9, 86, 172, 9, "9 rows" },
- /*122*/ { BARCODE_PDF417COMP, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", "", ZINT_WARN_NONCOMPLIANT, 22.5, 9, 86, 172, 45, "" },
- /*123*/ { BARCODE_MAXICODE, 1, "1234567890", "", 0, 16.5, 33, 30, 299, 298, "Fixed size, symbol->height ignored" },
- /*124*/ { BARCODE_QRCODE, 1, "ABCD", "", 0, 21, 21, 21, 42, 42, "Fixed width-to-height ratio, symbol->height ignored" },
- /*125*/ { BARCODE_CODE128B, 1, "1234567890", "", 0, 1, 1, 145, 290, 2, "" },
- /*126*/ { BARCODE_CODE128B, 4, "1234567890", "", 0, 4, 1, 145, 290, 8, "" },
- /*127*/ { BARCODE_AUSPOST, -1, "12345678901234567890123", "", 0, 8, 3, 133, 266, 16, "" },
- /*128*/ { BARCODE_AUSPOST, 1, "12345678901234567890123", "", 0, 2.5, 3, 133, 266, 5, "" },
- /*129*/ { BARCODE_AUSPOST, 4, "12345678901234567890123", "", 0, 4, 3, 133, 266, 8, "" },
- /*130*/ { BARCODE_AUSPOST, 7, "12345678901234567890123", "", 0, 7, 3, 133, 266, 14, "" },
- /*131*/ { BARCODE_AUSPOST, 14, "12345678901234567890123", "", 0, 14.5, 3, 133, 266, 29, "" },
- /*132*/ { BARCODE_AUSREPLY, 14, "12345678", "", 0, 14.5, 3, 73, 146, 29, "" },
- /*133*/ { BARCODE_AUSROUTE, 7, "12345678", "", 0, 7, 3, 73, 146, 14, "" },
- /*134*/ { BARCODE_AUSREDIRECT, 14, "12345678", "", 0, 14.5, 3, 73, 146, 29, "" },
- /*135*/ { BARCODE_ISBNX, 1, "123456789", "", 0, 1, 1, 95, 226, 12, "" },
- /*136*/ { BARCODE_ISBNX, 4, "123456789", "", 0, 4, 1, 95, 226, 18, "" },
- /*137*/ { BARCODE_ISBNX, 69, "123456789", "", 0, 69, 1, 95, 226, 148, "" },
- /*138*/ { BARCODE_RM4SCC, -1, "1234567890", "", 0, 8, 3, 91, 182, 16, "" },
- /*139*/ { BARCODE_RM4SCC, 1, "1234567890", "", 0, 2.5, 3, 91, 182, 5, "" },
- /*140*/ { BARCODE_RM4SCC, 4, "1234567890", "", 0, 4, 3, 91, 182, 8, "" },
- /*141*/ { BARCODE_RM4SCC, 6, "1234567890", "", 0, 6.5, 3, 91, 182, 13, "" },
- /*142*/ { BARCODE_RM4SCC, 11, "1234567890", "", 0, 11, 3, 91, 182, 22, "" },
- /*143*/ { BARCODE_RM4SCC, 16, "1234567890", "", 0, 16, 3, 91, 182, 32, "" },
- /*144*/ { BARCODE_DATAMATRIX, 1, "ABCD", "", 0, 12, 12, 12, 24, 24, "Fixed width-to-height ratio, symbol->height ignored" },
- /*145*/ { BARCODE_EAN14, 1, "1234567890123", "", 0, 1, 1, 134, 268, 2, "" },
- /*146*/ { BARCODE_EAN14, 4, "1234567890123", "", 0, 4, 1, 134, 268, 8, "" },
- /*147*/ { BARCODE_EAN14, 5, "1234567890123", "", 0, 5, 1, 134, 268, 10, "" },
- /*148*/ { BARCODE_VIN, 1, "12345678701234567", "", 0, 1, 1, 246, 492, 2, "" },
- /*149*/ { BARCODE_VIN, 4, "12345678701234567", "", 0, 4, 1, 246, 492, 8, "" },
- /*150*/ { BARCODE_CODABLOCKF, -1, "1234567890", "", 0, 20, 2, 101, 242, 44, "2 rows" },
- /*151*/ { BARCODE_CODABLOCKF, 1, "1234567890", "", 0, 1, 2, 101, 242, 6, "" },
- /*152*/ { BARCODE_CODABLOCKF, 4, "1234567890", "", 0, 4, 2, 101, 242, 12, "" },
- /*153*/ { BARCODE_CODABLOCKF, 30, "1234567890", "", 0, 30, 2, 101, 242, 64, "" },
- /*154*/ { BARCODE_CODABLOCKF, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 110, 11, 156, 352, 224, "11 rows, 14 cols" },
- /*155*/ { BARCODE_CODABLOCKF, 88, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 88, 11, 156, 352, 180, "" },
- /*156*/ { BARCODE_CODABLOCKF, 220, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 220, 11, 156, 352, 444, "" },
- /*157*/ { BARCODE_CODABLOCKF, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 110, 11, 167, 374, 224, "11 rows, 15 cols" },
- /*158*/ { BARCODE_CODABLOCKF, 88, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 88, 11, 167, 374, 180, "" },
- /*159*/ { BARCODE_NVE18, 1, "12345678901234567", "", 0, 1, 1, 156, 312, 2, "" },
- /*160*/ { BARCODE_NVE18, 4, "12345678901234567", "", 0, 4, 1, 156, 312, 8, "" },
- /*161*/ { BARCODE_NVE18, 6, "12345678901234567", "", 0, 6, 1, 156, 312, 12, "" },
- /*162*/ { BARCODE_JAPANPOST, -1, "1234567890", "", 0, 8, 3, 133, 266, 16, "" },
- /*163*/ { BARCODE_JAPANPOST, 1, "1234567890", "", 0, 2.5, 3, 133, 266, 5, "" },
- /*164*/ { BARCODE_JAPANPOST, 4, "1234567890", "", 0, 4, 3, 133, 266, 8, "" },
- /*165*/ { BARCODE_JAPANPOST, 7, "1234567890", "", 0, 7, 3, 133, 266, 14, "" },
- /*166*/ { BARCODE_JAPANPOST, 16, "1234567890", "", 0, 16, 3, 133, 266, 32, "" },
- /*167*/ { BARCODE_KOREAPOST, 1, "123456", "", 0, 1, 1, 167, 334, 2, "" },
- /*168*/ { BARCODE_KOREAPOST, 4, "123456", "", 0, 4, 1, 167, 334, 8, "" },
- /*169*/ { BARCODE_DBAR_STK, -1, "1234567890123", "", 0, 13, 3, 50, 100, 26, "" },
- /*170*/ { BARCODE_DBAR_STK, 1, "1234567890123", "", 0, 2, 3, 50, 100, 4, "" },
- /*171*/ { BARCODE_DBAR_STK, 4, "1234567890123", "", 0, 4.5, 3, 50, 100, 9, "" },
- /*172*/ { BARCODE_DBAR_STK, 12, "1234567890123", "", 0, 12, 3, 50, 100, 24, "" },
- /*173*/ { BARCODE_DBAR_STK, 13, "1234567890123", "", 0, 13, 3, 50, 100, 26, "" },
- /*174*/ { BARCODE_DBAR_STK, 24, "1234567890123", "", 0, 24, 3, 50, 100, 48, "" },
- /*175*/ { BARCODE_DBAR_STK, 26, "1234567890123", "", 0, 26, 3, 50, 100, 52, "" },
- /*176*/ { BARCODE_DBAR_OMNSTK, -1, "1234567890123", "", 0, 69, 5, 50, 100, 138, "" },
- /*177*/ { BARCODE_DBAR_OMNSTK, 1, "1234567890123", "", 0, 4, 5, 50, 100, 8, "" },
- /*178*/ { BARCODE_DBAR_OMNSTK, 4, "1234567890123", "", 0, 4, 5, 50, 100, 8, "" },
- /*179*/ { BARCODE_DBAR_OMNSTK, 68, "1234567890123", "", 0, 68, 5, 50, 100, 136, "" },
- /*180*/ { BARCODE_DBAR_OMNSTK, 69, "1234567890123", "", 0, 69, 5, 50, 100, 138, "" },
- /*181*/ { BARCODE_DBAR_OMNSTK, 150, "1234567890123", "", 0, 150, 5, 50, 100, 300, "" },
- /*182*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142, "2 rows" },
- /*183*/ { BARCODE_DBAR_EXPSTK, 1, "[01]12345678901231", "", 0, 4, 5, 102, 204, 8, "" },
- /*184*/ { BARCODE_DBAR_EXPSTK, 4, "[01]12345678901231", "", 0, 4, 5, 102, 204, 8, "" },
- /*185*/ { BARCODE_DBAR_EXPSTK, 71, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142, "" },
- /*186*/ { BARCODE_DBAR_EXPSTK, 76, "[01]12345678901231", "", 0, 76, 5, 102, 204, 152, "" },
- /*187*/ { BARCODE_DBAR_EXPSTK, -1, "[01]09501101530003[3920]123456789012345", "", 0, 108, 9, 102, 204, 216, "3 rows" },
- /*188*/ { BARCODE_DBAR_EXPSTK, 1, "[01]09501101530003[3920]123456789012345", "", 0, 7.5, 9, 102, 204, 15, "" },
- /*189*/ { BARCODE_DBAR_EXPSTK, 54, "[01]09501101530003[3920]123456789012345", "", 0, 54, 9, 102, 204, 108, "" },
- /*190*/ { BARCODE_DBAR_EXPSTK, 90, "[01]09501101530003[3920]123456789012345", "", 0, 90, 9, 102, 204, 180, "" },
- /*191*/ { BARCODE_DBAR_EXPSTK, 160, "[01]09501101530003[3920]123456789012345", "", 0, 160.5, 9, 102, 204, 321, "" },
- /*192*/ { BARCODE_PLANET, -1, "12345678901", "", 0, 12, 2, 123, 246, 24, "" },
- /*193*/ { BARCODE_PLANET, 1, "12345678901", "", 0, 1, 2, 123, 246, 2, "" },
- /*194*/ { BARCODE_PLANET, 4, "12345678901", "", 0, 4, 2, 123, 246, 8, "" },
- /*195*/ { BARCODE_PLANET, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
- /*196*/ { BARCODE_PLANET, 24, "12345678901", "", 0, 24, 2, 123, 246, 48, "" },
- /*197*/ { BARCODE_MICROPDF417, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 20, 10, 82, 164, 40, "10 rows" },
- /*198*/ { BARCODE_MICROPDF417, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 5, 10, 82, 164, 10, "" },
- /*199*/ { BARCODE_MICROPDF417, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 5, 10, 82, 164, 10, "" },
- /*200*/ { BARCODE_MICROPDF417, 19, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 20, 10, 82, 164, 40, "" },
- /*201*/ { BARCODE_MICROPDF417, 30, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 30, 10, 82, 164, 60, "" },
- /*202*/ { BARCODE_MICROPDF417, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 40, 20, 55, 110, 80, "20 rows" },
- /*203*/ { BARCODE_MICROPDF417, 20, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 20, 20, 55, 110, 40, "" },
- /*204*/ { BARCODE_USPS_IMAIL, -1, "12345678901234567890", "", 0, 8, 3, 129, 258, 16, "" },
- /*205*/ { BARCODE_USPS_IMAIL, 1, "12345678901234567890", "", 0, 2.5, 3, 129, 258, 5, "" },
- /*206*/ { BARCODE_USPS_IMAIL, 4, "12345678901234567890", "", 0, 4, 3, 129, 258, 8, "" },
- /*207*/ { BARCODE_USPS_IMAIL, 7, "12345678901234567890", "", 0, 7, 3, 129, 258, 14, "" },
- /*208*/ { BARCODE_PLESSEY, 1, "1234567890", "", 0, 1, 1, 227, 454, 2, "" },
- /*209*/ { BARCODE_PLESSEY, 4, "1234567890", "", 0, 4, 1, 227, 454, 8, "" },
- /*210*/ { BARCODE_TELEPEN_NUM, 1, "1234567890", "", 0, 1, 1, 128, 256, 2, "" },
- /*211*/ { BARCODE_TELEPEN_NUM, 4, "1234567890", "", 0, 4, 1, 128, 256, 8, "" },
- /*212*/ { BARCODE_ITF14, 1, "1234567890", "", 0, 1, 1, 135, 330, 22, "" },
- /*213*/ { BARCODE_ITF14, 4, "1234567890", "", 0, 4, 1, 135, 330, 28, "" },
- /*214*/ { BARCODE_ITF14, 64, "1234567890", "", 0, 64, 1, 135, 330, 148, "" },
- /*215*/ { BARCODE_KIX, -1, "1234567890", "", 0, 8, 3, 79, 158, 16, "" },
- /*216*/ { BARCODE_KIX, 1, "1234567890", "", 0, 2.5, 3, 79, 158, 5, "" },
- /*217*/ { BARCODE_KIX, 4, "1234567890", "", 0, 4, 3, 79, 158, 8, "" },
- /*218*/ { BARCODE_KIX, 6, "1234567890", "", 0, 6.5, 3, 79, 158, 13, "" },
- /*219*/ { BARCODE_KIX, 10, "1234567890", "", 0, 10.5, 3, 79, 158, 21, "" },
- /*220*/ { BARCODE_KIX, 16, "1234567890", "", 0, 16, 3, 79, 158, 32, "" },
- /*221*/ { BARCODE_AZTEC, 1, "1234567890AB", "", 0, 15, 15, 15, 30, 30, "Fixed width-to-height ratio, symbol->height ignored" },
- /*222*/ { BARCODE_DAFT, -1, "DAFTDAFTDAFTDAFT", "", 0, 8, 3, 31, 62, 16, "" },
- /*223*/ { BARCODE_DAFT, 1, "DAFTDAFTDAFTDAFT", "", 0, 2.5, 3, 31, 62, 5, "" },
- /*224*/ { BARCODE_DAFT, 4, "DAFTDAFTDAFTDAFT", "", 0, 4, 3, 31, 62, 8, "" },
- /*225*/ { BARCODE_DAFT, 6, "DAFTDAFTDAFTDAFT", "", 0, 6.5, 3, 31, 62, 13, "" },
- /*226*/ { BARCODE_DAFT, 12, "DAFTDAFTDAFTDAFT", "", 0, 12, 3, 31, 62, 24, "" },
- /*227*/ { BARCODE_DAFT, 16, "DAFTDAFTDAFTDAFT", "", 0, 16, 3, 31, 62, 32, "" },
- /*228*/ { BARCODE_DPD, 1, "0123456789012345678901234567", "", 0, 1, 1, 189, 378, 2, "" },
- /*229*/ { BARCODE_DPD, 4, "0123456789012345678901234567", "", 0, 4, 1, 189, 378, 8, "" },
- /*230*/ { BARCODE_DPD, 62, "0123456789012345678901234567", "", 0, 62, 1, 189, 378, 124, "" },
- /*231*/ { BARCODE_MICROQR, 1, "12345", "", 0, 11, 11, 11, 22, 22, "Fixed width-to-height ratio, symbol->height ignored" },
- /*232*/ { BARCODE_HIBC_128, 1, "1234567890", "", 0, 1, 1, 123, 246, 2, "" },
- /*233*/ { BARCODE_HIBC_128, 4, "1234567890", "", 0, 4, 1, 123, 246, 8, "" },
- /*234*/ { BARCODE_HIBC_39, 1, "1234567890", "", 0, 1, 1, 223, 446, 2, "" },
- /*235*/ { BARCODE_HIBC_39, 4, "1234567890", "", 0, 4, 1, 223, 446, 8, "" },
- /*236*/ { BARCODE_HIBC_DM, 1, "ABC", "", 0, 12, 12, 12, 24, 24, "Fixed width-to-height ratio, symbol->height ignored" },
- /*237*/ { BARCODE_HIBC_QR, 1, "1234567890AB", "", 0, 21, 21, 21, 42, 42, "Fixed width-to-height ratio, symbol->height ignored" },
- /*238*/ { BARCODE_HIBC_PDF, -1, "ABCDEF", "", 0, 21, 7, 103, 206, 42, "7 rows" },
- /*239*/ { BARCODE_HIBC_PDF, 1, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3.5, 7, 103, 206, 7, "" },
- /*240*/ { BARCODE_HIBC_PDF, 4, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3.5, 7, 103, 206, 7, "" },
- /*241*/ { BARCODE_HIBC_PDF, 36, "ABCDEF", "", 0, 35, 7, 103, 206, 70, "" },
- /*242*/ { BARCODE_HIBC_MICPDF, -1, "ABCDEF", "", 0, 12, 6, 82, 164, 24, "6 rows" },
- /*243*/ { BARCODE_HIBC_MICPDF, 1, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3, 6, 82, 164, 6, "" },
- /*244*/ { BARCODE_HIBC_MICPDF, 4, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3, 6, 82, 164, 6, "" },
- /*245*/ { BARCODE_HIBC_MICPDF, 47, "ABCDEF", "", 0, 48, 6, 82, 164, 96, "" },
- /*246*/ { BARCODE_HIBC_BLOCKF, -1, "1234567890", "", 0, 30, 3, 101, 242, 64, "3 rows" },
- /*247*/ { BARCODE_HIBC_BLOCKF, 1, "1234567890", "", 0, 1.5, 3, 101, 242, 7, "" },
- /*248*/ { BARCODE_HIBC_BLOCKF, 4, "1234567890", "", 0, 4.5, 3, 101, 242, 13, "" },
- /*249*/ { BARCODE_HIBC_BLOCKF, 23, "1234567890", "", 0, 22.5, 3, 101, 242, 49, "" },
- /*250*/ { BARCODE_HIBC_BLOCKF, 60, "1234567890", "", 0, 60, 3, 101, 242, 124, "" },
- /*251*/ { BARCODE_HIBC_AZTEC, 1, "1234567890AB", "", 0, 19, 19, 19, 38, 38, "Fixed width-to-height ratio, symbol->height ignored" },
- /*252*/ { BARCODE_DOTCODE, 1, "ABC", "", 0, 11, 11, 16, 33, 23, "Fixed width-to-height ratio, symbol->height ignored" },
- /*253*/ { BARCODE_HANXIN, 1, "1234567890AB", "", 0, 23, 23, 23, 46, 46, "Fixed width-to-height ratio, symbol->height ignored" },
- /*254*/ { BARCODE_MAILMARK, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
- /*255*/ { BARCODE_MAILMARK, 1, "01000000000000000AA00AA0A", "", 0, 2.5, 3, 155, 310, 5, "" },
- /*256*/ { BARCODE_MAILMARK, 4, "01000000000000000AA00AA0A", "", 0, 4, 3, 155, 310, 8, "" },
- /*257*/ { BARCODE_MAILMARK, 6, "01000000000000000AA00AA0A", "", 0, 6, 3, 155, 310, 12, "" },
- /*258*/ { BARCODE_MAILMARK, 10, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
- /*259*/ { BARCODE_MAILMARK, 15, "01000000000000000AA00AA0A", "", 0, 15, 3, 155, 310, 30, "" },
- /*260*/ { BARCODE_MAILMARK, 20, "01000000000000000AA00AA0A", "", 0, 20, 3, 155, 310, 40, "" },
- /*261*/ { BARCODE_AZRUNE, 1, "1", "", 0, 11, 11, 11, 22, 22, "Fixed width-to-height ratio, symbol->height ignored" },
- /*262*/ { BARCODE_CODE32, 1, "12345678", "", 0, 1, 1, 103, 206, 2, "" },
- /*263*/ { BARCODE_CODE32, 4, "12345678", "", 0, 4, 1, 103, 206, 8, "" },
- /*264*/ { BARCODE_CODE32, 19, "12345678", "", 0, 19, 1, 103, 206, 38, "" },
- /*265*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01", 0, 50, 7, 99, 234, 110, "EAN-13, CC-A 3 rows" },
- /*266*/ { BARCODE_EANX_CC, 1, "123456789012", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
- /*267*/ { BARCODE_EANX_CC, 4, "123456789012", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
- /*268*/ { BARCODE_EANX_CC, 81, "123456789012", "[20]01", 0, 81, 7, 99, 234, 172, "" },
- /*269*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 50, 9, 99, 234, 110, "EAN-13, CC-A 5 rows" },
- /*270*/ { BARCODE_EANX_CC, 1, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 16.5, 9, 99, 234, 43, "" },
- /*271*/ { BARCODE_EANX_CC, 4, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 16.5, 9, 99, 234, 43, "" },
- /*272*/ { BARCODE_EANX_CC, 20, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 20, 9, 99, 234, 50, "" },
- /*273*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 50, 11, 99, 234, 110, "EAN-13, CC-A 7 rows" },
- /*274*/ { BARCODE_EANX_CC, 1, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.5, 11, 99, 234, 51, "" },
- /*275*/ { BARCODE_EANX_CC, 4, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.5, 11, 99, 234, 51, "" },
- /*276*/ { BARCODE_EANX_CC, 40, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 40, 11, 99, 234, 90, "" },
- /*277*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 14, 99, 234, 110, "EAN-13, CC-B 10 rows" },
- /*278*/ { BARCODE_EANX_CC, 1, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 26.5, 14, 99, 234, 63, "" },
- /*279*/ { BARCODE_EANX_CC, 30, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 30, 14, 99, 234, 70, "" },
- /*280*/ { BARCODE_EANX_CC, -1, "1234567", "[20]01[90]123456789012345678901234", 0, 50, 10, 72, 172, 110, "EAN-8, CC-A 4 rows" },
- /*281*/ { BARCODE_EANX_CC, 1, "1234567", "[20]01[90]123456789012345678901234", 0, 18.5, 10, 72, 172, 47, "" },
- /*282*/ { BARCODE_EANX_CC, 4, "1234567", "[20]01[90]123456789012345678901234", 0, 18.5, 10, 72, 172, 47, "" },
- /*283*/ { BARCODE_EANX_CC, 69, "1234567", "[20]01[90]123456789012345678901234", 0, 69, 10, 72, 172, 148, "" },
- /*284*/ { BARCODE_EANX_CC, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 50, 24, 82, 192, 110, "EAN-8, CC-B 15 rows" },
- /*285*/ { BARCODE_EANX_CC, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 46.5, 24, 82, 192, 103, "" },
- /*286*/ { BARCODE_EANX_CC, 32, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 46.5, 24, 82, 192, 103, "" },
- /*287*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01", 0, 50, 5, 145, 290, 100, "CC-A 3 rows" },
- /*288*/ { BARCODE_GS1_128_CC, 1, "[01]12345678901231", "[20]01", 0, 7.5, 5, 145, 290, 15, "" },
- /*289*/ { BARCODE_GS1_128_CC, 4, "[01]12345678901231", "[20]01", 0, 7.5, 5, 145, 290, 15, "" },
- /*290*/ { BARCODE_GS1_128_CC, 12, "[01]12345678901231", "[20]01", 0, 12, 5, 145, 290, 24, "" },
- /*291*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 50, 9, 145, 290, 100, "CC-A 7 rows" },
- /*292*/ { BARCODE_GS1_128_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 15.5, 9, 145, 290, 31, "" },
- /*293*/ { BARCODE_GS1_128_CC, 52, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 52, 9, 145, 290, 104, "" },
- /*294*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 12, 145, 290, 100, "CC-B 10 rows" },
- /*295*/ { BARCODE_GS1_128_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 145, 290, 43, "" },
- /*296*/ { BARCODE_GS1_128_CC, 40, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40, 12, 145, 290, 80, "" },
- /*297*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 91.5, 32, 154, 308, 183, "CC-C 30 rows" },
- /*298*/ { BARCODE_GS1_128_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 91.5, 32, 154, 308, 183, "" },
- /*299*/ { BARCODE_GS1_128_CC, 100, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 100, 32, 154, 308, 200, "" },
- /*300*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01[90]1234567890", 0, 21, 5, 100, 200, 42, "CC-A 3 rows" },
- /*301*/ { BARCODE_DBAR_OMN_CC, 1, "1234567890123", "[20]01[90]1234567890", 0, 7.5, 5, 100, 200, 15, "" },
- /*302*/ { BARCODE_DBAR_OMN_CC, 4, "1234567890123", "[20]01[90]1234567890", 0, 7.5, 5, 100, 200, 15, "" },
- /*303*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01[90]12345678901234567890", 0, 23, 6, 100, 200, 46, "CC-A 4 rows" },
- /*304*/ { BARCODE_DBAR_OMN_CC, 1, "1234567890123", "[20]01[90]12345678901234567890", 0, 9.5, 6, 100, 200, 19, "" },
- /*305*/ { BARCODE_DBAR_OMN_CC, 4, "1234567890123", "[20]01[90]12345678901234567890", 0, 9.5, 6, 100, 200, 19, "" },
- /*306*/ { BARCODE_DBAR_OMN_CC, 20, "1234567890123", "[20]01[90]12345678901234567890", 0, 20, 6, 100, 200, 40, "" },
- /*307*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 35, 12, 100, 200, 70, "CC-B 10 rows" },
- /*308*/ { BARCODE_DBAR_OMN_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 100, 200, 43, "" },
- /*309*/ { BARCODE_DBAR_OMN_CC, 40, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40, 12, 100, 200, 80, "" },
- /*310*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 39, 14, 100, 200, 78, "CC-B 12 rows" },
- /*311*/ { BARCODE_DBAR_OMN_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 25.5, 14, 100, 200, 51, "" },
- /*312*/ { BARCODE_DBAR_OMN_CC, 36, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 36, 14, 100, 200, 72, "" },
- /*313*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 38, "CC-A 4 rows" },
- /*314*/ { BARCODE_DBAR_LTD_CC, 1, "1234567890123", "[20]01", 0, 9.5, 6, 79, 158, 19, "" },
- /*315*/ { BARCODE_DBAR_LTD_CC, 4, "1234567890123", "[20]01", 0, 9.5, 6, 79, 158, 19, "" },
- /*316*/ { BARCODE_DBAR_LTD_CC, 18, "1234567890123", "[20]01", 0, 18, 6, 79, 158, 36, "" },
- /*317*/ { BARCODE_DBAR_LTD_CC, 19, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 38, "" },
- /*318*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 25, 9, 79, 158, 50, "CC-A 7 rows" },
- /*319*/ { BARCODE_DBAR_LTD_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 15.5, 9, 79, 158, 31, "" },
- /*320*/ { BARCODE_DBAR_LTD_CC, 26, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 26, 9, 79, 158, 52, "" },
- /*321*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 51, 22, 88, 176, 102, "CC-B 20 rows" },
- /*322*/ { BARCODE_DBAR_LTD_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 41.5, 22, 88, 176, 83, "" },
- /*323*/ { BARCODE_DBAR_LTD_CC, 50, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 50, 22, 88, 176, 100, "" },
- /*324*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 82, "CC-A 3 rows" },
- /*325*/ { BARCODE_DBAR_EXP_CC, 1, "[01]12345678901231", "[20]01", 0, 7.5, 5, 134, 268, 15, "" },
- /*326*/ { BARCODE_DBAR_EXP_CC, 4, "[01]12345678901231", "[20]01", 0, 7.5, 5, 134, 268, 15, "" },
- /*327*/ { BARCODE_DBAR_EXP_CC, 40, "[01]12345678901231", "[20]01", 0, 40, 5, 134, 268, 80, "" },
- /*328*/ { BARCODE_DBAR_EXP_CC, 41, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 82, "" },
- /*329*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 45, 7, 134, 268, 90, "CC-A 5 rows" },
- /*330*/ { BARCODE_DBAR_EXP_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 11.5, 7, 134, 268, 23, "" },
- /*331*/ { BARCODE_DBAR_EXP_CC, 50, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 50, 7, 134, 268, 100, "" },
- /*332*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 55, 12, 134, 268, 110, "CC-B 10 rows" },
- /*333*/ { BARCODE_DBAR_EXP_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 134, 268, 43, "" },
- /*334*/ { BARCODE_DBAR_EXP_CC, 46, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 46, 12, 134, 268, 92, "" },
- /*335*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]01", 0, 50, 7, 99, 234, 110, "CC-A 3 rows" },
- /*336*/ { BARCODE_UPCA_CC, 1, "12345678901", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
- /*337*/ { BARCODE_UPCA_CC, 4, "12345678901", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
- /*338*/ { BARCODE_UPCA_CC, 81, "12345678901", "[20]01", 0, 81, 7, 99, 234, 172, "" },
- /*339*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 50, 10, 99, 234, 110, "CC-A 6 rows" },
- /*340*/ { BARCODE_UPCA_CC, 1, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 18.5, 10, 99, 234, 47, "" },
- /*341*/ { BARCODE_UPCA_CC, 4, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 18.5, 10, 99, 234, 47, "" },
- /*342*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 50, 16, 99, 234, 110, "CC-B 12 rows" },
- /*343*/ { BARCODE_UPCA_CC, 1, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 30.5, 16, 99, 234, 71, "" },
- /*344*/ { BARCODE_UPCA_CC, 51, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 51, 16, 99, 234, 112, "" },
- /*345*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01[90]123456789012345678", 0, 50, 11, 55, 142, 110, "CC-A 7 rows" },
- /*346*/ { BARCODE_UPCE_CC, 1, "1234567", "[20]01[90]123456789012345678", 0, 20.5, 11, 55, 142, 51, "" },
- /*347*/ { BARCODE_UPCE_CC, 4, "1234567", "[20]01[90]123456789012345678", 0, 20.5, 11, 55, 142, 51, "" },
- /*348*/ { BARCODE_UPCE_CC, 85, "1234567", "[20]01[90]123456789012345678", 0, 85, 11, 55, 142, 180, "" },
- /*349*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 50, 16, 55, 142, 110, "CC-A 12 rows" },
- /*350*/ { BARCODE_UPCE_CC, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 30.5, 16, 55, 142, 71, "" },
- /*351*/ { BARCODE_UPCE_CC, 49, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 49, 16, 55, 142, 108, "" },
- /*352*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 21, 55, 142, 110, "CC-B 17 rows" },
- /*353*/ { BARCODE_UPCE_CC, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40.5, 21, 55, 142, 91, "" },
- /*354*/ { BARCODE_UPCE_CC, 4, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40.5, 21, 55, 142, 91, "" },
- /*355*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "CC-B 23 rows" },
- /*356*/ { BARCODE_UPCE_CC, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "" },
- /*357*/ { BARCODE_UPCE_CC, 52, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "" },
- /*358*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "CC-A 5 rows" },
- /*359*/ { BARCODE_DBAR_STK_CC, 1, "1234567890123", "[20]01", 0, 13, 9, 56, 112, 26, "" },
- /*360*/ { BARCODE_DBAR_STK_CC, 4, "1234567890123", "[20]01", 0, 13, 9, 56, 112, 26, "" },
- /*361*/ { BARCODE_DBAR_STK_CC, 24, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "" },
- /*362*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 38, 16, 56, 112, 76, "CC-A 12 rows" },
- /*363*/ { BARCODE_DBAR_STK_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 27, 16, 56, 112, 54, "" },
- /*364*/ { BARCODE_DBAR_STK_CC, 25, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 27, 16, 56, 112, 54, "" },
- /*365*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 48, 21, 56, 112, 96, "CC-B 17 rows" },
- /*366*/ { BARCODE_DBAR_STK_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 37, 21, 56, 112, 74, "" },
- /*367*/ { BARCODE_DBAR_STK_CC, 59, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 59, 21, 56, 112, 118, "" },
- /*368*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]01[90]1234567890123456", 0, 82, 12, 56, 112, 164, "CC-A 6 rows" },
- /*369*/ { BARCODE_DBAR_OMNSTK_CC, 1, "1234567890123", "[20]01[90]1234567890123456", 0, 17, 12, 56, 112, 34, "" },
- /*370*/ { BARCODE_DBAR_OMNSTK_CC, 4, "1234567890123", "[20]01[90]1234567890123456", 0, 17, 12, 56, 112, 34, "" },
- /*371*/ { BARCODE_DBAR_OMNSTK_CC, 80, "1234567890123", "[20]01[90]1234567890123456", 0, 80, 12, 56, 112, 160, "" },
- /*372*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 94, 18, 56, 112, 188, "CC-A 12 rows" },
- /*373*/ { BARCODE_DBAR_OMNSTK_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 29, 18, 56, 112, 58, "" },
- /*374*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 104, 23, 56, 112, 208, "CC-B 17 rows" },
- /*375*/ { BARCODE_DBAR_OMNSTK_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 39, 23, 56, 112, 78, "" },
- /*376*/ { BARCODE_DBAR_OMNSTK_CC, 4, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 39, 23, 56, 112, 78, "" },
- /*377*/ { BARCODE_DBAR_OMNSTK_CC, 52, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 52, 23, 56, 112, 104, "" },
- /*378*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156, "3 rows, CC-A 3 rows" },
- /*379*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]12345678901231", "[20]01", 0, 11, 9, 102, 204, 22, "" },
- /*380*/ { BARCODE_DBAR_EXPSTK_CC, 4, "[01]12345678901231", "[20]01", 0, 11, 9, 102, 204, 22, "" },
- /*381*/ { BARCODE_DBAR_EXPSTK_CC, 77, "[01]12345678901231", "[20]01", 0, 77, 9, 102, 204, 154, "" },
- /*382*/ { BARCODE_DBAR_EXPSTK_CC, 78, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156, "" },
- /*383*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 189, 21, 102, 204, 378, "5 rows, CC-A 3 rows" },
- /*384*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 21.5, 21, 102, 204, 43, "" },
- /*385*/ { BARCODE_DBAR_EXPSTK_CC, 190, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 189, 21, 102, 204, 378, "" },
- /*386*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 80, 10, 102, 204, 160, "3 rows, CC-A 4 rows" },
- /*387*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 13, 10, 102, 204, 26, "" },
- /*388*/ { BARCODE_DBAR_EXPSTK_CC, 38, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 38, 10, 102, 204, 76, "" },
- /*389*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 92, 16, 102, 204, 184, "3 rows, CC-B 10 rows" },
- /*390*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 25, 16, 102, 204, 50, "" },
- /*391*/ { BARCODE_DBAR_EXPSTK_CC, 4, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 25, 16, 102, 204, 50, "" },
- /*392*/ { BARCODE_DBAR_EXPSTK_CC, 47, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 47, 16, 102, 204, 94, "" },
- /*393*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 203, 28, 102, 204, 406, "5 rows, CC-B 10 rows" },
- /*394*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 35.5, 28, 102, 204, 71, "" },
- /*395*/ { BARCODE_CHANNEL, 1, "1", "", 0, 1, 1, 19, 38, 2, "" },
- /*396*/ { BARCODE_CHANNEL, 4, "123", "", 0, 4, 1, 23, 46, 8, "" },
- /*397*/ { BARCODE_CODEONE, 1, "12345678901234567890", "", 0, 16, 16, 18, 36, 32, "Fixed height, symbol->height ignored" },
- /*398*/ { BARCODE_GRIDMATRIX, 1, "ABC", "", 0, 18, 18, 18, 36, 36, "Fixed width-to-height ratio, symbol->height ignored" },
- /*399*/ { BARCODE_UPNQR, 1, "1234567890AB", "", 0, 77, 77, 77, 154, 154, "Fixed width-to-height ratio, symbol->height ignored" },
- /*400*/ { BARCODE_ULTRA, 1, "1234567890", "", 0, 13, 13, 18, 36, 26, "Fixed width-to-height ratio, symbol->height ignored" },
- /*401*/ { BARCODE_RMQR, 1, "12345", "", 0, 11, 11, 27, 54, 22, "Fixed width-to-height ratio, symbol->height ignored" },
+ /* 0*/ { BARCODE_CODE11, -1, 1, "1234567890", "", 0, 1, 1, 108, 216, 2, "" },
+ /* 1*/ { BARCODE_CODE11, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 108, 216, 2, "TODO: Find doc" },
+ /* 2*/ { BARCODE_CODE11, -1, 4, "1234567890", "", 0, 4, 1, 108, 216, 8, "" },
+ /* 3*/ { BARCODE_CODE11, -1, 10, "1234567890", "", 0, 10, 1, 108, 216, 20, "" },
+ /* 4*/ { BARCODE_C25STANDARD, -1, 1, "1234567890", "", 0, 1, 1, 117, 234, 2, "" },
+ /* 5*/ { BARCODE_C25STANDARD, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 117, 234, 2, "No doc for C25 except C25INTER" },
+ /* 6*/ { BARCODE_C25STANDARD, -1, 4, "1234567890", "", 0, 4, 1, 117, 234, 8, "" },
+ /* 7*/ { BARCODE_C25STANDARD, -1, 11, "1234567890", "", 0, 11, 1, 117, 234, 22, "" },
+ /* 8*/ { BARCODE_C25INTER, -1, 1, "1234567890", "", 0, 1, 1, 99, 198, 2, "" },
+ /* 9*/ { BARCODE_C25INTER, -1, 15, "1234567890", "", 0, 15, 1, 99, 198, 30, "" },
+ /* 10*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, 15, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 15, 1, 99, 198, 30, "Min height data-length dependent" },
+ /* 11*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, 15.5, "1234567890", "", 0, 15.5, 1, 99, 198, 31, "" },
+ /* 12*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, 17.5, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 17.5, 1, 117, 234, 35, "Min height data-length dependent" },
+ /* 13*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, 17.75, "12345678901", "", 0, 18, 1, 117, 234, 36, "" },
+ /* 14*/ { BARCODE_C25IATA, -1, 1, "1234567890", "", 0, 1, 1, 149, 298, 2, "" },
+ /* 15*/ { BARCODE_C25IATA, -1, 4, "1234567890", "", 0, 4, 1, 149, 298, 8, "" },
+ /* 16*/ { BARCODE_C25IATA, -1, 30, "1234567890", "", 0, 30, 1, 149, 298, 60, "" },
+ /* 17*/ { BARCODE_C25LOGIC, -1, 1, "1234567890", "", 0, 1, 1, 109, 218, 2, "" },
+ /* 18*/ { BARCODE_C25LOGIC, -1, 4, "1234567890", "", 0, 4, 1, 109, 218, 8, "" },
+ /* 19*/ { BARCODE_C25LOGIC, -1, 41, "1234567890", "", 0, 41, 1, 109, 218, 82, "" },
+ /* 20*/ { BARCODE_C25IND, -1, 1, "1234567890", "", 0, 1, 1, 159, 318, 2, "" },
+ /* 21*/ { BARCODE_C25IND, -1, 4, "1234567890", "", 0, 4, 1, 159, 318, 8, "" },
+ /* 22*/ { BARCODE_C25IND, -1, 21, "1234567890", "", 0, 21, 1, 159, 318, 42, "" },
+ /* 23*/ { BARCODE_CODE39, -1, 1, "1234567890", "", 0, 1, 1, 155, 310, 2, "" },
+ /* 24*/ { BARCODE_CODE39, -1, 4, "1", "", 0, 4, 1, 38, 76, 8, "" },
+ /* 25*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, 4, "1", "", ZINT_WARN_NONCOMPLIANT, 4, 1, 38, 76, 8, "Min height data-length dependent" },
+ /* 26*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, 4.4, "1", "", 0, 4.5, 1, 38, 76, 9, "" },
+ /* 27*/ { BARCODE_CODE39, -1, 17, "1234567890", "", 0, 17, 1, 155, 310, 34, "" },
+ /* 28*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, 17, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 17, 1, 155, 310, 34, "Min height data-length dependent" },
+ /* 29*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, 17.85, "1234567890", "", 0, 18, 1, 155, 310, 36, "" },
+ /* 30*/ { BARCODE_EXCODE39, -1, 1, "1234567890", "", 0, 1, 1, 155, 310, 2, "" },
+ /* 31*/ { BARCODE_EXCODE39, -1, 17.8, "1234567890", "", 0, 18, 1, 155, 310, 36, "" },
+ /* 32*/ { BARCODE_EXCODE39, COMPLIANT_HEIGHT, 17.8, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 18, 1, 155, 310, 36, "" },
+ /* 33*/ { BARCODE_EXCODE39, COMPLIANT_HEIGHT, 17.9, "1234567890", "", 0, 18, 1, 155, 310, 36, "" },
+ /* 34*/ { BARCODE_EANX, -1, 1, "123456789012", "", 0, 1, 1, 95, 226, 12, "EAN-13" },
+ /* 35*/ { BARCODE_EANX, -1, 69, "123456789012", "", 0, 69, 1, 95, 226, 148, "" },
+ /* 36*/ { BARCODE_EANX, COMPLIANT_HEIGHT, 69, "123456789012", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /* 37*/ { BARCODE_EANX, COMPLIANT_HEIGHT, 69.25, "123456789012", "", 0, 69.5, 1, 95, 226, 149, "" },
+ /* 38*/ { BARCODE_EANX, -1, 55, "1234567", "", 0, 55, 1, 67, 162, 120, "EAN-8" },
+ /* 39*/ { BARCODE_EANX, COMPLIANT_HEIGHT, 55, "1234567", "", ZINT_WARN_NONCOMPLIANT, 55, 1, 67, 162, 120, "EAN-8" },
+ /* 40*/ { BARCODE_EANX, COMPLIANT_HEIGHT, 55.25, "1234567", "", 0, 55.5, 1, 67, 162, 121, "EAN-8" },
+ /* 41*/ { BARCODE_EANX_CHK, -1, 1, "1234567890128", "", 0, 1, 1, 95, 226, 12, "EAN-13" },
+ /* 42*/ { BARCODE_EANX_CHK, -1, 69, "1234567890128", "", 0, 69, 1, 95, 226, 148, "" },
+ /* 43*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, 69, "1234567890128", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /* 44*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, 69.25, "1234567890128", "", 0, 69.5, 1, 95, 226, 149, "" },
+ /* 45*/ { BARCODE_GS1_128, -1, 1, "[01]12345678901231", "", 0, 1, 1, 134, 268, 2, "" },
+ /* 46*/ { BARCODE_GS1_128, -1, 5.7, "[01]12345678901231", "", 0, 5.5, 1, 134, 268, 11, "" },
+ /* 47*/ { BARCODE_GS1_128, COMPLIANT_HEIGHT, 5.7, "[01]12345678901231", "", ZINT_WARN_NONCOMPLIANT, 5.5, 1, 134, 268, 11, "" },
+ /* 48*/ { BARCODE_GS1_128, COMPLIANT_HEIGHT, 5.725, "[01]12345678901231", "", 0, 5.5, 1, 134, 268, 11, "Note considered compliant even though rendered height same as before" },
+ /* 49*/ { BARCODE_GS1_128, -1, 50, "[01]12345678901231", "", 0, 50, 1, 134, 268, 100, "" },
+ /* 50*/ { BARCODE_CODABAR, -1, 1, "A0B", "", 0, 1, 1, 32, 64, 2, "" },
+ /* 51*/ { BARCODE_CODABAR, -1, 4, "A0B", "", 0, 4, 1, 32, 64, 8, "" },
+ /* 52*/ { BARCODE_CODABAR, -1, 26, "A0B", "", 0, 26, 1, 32, 64, 52, "" },
+ /* 53*/ { BARCODE_CODABAR, COMPLIANT_HEIGHT, 26, "A0B", "", ZINT_WARN_NONCOMPLIANT, 26, 1, 32, 64, 52, "" },
+ /* 54*/ { BARCODE_CODABAR, COMPLIANT_HEIGHT, 27, "A0B", "", 0, 27, 1, 32, 64, 54, "" },
+ /* 55*/ { BARCODE_CODE128, -1, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
+ /* 56*/ { BARCODE_CODE128, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
+ /* 57*/ { BARCODE_CODE128, -1, 4, "1234567890", "", 0, 4, 1, 90, 180, 8, "" },
+ /* 58*/ { BARCODE_CODE128, -1, 7, "1234567890", "", 0, 7, 1, 90, 180, 14, "" },
+ /* 59*/ { BARCODE_DPLEIT, -1, 1, "1234567890123", "", 0, 1, 1, 135, 270, 2, "" },
+ /* 60*/ { BARCODE_DPLEIT, COMPLIANT_HEIGHT, 1, "1234567890123", "", 0, 1, 1, 135, 270, 2, "TODO: Find doc" },
+ /* 61*/ { BARCODE_DPLEIT, -1, 4, "1234567890123", "", 0, 4, 1, 135, 270, 8, "" },
+ /* 62*/ { BARCODE_DPIDENT, -1, 1, "12345678901", "", 0, 1, 1, 117, 234, 2, "" },
+ /* 63*/ { BARCODE_DPIDENT, COMPLIANT_HEIGHT, 1, "12345678901", "", 0, 1, 1, 117, 234, 2, "TODO: Find doc" },
+ /* 64*/ { BARCODE_DPIDENT, -1, 4, "12345678901", "", 0, 4, 1, 117, 234, 8, "" },
+ /* 65*/ { BARCODE_CODE16K, -1, -1, "1234567890", "", 0, 20, 2, 70, 162, 44, "2 rows" },
+ /* 66*/ { BARCODE_CODE16K, -1, 1, "1234567890", "", 0, 1, 2, 70, 162, 6, "" },
+ /* 67*/ { BARCODE_CODE16K, -1, 4, "1234567890", "", 0, 4, 2, 70, 162, 12, "" },
+ /* 68*/ { BARCODE_CODE16K, -1, 16.75, "1234567890", "", 0, 17, 2, 70, 162, 38, "" },
+ /* 69*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, 16.75, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 17, 2, 70, 162, 38, "" },
+ /* 70*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, 17, "1234567890", "", 0, 17, 2, 70, 162, 38, "" },
+ /* 71*/ { BARCODE_CODE16K, -1, -1, "12345678901234567890123456789012345678901234567890", "", 0, 60, 6, 70, 162, 124, "6 rows" },
+ /* 72*/ { BARCODE_CODE16K, -1, 52.5, "12345678901234567890123456789012345678901234567890", "", 0, 54, 6, 70, 162, 112, "" },
+ /* 73*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, 52.5, "12345678901234567890123456789012345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 54, 6, 70, 162, 112, "" },
+ /* 74*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, 53, "12345678901234567890123456789012345678901234567890", "", 0, 54, 6, 70, 162, 112, "" },
+ /* 75*/ { BARCODE_CODE49, -1, -1, "1234567890", "", 0, 20, 2, 70, 162, 44, "2 rows" },
+ /* 76*/ { BARCODE_CODE49, -1, 1, "1234567890", "", 0, 1, 2, 70, 162, 6, "" },
+ /* 77*/ { BARCODE_CODE49, -1, 16.75, "1234567890", "", 0, 17, 2, 70, 162, 38, "" },
+ /* 78*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, 16.75, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 17, 2, 70, 162, 38, "" },
+ /* 79*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, 17, "1234567890", "", 0, 17, 2, 70, 162, 38, "" },
+ /* 80*/ { BARCODE_CODE49, -1, -1, "12345678901234567890", "", 0, 30, 3, 70, 162, 64, "3 rows" },
+ /* 81*/ { BARCODE_CODE49, -1, 25.75, "12345678901234567890", "", 0, 25.5, 3, 70, 162, 55, "" },
+ /* 82*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, 25.75, "12345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 25.5, 3, 70, 162, 55, "" },
+ /* 83*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, 26, "12345678901234567890", "", 0, 25.5, 3, 70, 162, 55, "" },
+ /* 84*/ { BARCODE_CODE93, -1, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "" },
+ /* 85*/ { BARCODE_CODE93, -1, 9.9, "1", "", 0, 10, 1, 46, 92, 20, "" },
+ /* 86*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, 9.9, "1", "", ZINT_WARN_NONCOMPLIANT, 10, 1, 46, 92, 20, "Min height data-length dependent" },
+ /* 87*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, 10, "1", "", 0, 10, 1, 46, 92, 20, "" },
+ /* 88*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, 22, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 22, 1, 127, 254, 44, "Min height data-length dependent" },
+ /* 89*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, 22.1, "1234567890", "", 0, 22, 1, 127, 254, 44, "" },
+ /* 90*/ { BARCODE_FLAT, -1, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
+ /* 91*/ { BARCODE_FLAT, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "TODO: Find doc" },
+ /* 92*/ { BARCODE_FLAT, -1, 4, "1234567890", "", 0, 4, 1, 90, 180, 8, "" },
+ /* 93*/ { BARCODE_DBAR_OMN, -1, 1, "1234567890123", "", 0, 1, 1, 96, 192, 2, "" },
+ /* 94*/ { BARCODE_DBAR_OMN, -1, 12.9, "1234567890123", "", 0, 13, 1, 96, 192, 26, "" },
+ /* 95*/ { BARCODE_DBAR_OMN, COMPLIANT_HEIGHT, 12.9, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 13, 1, 96, 192, 26, "" },
+ /* 96*/ { BARCODE_DBAR_OMN, COMPLIANT_HEIGHT, 13, "1234567890123", "", 0, 13, 1, 96, 192, 26, "" },
+ /* 97*/ { BARCODE_DBAR_LTD, -1, 1, "1234567890123", "", 0, 1, 1, 79, 158, 2, "" },
+ /* 98*/ { BARCODE_DBAR_LTD, -1, 9, "1234567890123", "", 0, 9, 1, 79, 158, 18, "" },
+ /* 99*/ { BARCODE_DBAR_LTD, COMPLIANT_HEIGHT, 9, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 9, 1, 79, 158, 18, "" },
+ /*100*/ { BARCODE_DBAR_LTD, COMPLIANT_HEIGHT, 10, "1234567890123", "", 0, 10, 1, 79, 158, 20, "" },
+ /*101*/ { BARCODE_DBAR_EXP, -1, 1, "[01]12345678901231", "", 0, 1, 1, 134, 268, 2, "" },
+ /*102*/ { BARCODE_DBAR_EXP, -1, 33, "[01]12345678901231", "", 0, 33, 1, 134, 268, 66, "" },
+ /*103*/ { BARCODE_DBAR_EXP, COMPLIANT_HEIGHT, 33, "[01]12345678901231", "", ZINT_WARN_NONCOMPLIANT, 33, 1, 134, 268, 66, "" },
+ /*104*/ { BARCODE_DBAR_EXP, COMPLIANT_HEIGHT, 34, "[01]12345678901231", "", 0, 34, 1, 134, 268, 68, "" },
+ /*105*/ { BARCODE_TELEPEN, -1, 1, "1234567890", "", 0, 1, 1, 208, 416, 2, "" },
+ /*106*/ { BARCODE_TELEPEN, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 208, 416, 2, "No known min" },
+ /*107*/ { BARCODE_TELEPEN, -1, 4, "1234567890", "", 0, 4, 1, 208, 416, 8, "" },
+ /*108*/ { BARCODE_UPCA, -1, 1, "12345678901", "", 0, 1, 1, 95, 226, 12, "" },
+ /*109*/ { BARCODE_UPCA, -1, 69, "12345678901", "", 0, 69, 1, 95, 226, 148, "" },
+ /*110*/ { BARCODE_UPCA, COMPLIANT_HEIGHT, 69, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /*111*/ { BARCODE_UPCA, COMPLIANT_HEIGHT, 69.25, "12345678901", "", 0, 69.5, 1, 95, 226, 149, "" },
+ /*112*/ { BARCODE_UPCA_CHK, -1, 1, "123456789012", "", 0, 1, 1, 95, 226, 12, "" },
+ /*113*/ { BARCODE_UPCA_CHK, COMPLIANT_HEIGHT, 69, "123456789012", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /*114*/ { BARCODE_UPCA_CHK, COMPLIANT_HEIGHT, 69.5, "123456789012", "", 0, 69.5, 1, 95, 226, 149, "" },
+ /*115*/ { BARCODE_UPCE, -1, 1, "1234567", "", 0, 1, 1, 51, 134, 12, "" },
+ /*116*/ { BARCODE_UPCE, -1, 69, "1234567", "", 0, 69, 1, 51, 134, 148, "" },
+ /*117*/ { BARCODE_UPCE, COMPLIANT_HEIGHT, 69, "1234567", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 51, 134, 148, "" },
+ /*118*/ { BARCODE_UPCE, COMPLIANT_HEIGHT, 69.25, "1234567", "", 0, 69.5, 1, 51, 134, 149, "" },
+ /*119*/ { BARCODE_UPCE_CHK, -1, 1, "12345670", "", 0, 1, 1, 51, 134, 12, "" },
+ /*120*/ { BARCODE_UPCE_CHK, COMPLIANT_HEIGHT, 69.24, "12345670", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 51, 134, 148, "" },
+ /*121*/ { BARCODE_UPCE_CHK, COMPLIANT_HEIGHT, 69.25, "12345670", "", 0, 69.5, 1, 51, 134, 149, "" },
+ /*122*/ { BARCODE_POSTNET, -1, -1, "12345678901", "", 0, 12, 2, 123, 246, 24, "" },
+ /*123*/ { BARCODE_POSTNET, -1, 1, "12345678901", "", 0, 1, 2, 123, 246, 2, "" },
+ /*124*/ { BARCODE_POSTNET, -1, 4.5, "12345678901", "", 0, 5, 2, 123, 246, 10, "" },
+ /*125*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 4.5, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 4.5, 2, 123, 246, 9, "" },
+ /*126*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 4.6, "12345678901", "", 0, 5, 2, 123, 246, 10, "" },
+ /*127*/ { BARCODE_POSTNET, -1, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
+ /*128*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
+ /*129*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 9.1, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 9, 2, 123, 246, 18, "" },
+ /*130*/ { BARCODE_POSTNET, -1, 20, "12345678901", "", 0, 20, 2, 123, 246, 40, "" },
+ /*131*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 20, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 20, 2, 123, 246, 40, "" },
+ /*132*/ { BARCODE_MSI_PLESSEY, -1, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "" },
+ /*133*/ { BARCODE_MSI_PLESSEY, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "TODO: Find doc" },
+ /*134*/ { BARCODE_MSI_PLESSEY, -1, 4, "1234567890", "", 0, 4, 1, 127, 254, 8, "" },
+ /*135*/ { BARCODE_FIM, -1, 1, "A", "", 0, 1, 1, 17, 34, 2, "" },
+ /*136*/ { BARCODE_FIM, -1, 12.7, "A", "", 0, 12.5, 1, 17, 34, 25, "" },
+ /*137*/ { BARCODE_FIM, COMPLIANT_HEIGHT, 12.7, "A", "", ZINT_WARN_NONCOMPLIANT, 12.5, 1, 17, 34, 25, "" },
+ /*138*/ { BARCODE_FIM, COMPLIANT_HEIGHT, 12.8, "A", "", 0, 13, 1, 17, 34, 26, "" },
+ /*139*/ { BARCODE_LOGMARS, -1, 1, "1234567890", "", 0, 1, 1, 191, 382, 2, "" },
+ /*140*/ { BARCODE_LOGMARS, -1, 6, "1234567890", "", 0, 6, 1, 191, 382, 12, "" },
+ /*141*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, 6, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 6, 1, 191, 382, 12, "" },
+ /*142*/ { BARCODE_LOGMARS, -1, 6.25, "1234567890", "", 0, 6.5, 1, 191, 382, 13, "" },
+ /*143*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, 6.25, "1234567890", "", 0, 6.5, 1, 191, 382, 13, "" },
+ /*144*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, 116, "1234567890", "", 0, 116, 1, 191, 382, 232, "" },
+ /*145*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, 117, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 117, 1, 191, 382, 234, "" },
+ /*146*/ { BARCODE_PHARMA, -1, 1, "123456", "", 0, 1, 1, 58, 116, 2, "" },
+ /*147*/ { BARCODE_PHARMA, -1, 15, "123456", "", 0, 15, 1, 58, 116, 30, "" },
+ /*148*/ { BARCODE_PHARMA, COMPLIANT_HEIGHT, 15, "123456", "", ZINT_WARN_NONCOMPLIANT, 15, 1, 58, 116, 30, "" },
+ /*149*/ { BARCODE_PHARMA, COMPLIANT_HEIGHT, 16, "123456", "", 0, 16, 1, 58, 116, 32, "" },
+ /*150*/ { BARCODE_PZN, -1, 1, "123456", "", 0, 1, 1, 142, 284, 2, "" },
+ /*151*/ { BARCODE_PZN, -1, 17.7, "123456", "", 0, 17.5, 1, 142, 284, 35, "" },
+ /*152*/ { BARCODE_PZN, COMPLIANT_HEIGHT, 17.7, "123456", "", ZINT_WARN_NONCOMPLIANT, 17.5, 1, 142, 284, 35, "" },
+ /*153*/ { BARCODE_PZN, COMPLIANT_HEIGHT, 17.8, "123456", "", 0, 18, 1, 142, 284, 36, "" },
+ /*154*/ { BARCODE_PHARMA_TWO, -1, -1, "12345678", "", 0, 10, 2, 29, 58, 20, "" },
+ /*155*/ { BARCODE_PHARMA_TWO, -1, 1, "12345678", "", 0, 1, 2, 29, 58, 2, "" },
+ /*156*/ { BARCODE_PHARMA_TWO, -1, 3.9, "12345678", "", 0, 4, 2, 29, 58, 8, "" },
+ /*157*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, 3.9, "12345678", "", ZINT_WARN_NONCOMPLIANT, 4, 2, 29, 58, 8, "" },
+ /*158*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, 4, "12345678", "", 0, 4, 2, 29, 58, 8, "" },
+ /*159*/ { BARCODE_PHARMA_TWO, -1, 15, "12345678", "", 0, 15, 2, 29, 58, 30, "" },
+ /*160*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, 15, "12345678", "", 0, 15, 2, 29, 58, 30, "" },
+ /*161*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, 15.1, "12345678", "", ZINT_WARN_NONCOMPLIANT, 15, 2, 29, 58, 30, "" },
+ /*162*/ { BARCODE_PDF417, -1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 4, 8, 120, 240, 8, "8 rows" },
+ /*163*/ { BARCODE_PDF417, -1, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 4, 8, 120, 240, 8, "" },
+ /*164*/ { BARCODE_PDF417, -1, 23, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 24, 8, 120, 240, 48, "" },
+ /*165*/ { BARCODE_PDF417, -1, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 24, 8, 120, 240, 48, "" },
+ /*166*/ { BARCODE_PDF417, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 36, 12, 120, 240, 72, "12 rows" },
+ /*167*/ { BARCODE_PDF417, -1, 12, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 12, 12, 120, 240, 24, "" },
+ /*168*/ { BARCODE_PDF417COMP, -1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", "", ZINT_WARN_NONCOMPLIANT, 4.5, 9, 86, 172, 9, "9 rows" },
+ /*169*/ { BARCODE_PDF417COMP, -1, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", "", ZINT_WARN_NONCOMPLIANT, 22.5, 9, 86, 172, 45, "" },
+ /*170*/ { BARCODE_MAXICODE, -1, 1, "1234567890", "", 0, 16.5, 33, 30, 299, 298, "Fixed size, symbol->height ignored" },
+ /*171*/ { BARCODE_QRCODE, -1, 1, "ABCD", "", 0, 21, 21, 21, 42, 42, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*172*/ { BARCODE_CODE128B, -1, 1, "1234567890", "", 0, 1, 1, 145, 290, 2, "" },
+ /*173*/ { BARCODE_CODE128B, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 145, 290, 2, "" },
+ /*174*/ { BARCODE_CODE128B, -1, 4, "1234567890", "", 0, 4, 1, 145, 290, 8, "" },
+ /*175*/ { BARCODE_AUSPOST, -1, -1, "12345678901234567890123", "", 0, 8, 3, 133, 266, 16, "" },
+ /*176*/ { BARCODE_AUSPOST, -1, 1, "12345678901234567890123", "", 0, 2.5, 3, 133, 266, 5, "" },
+ /*177*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 1, "12345678901234567890123", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 133, 266, 3, "" },
+ /*178*/ { BARCODE_AUSPOST, -1, 6.9, "12345678901234567890123", "", 0, 6.5, 3, 133, 266, 13, "" },
+ /*179*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 6.9, "12345678901234567890123", "", ZINT_WARN_NONCOMPLIANT, 7, 3, 133, 266, 14, "" },
+ /*180*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 7, "12345678901234567890123", "", 0, 7, 3, 133, 266, 14, "" },
+ /*181*/ { BARCODE_AUSPOST, -1, 14, "12345678901234567890123", "", 0, 14.5, 3, 133, 266, 29, "" },
+ /*182*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 14, "12345678901234567890123", "", 0, 13.5, 3, 133, 266, 27, "" },
+ /*183*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 14.1, "12345678901234567890123", "", ZINT_WARN_NONCOMPLIANT, 13.5, 3, 133, 266, 27, "" },
+ /*184*/ { BARCODE_AUSREPLY, -1, 14, "12345678", "", 0, 14.5, 3, 73, 146, 29, "" },
+ /*185*/ { BARCODE_AUSREPLY, COMPLIANT_HEIGHT, 14, "12345678", "", 0, 13.5, 3, 73, 146, 27, "" },
+ /*186*/ { BARCODE_AUSREPLY, COMPLIANT_HEIGHT, 14.25, "12345678", "", ZINT_WARN_NONCOMPLIANT, 14.5, 3, 73, 146, 29, "" },
+ /*187*/ { BARCODE_AUSROUTE, -1, 7, "12345678", "", 0, 7, 3, 73, 146, 14, "" },
+ /*188*/ { BARCODE_AUSROUTE, COMPLIANT_HEIGHT, 7, "12345678", "", 0, 7, 3, 73, 146, 14, "" },
+ /*189*/ { BARCODE_AUSREDIRECT, -1, 14, "12345678", "", 0, 14.5, 3, 73, 146, 29, "" },
+ /*190*/ { BARCODE_AUSREDIRECT, COMPLIANT_HEIGHT, 14, "12345678", "", 0, 13.5, 3, 73, 146, 27, "" },
+ /*191*/ { BARCODE_ISBNX, -1, 1, "123456789", "", 0, 1, 1, 95, 226, 12, "" },
+ /*192*/ { BARCODE_ISBNX, -1, 69, "123456789", "", 0, 69, 1, 95, 226, 148, "" },
+ /*193*/ { BARCODE_ISBNX, COMPLIANT_HEIGHT, 69, "123456789", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /*194*/ { BARCODE_ISBNX, COMPLIANT_HEIGHT, 69.5, "123456789", "", 0, 69.5, 1, 95, 226, 149, "" },
+ /*195*/ { BARCODE_RM4SCC, -1, -1, "1234567890", "", 0, 8, 3, 91, 182, 16, "" },
+ /*196*/ { BARCODE_RM4SCC, -1, 1, "1234567890", "", 0, 2.5, 3, 91, 182, 5, "" },
+ /*197*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 91, 182, 3, "" },
+ /*198*/ { BARCODE_RM4SCC, -1, 4, "1234567890", "", 0, 4, 3, 91, 182, 8, "" },
+ /*199*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 4, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 4, 3, 91, 182, 8, "" },
+ /*200*/ { BARCODE_RM4SCC, -1, 6, "1234567890", "", 0, 6.5, 3, 91, 182, 13, "" },
+ /*201*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 6, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 5.5, 3, 91, 182, 11, "" },
+ /*202*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 6.5, "1234567890", "", 0, 6.5, 3, 91, 182, 13, "" },
+ /*203*/ { BARCODE_RM4SCC, -1, 10.8, "1234567890", "", 0, 10.5, 3, 91, 182, 21, "" },
+ /*204*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 10.8, "1234567890", "", 0, 11, 3, 91, 182, 22, "" },
+ /*205*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 11, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 11, 3, 91, 182, 22, "" },
+ /*206*/ { BARCODE_RM4SCC, -1, 16, "1234567890", "", 0, 16, 3, 91, 182, 32, "" },
+ /*207*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 16, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 16, 3, 91, 182, 32, "" },
+ /*208*/ { BARCODE_DATAMATRIX, -1, 1, "ABCD", "", 0, 12, 12, 12, 24, 24, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*209*/ { BARCODE_EAN14, -1, 1, "1234567890123", "", 0, 1, 1, 134, 268, 2, "" },
+ /*210*/ { BARCODE_EAN14, -1, 5.7, "1234567890123", "", 0, 5.5, 1, 134, 268, 11, "" },
+ /*211*/ { BARCODE_EAN14, COMPLIANT_HEIGHT, 5.7, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 5.5, 1, 134, 268, 11, "" },
+ /*212*/ { BARCODE_EAN14, COMPLIANT_HEIGHT, 5.8, "1234567890123", "", 0, 6, 1, 134, 268, 12, "" },
+ /*213*/ { BARCODE_VIN, -1, 1, "12345678701234567", "", 0, 1, 1, 246, 492, 2, "" },
+ /*214*/ { BARCODE_VIN, COMPLIANT_HEIGHT, 1, "12345678701234567", "", 0, 1, 1, 246, 492, 2, "Doc unlikely" },
+ /*215*/ { BARCODE_VIN, -1, 4, "12345678701234567", "", 0, 4, 1, 246, 492, 8, "" },
+ /*216*/ { BARCODE_CODABLOCKF, -1, -1, "1234567890", "", 0, 20, 2, 101, 242, 44, "2 rows" },
+ /*217*/ { BARCODE_CODABLOCKF, -1, 1, "1234567890", "", 0, 1, 2, 101, 242, 6, "" },
+ /*218*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1, 2, 101, 242, 6, "" },
+ /*219*/ { BARCODE_CODABLOCKF, -1, 15.5, "1234567890", "", 0, 16, 2, 101, 242, 36, "" },
+ /*220*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 15.5, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 16, 2, 101, 242, 36, "" },
+ /*221*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 16, "1234567890", "", 0, 16, 2, 101, 242, 36, "" },
+ /*222*/ { BARCODE_CODABLOCKF, -1, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 110, 11, 156, 352, 224, "11 rows, 14 cols" },
+ /*223*/ { BARCODE_CODABLOCKF, -1, 87, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 88, 11, 156, 352, 180, "" },
+ /*224*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 87, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", ZINT_WARN_NONCOMPLIANT, 88, 11, 156, 352, 180, "" },
+ /*225*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 88, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 88, 11, 156, 352, 180, "" },
+ /*226*/ { BARCODE_CODABLOCKF, -1, 220, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 220, 11, 156, 352, 444, "" },
+ /*227*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 220, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 220, 11, 156, 352, 444, "" },
+ /*228*/ { BARCODE_CODABLOCKF, -1, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 110, 11, 167, 374, 224, "11 rows, 15 cols" },
+ /*229*/ { BARCODE_CODABLOCKF, -1, 93, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 93.5, 11, 167, 374, 191, "" },
+ /*230*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 93, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", ZINT_WARN_NONCOMPLIANT, 93.5, 11, 167, 374, 191, "" },
+ /*231*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 93.5, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 93.5, 11, 167, 374, 191, "" },
+ /*232*/ { BARCODE_NVE18, -1, 1, "12345678901234567", "", 0, 1, 1, 156, 312, 2, "" },
+ /*233*/ { BARCODE_NVE18, -1, 5.7, "12345678901234567", "", 0, 5.5, 1, 156, 312, 11, "" },
+ /*234*/ { BARCODE_NVE18, COMPLIANT_HEIGHT, 5.7, "12345678901234567", "", ZINT_WARN_NONCOMPLIANT, 5.5, 1, 156, 312, 11, "" },
+ /*235*/ { BARCODE_NVE18, COMPLIANT_HEIGHT, 5.8, "12345678901234567", "", 0, 6, 1, 156, 312, 12, "" },
+ /*236*/ { BARCODE_JAPANPOST, -1, -1, "1234567890", "", 0, 8, 3, 133, 266, 16, "" },
+ /*237*/ { BARCODE_JAPANPOST, -1, 1, "1234567890", "", 0, 2.5, 3, 133, 266, 5, "" },
+ /*238*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 133, 266, 3, "" },
+ /*239*/ { BARCODE_JAPANPOST, -1, 4.8, "1234567890", "", 0, 5, 3, 133, 266, 10, "" },
+ /*240*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 4.8, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 4.5, 3, 133, 266, 9, "" },
+ /*241*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 4.9, "1234567890", "", 0, 4.5, 3, 133, 266, 9, "" },
+ /*242*/ { BARCODE_JAPANPOST, -1, 7, "1234567890", "", 0, 7, 3, 133, 266, 14, "" },
+ /*243*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 7, "1234567890", "", 0, 7.5, 3, 133, 266, 15, "" },
+ /*244*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 7.5, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 7.5, 3, 133, 266, 15, "" },
+ /*245*/ { BARCODE_JAPANPOST, -1, 16, "1234567890", "", 0, 16, 3, 133, 266, 32, "" },
+ /*246*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 16, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 16.5, 3, 133, 266, 33, "" },
+ /*247*/ { BARCODE_KOREAPOST, -1, 1, "123456", "", 0, 1, 1, 167, 334, 2, "" },
+ /*248*/ { BARCODE_KOREAPOST, COMPLIANT_HEIGHT, 1, "123456", "", 0, 1, 1, 167, 334, 2, "TODO: Find doc" },
+ /*249*/ { BARCODE_KOREAPOST, -1, 4, "123456", "", 0, 4, 1, 167, 334, 8, "" },
+ /*250*/ { BARCODE_DBAR_STK, -1, -1, "1234567890123", "", 0, 13, 3, 50, 100, 26, "" },
+ /*251*/ { BARCODE_DBAR_STK, -1, 1, "1234567890123", "", 0, 2, 3, 50, 100, 4, "" },
+ /*252*/ { BARCODE_DBAR_STK, -1, 12, "1234567890123", "", 0, 12, 3, 50, 100, 24, "" },
+ /*253*/ { BARCODE_DBAR_STK, COMPLIANT_HEIGHT, 12, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 12, 3, 50, 100, 24, "" },
+ /*254*/ { BARCODE_DBAR_STK, COMPLIANT_HEIGHT, 13, "1234567890123", "", 0, 13, 3, 50, 100, 26, "" },
+ /*255*/ { BARCODE_DBAR_OMNSTK, -1, -1, "1234567890123", "", 0, 69, 5, 50, 100, 138, "" },
+ /*256*/ { BARCODE_DBAR_OMNSTK, -1, 1, "1234567890123", "", 0, 4, 5, 50, 100, 8, "" },
+ /*257*/ { BARCODE_DBAR_OMNSTK, -1, 68, "1234567890123", "", 0, 68, 5, 50, 100, 136, "" },
+ /*258*/ { BARCODE_DBAR_OMNSTK, COMPLIANT_HEIGHT, 68, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 68, 5, 50, 100, 136, "" },
+ /*259*/ { BARCODE_DBAR_OMNSTK, COMPLIANT_HEIGHT, 69, "1234567890123", "", 0, 69, 5, 50, 100, 138, "" },
+ /*260*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142, "2 rows" },
+ /*261*/ { BARCODE_DBAR_EXPSTK, -1, 1, "[01]12345678901231", "", 0, 4, 5, 102, 204, 8, "" },
+ /*262*/ { BARCODE_DBAR_EXPSTK, -1, 70, "[01]12345678901231", "", 0, 70, 5, 102, 204, 140, "" },
+ /*263*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, 70, "[01]12345678901231", "", ZINT_WARN_NONCOMPLIANT, 70, 5, 102, 204, 140, "" },
+ /*264*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, 71, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142, "" },
+ /*265*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]09501101530003[3920]123456789012345", "", 0, 108, 9, 102, 204, 216, "3 rows" },
+ /*266*/ { BARCODE_DBAR_EXPSTK, -1, 1, "[01]09501101530003[3920]123456789012345", "", 0, 7.5, 9, 102, 204, 15, "" },
+ /*267*/ { BARCODE_DBAR_EXPSTK, -1, 107.5, "[01]09501101530003[3920]123456789012345", "", 0, 108, 9, 102, 204, 216, "" },
+ /*268*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, 107.5, "[01]09501101530003[3920]123456789012345", "", ZINT_WARN_NONCOMPLIANT, 108, 9, 102, 204, 216, "" },
+ /*269*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, 108, "[01]09501101530003[3920]123456789012345", "", 0, 108, 9, 102, 204, 216, "" },
+ /*270*/ { BARCODE_PLANET, -1, -1, "12345678901", "", 0, 12, 2, 123, 246, 24, "" },
+ /*271*/ { BARCODE_PLANET, -1, 1, "12345678901", "", 0, 1, 2, 123, 246, 2, "" },
+ /*272*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 1, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 1.5, 2, 123, 246, 3, "" },
+ /*273*/ { BARCODE_PLANET, -1, 4.5, "12345678901", "", 0, 5, 2, 123, 246, 10, "" },
+ /*274*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 4.5, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 4.5, 2, 123, 246, 9, "" },
+ /*275*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 4.6, "12345678901", "", 0, 5, 2, 123, 246, 10, "" },
+ /*276*/ { BARCODE_PLANET, -1, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
+ /*277*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
+ /*278*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 9.1, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 9, 2, 123, 246, 18, "" },
+ /*279*/ { BARCODE_PLANET, -1, 24, "12345678901", "", 0, 24, 2, 123, 246, 48, "" },
+ /*280*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 24, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 24, 2, 123, 246, 48, "" },
+ /*281*/ { BARCODE_MICROPDF417, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 20, 10, 82, 164, 40, "10 rows" },
+ /*282*/ { BARCODE_MICROPDF417, -1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 5, 10, 82, 164, 10, "" },
+ /*283*/ { BARCODE_MICROPDF417, -1, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 5, 10, 82, 164, 10, "" },
+ /*284*/ { BARCODE_MICROPDF417, -1, 19, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 20, 10, 82, 164, 40, "" },
+ /*285*/ { BARCODE_MICROPDF417, -1, 30, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 30, 10, 82, 164, 60, "" },
+ /*286*/ { BARCODE_MICROPDF417, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 40, 20, 55, 110, 80, "20 rows" },
+ /*287*/ { BARCODE_MICROPDF417, -1, 20, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 20, 20, 55, 110, 40, "" },
+ /*288*/ { BARCODE_USPS_IMAIL, -1, -1, "12345678901234567890", "", 0, 8, 3, 129, 258, 16, "" },
+ /*289*/ { BARCODE_USPS_IMAIL, -1, 1, "12345678901234567890", "", 0, 2.5, 3, 129, 258, 5, "" },
+ /*290*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 1, "12345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 129, 258, 3, "" },
+ /*291*/ { BARCODE_USPS_IMAIL, -1, 4.8, "12345678901234567890", "", 0, 5, 3, 129, 258, 10, "" },
+ /*292*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 4.8, "12345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 4.5, 3, 129, 258, 9, "" },
+ /*293*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 4.9, "12345678901234567890", "", 0, 4.5, 3, 129, 258, 9, "" },
+ /*294*/ { BARCODE_USPS_IMAIL, -1, 7.7, "12345678901234567890", "", 0, 8, 3, 129, 258, 16, "" },
+ /*295*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 7.7, "12345678901234567890", "", 0, 7.5, 3, 129, 258, 15, "" },
+ /*296*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 7.8, "12345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 7.5, 3, 129, 258, 15, "" },
+ /*297*/ { BARCODE_PLESSEY, -1, 1, "1234567890", "", 0, 1, 1, 227, 454, 2, "" },
+ /*298*/ { BARCODE_PLESSEY, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 227, 454, 2, "TODO: Find doc" },
+ /*299*/ { BARCODE_PLESSEY, -1, 4, "1234567890", "", 0, 4, 1, 227, 454, 8, "" },
+ /*300*/ { BARCODE_TELEPEN_NUM, -1, 1, "1234567890", "", 0, 1, 1, 128, 256, 2, "" },
+ /*301*/ { BARCODE_TELEPEN_NUM, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 128, 256, 2, "No known min" },
+ /*302*/ { BARCODE_TELEPEN_NUM, -1, 4, "1234567890", "", 0, 4, 1, 128, 256, 8, "" },
+ /*303*/ { BARCODE_ITF14, -1, 1, "1234567890", "", 0, 1, 1, 135, 330, 22, "" },
+ /*304*/ { BARCODE_ITF14, -1, 5.7, "1234567890", "", 0, 5.5, 1, 135, 330, 31, "" },
+ /*305*/ { BARCODE_ITF14, COMPLIANT_HEIGHT, 5.7, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 5.5, 1, 135, 330, 31, "" },
+ /*306*/ { BARCODE_ITF14, COMPLIANT_HEIGHT, 5.8, "1234567890", "", 0, 6, 1, 135, 330, 32, "" },
+ /*307*/ { BARCODE_KIX, -1, -1, "1234567890", "", 0, 8, 3, 79, 158, 16, "" },
+ /*308*/ { BARCODE_KIX, -1, 1, "1234567890", "", 0, 2.5, 3, 79, 158, 5, "" },
+ /*309*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 79, 158, 3, "" },
+ /*310*/ { BARCODE_KIX, -1, 6.4, "1234567890", "", 0, 6.5, 3, 79, 158, 13, "" },
+ /*311*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 6.4, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 6.5, 3, 79, 158, 13, "" },
+ /*312*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 6.5, "1234567890", "", 0, 6.5, 3, 79, 158, 13, "" },
+ /*313*/ { BARCODE_KIX, -1, 10.8, "1234567890", "", 0, 10.5, 3, 79, 158, 21, "" },
+ /*314*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 10.8, "1234567890", "", 0, 11, 3, 79, 158, 22, "" },
+ /*315*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 10.9, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 11, 3, 79, 158, 22, "" },
+ /*316*/ { BARCODE_KIX, -1, 16, "1234567890", "", 0, 16, 3, 79, 158, 32, "" },
+ /*317*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 16, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 16, 3, 79, 158, 32, "" },
+ /*318*/ { BARCODE_AZTEC, -1, 1, "1234567890AB", "", 0, 15, 15, 15, 30, 30, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*319*/ { BARCODE_DAFT, -1, -1, "DAFTDAFTDAFTDAFT", "", 0, 8, 3, 31, 62, 16, "" },
+ /*320*/ { BARCODE_DAFT, -1, 1, "DAFTDAFTDAFTDAFT", "", 0, 2.5, 3, 31, 62, 5, "" },
+ /*321*/ { BARCODE_DAFT, COMPLIANT_HEIGHT, 1, "DAFTDAFTDAFTDAFT", "", 0, 2.5, 3, 31, 62, 5, "" },
+ /*322*/ { BARCODE_DAFT, -1, 4, "DAFTDAFTDAFTDAFT", "", 0, 4, 3, 31, 62, 8, "" },
+ /*323*/ { BARCODE_DAFT, -1, 6, "DAFTDAFTDAFTDAFT", "", 0, 6.5, 3, 31, 62, 13, "" },
+ /*324*/ { BARCODE_DAFT, -1, 12, "DAFTDAFTDAFTDAFT", "", 0, 12, 3, 31, 62, 24, "" },
+ /*325*/ { BARCODE_DAFT, -1, 16, "DAFTDAFTDAFTDAFT", "", 0, 16, 3, 31, 62, 32, "" },
+ /*326*/ { BARCODE_DAFT, COMPLIANT_HEIGHT, 16, "DAFTDAFTDAFTDAFT", "", 0, 16, 3, 31, 62, 32, "" },
+ /*327*/ { BARCODE_DPD, -1, 1, "0123456789012345678901234567", "", 0, 1, 1, 189, 378, 2, "" },
+ /*328*/ { BARCODE_DPD, -1, 62, "0123456789012345678901234567", "", 0, 62, 1, 189, 378, 124, "" },
+ /*329*/ { BARCODE_DPD, COMPLIANT_HEIGHT, 62, "0123456789012345678901234567", "", ZINT_WARN_NONCOMPLIANT, 62, 1, 189, 378, 124, "" },
+ /*330*/ { BARCODE_DPD, COMPLIANT_HEIGHT, 62.5, "0123456789012345678901234567", "", 0, 62.5, 1, 189, 378, 125, "" },
+ /*331*/ { BARCODE_MICROQR, -1, 1, "12345", "", 0, 11, 11, 11, 22, 22, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*332*/ { BARCODE_HIBC_128, -1, 1, "1234567890", "", 0, 1, 1, 123, 246, 2, "" },
+ /*333*/ { BARCODE_HIBC_128, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 123, 246, 2, "" },
+ /*334*/ { BARCODE_HIBC_128, -1, 4, "1234567890", "", 0, 4, 1, 123, 246, 8, "" },
+ /*335*/ { BARCODE_HIBC_39, -1, 1, "1234567890", "", 0, 1, 1, 223, 446, 2, "" },
+ /*336*/ { BARCODE_HIBC_39, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1, 1, 223, 446, 2, "" },
+ /*337*/ { BARCODE_HIBC_39, -1, 4, "1234567890", "", 0, 4, 1, 223, 446, 8, "" },
+ /*338*/ { BARCODE_HIBC_DM, -1, 1, "ABC", "", 0, 12, 12, 12, 24, 24, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*339*/ { BARCODE_HIBC_QR, -1, 1, "1234567890AB", "", 0, 21, 21, 21, 42, 42, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*340*/ { BARCODE_HIBC_PDF, -1, -1, "ABCDEF", "", 0, 21, 7, 103, 206, 42, "7 rows" },
+ /*341*/ { BARCODE_HIBC_PDF, -1, 1, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3.5, 7, 103, 206, 7, "" },
+ /*342*/ { BARCODE_HIBC_PDF, -1, 4, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3.5, 7, 103, 206, 7, "" },
+ /*343*/ { BARCODE_HIBC_PDF, -1, 36, "ABCDEF", "", 0, 35, 7, 103, 206, 70, "" },
+ /*344*/ { BARCODE_HIBC_MICPDF, -1, -1, "ABCDEF", "", 0, 12, 6, 82, 164, 24, "6 rows" },
+ /*345*/ { BARCODE_HIBC_MICPDF, -1, 1, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3, 6, 82, 164, 6, "" },
+ /*346*/ { BARCODE_HIBC_MICPDF, -1, 4, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3, 6, 82, 164, 6, "" },
+ /*347*/ { BARCODE_HIBC_MICPDF, -1, 47, "ABCDEF", "", 0, 48, 6, 82, 164, 96, "" },
+ /*348*/ { BARCODE_HIBC_BLOCKF, -1, -1, "1234567890", "", 0, 30, 3, 101, 242, 64, "3 rows" },
+ /*349*/ { BARCODE_HIBC_BLOCKF, -1, 1, "1234567890", "", 0, 1.5, 3, 101, 242, 7, "" },
+ /*350*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 101, 242, 7, "" },
+ /*351*/ { BARCODE_HIBC_BLOCKF, -1, 4, "1234567890", "", 0, 4.5, 3, 101, 242, 13, "" },
+ /*352*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 4, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 4.5, 3, 101, 242, 13, "" },
+ /*353*/ { BARCODE_HIBC_BLOCKF, -1, 23, "1234567890", "", 0, 22.5, 3, 101, 242, 49, "" },
+ /*354*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 23, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 22.5, 3, 101, 242, 49, "" },
+ /*355*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 24, "1234567890", "", 0, 24, 3, 101, 242, 52, "" },
+ /*356*/ { BARCODE_HIBC_BLOCKF, -1, 60, "1234567890", "", 0, 60, 3, 101, 242, 124, "" },
+ /*357*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 60, "1234567890", "", 0, 60, 3, 101, 242, 124, "" },
+ /*358*/ { BARCODE_HIBC_AZTEC, -1, 1, "1234567890AB", "", 0, 19, 19, 19, 38, 38, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*359*/ { BARCODE_DOTCODE, -1, 1, "ABC", "", 0, 11, 11, 16, 33, 23, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*360*/ { BARCODE_HANXIN, -1, 1, "1234567890AB", "", 0, 23, 23, 23, 46, 46, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*361*/ { BARCODE_MAILMARK, -1, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
+ /*362*/ { BARCODE_MAILMARK, -1, 1, "01000000000000000AA00AA0A", "", 0, 2.5, 3, 155, 310, 5, "" },
+ /*363*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 1, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 155, 310, 3, "" },
+ /*364*/ { BARCODE_MAILMARK, -1, 6.4, "01000000000000000AA00AA0A", "", 0, 6.5, 3, 155, 310, 13, "" },
+ /*365*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 6.4, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 6.5, 3, 155, 310, 13, "" },
+ /*366*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 6.5, "01000000000000000AA00AA0A", "", 0, 6.5, 3, 155, 310, 13, "" },
+ /*367*/ { BARCODE_MAILMARK, -1, 10, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
+ /*368*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 10, "01000000000000000AA00AA0A", "", 0, 9.5, 3, 155, 310, 19, "" },
+ /*369*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 11, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 11, 3, 155, 310, 22, "" },
+ /*370*/ { BARCODE_MAILMARK, -1, 15, "01000000000000000AA00AA0A", "", 0, 15, 3, 155, 310, 30, "" },
+ /*371*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 15, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 15, 3, 155, 310, 30, "" },
+ /*372*/ { BARCODE_MAILMARK, -1, 20, "01000000000000000AA00AA0A", "", 0, 20, 3, 155, 310, 40, "" },
+ /*373*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 20, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 20, 3, 155, 310, 40, "" },
+ /*374*/ { BARCODE_AZRUNE, -1, 1, "1", "", 0, 11, 11, 11, 22, 22, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*375*/ { BARCODE_CODE32, -1, 1, "12345678", "", 0, 1, 1, 103, 206, 2, "" },
+ /*376*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, 1, "12345678", "", ZINT_WARN_NONCOMPLIANT, 1, 1, 103, 206, 2, "" },
+ /*377*/ { BARCODE_CODE32, -1, 19, "12345678", "", 0, 19, 1, 103, 206, 38, "" },
+ /*378*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, 19, "12345678", "", ZINT_WARN_NONCOMPLIANT, 19, 1, 103, 206, 38, "" },
+ /*379*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, 20, "12345678", "", 0, 20, 1, 103, 206, 40, "" },
+ /*380*/ { BARCODE_EANX_CC, -1, -1, "123456789012", "[20]01", 0, 50, 7, 99, 234, 110, "EAN-13, CC-A 3 rows" },
+ /*381*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
+ /*382*/ { BARCODE_EANX_CC, -1, 81, "123456789012", "[20]01", 0, 81, 7, 99, 234, 172, "" },
+ /*383*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 81, "123456789012", "[20]01", ZINT_WARN_NONCOMPLIANT, 81, 7, 99, 234, 172, "" },
+ /*384*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 81.25, "123456789012", "[20]01", 0, 81.5, 7, 99, 234, 173, "" },
+ /*385*/ { BARCODE_EANX_CC, -1, -1, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 50, 9, 99, 234, 110, "EAN-13, CC-A 5 rows" },
+ /*386*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 16.5, 9, 99, 234, 43, "" },
+ /*387*/ { BARCODE_EANX_CC, -1, 85, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 85, 9, 99, 234, 180, "" },
+ /*388*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 85, "123456789012", "[20]01[90]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 85, 9, 99, 234, 180, "" },
+ /*389*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 85.25, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 85.5, 9, 99, 234, 181, "" },
+ /*390*/ { BARCODE_EANX_CC, -1, -1, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 50, 11, 99, 234, 110, "EAN-13, CC-A 7 rows" },
+ /*391*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.5, 11, 99, 234, 51, "" },
+ /*392*/ { BARCODE_EANX_CC, -1, 89, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 89, 11, 99, 234, 188, "" },
+ /*393*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 89, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", ZINT_WARN_NONCOMPLIANT, 89, 11, 99, 234, 188, "" },
+ /*394*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 89.25, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 89.5, 11, 99, 234, 189, "" },
+ /*395*/ { BARCODE_EANX_CC, -1, -1, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 14, 99, 234, 110, "EAN-13, CC-B 10 rows" },
+ /*396*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 26.5, 14, 99, 234, 63, "" },
+ /*397*/ { BARCODE_EANX_CC, -1, 95, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 95, 14, 99, 234, 200, "" },
+ /*398*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 95, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 95, 14, 99, 234, 200, "" },
+ /*399*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 95.25, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 95.5, 14, 99, 234, 201, "" },
+ /*400*/ { BARCODE_EANX_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234", 0, 50, 10, 72, 172, 110, "EAN-8, CC-A 4 rows" },
+ /*401*/ { BARCODE_EANX_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234", 0, 18.5, 10, 72, 172, 47, "" },
+ /*402*/ { BARCODE_EANX_CC, -1, 73, "1234567", "[20]01[90]123456789012345678901234", 0, 73, 10, 72, 172, 156, "" },
+ /*403*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 73, "1234567", "[20]01[90]123456789012345678901234", ZINT_WARN_NONCOMPLIANT, 73, 10, 72, 172, 156, "" },
+ /*404*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 73.25, "1234567", "[20]01[90]123456789012345678901234", 0, 73.5, 10, 72, 172, 157, "" },
+ /*405*/ { BARCODE_EANX_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 50, 24, 82, 192, 110, "EAN-8, CC-B 15 rows" },
+ /*406*/ { BARCODE_EANX_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 46.5, 24, 82, 192, 103, "" },
+ /*407*/ { BARCODE_EANX_CC, -1, 101, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 101, 24, 82, 192, 212, "" },
+ /*408*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 101, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 101, 24, 82, 192, 212, "" },
+ /*409*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 101.25, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 101.5, 24, 82, 192, 213, "" },
+ /*410*/ { BARCODE_GS1_128_CC, -1, -1, "[01]12345678901231", "[20]01", 0, 50, 5, 145, 290, 100, "CC-A 3 rows" },
+ /*411*/ { BARCODE_GS1_128_CC, -1, 1, "[01]12345678901231", "[20]01", 0, 7.5, 5, 145, 290, 15, "" },
+ /*412*/ { BARCODE_GS1_128_CC, -1, 12.5, "[01]12345678901231", "[20]01", 0, 12.5, 5, 145, 290, 25, "" },
+ /*413*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 12.5, "[01]12345678901231", "[20]01", ZINT_WARN_NONCOMPLIANT, 12.5, 5, 145, 290, 25, "" },
+ /*414*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 12.75, "[01]12345678901231", "[20]01", 0, 13, 5, 145, 290, 26, "" },
+ /*415*/ { BARCODE_GS1_128_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 50, 9, 145, 290, 100, "CC-A 7 rows" },
+ /*416*/ { BARCODE_GS1_128_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 15.5, 9, 145, 290, 31, "" },
+ /*417*/ { BARCODE_GS1_128_CC, -1, 20.7, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.5, 9, 145, 290, 41, "" },
+ /*418*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 20.7, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", ZINT_WARN_NONCOMPLIANT, 20.5, 9, 145, 290, 41, "" },
+ /*419*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 20.75, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 21, 9, 145, 290, 42, "" },
+ /*420*/ { BARCODE_GS1_128_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 12, 145, 290, 100, "CC-B 10 rows" },
+ /*421*/ { BARCODE_GS1_128_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 145, 290, 43, "" },
+ /*422*/ { BARCODE_GS1_128_CC, -1, 26.5, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 26.5, 12, 145, 290, 53, "" },
+ /*423*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 26.5, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 26.5, 12, 145, 290, 53, "" },
+ /*424*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 26.75, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 27, 12, 145, 290, 54, "" },
+ /*425*/ { BARCODE_GS1_128_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 91.5, 32, 154, 308, 183, "CC-C 30 rows" },
+ /*426*/ { BARCODE_GS1_128_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 91.5, 32, 154, 308, 183, "" },
+ /*427*/ { BARCODE_GS1_128_CC, -1, 96.5, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 96.5, 32, 154, 308, 193, "" },
+ /*428*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 96.5, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 96.5, 32, 154, 308, 193, "" },
+ /*429*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 96.75, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 97, 32, 154, 308, 194, "" },
+ /*430*/ { BARCODE_DBAR_OMN_CC, -1, -1, "1234567890123", "[20]01[90]1234567890", 0, 21, 5, 100, 200, 42, "CC-A 3 rows" },
+ /*431*/ { BARCODE_DBAR_OMN_CC, -1, 1, "1234567890123", "[20]01[90]1234567890", 0, 7.5, 5, 100, 200, 15, "" },
+ /*432*/ { BARCODE_DBAR_OMN_CC, -1, 19.9, "1234567890123", "[20]01[90]1234567890", 0, 20, 5, 100, 200, 40, "" },
+ /*433*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 19.9, "1234567890123", "[20]01[90]1234567890", ZINT_WARN_NONCOMPLIANT, 20, 5, 100, 200, 40, "" },
+ /*434*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 20, "1234567890123", "[20]01[90]1234567890", 0, 20, 5, 100, 200, 40, "" },
+ /*435*/ { BARCODE_DBAR_OMN_CC, -1, -1, "1234567890123", "[20]01[90]12345678901234567890", 0, 23, 6, 100, 200, 46, "CC-A 4 rows" },
+ /*436*/ { BARCODE_DBAR_OMN_CC, -1, 1, "1234567890123", "[20]01[90]12345678901234567890", 0, 9.5, 6, 100, 200, 19, "" },
+ /*437*/ { BARCODE_DBAR_OMN_CC, -1, 21.9, "1234567890123", "[20]01[90]12345678901234567890", 0, 22, 6, 100, 200, 44, "" },
+ /*438*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 21.9, "1234567890123", "[20]01[90]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 22, 6, 100, 200, 44, "" },
+ /*439*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 22, "1234567890123", "[20]01[90]12345678901234567890", 0, 22, 6, 100, 200, 44, "" },
+ /*440*/ { BARCODE_DBAR_OMN_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 35, 12, 100, 200, 70, "CC-B 10 rows" },
+ /*441*/ { BARCODE_DBAR_OMN_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 100, 200, 43, "" },
+ /*442*/ { BARCODE_DBAR_OMN_CC, -1, 33.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 34, 12, 100, 200, 68, "" },
+ /*443*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 33.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 34, 12, 100, 200, 68, "" },
+ /*444*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 34, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 34, 12, 100, 200, 68, "" },
+ /*445*/ { BARCODE_DBAR_OMN_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 39, 14, 100, 200, 78, "CC-B 12 rows" },
+ /*446*/ { BARCODE_DBAR_OMN_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 25.5, 14, 100, 200, 51, "" },
+ /*447*/ { BARCODE_DBAR_OMN_CC, -1, 37.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 38, 14, 100, 200, 76, "" },
+ /*448*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 37.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 38, 14, 100, 200, 76, "" },
+ /*449*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 38, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 38, 14, 100, 200, 76, "" },
+ /*450*/ { BARCODE_DBAR_LTD_CC, -1, -1, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 38, "CC-A 4 rows" },
+ /*451*/ { BARCODE_DBAR_LTD_CC, -1, 1, "1234567890123", "[20]01", 0, 9.5, 6, 79, 158, 19, "" },
+ /*452*/ { BARCODE_DBAR_LTD_CC, -1, 18, "1234567890123", "[20]01", 0, 18, 6, 79, 158, 36, "" },
+ /*453*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 18, "1234567890123", "[20]01", ZINT_WARN_NONCOMPLIANT, 18, 6, 79, 158, 36, "" },
+ /*454*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 19, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 38, "" },
+ /*455*/ { BARCODE_DBAR_LTD_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 25, 9, 79, 158, 50, "CC-A 7 rows" },
+ /*456*/ { BARCODE_DBAR_LTD_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 15.5, 9, 79, 158, 31, "" },
+ /*457*/ { BARCODE_DBAR_LTD_CC, -1, 24.9, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 25, 9, 79, 158, 50, "" },
+ /*458*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 24.9, "1234567890123", "[20]01[90]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 25, 9, 79, 158, 50, "" },
+ /*459*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 25, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 25, 9, 79, 158, 50, "" },
+ /*460*/ { BARCODE_DBAR_LTD_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 51, 22, 88, 176, 102, "CC-B 20 rows" },
+ /*461*/ { BARCODE_DBAR_LTD_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 41.5, 22, 88, 176, 83, "" },
+ /*462*/ { BARCODE_DBAR_LTD_CC, -1, 50.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 51, 22, 88, 176, 102, "" },
+ /*463*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 50.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 51, 22, 88, 176, 102, "" },
+ /*464*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 51, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 51, 22, 88, 176, 102, "" },
+ /*465*/ { BARCODE_DBAR_EXP_CC, -1, -1, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 82, "CC-A 3 rows" },
+ /*466*/ { BARCODE_DBAR_EXP_CC, -1, 1, "[01]12345678901231", "[20]01", 0, 7.5, 5, 134, 268, 15, "" },
+ /*467*/ { BARCODE_DBAR_EXP_CC, -1, 40, "[01]12345678901231", "[20]01", 0, 40, 5, 134, 268, 80, "" },
+ /*468*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 40, "[01]12345678901231", "[20]01", ZINT_WARN_NONCOMPLIANT, 40, 5, 134, 268, 80, "" },
+ /*469*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 41, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 82, "" },
+ /*470*/ { BARCODE_DBAR_EXP_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 45, 7, 134, 268, 90, "CC-A 5 rows" },
+ /*471*/ { BARCODE_DBAR_EXP_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 11.5, 7, 134, 268, 23, "" },
+ /*472*/ { BARCODE_DBAR_EXP_CC, -1, 44, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 44, 7, 134, 268, 88, "" },
+ /*473*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 44, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 44, 7, 134, 268, 88, "" },
+ /*474*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 45, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 45, 7, 134, 268, 90, "" },
+ /*475*/ { BARCODE_DBAR_EXP_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 55, 12, 134, 268, 110, "CC-B 10 rows" },
+ /*476*/ { BARCODE_DBAR_EXP_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 134, 268, 43, "" },
+ /*477*/ { BARCODE_DBAR_EXP_CC, -1, 54, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 54, 12, 134, 268, 108, "" },
+ /*478*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 54, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 54, 12, 134, 268, 108, "" },
+ /*479*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 55, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 55, 12, 134, 268, 110, "" },
+ /*480*/ { BARCODE_UPCA_CC, -1, -1, "12345678901", "[20]01", 0, 50, 7, 99, 234, 110, "CC-A 3 rows" },
+ /*481*/ { BARCODE_UPCA_CC, -1, 1, "12345678901", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
+ /*482*/ { BARCODE_UPCA_CC, -1, 81.24, "12345678901", "[20]01", 0, 81, 7, 99, 234, 172, "" },
+ /*483*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 81.24, "12345678901", "[20]01", ZINT_WARN_NONCOMPLIANT, 81, 7, 99, 234, 172, "" },
+ /*484*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 81.25, "12345678901", "[20]01", 0, 81.5, 7, 99, 234, 173, "" },
+ /*485*/ { BARCODE_UPCA_CC, -1, -1, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 50, 10, 99, 234, 110, "CC-A 6 rows" },
+ /*486*/ { BARCODE_UPCA_CC, -1, 1, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 18.5, 10, 99, 234, 47, "" },
+ /*487*/ { BARCODE_UPCA_CC, -1, 87.24, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 87, 10, 99, 234, 184, "" },
+ /*488*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 87.24, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", ZINT_WARN_NONCOMPLIANT, 87, 10, 99, 234, 184, "" },
+ /*489*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 87.25, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 87.5, 10, 99, 234, 185, "" },
+ /*490*/ { BARCODE_UPCA_CC, -1, -1, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 50, 16, 99, 234, 110, "CC-B 12 rows" },
+ /*491*/ { BARCODE_UPCA_CC, -1, 1, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 30.5, 16, 99, 234, 71, "" },
+ /*492*/ { BARCODE_UPCA_CC, -1, 99, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 99, 16, 99, 234, 208, "" },
+ /*493*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 99, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", ZINT_WARN_NONCOMPLIANT, 99, 16, 99, 234, 208, "" },
+ /*494*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 99.25, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 99.5, 16, 99, 234, 209, "" },
+ /*495*/ { BARCODE_UPCE_CC, -1, -1, "1234567", "[20]01[90]123456789012345678", 0, 50, 11, 55, 142, 110, "CC-A 7 rows" },
+ /*496*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[20]01[90]123456789012345678", 0, 20.5, 11, 55, 142, 51, "" },
+ /*497*/ { BARCODE_UPCE_CC, -1, 89, "1234567", "[20]01[90]123456789012345678", 0, 89, 11, 55, 142, 188, "" },
+ /*498*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 89, "1234567", "[20]01[90]123456789012345678", ZINT_WARN_NONCOMPLIANT, 89, 11, 55, 142, 188, "" },
+ /*499*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 89.25, "1234567", "[20]01[90]123456789012345678", 0, 89.5, 11, 55, 142, 189, "" },
+ /*500*/ { BARCODE_UPCE_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 50, 16, 55, 142, 110, "CC-A 12 rows" },
+ /*501*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 30.5, 16, 55, 142, 71, "" },
+ /*502*/ { BARCODE_UPCE_CC, -1, 99, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 99, 16, 55, 142, 208, "" },
+ /*503*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 99, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", ZINT_WARN_NONCOMPLIANT, 99, 16, 55, 142, 208, "" },
+ /*504*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 99.25, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 99.5, 16, 55, 142, 209, "" },
+ /*505*/ { BARCODE_UPCE_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 21, 55, 142, 110, "CC-B 17 rows" },
+ /*506*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40.5, 21, 55, 142, 91, "" },
+ /*507*/ { BARCODE_UPCE_CC, -1, 109, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 109, 21, 55, 142, 228, "" },
+ /*508*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 109, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 109, 21, 55, 142, 228, "" },
+ /*509*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 109.25, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 109.5, 21, 55, 142, 229, "" },
+ /*510*/ { BARCODE_UPCE_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "CC-B 23 rows" },
+ /*511*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "" },
+ /*512*/ { BARCODE_UPCE_CC, -1, 121, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 121, 27, 55, 142, 252, "" },
+ /*513*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 121, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", ZINT_WARN_NONCOMPLIANT, 121, 27, 55, 142, 252, "" },
+ /*514*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 121.25, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 121.5, 27, 55, 142, 253, "" },
+ /*515*/ { BARCODE_DBAR_STK_CC, -1, -1, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "CC-A 5 rows" },
+ /*516*/ { BARCODE_DBAR_STK_CC, -1, 1, "1234567890123", "[20]01", 0, 13, 9, 56, 112, 26, "" },
+ /*517*/ { BARCODE_DBAR_STK_CC, -1, 23.9, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "" },
+ /*518*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 23.9, "1234567890123", "[20]01", ZINT_WARN_NONCOMPLIANT, 24, 9, 56, 112, 48, "" },
+ /*519*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 24, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "" },
+ /*520*/ { BARCODE_DBAR_STK_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 38, 16, 56, 112, 76, "CC-A 12 rows" },
+ /*521*/ { BARCODE_DBAR_STK_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 27, 16, 56, 112, 54, "" },
+ /*522*/ { BARCODE_DBAR_STK_CC, -1, 37.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 38, 16, 56, 112, 76, "" },
+ /*523*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 37.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", ZINT_WARN_NONCOMPLIANT, 38, 16, 56, 112, 76, "" },
+ /*524*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 38, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 38, 16, 56, 112, 76, "" },
+ /*525*/ { BARCODE_DBAR_STK_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 48, 21, 56, 112, 96, "CC-B 17 rows" },
+ /*526*/ { BARCODE_DBAR_STK_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 37, 21, 56, 112, 74, "" },
+ /*527*/ { BARCODE_DBAR_STK_CC, -1, 47.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 48, 21, 56, 112, 96, "" },
+ /*528*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 47.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 48, 21, 56, 112, 96, "" },
+ /*529*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 48, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 48, 21, 56, 112, 96, "" },
+ /*530*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, "1234567890123", "[20]01[90]1234567890123456", 0, 82, 12, 56, 112, 164, "CC-A 6 rows" },
+ /*531*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "1234567890123", "[20]01[90]1234567890123456", 0, 17, 12, 56, 112, 34, "" },
+ /*532*/ { BARCODE_DBAR_OMNSTK_CC, -1, 81, "1234567890123", "[20]01[90]1234567890123456", 0, 81, 12, 56, 112, 162, "" },
+ /*533*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 81, "1234567890123", "[20]01[90]1234567890123456", ZINT_WARN_NONCOMPLIANT, 81, 12, 56, 112, 162, "" },
+ /*534*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 82, "1234567890123", "[20]01[90]1234567890123456", 0, 82, 12, 56, 112, 164, "" },
+ /*535*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 94, 18, 56, 112, 188, "CC-A 12 rows" },
+ /*536*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 29, 18, 56, 112, 58, "" },
+ /*537*/ { BARCODE_DBAR_OMNSTK_CC, -1, 93.5, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 94, 18, 56, 112, 188, "" },
+ /*538*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 93.5, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", ZINT_WARN_NONCOMPLIANT, 94, 18, 56, 112, 188, "" },
+ /*539*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 94, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 94, 18, 56, 112, 188, "" },
+ /*540*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 104, 23, 56, 112, 208, "CC-B 17 rows" },
+ /*541*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 39, 23, 56, 112, 78, "" },
+ /*542*/ { BARCODE_DBAR_OMNSTK_CC, -1, 103, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 103, 23, 56, 112, 206, "" },
+ /*543*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 103, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", ZINT_WARN_NONCOMPLIANT, 103, 23, 56, 112, 206, "" },
+ /*544*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 104, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 104, 23, 56, 112, 208, "" },
+ /*545*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156, "3 rows, CC-A 3 rows" },
+ /*546*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[01]12345678901231", "[20]01", 0, 11, 9, 102, 204, 22, "" },
+ /*547*/ { BARCODE_DBAR_EXPSTK_CC, -1, 77, "[01]12345678901231", "[20]01", 0, 77, 9, 102, 204, 154, "" },
+ /*548*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 77, "[01]12345678901231", "[20]01", ZINT_WARN_NONCOMPLIANT, 77, 9, 102, 204, 154, "" },
+ /*549*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 78, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156, "" },
+ /*550*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 189, 21, 102, 204, 378, "5 rows, CC-A 3 rows" },
+ /*551*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 21.5, 21, 102, 204, 43, "" },
+ /*552*/ { BARCODE_DBAR_EXPSTK_CC, -1, 188, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 189, 21, 102, 204, 378, "" },
+ /*553*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 188, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", ZINT_WARN_NONCOMPLIANT, 189, 21, 102, 204, 378, "" },
+ /*554*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 189, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 189, 21, 102, 204, 378, "" },
+ /*555*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 80, 10, 102, 204, 160, "3 rows, CC-A 4 rows" },
+ /*556*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 13, 10, 102, 204, 26, "" },
+ /*557*/ { BARCODE_DBAR_EXPSTK_CC, -1, 79, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 79, 10, 102, 204, 158, "" },
+ /*558*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 79, "[01]12345678901231", "[20]01[90]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 79, 10, 102, 204, 158, "" },
+ /*559*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 80, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 80, 10, 102, 204, 160, "" },
+ /*560*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 92, 16, 102, 204, 184, "3 rows, CC-B 10 rows" },
+ /*561*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 25, 16, 102, 204, 50, "" },
+ /*562*/ { BARCODE_DBAR_EXPSTK_CC, -1, 91, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 91, 16, 102, 204, 182, "" },
+ /*563*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 91, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 91, 16, 102, 204, 182, "" },
+ /*564*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 92, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 92, 16, 102, 204, 184, "" },
+ /*565*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 203, 28, 102, 204, 406, "5 rows, CC-B 10 rows" },
+ /*566*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 35.5, 28, 102, 204, 71, "" },
+ /*567*/ { BARCODE_DBAR_EXPSTK_CC, -1, 202, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 203, 28, 102, 204, 406, "" },
+ /*568*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 202, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 203, 28, 102, 204, 406, "" },
+ /*569*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 203, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 203, 28, 102, 204, 406, "" },
+ /*570*/ { BARCODE_CHANNEL, -1, 1, "1", "", 0, 1, 1, 19, 38, 2, "" },
+ /*571*/ { BARCODE_CHANNEL, -1, 3.75, "123", "", 0, 4, 1, 23, 46, 8, "" },
+ /*572*/ { BARCODE_CHANNEL, COMPLIANT_HEIGHT, 3.75, "123", "", ZINT_WARN_NONCOMPLIANT, 4, 1, 23, 46, 8, "Min height data-length dependent" },
+ /*573*/ { BARCODE_CHANNEL, COMPLIANT_HEIGHT, 4, "123", "", 0, 4, 1, 23, 46, 8, "" },
+ /*574*/ { BARCODE_CODEONE, -1, 1, "12345678901234567890", "", 0, 16, 16, 18, 36, 32, "Fixed height, symbol->height ignored" },
+ /*575*/ { BARCODE_GRIDMATRIX, -1, 1, "ABC", "", 0, 18, 18, 18, 36, 36, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*576*/ { BARCODE_UPNQR, -1, 1, "1234567890AB", "", 0, 77, 77, 77, 154, 154, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*577*/ { BARCODE_ULTRA, -1, 1, "1234567890", "", 0, 13, 13, 18, 36, 26, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*578*/ { BARCODE_RMQR, -1, 1, "12345", "", 0, 11, 11, 27, 54, 22, "Fixed width-to-height ratio, symbol->height ignored" },
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
@@ -2164,6 +2468,9 @@ static void test_height(int index, int generate, int debug) {
assert_nonnull(symbol, "Symbol not created\n");
symbol->symbology = data[i].symbology;
+ if (data[i].output_options != -1) {
+ symbol->output_options = data[i].output_options;
+ }
if (data[i].height != -1) {
symbol->height = data[i].height;
}
@@ -2189,8 +2496,9 @@ static void test_height(int index, int generate, int debug) {
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL);
if (generate) {
- printf(" /*%3d*/ { %s, %.5g, \"%s\", \"%s\", %s, %.8g, %d, %d, %d, %d, \"%s\" },\n",
- i, testUtilBarcodeName(data[i].symbology), data[i].height, data[i].data, data[i].composite, testUtilErrorName(data[i].ret),
+ printf(" /*%3d*/ { %s, %s, %.5g, \"%s\", \"%s\", %s, %.8g, %d, %d, %d, %d, \"%s\" },\n",
+ i, testUtilBarcodeName(data[i].symbology), testUtilOutputOptionsName(data[i].output_options),
+ data[i].height, data[i].data, data[i].composite, testUtilErrorName(data[i].ret),
symbol->height, symbol->rows, symbol->width, symbol->bitmap_width, symbol->bitmap_height, data[i].comment);
} else {
assert_equal(symbol->height, data[i].expected_height, "i:%d (%s) symbol->height %.8g != %.8g\n", i, testUtilBarcodeName(data[i].symbology), symbol->height, data[i].expected_height);
diff --git a/backend/tests/test_vector.c b/backend/tests/test_vector.c
index eb212280..ea56a9d2 100644
--- a/backend/tests/test_vector.c
+++ b/backend/tests/test_vector.c
@@ -159,98 +159,98 @@ static void test_buffer_vector(int index, int generate, int debug) {
float expected_vector_height;
};
struct item data[] = {
- /* 0*/ { BARCODE_CODE11, "1234567890", "", 50, 1, 108, 216, 118.9 },
- /* 1*/ { BARCODE_C25STANDARD, "1234567890", "", 50, 1, 117, 234, 118.9 },
- /* 2*/ { BARCODE_C25INTER, "1234567890", "", 50, 1, 99, 198, 118.9 },
- /* 3*/ { BARCODE_C25IATA, "1234567890", "", 50, 1, 149, 298, 118.9 },
- /* 4*/ { BARCODE_C25LOGIC, "1234567890", "", 50, 1, 109, 218, 118.9 },
- /* 5*/ { BARCODE_C25IND, "1234567890", "", 50, 1, 159, 318, 118.9 },
- /* 6*/ { BARCODE_CODE39, "1234567890", "", 50, 1, 155, 310, 118.9 },
- /* 7*/ { BARCODE_EXCODE39, "1234567890", "", 50, 1, 155, 310, 118.9 },
- /* 8*/ { BARCODE_EANX, "123456789012", "", 50, 1, 95, 226, 116.4 },
- /* 9*/ { BARCODE_EANX_CHK, "1234567890128", "", 50, 1, 95, 226, 116.4 },
- /* 10*/ { BARCODE_EANX, "123456789012+12", "", 50, 1, 122, 276, 116.4 },
- /* 11*/ { BARCODE_EANX_CHK, "1234567890128+12", "", 50, 1, 122, 276, 116.4 },
- /* 12*/ { BARCODE_EANX, "123456789012+12345", "", 50, 1, 149, 330, 116.4 },
- /* 13*/ { BARCODE_EANX_CHK, "1234567890128+12345", "", 50, 1, 149, 330, 116.4 },
- /* 14*/ { BARCODE_EANX, "1234567", "", 50, 1, 67, 162, 116.4 },
- /* 15*/ { BARCODE_EANX_CHK, "12345670", "", 50, 1, 67, 162, 116.4 },
- /* 16*/ { BARCODE_EANX, "1234567+12", "", 50, 1, 94, 216, 116.4 },
- /* 17*/ { BARCODE_EANX_CHK, "12345670+12", "", 50, 1, 94, 216, 116.4 },
- /* 18*/ { BARCODE_EANX, "1234567+12345", "", 50, 1, 121, 270, 116.4 },
- /* 19*/ { BARCODE_EANX_CHK, "12345670+12345", "", 50, 1, 121, 270, 116.4 },
- /* 20*/ { BARCODE_EANX, "1234", "", 50, 1, 47, 118, 116.4 },
- /* 21*/ { BARCODE_EANX_CHK, "1234", "", 50, 1, 47, 118, 116.4 },
- /* 22*/ { BARCODE_EANX, "12", "", 50, 1, 20, 64, 116.4 },
- /* 23*/ { BARCODE_EANX_CHK, "12", "", 50, 1, 20, 64, 116.4 },
- /* 24*/ { BARCODE_GS1_128, "[01]12345678901231", "", 50, 1, 134, 268, 118.9 },
- /* 25*/ { BARCODE_CODABAR, "A00000000B", "", 50, 1, 102, 204, 118.9 },
- /* 26*/ { BARCODE_CODE128, "1234567890", "", 50, 1, 90, 180, 118.9 },
- /* 27*/ { BARCODE_DPLEIT, "1234567890123", "", 50, 1, 135, 270, 118.9 },
- /* 28*/ { BARCODE_DPIDENT, "12345678901", "", 50, 1, 117, 234, 118.9 },
+ /* 0*/ { BARCODE_CODE11, "1234567890", "", 50, 1, 108, 216, 118.900002 },
+ /* 1*/ { BARCODE_C25STANDARD, "1234567890", "", 50, 1, 117, 234, 118.900002 },
+ /* 2*/ { BARCODE_C25INTER, "1234567890", "", 50, 1, 99, 198, 118.900002 },
+ /* 3*/ { BARCODE_C25IATA, "1234567890", "", 50, 1, 149, 298, 118.900002 },
+ /* 4*/ { BARCODE_C25LOGIC, "1234567890", "", 50, 1, 109, 218, 118.900002 },
+ /* 5*/ { BARCODE_C25IND, "1234567890", "", 50, 1, 159, 318, 118.900002 },
+ /* 6*/ { BARCODE_CODE39, "1234567890", "", 50, 1, 155, 310, 118.900002 },
+ /* 7*/ { BARCODE_EXCODE39, "1234567890", "", 50, 1, 155, 310, 118.900002 },
+ /* 8*/ { BARCODE_EANX, "123456789012", "", 50, 1, 95, 226, 116.400002 },
+ /* 9*/ { BARCODE_EANX_CHK, "1234567890128", "", 50, 1, 95, 226, 116.400002 },
+ /* 10*/ { BARCODE_EANX, "123456789012+12", "", 50, 1, 122, 276, 116.400002 },
+ /* 11*/ { BARCODE_EANX_CHK, "1234567890128+12", "", 50, 1, 122, 276, 116.400002 },
+ /* 12*/ { BARCODE_EANX, "123456789012+12345", "", 50, 1, 149, 330, 116.400002 },
+ /* 13*/ { BARCODE_EANX_CHK, "1234567890128+12345", "", 50, 1, 149, 330, 116.400002 },
+ /* 14*/ { BARCODE_EANX, "1234567", "", 50, 1, 67, 162, 116.400002 },
+ /* 15*/ { BARCODE_EANX_CHK, "12345670", "", 50, 1, 67, 162, 116.400002 },
+ /* 16*/ { BARCODE_EANX, "1234567+12", "", 50, 1, 94, 216, 116.400002 },
+ /* 17*/ { BARCODE_EANX_CHK, "12345670+12", "", 50, 1, 94, 216, 116.400002 },
+ /* 18*/ { BARCODE_EANX, "1234567+12345", "", 50, 1, 121, 270, 116.400002 },
+ /* 19*/ { BARCODE_EANX_CHK, "12345670+12345", "", 50, 1, 121, 270, 116.400002 },
+ /* 20*/ { BARCODE_EANX, "1234", "", 50, 1, 47, 118, 116.400002 },
+ /* 21*/ { BARCODE_EANX_CHK, "1234", "", 50, 1, 47, 118, 116.400002 },
+ /* 22*/ { BARCODE_EANX, "12", "", 50, 1, 20, 64, 116.400002 },
+ /* 23*/ { BARCODE_EANX_CHK, "12", "", 50, 1, 20, 64, 116.400002 },
+ /* 24*/ { BARCODE_GS1_128, "[01]12345678901231", "", 50, 1, 134, 268, 118.900002 },
+ /* 25*/ { BARCODE_CODABAR, "A00000000B", "", 50, 1, 102, 204, 118.900002 },
+ /* 26*/ { BARCODE_CODE128, "1234567890", "", 50, 1, 90, 180, 118.900002 },
+ /* 27*/ { BARCODE_DPLEIT, "1234567890123", "", 50, 1, 135, 270, 118.900002 },
+ /* 28*/ { BARCODE_DPIDENT, "12345678901", "", 50, 1, 117, 234, 118.900002 },
/* 29*/ { BARCODE_CODE16K, "1234567890", "", 20, 2, 70, 162, 44 },
/* 30*/ { BARCODE_CODE49, "1234567890", "", 20, 2, 70, 162, 44 },
- /* 31*/ { BARCODE_CODE93, "1234567890", "", 50, 1, 127, 254, 118.9 },
+ /* 31*/ { BARCODE_CODE93, "1234567890", "", 50, 1, 127, 254, 118.900002 },
/* 32*/ { BARCODE_FLAT, "1234567890", "", 50, 1, 90, 180, 100 },
- /* 33*/ { BARCODE_DBAR_OMN, "1234567890123", "", 50, 1, 96, 192, 118.9 },
- /* 34*/ { BARCODE_DBAR_LTD, "1234567890123", "", 50, 1, 79, 158, 118.9 },
- /* 35*/ { BARCODE_DBAR_EXP, "[01]12345678901231", "", 34, 1, 134, 268, 86.900002 },
- /* 36*/ { BARCODE_TELEPEN, "1234567890", "", 50, 1, 208, 416, 118.9 },
- /* 37*/ { BARCODE_UPCA, "12345678901", "", 50, 1, 95, 226, 116.4 },
- /* 38*/ { BARCODE_UPCA_CHK, "123456789012", "", 50, 1, 95, 226, 116.4 },
- /* 39*/ { BARCODE_UPCA, "12345678901+12", "", 50, 1, 124, 276, 116.4 },
- /* 40*/ { BARCODE_UPCA_CHK, "123456789012+12", "", 50, 1, 124, 276, 116.4 },
- /* 41*/ { BARCODE_UPCA, "12345678901+12345", "", 50, 1, 151, 330, 116.4 },
- /* 42*/ { BARCODE_UPCA_CHK, "123456789012+12345", "", 50, 1, 151, 330, 116.4 },
- /* 43*/ { BARCODE_UPCE, "1234567", "", 50, 1, 51, 134, 116.4 },
- /* 44*/ { BARCODE_UPCE_CHK, "12345670", "", 50, 1, 51, 134, 116.4 },
- /* 45*/ { BARCODE_UPCE, "1234567+12", "", 50, 1, 78, 184, 116.4 },
- /* 46*/ { BARCODE_UPCE_CHK, "12345670+12", "", 50, 1, 78, 184, 116.4 },
- /* 47*/ { BARCODE_UPCE, "1234567+12345", "", 50, 1, 105, 238, 116.4 },
- /* 48*/ { BARCODE_UPCE_CHK, "12345670+12345", "", 50, 1, 105, 238, 116.4 },
+ /* 33*/ { BARCODE_DBAR_OMN, "1234567890123", "", 50, 1, 96, 192, 118.900002 },
+ /* 34*/ { BARCODE_DBAR_LTD, "1234567890123", "", 50, 1, 79, 158, 118.900002 },
+ /* 35*/ { BARCODE_DBAR_EXP, "[01]12345678901231", "", 34, 1, 134, 268, 86.9000015 },
+ /* 36*/ { BARCODE_TELEPEN, "1234567890", "", 50, 1, 208, 416, 118.900002 },
+ /* 37*/ { BARCODE_UPCA, "12345678901", "", 50, 1, 95, 226, 116.400002 },
+ /* 38*/ { BARCODE_UPCA_CHK, "123456789012", "", 50, 1, 95, 226, 116.400002 },
+ /* 39*/ { BARCODE_UPCA, "12345678901+12", "", 50, 1, 124, 276, 116.400002 },
+ /* 40*/ { BARCODE_UPCA_CHK, "123456789012+12", "", 50, 1, 124, 276, 116.400002 },
+ /* 41*/ { BARCODE_UPCA, "12345678901+12345", "", 50, 1, 151, 330, 116.400002 },
+ /* 42*/ { BARCODE_UPCA_CHK, "123456789012+12345", "", 50, 1, 151, 330, 116.400002 },
+ /* 43*/ { BARCODE_UPCE, "1234567", "", 50, 1, 51, 134, 116.400002 },
+ /* 44*/ { BARCODE_UPCE_CHK, "12345670", "", 50, 1, 51, 134, 116.400002 },
+ /* 45*/ { BARCODE_UPCE, "1234567+12", "", 50, 1, 78, 184, 116.400002 },
+ /* 46*/ { BARCODE_UPCE_CHK, "12345670+12", "", 50, 1, 78, 184, 116.400002 },
+ /* 47*/ { BARCODE_UPCE, "1234567+12345", "", 50, 1, 105, 238, 116.400002 },
+ /* 48*/ { BARCODE_UPCE_CHK, "12345670+12345", "", 50, 1, 105, 238, 116.400002 },
/* 49*/ { BARCODE_POSTNET, "12345678901", "", 12, 2, 123, 246, 24 },
- /* 50*/ { BARCODE_MSI_PLESSEY, "1234567890", "", 50, 1, 127, 254, 118.9 },
+ /* 50*/ { BARCODE_MSI_PLESSEY, "1234567890", "", 50, 1, 127, 254, 118.900002 },
/* 51*/ { BARCODE_FIM, "A", "", 50, 1, 17, 34, 100 },
- /* 52*/ { BARCODE_LOGMARS, "1234567890", "", 50, 1, 191, 382, 118.9 },
+ /* 52*/ { BARCODE_LOGMARS, "1234567890", "", 50, 1, 191, 382, 118.900002 },
/* 53*/ { BARCODE_PHARMA, "123456", "", 50, 1, 58, 116, 100 },
- /* 54*/ { BARCODE_PZN, "123456", "", 50, 1, 142, 284, 118.9 },
+ /* 54*/ { BARCODE_PZN, "123456", "", 50, 1, 142, 284, 118.900002 },
/* 55*/ { BARCODE_PHARMA_TWO, "12345678", "", 10, 2, 29, 58, 20 },
/* 56*/ { BARCODE_PDF417, "1234567890", "", 21, 7, 103, 206, 42 },
/* 57*/ { BARCODE_PDF417COMP, "1234567890", "", 21, 7, 69, 138, 42 },
- /* 58*/ { BARCODE_MAXICODE, "1234567890", "", 165, 33, 30, 60, 57.733398 },
+ /* 58*/ { BARCODE_MAXICODE, "1234567890", "", 165, 33, 30, 60, 57.7333984 },
/* 59*/ { BARCODE_QRCODE, "1234567890AB", "", 21, 21, 21, 42, 42 },
- /* 60*/ { BARCODE_CODE128B, "1234567890", "", 50, 1, 145, 290, 118.9 },
+ /* 60*/ { BARCODE_CODE128B, "1234567890", "", 50, 1, 145, 290, 118.900002 },
/* 61*/ { BARCODE_AUSPOST, "12345678901234567890123", "", 8, 3, 133, 266, 16 },
/* 62*/ { BARCODE_AUSREPLY, "12345678", "", 8, 3, 73, 146, 16 },
/* 63*/ { BARCODE_AUSROUTE, "12345678", "", 8, 3, 73, 146, 16 },
/* 64*/ { BARCODE_AUSREDIRECT, "12345678", "", 8, 3, 73, 146, 16 },
- /* 65*/ { BARCODE_ISBNX, "123456789", "", 50, 1, 95, 226, 116.4 },
- /* 66*/ { BARCODE_ISBNX, "123456789+12", "", 50, 1, 122, 276, 116.4 },
- /* 67*/ { BARCODE_ISBNX, "123456789+12345", "", 50, 1, 149, 330, 116.4 },
+ /* 65*/ { BARCODE_ISBNX, "123456789", "", 50, 1, 95, 226, 116.400002 },
+ /* 66*/ { BARCODE_ISBNX, "123456789+12", "", 50, 1, 122, 276, 116.400002 },
+ /* 67*/ { BARCODE_ISBNX, "123456789+12345", "", 50, 1, 149, 330, 116.400002 },
/* 68*/ { BARCODE_RM4SCC, "1234567890", "", 8, 3, 91, 182, 16 },
/* 69*/ { BARCODE_DATAMATRIX, "ABC", "", 10, 10, 10, 20, 20 },
- /* 70*/ { BARCODE_EAN14, "1234567890123", "", 50, 1, 134, 268, 118.9 },
- /* 71*/ { BARCODE_VIN, "12345678701234567", "", 50, 1, 246, 492, 118.9 },
+ /* 70*/ { BARCODE_EAN14, "1234567890123", "", 50, 1, 134, 268, 118.900002 },
+ /* 71*/ { BARCODE_VIN, "12345678701234567", "", 50, 1, 246, 492, 118.900002 },
/* 72*/ { BARCODE_CODABLOCKF, "1234567890", "", 20, 2, 101, 242, 44 },
- /* 73*/ { BARCODE_NVE18, "12345678901234567", "", 50, 1, 156, 312, 118.9 },
+ /* 73*/ { BARCODE_NVE18, "12345678901234567", "", 50, 1, 156, 312, 118.900002 },
/* 74*/ { BARCODE_JAPANPOST, "1234567890", "", 8, 3, 133, 266, 16 },
- /* 75*/ { BARCODE_KOREAPOST, "123456", "", 50, 1, 167, 334, 118.9 },
+ /* 75*/ { BARCODE_KOREAPOST, "123456", "", 50, 1, 167, 334, 118.900002 },
/* 76*/ { BARCODE_DBAR_STK, "1234567890123", "", 13, 3, 50, 100, 26 },
/* 77*/ { BARCODE_DBAR_OMNSTK, "1234567890123", "", 69, 5, 50, 100, 138 },
/* 78*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901231", "", 71, 5, 102, 204, 142 },
/* 79*/ { BARCODE_PLANET, "12345678901", "", 12, 2, 123, 246, 24 },
/* 80*/ { BARCODE_MICROPDF417, "1234567890", "", 12, 6, 82, 164, 24 },
/* 81*/ { BARCODE_USPS_IMAIL, "12345678901234567890", "", 8, 3, 129, 258, 16 },
- /* 82*/ { BARCODE_PLESSEY, "1234567890", "", 50, 1, 227, 454, 118.9 },
- /* 83*/ { BARCODE_TELEPEN_NUM, "1234567890", "", 50, 1, 128, 256, 118.9 },
- /* 84*/ { BARCODE_ITF14, "1234567890", "", 50, 1, 135, 330, 138.89999 },
+ /* 82*/ { BARCODE_PLESSEY, "1234567890", "", 50, 1, 227, 454, 118.900002 },
+ /* 83*/ { BARCODE_TELEPEN_NUM, "1234567890", "", 50, 1, 128, 256, 118.900002 },
+ /* 84*/ { BARCODE_ITF14, "1234567890", "", 50, 1, 135, 330, 138.899994 },
/* 85*/ { BARCODE_KIX, "123456ABCDE", "", 8, 3, 87, 174, 16 },
/* 86*/ { BARCODE_AZTEC, "1234567890AB", "", 15, 15, 15, 30, 30 },
/* 87*/ { BARCODE_DAFT, "DAFTDAFTDAFTDAFT", "", 8, 3, 31, 62, 16 },
- /* 88*/ { BARCODE_DPD, "0123456789012345678901234567", "", 50, 1, 189, 378, 118.9 },
+ /* 88*/ { BARCODE_DPD, "0123456789012345678901234567", "", 50, 1, 189, 378, 118.900002 },
/* 89*/ { BARCODE_MICROQR, "12345", "", 11, 11, 11, 22, 22 },
- /* 90*/ { BARCODE_HIBC_128, "1234567890", "", 50, 1, 123, 246, 118.9 },
- /* 91*/ { BARCODE_HIBC_39, "1234567890", "", 50, 1, 223, 446, 118.9 },
+ /* 90*/ { BARCODE_HIBC_128, "1234567890", "", 50, 1, 123, 246, 118.900002 },
+ /* 91*/ { BARCODE_HIBC_39, "1234567890", "", 50, 1, 223, 446, 118.900002 },
/* 92*/ { BARCODE_HIBC_DM, "ABC", "", 12, 12, 12, 24, 24 },
/* 93*/ { BARCODE_HIBC_QR, "1234567890AB", "", 21, 21, 21, 42, 42 },
/* 94*/ { BARCODE_HIBC_PDF, "1234567890", "", 24, 8, 103, 206, 48 },
@@ -261,27 +261,27 @@ static void test_buffer_vector(int index, int generate, int debug) {
/* 99*/ { BARCODE_HANXIN, "1234567890AB", "", 23, 23, 23, 46, 46 },
/*100*/ { BARCODE_MAILMARK, "01000000000000000AA00AA0A", "", 10, 3, 155, 310, 20 },
/*101*/ { BARCODE_AZRUNE, "255", "", 11, 11, 11, 22, 22 },
- /*102*/ { BARCODE_CODE32, "12345678", "", 50, 1, 103, 206, 118.9 },
- /*103*/ { BARCODE_EANX_CC, "123456789012", "[20]01", 50, 7, 99, 234, 116.4 },
- /*104*/ { BARCODE_EANX_CC, "123456789012+12", "[20]01", 50, 7, 126, 284, 116.4 },
- /*105*/ { BARCODE_EANX_CC, "123456789012+12345", "[20]01", 50, 7, 153, 338, 116.4 },
- /*106*/ { BARCODE_EANX_CC, "1234567", "[20]01", 50, 8, 72, 172, 116.4 },
- /*107*/ { BARCODE_EANX_CC, "1234567+12", "[20]01", 50, 8, 99, 226, 116.4 },
- /*108*/ { BARCODE_EANX_CC, "1234567+12345", "[20]01", 50, 8, 126, 280, 116.4 },
- /*109*/ { BARCODE_GS1_128_CC, "[01]12345678901231", "[20]01", 50, 5, 145, 290, 118.9 },
- /*110*/ { BARCODE_DBAR_OMN_CC, "1234567890123", "[20]01", 21, 5, 100, 200, 60.900002 },
- /*111*/ { BARCODE_DBAR_LTD_CC, "1234567890123", "[20]01", 19, 6, 79, 158, 56.900002 },
- /*112*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901231", "[20]01", 41, 5, 134, 268, 100.9 },
- /*113*/ { BARCODE_UPCA_CC, "12345678901", "[20]01", 50, 7, 99, 234, 116.4 },
- /*114*/ { BARCODE_UPCA_CC, "12345678901+12", "[20]01", 50, 7, 128, 284, 116.4 },
- /*115*/ { BARCODE_UPCA_CC, "12345678901+12345", "[20]01", 50, 7, 155, 338, 116.4 },
- /*116*/ { BARCODE_UPCE_CC, "1234567", "[20]01", 50, 9, 55, 142, 116.4 },
- /*117*/ { BARCODE_UPCE_CC, "1234567+12", "[20]01", 50, 9, 82, 192, 116.4 },
- /*118*/ { BARCODE_UPCE_CC, "1234567+12345", "[20]01", 50, 9, 109, 246, 116.4 },
+ /*102*/ { BARCODE_CODE32, "12345678", "", 50, 1, 103, 206, 118.900002 },
+ /*103*/ { BARCODE_EANX_CC, "123456789012", "[20]01", 50, 7, 99, 234, 116.400002 },
+ /*104*/ { BARCODE_EANX_CC, "123456789012+12", "[20]01", 50, 7, 126, 284, 116.400002 },
+ /*105*/ { BARCODE_EANX_CC, "123456789012+12345", "[20]01", 50, 7, 153, 338, 116.400002 },
+ /*106*/ { BARCODE_EANX_CC, "1234567", "[20]01", 50, 8, 72, 172, 116.400002 },
+ /*107*/ { BARCODE_EANX_CC, "1234567+12", "[20]01", 50, 8, 99, 226, 116.400002 },
+ /*108*/ { BARCODE_EANX_CC, "1234567+12345", "[20]01", 50, 8, 126, 280, 116.400002 },
+ /*109*/ { BARCODE_GS1_128_CC, "[01]12345678901231", "[20]01", 50, 5, 145, 290, 118.900002 },
+ /*110*/ { BARCODE_DBAR_OMN_CC, "1234567890123", "[20]01", 21, 5, 100, 200, 60.9000015 },
+ /*111*/ { BARCODE_DBAR_LTD_CC, "1234567890123", "[20]01", 19, 6, 79, 158, 56.9000015 },
+ /*112*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901231", "[20]01", 41, 5, 134, 268, 100.900002 },
+ /*113*/ { BARCODE_UPCA_CC, "12345678901", "[20]01", 50, 7, 99, 234, 116.400002 },
+ /*114*/ { BARCODE_UPCA_CC, "12345678901+12", "[20]01", 50, 7, 128, 284, 116.400002 },
+ /*115*/ { BARCODE_UPCA_CC, "12345678901+12345", "[20]01", 50, 7, 155, 338, 116.400002 },
+ /*116*/ { BARCODE_UPCE_CC, "1234567", "[20]01", 50, 9, 55, 142, 116.400002 },
+ /*117*/ { BARCODE_UPCE_CC, "1234567+12", "[20]01", 50, 9, 82, 192, 116.400002 },
+ /*118*/ { BARCODE_UPCE_CC, "1234567+12345", "[20]01", 50, 9, 109, 246, 116.400002 },
/*119*/ { BARCODE_DBAR_STK_CC, "1234567890123", "[20]01", 24, 9, 56, 112, 48 },
/*120*/ { BARCODE_DBAR_OMNSTK_CC, "1234567890123", "[20]01", 80, 11, 56, 112, 160 },
/*121*/ { BARCODE_DBAR_EXPSTK_CC, "[01]12345678901231", "[20]01", 78, 9, 102, 204, 156 },
- /*122*/ { BARCODE_CHANNEL, "01", "", 50, 1, 19, 38, 118.9 },
+ /*122*/ { BARCODE_CHANNEL, "01", "", 50, 1, 19, 38, 118.900002 },
/*123*/ { BARCODE_CODEONE, "12345678901234567890", "", 16, 16, 18, 36, 32 },
/*124*/ { BARCODE_GRIDMATRIX, "ABC", "", 18, 18, 18, 36, 36 },
/*125*/ { BARCODE_UPNQR, "1234567890AB", "", 77, 77, 77, 154, 154 },
@@ -1350,6 +1350,7 @@ static void test_height(int index, int generate, int debug) {
struct item {
int symbology;
+ int output_options;
float height;
char *data;
char *composite;
@@ -1364,408 +1365,585 @@ static void test_height(int index, int generate, int debug) {
const char *comment;
};
struct item data[] = {
- /* 0*/ { BARCODE_CODE11, 1, "1234567890", "", 0, 1, 1, 108, 216, 2, "" },
- /* 1*/ { BARCODE_CODE11, 4, "1234567890", "", 0, 4, 1, 108, 216, 8, "" },
- /* 2*/ { BARCODE_CODE11, 10, "1234567890", "", 0, 10, 1, 108, 216, 20, "" },
- /* 3*/ { BARCODE_C25STANDARD, 1, "1234567890", "", 0, 1, 1, 117, 234, 2, "" },
- /* 4*/ { BARCODE_C25STANDARD, 4, "1234567890", "", 0, 4, 1, 117, 234, 8, "" },
- /* 5*/ { BARCODE_C25STANDARD, 11, "1234567890", "", 0, 11, 1, 117, 234, 22, "" },
- /* 6*/ { BARCODE_C25INTER, 1, "1234567890", "", 0, 1, 1, 99, 198, 2, "" },
- /* 7*/ { BARCODE_C25INTER, 4, "1234567890", "", 0, 4, 1, 99, 198, 8, "" },
- /* 8*/ { BARCODE_C25INTER, 15, "1234567890", "", 0, 15, 1, 99, 198, 30, "" },
- /* 9*/ { BARCODE_C25IATA, 1, "1234567890", "", 0, 1, 1, 149, 298, 2, "" },
- /* 10*/ { BARCODE_C25IATA, 4, "1234567890", "", 0, 4, 1, 149, 298, 8, "" },
- /* 11*/ { BARCODE_C25IATA, 30, "1234567890", "", 0, 30, 1, 149, 298, 60, "" },
- /* 12*/ { BARCODE_C25LOGIC, 1, "1234567890", "", 0, 1, 1, 109, 218, 2, "" },
- /* 13*/ { BARCODE_C25LOGIC, 4, "1234567890", "", 0, 4, 1, 109, 218, 8, "" },
- /* 14*/ { BARCODE_C25LOGIC, 41, "1234567890", "", 0, 41, 1, 109, 218, 82, "" },
- /* 15*/ { BARCODE_C25IND, 1, "1234567890", "", 0, 1, 1, 159, 318, 2, "" },
- /* 16*/ { BARCODE_C25IND, 4, "1234567890", "", 0, 4, 1, 159, 318, 8, "" },
- /* 17*/ { BARCODE_C25IND, 21, "1234567890", "", 0, 21, 1, 159, 318, 42, "" },
- /* 18*/ { BARCODE_CODE39, 1, "1234567890", "", 0, 1, 1, 155, 310, 2, "" },
- /* 19*/ { BARCODE_CODE39, 4, "1", "", 0, 4, 1, 38, 76, 8, "" },
- /* 20*/ { BARCODE_CODE39, 17, "1234567890", "", 0, 17, 1, 155, 310, 34, "" },
- /* 21*/ { BARCODE_EXCODE39, 1, "1234567890", "", 0, 1, 1, 155, 310, 2, "" },
- /* 22*/ { BARCODE_EXCODE39, 4, "1234567890", "", 0, 4, 1, 155, 310, 8, "" },
- /* 23*/ { BARCODE_EXCODE39, 17, "1234567890", "", 0, 17, 1, 155, 310, 34, "" },
- /* 24*/ { BARCODE_EANX, 1, "123456789012", "", 0, 1, 1, 95, 226, 12, "EAN-13" },
- /* 25*/ { BARCODE_EANX, 4, "123456789012", "", 0, 4, 1, 95, 226, 18, "" },
- /* 26*/ { BARCODE_EANX, 69, "123456789012", "", 0, 69, 1, 95, 226, 148, "" },
- /* 27*/ { BARCODE_EANX, 55, "1234567", "", 0, 55, 1, 67, 162, 120, "EAN-8" },
- /* 28*/ { BARCODE_EANX, 66, "12345", "", 0, 66, 1, 47, 118, 132, "EAN-8" },
- /* 29*/ { BARCODE_EANX_CHK, 1, "1234567890128", "", 0, 1, 1, 95, 226, 12, "EAN-13" },
- /* 30*/ { BARCODE_EANX_CHK, 69, "1234567890128", "", 0, 69, 1, 95, 226, 148, "" },
- /* 31*/ { BARCODE_GS1_128, 1, "[01]12345678901231", "", 0, 1, 1, 134, 268, 2, "" },
- /* 32*/ { BARCODE_GS1_128, 4, "[01]12345678901231", "", 0, 4, 1, 134, 268, 8, "" },
- /* 33*/ { BARCODE_GS1_128, 5, "[01]12345678901231", "", 0, 5, 1, 134, 268, 10, "" },
- /* 34*/ { BARCODE_GS1_128, 50, "[01]12345678901231", "", 0, 50, 1, 134, 268, 100, "" },
- /* 35*/ { BARCODE_CODABAR, 1, "A0B", "", 0, 1, 1, 32, 64, 2, "" },
- /* 36*/ { BARCODE_CODABAR, 4, "A0B", "", 0, 4, 1, 32, 64, 8, "" },
- /* 37*/ { BARCODE_CODABAR, 26, "A0B", "", 0, 26, 1, 32, 64, 52, "" },
- /* 38*/ { BARCODE_CODE128, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
- /* 39*/ { BARCODE_CODE128, 4, "1234567890", "", 0, 4, 1, 90, 180, 8, "" },
- /* 40*/ { BARCODE_CODE128, 7, "1234567890", "", 0, 7, 1, 90, 180, 14, "" },
- /* 41*/ { BARCODE_DPLEIT, 1, "1234567890123", "", 0, 1, 1, 135, 270, 2, "" },
- /* 42*/ { BARCODE_DPLEIT, 4, "1234567890123", "", 0, 4, 1, 135, 270, 8, "" },
- /* 43*/ { BARCODE_DPIDENT, 1, "12345678901", "", 0, 1, 1, 117, 234, 2, "" },
- /* 44*/ { BARCODE_DPIDENT, 4, "12345678901", "", 0, 4, 1, 117, 234, 8, "" },
- /* 45*/ { BARCODE_CODE16K, -1, "1234567890", "", 0, 20, 2, 70, 162, 44, "2 rows" },
- /* 46*/ { BARCODE_CODE16K, 1, "1234567890", "", 0, 1, 2, 70, 162, 6, "" },
- /* 47*/ { BARCODE_CODE16K, 4, "1234567890", "", 0, 4, 2, 70, 162, 12, "" },
- /* 48*/ { BARCODE_CODE16K, 17, "1234567890", "", 0, 17, 2, 70, 162, 38, "" },
- /* 49*/ { BARCODE_CODE16K, 40, "1234567890", "", 0, 40, 2, 70, 162, 84, "" },
- /* 50*/ { BARCODE_CODE16K, -1, "12345678901234567890123456789012345678901234567890", "", 0, 60, 6, 70, 162, 124, "6 rows" },
- /* 51*/ { BARCODE_CODE16K, 30, "12345678901234567890123456789012345678901234567890", "", 0, 30, 6, 70, 162, 64, "" },
- /* 52*/ { BARCODE_CODE16K, 120, "12345678901234567890123456789012345678901234567890", "", 0, 120, 6, 70, 162, 244, "" },
- /* 53*/ { BARCODE_CODE49, -1, "1234567890", "", 0, 20, 2, 70, 162, 44, "2 rows" },
- /* 54*/ { BARCODE_CODE49, 1, "1234567890", "", 0, 1, 2, 70, 162, 6, "" },
- /* 55*/ { BARCODE_CODE49, 4, "1234567890", "", 0, 4, 2, 70, 162, 12, "" },
- /* 56*/ { BARCODE_CODE49, 18, "1234567890", "", 0, 18, 2, 70, 162, 40, "" },
- /* 57*/ { BARCODE_CODE49, 40, "1234567890", "", 0, 40, 2, 70, 162, 84, "" },
- /* 58*/ { BARCODE_CODE49, -1, "12345678901234567890", "", 0, 30, 3, 70, 162, 64, "3 rows" },
- /* 59*/ { BARCODE_CODE49, 15, "12345678901234567890", "", 0, 15, 3, 70, 162, 34, "" },
- /* 60*/ { BARCODE_CODE49, 45, "12345678901234567890", "", 0, 45, 3, 70, 162, 94, "" },
- /* 61*/ { BARCODE_CODE93, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "" },
- /* 62*/ { BARCODE_CODE93, 4, "1234567890", "", 0, 4, 1, 127, 254, 8, "" },
- /* 63*/ { BARCODE_CODE93, 26, "1234567890", "", 0, 26, 1, 127, 254, 52, "" },
- /* 64*/ { BARCODE_FLAT, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
- /* 65*/ { BARCODE_FLAT, 4, "1234567890", "", 0, 4, 1, 90, 180, 8, "" },
- /* 66*/ { BARCODE_DBAR_OMN, 1, "1234567890123", "", 0, 1, 1, 96, 192, 2, "" },
- /* 67*/ { BARCODE_DBAR_OMN, 4, "1234567890123", "", 0, 4, 1, 96, 192, 8, "" },
- /* 68*/ { BARCODE_DBAR_OMN, 12, "1234567890123", "", 0, 12, 1, 96, 192, 24, "" },
- /* 69*/ { BARCODE_DBAR_OMN, 33, "1234567890123", "", 0, 33, 1, 96, 192, 66, "" },
- /* 70*/ { BARCODE_DBAR_LTD, 1, "1234567890123", "", 0, 1, 1, 79, 158, 2, "" },
- /* 71*/ { BARCODE_DBAR_LTD, 4, "1234567890123", "", 0, 4, 1, 79, 158, 8, "" },
- /* 72*/ { BARCODE_DBAR_LTD, 9, "1234567890123", "", 0, 9, 1, 79, 158, 18, "" },
- /* 73*/ { BARCODE_DBAR_LTD, 10, "1234567890123", "", 0, 10, 1, 79, 158, 20, "" },
- /* 74*/ { BARCODE_DBAR_EXP, 1, "[01]12345678901231", "", 0, 1, 1, 134, 268, 2, "" },
- /* 75*/ { BARCODE_DBAR_EXP, 33, "[01]12345678901231", "", 0, 33, 1, 134, 268, 66, "" },
- /* 76*/ { BARCODE_DBAR_EXP, 34, "[01]12345678901231", "", 0, 34, 1, 134, 268, 68, "" },
- /* 77*/ { BARCODE_TELEPEN, 1, "1234567890", "", 0, 1, 1, 208, 416, 2, "" },
- /* 78*/ { BARCODE_TELEPEN, 4, "1234567890", "", 0, 4, 1, 208, 416, 8, "" },
- /* 79*/ { BARCODE_UPCA, 1, "12345678901", "", 0, 1, 1, 95, 226, 12, "" },
- /* 80*/ { BARCODE_UPCA, 4, "12345678901", "", 0, 4, 1, 95, 226, 18, "" },
- /* 81*/ { BARCODE_UPCA, 69, "12345678901", "", 0, 69, 1, 95, 226, 148, "" },
- /* 82*/ { BARCODE_UPCA_CHK, 1, "123456789012", "", 0, 1, 1, 95, 226, 12, "" },
- /* 83*/ { BARCODE_UPCE, 1, "1234567", "", 0, 1, 1, 51, 134, 12, "" },
- /* 84*/ { BARCODE_UPCE, 4, "1234567", "", 0, 4, 1, 51, 134, 18, "" },
- /* 85*/ { BARCODE_UPCE, 69, "1234567", "", 0, 69, 1, 51, 134, 148, "" },
- /* 86*/ { BARCODE_UPCE_CHK, 1, "12345670", "", 0, 1, 1, 51, 134, 12, "" },
- /* 87*/ { BARCODE_POSTNET, -1, "12345678901", "", 0, 12, 2, 123, 246, 24, "" },
- /* 88*/ { BARCODE_POSTNET, 1, "12345678901", "", 0, 1, 2, 123, 246, 2, "" },
- /* 89*/ { BARCODE_POSTNET, 4, "12345678901", "", 0, 4, 2, 123, 246, 8, "" },
- /* 90*/ { BARCODE_POSTNET, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
- /* 91*/ { BARCODE_POSTNET, 20, "12345678901", "", 0, 20, 2, 123, 246, 40, "" },
- /* 92*/ { BARCODE_MSI_PLESSEY, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "" },
- /* 93*/ { BARCODE_MSI_PLESSEY, 4, "1234567890", "", 0, 4, 1, 127, 254, 8, "" },
- /* 94*/ { BARCODE_FIM, 1, "A", "", 0, 1, 1, 17, 34, 2, "" },
- /* 95*/ { BARCODE_FIM, 4, "A", "", 0, 4, 1, 17, 34, 8, "" },
- /* 96*/ { BARCODE_FIM, 12, "A", "", 0, 12, 1, 17, 34, 24, "" },
- /* 97*/ { BARCODE_LOGMARS, 1, "1234567890", "", 0, 1, 1, 191, 382, 2, "" },
- /* 98*/ { BARCODE_LOGMARS, 4, "1234567890", "", 0, 4, 1, 191, 382, 8, "" },
- /* 99*/ { BARCODE_LOGMARS, 6, "1234567890", "", 0, 6, 1, 191, 382, 12, "" },
- /*100*/ { BARCODE_LOGMARS, 45, "1234567890", "", 0, 45, 1, 191, 382, 90, "" },
- /*101*/ { BARCODE_PHARMA, 1, "123456", "", 0, 1, 1, 58, 116, 2, "" },
- /*102*/ { BARCODE_PHARMA, 4, "123456", "", 0, 4, 1, 58, 116, 8, "" },
- /*103*/ { BARCODE_PHARMA, 15, "123456", "", 0, 15, 1, 58, 116, 30, "" },
- /*104*/ { BARCODE_PHARMA, 16, "123456", "", 0, 16, 1, 58, 116, 32, "" },
- /*105*/ { BARCODE_PZN, 1, "123456", "", 0, 1, 1, 142, 284, 2, "" },
- /*106*/ { BARCODE_PZN, 4, "123456", "", 0, 4, 1, 142, 284, 8, "" },
- /*107*/ { BARCODE_PZN, 17, "123456", "", 0, 17, 1, 142, 284, 34, "" },
- /*108*/ { BARCODE_PZN, 106, "123456", "", 0, 106, 1, 142, 284, 212, "" },
- /*109*/ { BARCODE_PHARMA_TWO, -1, "12345678", "", 0, 10, 2, 29, 58, 20, "" },
- /*110*/ { BARCODE_PHARMA_TWO, 1, "12345678", "", 0, 1, 2, 29, 58, 2, "" },
- /*111*/ { BARCODE_PHARMA_TWO, 4, "12345678", "", 0, 4, 2, 29, 58, 8, "" },
- /*112*/ { BARCODE_PHARMA_TWO, 15, "12345678", "", 0, 15, 2, 29, 58, 30, "" },
- /*113*/ { BARCODE_PHARMA_TWO, 20, "12345678", "", 0, 20, 2, 29, 58, 40, "" },
- /*114*/ { BARCODE_PHARMA_TWO, 30, "12345678", "", 0, 30, 2, 29, 58, 60, "" },
- /*115*/ { BARCODE_PDF417, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 4, 8, 120, 240, 8, "8 rows" },
- /*116*/ { BARCODE_PDF417, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 4, 8, 120, 240, 8, "" },
- /*117*/ { BARCODE_PDF417, 23, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 23, 8, 120, 240, 46, "" },
- /*118*/ { BARCODE_PDF417, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 24, 8, 120, 240, 48, "" },
- /*119*/ { BARCODE_PDF417, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 36, 12, 120, 240, 72, "12 rows" },
- /*120*/ { BARCODE_PDF417, 12, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 12, 12, 120, 240, 24, "" },
- /*121*/ { BARCODE_PDF417COMP, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", "", ZINT_WARN_NONCOMPLIANT, 4.5, 9, 86, 172, 9, "9 rows" },
- /*122*/ { BARCODE_PDF417COMP, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", "", ZINT_WARN_NONCOMPLIANT, 24, 9, 86, 172, 48, "" },
- /*123*/ { BARCODE_MAXICODE, 1, "1234567890", "", 0, 16.5, 33, 30, 60, 57.733398, "Fixed size, symbol->height ignored" },
- /*124*/ { BARCODE_QRCODE, 1, "ABCD", "", 0, 21, 21, 21, 42, 42, "Fixed width-to-height ratio, symbol->height ignored" },
- /*125*/ { BARCODE_CODE128B, 1, "1234567890", "", 0, 1, 1, 145, 290, 2, "" },
- /*126*/ { BARCODE_CODE128B, 4, "1234567890", "", 0, 4, 1, 145, 290, 8, "" },
- /*127*/ { BARCODE_AUSPOST, -1, "12345678901234567890123", "", 0, 8, 3, 133, 266, 16, "" },
- /*128*/ { BARCODE_AUSPOST, 1, "12345678901234567890123", "", 0, 2, 3, 133, 266, 4, "" },
- /*129*/ { BARCODE_AUSPOST, 4, "12345678901234567890123", "", 0, 4, 3, 133, 266, 8, "" },
- /*130*/ { BARCODE_AUSPOST, 7, "12345678901234567890123", "", 0, 7, 3, 133, 266, 14, "" },
- /*131*/ { BARCODE_AUSPOST, 14, "12345678901234567890123", "", 0, 14, 3, 133, 266, 28, "" },
- /*132*/ { BARCODE_AUSREPLY, 14, "12345678", "", 0, 14, 3, 73, 146, 28, "" },
- /*133*/ { BARCODE_AUSROUTE, 7, "12345678", "", 0, 7, 3, 73, 146, 14, "" },
- /*134*/ { BARCODE_AUSREDIRECT, 14, "12345678", "", 0, 14, 3, 73, 146, 28, "" },
- /*135*/ { BARCODE_ISBNX, 1, "123456789", "", 0, 1, 1, 95, 226, 12, "" },
- /*136*/ { BARCODE_ISBNX, 4, "123456789", "", 0, 4, 1, 95, 226, 18, "" },
- /*137*/ { BARCODE_ISBNX, 69, "123456789", "", 0, 69, 1, 95, 226, 148, "" },
- /*138*/ { BARCODE_RM4SCC, -1, "1234567890", "", 0, 8, 3, 91, 182, 16, "" },
- /*139*/ { BARCODE_RM4SCC, 1, "1234567890", "", 0, 2, 3, 91, 182, 4, "" },
- /*140*/ { BARCODE_RM4SCC, 4, "1234567890", "", 0, 4, 3, 91, 182, 8, "" },
- /*141*/ { BARCODE_RM4SCC, 6, "1234567890", "", 0, 6, 3, 91, 182, 12, "" },
- /*142*/ { BARCODE_RM4SCC, 11, "1234567890", "", 0, 11, 3, 91, 182, 22, "" },
- /*143*/ { BARCODE_RM4SCC, 16, "1234567890", "", 0, 16, 3, 91, 182, 32, "" },
- /*144*/ { BARCODE_DATAMATRIX, 1, "ABCD", "", 0, 12, 12, 12, 24, 24, "Fixed width-to-height ratio, symbol->height ignored" },
- /*145*/ { BARCODE_EAN14, 1, "1234567890123", "", 0, 1, 1, 134, 268, 2, "" },
- /*146*/ { BARCODE_EAN14, 4, "1234567890123", "", 0, 4, 1, 134, 268, 8, "" },
- /*147*/ { BARCODE_EAN14, 5, "1234567890123", "", 0, 5, 1, 134, 268, 10, "" },
- /*148*/ { BARCODE_VIN, 1, "12345678701234567", "", 0, 1, 1, 246, 492, 2, "" },
- /*149*/ { BARCODE_VIN, 4, "12345678701234567", "", 0, 4, 1, 246, 492, 8, "" },
- /*150*/ { BARCODE_CODABLOCKF, -1, "1234567890", "", 0, 20, 2, 101, 242, 44, "2 rows" },
- /*151*/ { BARCODE_CODABLOCKF, 1, "1234567890", "", 0, 1, 2, 101, 242, 6, "" },
- /*152*/ { BARCODE_CODABLOCKF, 4, "1234567890", "", 0, 4, 2, 101, 242, 12, "" },
- /*153*/ { BARCODE_CODABLOCKF, 30, "1234567890", "", 0, 30, 2, 101, 242, 64, "" },
- /*154*/ { BARCODE_CODABLOCKF, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 110, 11, 156, 352, 224, "11 rows, 14 cols" },
- /*155*/ { BARCODE_CODABLOCKF, 88, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 88, 11, 156, 352, 180, "" },
- /*156*/ { BARCODE_CODABLOCKF, 220, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 220, 11, 156, 352, 444, "" },
- /*157*/ { BARCODE_CODABLOCKF, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 110, 11, 167, 374, 224, "11 rows, 15 cols" },
- /*158*/ { BARCODE_CODABLOCKF, 88, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 88, 11, 167, 374, 180, "" },
- /*159*/ { BARCODE_NVE18, 1, "12345678901234567", "", 0, 1, 1, 156, 312, 2, "" },
- /*160*/ { BARCODE_NVE18, 4, "12345678901234567", "", 0, 4, 1, 156, 312, 8, "" },
- /*161*/ { BARCODE_NVE18, 6, "12345678901234567", "", 0, 6, 1, 156, 312, 12, "" },
- /*162*/ { BARCODE_JAPANPOST, -1, "1234567890", "", 0, 8, 3, 133, 266, 16, "" },
- /*163*/ { BARCODE_JAPANPOST, 1, "1234567890", "", 0, 2, 3, 133, 266, 4, "" },
- /*164*/ { BARCODE_JAPANPOST, 4, "1234567890", "", 0, 4, 3, 133, 266, 8, "" },
- /*165*/ { BARCODE_JAPANPOST, 7, "1234567890", "", 0, 7, 3, 133, 266, 14, "" },
- /*166*/ { BARCODE_JAPANPOST, 16, "1234567890", "", 0, 16, 3, 133, 266, 32, "" },
- /*167*/ { BARCODE_KOREAPOST, 1, "123456", "", 0, 1, 1, 167, 334, 2, "" },
- /*168*/ { BARCODE_KOREAPOST, 4, "123456", "", 0, 4, 1, 167, 334, 8, "" },
- /*169*/ { BARCODE_DBAR_STK, -1, "1234567890123", "", 0, 13, 3, 50, 100, 26, "" },
- /*170*/ { BARCODE_DBAR_STK, 1, "1234567890123", "", 0, 2.2, 3, 50, 100, 4.4000001, "" },
- /*171*/ { BARCODE_DBAR_STK, 4, "1234567890123", "", 0, 4, 3, 50, 100, 8, "" },
- /*172*/ { BARCODE_DBAR_STK, 12, "1234567890123", "", 0, 12, 3, 50, 100, 24, "" },
- /*173*/ { BARCODE_DBAR_STK, 13, "1234567890123", "", 0, 13, 3, 50, 100, 26, "" },
- /*174*/ { BARCODE_DBAR_STK, 24, "1234567890123", "", 0, 24, 3, 50, 100, 48, "" },
- /*175*/ { BARCODE_DBAR_STK, 26, "1234567890123", "", 0, 26, 3, 50, 100, 52, "" },
- /*176*/ { BARCODE_DBAR_OMNSTK, -1, "1234567890123", "", 0, 69, 5, 50, 100, 138, "" },
- /*177*/ { BARCODE_DBAR_OMNSTK, 1, "1234567890123", "", 0, 4, 5, 50, 100, 8, "" },
- /*178*/ { BARCODE_DBAR_OMNSTK, 4, "1234567890123", "", 0, 4, 5, 50, 100, 8, "" },
- /*179*/ { BARCODE_DBAR_OMNSTK, 68, "1234567890123", "", 0, 68, 5, 50, 100, 136, "" },
- /*180*/ { BARCODE_DBAR_OMNSTK, 69, "1234567890123", "", 0, 69, 5, 50, 100, 138, "" },
- /*181*/ { BARCODE_DBAR_OMNSTK, 150, "1234567890123", "", 0, 150, 5, 50, 100, 300, "" },
- /*182*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142, "2 rows" },
- /*183*/ { BARCODE_DBAR_EXPSTK, 1, "[01]12345678901231", "", 0, 4, 5, 102, 204, 8, "" },
- /*184*/ { BARCODE_DBAR_EXPSTK, 4, "[01]12345678901231", "", 0, 4, 5, 102, 204, 8, "" },
- /*185*/ { BARCODE_DBAR_EXPSTK, 71, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142, "" },
- /*186*/ { BARCODE_DBAR_EXPSTK, 76, "[01]12345678901231", "", 0, 76, 5, 102, 204, 152, "" },
- /*187*/ { BARCODE_DBAR_EXPSTK, -1, "[01]09501101530003[3920]123456789012345", "", 0, 108, 9, 102, 204, 216, "3 rows" },
- /*188*/ { BARCODE_DBAR_EXPSTK, 1, "[01]09501101530003[3920]123456789012345", "", 0, 7.5, 9, 102, 204, 15, "" },
- /*189*/ { BARCODE_DBAR_EXPSTK, 54, "[01]09501101530003[3920]123456789012345", "", 0, 54, 9, 102, 204, 108, "" },
- /*190*/ { BARCODE_DBAR_EXPSTK, 90, "[01]09501101530003[3920]123456789012345", "", 0, 90, 9, 102, 204, 180, "" },
- /*191*/ { BARCODE_DBAR_EXPSTK, 160, "[01]09501101530003[3920]123456789012345", "", 0, 160, 9, 102, 204, 320, "" },
- /*192*/ { BARCODE_PLANET, -1, "12345678901", "", 0, 12, 2, 123, 246, 24, "" },
- /*193*/ { BARCODE_PLANET, 1, "12345678901", "", 0, 1, 2, 123, 246, 2, "" },
- /*194*/ { BARCODE_PLANET, 4, "12345678901", "", 0, 4, 2, 123, 246, 8, "" },
- /*195*/ { BARCODE_PLANET, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
- /*196*/ { BARCODE_PLANET, 24, "12345678901", "", 0, 24, 2, 123, 246, 48, "" },
- /*197*/ { BARCODE_MICROPDF417, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 20, 10, 82, 164, 40, "10 rows" },
- /*198*/ { BARCODE_MICROPDF417, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 5, 10, 82, 164, 10, "" },
- /*199*/ { BARCODE_MICROPDF417, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 5, 10, 82, 164, 10, "" },
- /*200*/ { BARCODE_MICROPDF417, 19, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 19, 10, 82, 164, 38, "" },
- /*201*/ { BARCODE_MICROPDF417, 30, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 30, 10, 82, 164, 60, "" },
- /*202*/ { BARCODE_MICROPDF417, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 40, 20, 55, 110, 80, "20 rows" },
- /*203*/ { BARCODE_MICROPDF417, 20, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 20, 20, 55, 110, 40, "" },
- /*204*/ { BARCODE_USPS_IMAIL, -1, "12345678901234567890", "", 0, 8, 3, 129, 258, 16, "" },
- /*205*/ { BARCODE_USPS_IMAIL, 1, "12345678901234567890", "", 0, 2, 3, 129, 258, 4, "" },
- /*206*/ { BARCODE_USPS_IMAIL, 4, "12345678901234567890", "", 0, 4, 3, 129, 258, 8, "" },
- /*207*/ { BARCODE_USPS_IMAIL, 7, "12345678901234567890", "", 0, 7, 3, 129, 258, 14, "" },
- /*208*/ { BARCODE_PLESSEY, 1, "1234567890", "", 0, 1, 1, 227, 454, 2, "" },
- /*209*/ { BARCODE_PLESSEY, 4, "1234567890", "", 0, 4, 1, 227, 454, 8, "" },
- /*210*/ { BARCODE_TELEPEN_NUM, 1, "1234567890", "", 0, 1, 1, 128, 256, 2, "" },
- /*211*/ { BARCODE_TELEPEN_NUM, 4, "1234567890", "", 0, 4, 1, 128, 256, 8, "" },
- /*212*/ { BARCODE_ITF14, 1, "1234567890", "", 0, 1, 1, 135, 330, 22, "" },
- /*213*/ { BARCODE_ITF14, 4, "1234567890", "", 0, 4, 1, 135, 330, 28, "" },
- /*214*/ { BARCODE_ITF14, 64, "1234567890", "", 0, 64, 1, 135, 330, 148, "" },
- /*215*/ { BARCODE_KIX, -1, "1234567890", "", 0, 8, 3, 79, 158, 16, "" },
- /*216*/ { BARCODE_KIX, 1, "1234567890", "", 0, 2, 3, 79, 158, 4, "" },
- /*217*/ { BARCODE_KIX, 4, "1234567890", "", 0, 4, 3, 79, 158, 8, "" },
- /*218*/ { BARCODE_KIX, 6, "1234567890", "", 0, 6, 3, 79, 158, 12, "" },
- /*219*/ { BARCODE_KIX, 10, "1234567890", "", 0, 10, 3, 79, 158, 20, "" },
- /*220*/ { BARCODE_KIX, 16, "1234567890", "", 0, 16, 3, 79, 158, 32, "" },
- /*221*/ { BARCODE_AZTEC, 1, "1234567890AB", "", 0, 15, 15, 15, 30, 30, "Fixed width-to-height ratio, symbol->height ignored" },
- /*222*/ { BARCODE_DAFT, -1, "DAFTDAFTDAFTDAFT", "", 0, 8, 3, 31, 62, 16, "" },
- /*223*/ { BARCODE_DAFT, 1, "DAFTDAFTDAFTDAFT", "", 0, 2, 3, 31, 62, 4, "" },
- /*224*/ { BARCODE_DAFT, 4, "DAFTDAFTDAFTDAFT", "", 0, 4, 3, 31, 62, 8, "" },
- /*225*/ { BARCODE_DAFT, 6, "DAFTDAFTDAFTDAFT", "", 0, 6, 3, 31, 62, 12, "" },
- /*226*/ { BARCODE_DAFT, 12, "DAFTDAFTDAFTDAFT", "", 0, 12, 3, 31, 62, 24, "" },
- /*227*/ { BARCODE_DAFT, 16, "DAFTDAFTDAFTDAFT", "", 0, 16, 3, 31, 62, 32, "" },
- /*228*/ { BARCODE_DPD, 1, "0123456789012345678901234567", "", 0, 1, 1, 189, 378, 2, "" },
- /*229*/ { BARCODE_DPD, 4, "0123456789012345678901234567", "", 0, 4, 1, 189, 378, 8, "" },
- /*230*/ { BARCODE_DPD, 62, "0123456789012345678901234567", "", 0, 62, 1, 189, 378, 124, "" },
- /*231*/ { BARCODE_MICROQR, 1, "12345", "", 0, 11, 11, 11, 22, 22, "Fixed width-to-height ratio, symbol->height ignored" },
- /*232*/ { BARCODE_HIBC_128, 1, "1234567890", "", 0, 1, 1, 123, 246, 2, "" },
- /*233*/ { BARCODE_HIBC_128, 4, "1234567890", "", 0, 4, 1, 123, 246, 8, "" },
- /*234*/ { BARCODE_HIBC_39, 1, "1234567890", "", 0, 1, 1, 223, 446, 2, "" },
- /*235*/ { BARCODE_HIBC_39, 4, "1234567890", "", 0, 4, 1, 223, 446, 8, "" },
- /*236*/ { BARCODE_HIBC_DM, 1, "ABC", "", 0, 12, 12, 12, 24, 24, "Fixed width-to-height ratio, symbol->height ignored" },
- /*237*/ { BARCODE_HIBC_QR, 1, "1234567890AB", "", 0, 21, 21, 21, 42, 42, "Fixed width-to-height ratio, symbol->height ignored" },
- /*238*/ { BARCODE_HIBC_PDF, -1, "ABCDEF", "", 0, 21, 7, 103, 206, 42, "7 rows" },
- /*239*/ { BARCODE_HIBC_PDF, 1, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3.5, 7, 103, 206, 7, "" },
- /*240*/ { BARCODE_HIBC_PDF, 4, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 4, 7, 103, 206, 8, "" },
- /*241*/ { BARCODE_HIBC_PDF, 36, "ABCDEF", "", 0, 36, 7, 103, 206, 72, "" },
- /*242*/ { BARCODE_HIBC_MICPDF, -1, "ABCDEF", "", 0, 12, 6, 82, 164, 24, "6 rows" },
- /*243*/ { BARCODE_HIBC_MICPDF, 1, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3, 6, 82, 164, 6, "" },
- /*244*/ { BARCODE_HIBC_MICPDF, 4, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 4, 6, 82, 164, 8, "" },
- /*245*/ { BARCODE_HIBC_MICPDF, 47, "ABCDEF", "", 0, 47, 6, 82, 164, 94, "" },
- /*246*/ { BARCODE_HIBC_BLOCKF, -1, "1234567890", "", 0, 30, 3, 101, 242, 64, "3 rows" },
- /*247*/ { BARCODE_HIBC_BLOCKF, 1, "1234567890", "", 0, 1.5, 3, 101, 242, 7, "" },
- /*248*/ { BARCODE_HIBC_BLOCKF, 4, "1234567890", "", 0, 4, 3, 101, 242, 12, "" },
- /*249*/ { BARCODE_HIBC_BLOCKF, 23, "1234567890", "", 0, 23, 3, 101, 242, 50, "" },
- /*250*/ { BARCODE_HIBC_BLOCKF, 60, "1234567890", "", 0, 60, 3, 101, 242, 124, "" },
- /*251*/ { BARCODE_HIBC_AZTEC, 1, "1234567890AB", "", 0, 19, 19, 19, 38, 38, "Fixed width-to-height ratio, symbol->height ignored" },
- /*252*/ { BARCODE_DOTCODE, 1, "ABC", "", 0, 11, 11, 16, 32, 22, "Fixed width-to-height ratio, symbol->height ignored" },
- /*253*/ { BARCODE_HANXIN, 1, "1234567890AB", "", 0, 23, 23, 23, 46, 46, "Fixed width-to-height ratio, symbol->height ignored" },
- /*254*/ { BARCODE_MAILMARK, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
- /*255*/ { BARCODE_MAILMARK, 1, "01000000000000000AA00AA0A", "", 0, 2.5, 3, 155, 310, 5, "" },
- /*256*/ { BARCODE_MAILMARK, 4, "01000000000000000AA00AA0A", "", 0, 4, 3, 155, 310, 8, "" },
- /*257*/ { BARCODE_MAILMARK, 6, "01000000000000000AA00AA0A", "", 0, 6, 3, 155, 310, 12, "" },
- /*258*/ { BARCODE_MAILMARK, 10, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
- /*259*/ { BARCODE_MAILMARK, 15, "01000000000000000AA00AA0A", "", 0, 15, 3, 155, 310, 30, "" },
- /*260*/ { BARCODE_MAILMARK, 20, "01000000000000000AA00AA0A", "", 0, 20, 3, 155, 310, 40, "" },
- /*261*/ { BARCODE_AZRUNE, 1, "1", "", 0, 11, 11, 11, 22, 22, "Fixed width-to-height ratio, symbol->height ignored" },
- /*262*/ { BARCODE_CODE32, 1, "12345678", "", 0, 1, 1, 103, 206, 2, "" },
- /*263*/ { BARCODE_CODE32, 4, "12345678", "", 0, 4, 1, 103, 206, 8, "" },
- /*264*/ { BARCODE_CODE32, 19, "12345678", "", 0, 19, 1, 103, 206, 38, "" },
- /*265*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01", 0, 50, 7, 99, 234, 110, "EAN-13, CC-A 3 rows" },
- /*266*/ { BARCODE_EANX_CC, 1, "123456789012", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
- /*267*/ { BARCODE_EANX_CC, 4, "123456789012", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
- /*268*/ { BARCODE_EANX_CC, 81, "123456789012", "[20]01", 0, 81, 7, 99, 234, 172, "" },
- /*269*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 50, 9, 99, 234, 110, "EAN-13, CC-A 5 rows" },
- /*270*/ { BARCODE_EANX_CC, 1, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 16.5, 9, 99, 234, 43, "" },
- /*271*/ { BARCODE_EANX_CC, 4, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 16.5, 9, 99, 234, 43, "" },
- /*272*/ { BARCODE_EANX_CC, 20, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 20, 9, 99, 234, 50, "" },
- /*273*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 50, 11, 99, 234, 110, "EAN-13, CC-A 7 rows" },
- /*274*/ { BARCODE_EANX_CC, 1, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.5, 11, 99, 234, 51, "" },
- /*275*/ { BARCODE_EANX_CC, 4, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.5, 11, 99, 234, 51, "" },
- /*276*/ { BARCODE_EANX_CC, 40, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 40, 11, 99, 234, 90, "" },
- /*277*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 14, 99, 234, 110, "EAN-13, CC-B 10 rows" },
- /*278*/ { BARCODE_EANX_CC, 1, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 26.5, 14, 99, 234, 63, "" },
- /*279*/ { BARCODE_EANX_CC, 30, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 30, 14, 99, 234, 70, "" },
- /*280*/ { BARCODE_EANX_CC, -1, "1234567", "[20]01[90]123456789012345678901234", 0, 50, 10, 72, 172, 110, "EAN-8, CC-A 4 rows" },
- /*281*/ { BARCODE_EANX_CC, 1, "1234567", "[20]01[90]123456789012345678901234", 0, 18.5, 10, 72, 172, 47, "" },
- /*282*/ { BARCODE_EANX_CC, 4, "1234567", "[20]01[90]123456789012345678901234", 0, 18.5, 10, 72, 172, 47, "" },
- /*283*/ { BARCODE_EANX_CC, 69, "1234567", "[20]01[90]123456789012345678901234", 0, 69, 10, 72, 172, 148, "" },
- /*284*/ { BARCODE_EANX_CC, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 50, 24, 82, 192, 110, "EAN-8, CC-B 15 rows" },
- /*285*/ { BARCODE_EANX_CC, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 46.5, 24, 82, 192, 103, "" },
- /*286*/ { BARCODE_EANX_CC, 32, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 46.5, 24, 82, 192, 103, "" },
- /*287*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01", 0, 50, 5, 145, 290, 100, "CC-A 3 rows" },
- /*288*/ { BARCODE_GS1_128_CC, 1, "[01]12345678901231", "[20]01", 0, 7.5, 5, 145, 290, 15, "" },
- /*289*/ { BARCODE_GS1_128_CC, 4, "[01]12345678901231", "[20]01", 0, 7.5, 5, 145, 290, 15, "" },
- /*290*/ { BARCODE_GS1_128_CC, 12, "[01]12345678901231", "[20]01", 0, 12, 5, 145, 290, 24, "" },
- /*291*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 50, 9, 145, 290, 100, "CC-A 7 rows" },
- /*292*/ { BARCODE_GS1_128_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 15.5, 9, 145, 290, 31, "" },
- /*293*/ { BARCODE_GS1_128_CC, 52, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 52, 9, 145, 290, 104, "" },
- /*294*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 12, 145, 290, 100, "CC-B 10 rows" },
- /*295*/ { BARCODE_GS1_128_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 145, 290, 43, "" },
- /*296*/ { BARCODE_GS1_128_CC, 40, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40, 12, 145, 290, 80, "" },
- /*297*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 91.5, 32, 154, 308, 183, "CC-C 30 rows" },
- /*298*/ { BARCODE_GS1_128_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 91.5, 32, 154, 308, 183, "" },
- /*299*/ { BARCODE_GS1_128_CC, 100, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 100, 32, 154, 308, 200, "" },
- /*300*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01[90]1234567890", 0, 21, 5, 100, 200, 42, "CC-A 3 rows" },
- /*301*/ { BARCODE_DBAR_OMN_CC, 1, "1234567890123", "[20]01[90]1234567890", 0, 7.5, 5, 100, 200, 15, "" },
- /*302*/ { BARCODE_DBAR_OMN_CC, 4, "1234567890123", "[20]01[90]1234567890", 0, 7.5, 5, 100, 200, 15, "" },
- /*303*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01[90]12345678901234567890", 0, 23, 6, 100, 200, 46, "CC-A 4 rows" },
- /*304*/ { BARCODE_DBAR_OMN_CC, 1, "1234567890123", "[20]01[90]12345678901234567890", 0, 9.5, 6, 100, 200, 19, "" },
- /*305*/ { BARCODE_DBAR_OMN_CC, 4, "1234567890123", "[20]01[90]12345678901234567890", 0, 9.5, 6, 100, 200, 19, "" },
- /*306*/ { BARCODE_DBAR_OMN_CC, 20, "1234567890123", "[20]01[90]12345678901234567890", 0, 20, 6, 100, 200, 40, "" },
- /*307*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 35, 12, 100, 200, 70, "CC-B 10 rows" },
- /*308*/ { BARCODE_DBAR_OMN_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 100, 200, 43, "" },
- /*309*/ { BARCODE_DBAR_OMN_CC, 40, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40, 12, 100, 200, 80, "" },
- /*310*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 39, 14, 100, 200, 78, "CC-B 12 rows" },
- /*311*/ { BARCODE_DBAR_OMN_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 25.5, 14, 100, 200, 51, "" },
- /*312*/ { BARCODE_DBAR_OMN_CC, 36, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 36, 14, 100, 200, 72, "" },
- /*313*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 38, "CC-A 4 rows" },
- /*314*/ { BARCODE_DBAR_LTD_CC, 1, "1234567890123", "[20]01", 0, 9.5, 6, 79, 158, 19, "" },
- /*315*/ { BARCODE_DBAR_LTD_CC, 4, "1234567890123", "[20]01", 0, 9.5, 6, 79, 158, 19, "" },
- /*316*/ { BARCODE_DBAR_LTD_CC, 18, "1234567890123", "[20]01", 0, 18, 6, 79, 158, 36, "" },
- /*317*/ { BARCODE_DBAR_LTD_CC, 19, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 38, "" },
- /*318*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 25, 9, 79, 158, 50, "CC-A 7 rows" },
- /*319*/ { BARCODE_DBAR_LTD_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 15.5, 9, 79, 158, 31, "" },
- /*320*/ { BARCODE_DBAR_LTD_CC, 26, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 26, 9, 79, 158, 52, "" },
- /*321*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 51, 22, 88, 176, 102, "CC-B 20 rows" },
- /*322*/ { BARCODE_DBAR_LTD_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 41.5, 22, 88, 176, 83, "" },
- /*323*/ { BARCODE_DBAR_LTD_CC, 50, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 50, 22, 88, 176, 100, "" },
- /*324*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 82, "CC-A 3 rows" },
- /*325*/ { BARCODE_DBAR_EXP_CC, 1, "[01]12345678901231", "[20]01", 0, 7.5, 5, 134, 268, 15, "" },
- /*326*/ { BARCODE_DBAR_EXP_CC, 4, "[01]12345678901231", "[20]01", 0, 7.5, 5, 134, 268, 15, "" },
- /*327*/ { BARCODE_DBAR_EXP_CC, 40, "[01]12345678901231", "[20]01", 0, 40, 5, 134, 268, 80, "" },
- /*328*/ { BARCODE_DBAR_EXP_CC, 41, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 82, "" },
- /*329*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 45, 7, 134, 268, 90, "CC-A 5 rows" },
- /*330*/ { BARCODE_DBAR_EXP_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 11.5, 7, 134, 268, 23, "" },
- /*331*/ { BARCODE_DBAR_EXP_CC, 50, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 50, 7, 134, 268, 100, "" },
- /*332*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 55, 12, 134, 268, 110, "CC-B 10 rows" },
- /*333*/ { BARCODE_DBAR_EXP_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 134, 268, 43, "" },
- /*334*/ { BARCODE_DBAR_EXP_CC, 46, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 46, 12, 134, 268, 92, "" },
- /*335*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]01", 0, 50, 7, 99, 234, 110, "CC-A 3 rows" },
- /*336*/ { BARCODE_UPCA_CC, 1, "12345678901", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
- /*337*/ { BARCODE_UPCA_CC, 4, "12345678901", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
- /*338*/ { BARCODE_UPCA_CC, 81, "12345678901", "[20]01", 0, 81, 7, 99, 234, 172, "" },
- /*339*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 50, 10, 99, 234, 110, "CC-A 6 rows" },
- /*340*/ { BARCODE_UPCA_CC, 1, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 18.5, 10, 99, 234, 47, "" },
- /*341*/ { BARCODE_UPCA_CC, 4, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 18.5, 10, 99, 234, 47, "" },
- /*342*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 50, 16, 99, 234, 110, "CC-B 12 rows" },
- /*343*/ { BARCODE_UPCA_CC, 1, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 30.5, 16, 99, 234, 71, "" },
- /*344*/ { BARCODE_UPCA_CC, 51, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 51, 16, 99, 234, 112, "" },
- /*345*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01[90]123456789012345678", 0, 50, 11, 55, 142, 110, "CC-A 7 rows" },
- /*346*/ { BARCODE_UPCE_CC, 1, "1234567", "[20]01[90]123456789012345678", 0, 20.5, 11, 55, 142, 51, "" },
- /*347*/ { BARCODE_UPCE_CC, 4, "1234567", "[20]01[90]123456789012345678", 0, 20.5, 11, 55, 142, 51, "" },
- /*348*/ { BARCODE_UPCE_CC, 85, "1234567", "[20]01[90]123456789012345678", 0, 85, 11, 55, 142, 180, "" },
- /*349*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 50, 16, 55, 142, 110, "CC-A 12 rows" },
- /*350*/ { BARCODE_UPCE_CC, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 30.5, 16, 55, 142, 71, "" },
- /*351*/ { BARCODE_UPCE_CC, 49, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 49, 16, 55, 142, 108, "" },
- /*352*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 21, 55, 142, 110, "CC-B 17 rows" },
- /*353*/ { BARCODE_UPCE_CC, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40.5, 21, 55, 142, 91, "" },
- /*354*/ { BARCODE_UPCE_CC, 4, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40.5, 21, 55, 142, 91, "" },
- /*355*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "CC-B 23 rows" },
- /*356*/ { BARCODE_UPCE_CC, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "" },
- /*357*/ { BARCODE_UPCE_CC, 52, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "" },
- /*358*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "CC-A 5 rows" },
- /*359*/ { BARCODE_DBAR_STK_CC, 1, "1234567890123", "[20]01", 0, 13.2, 9, 56, 112, 26.4, "" },
- /*360*/ { BARCODE_DBAR_STK_CC, 4, "1234567890123", "[20]01", 0, 13.2, 9, 56, 112, 26.4, "" },
- /*361*/ { BARCODE_DBAR_STK_CC, 24, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "" },
- /*362*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 38, 16, 56, 112, 76, "CC-A 12 rows" },
- /*363*/ { BARCODE_DBAR_STK_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 27.200001, 16, 56, 112, 54.400002, "" },
- /*364*/ { BARCODE_DBAR_STK_CC, 25, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 27.200001, 16, 56, 112, 54.400002, "" },
- /*365*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 48, 21, 56, 112, 96, "CC-B 17 rows" },
- /*366*/ { BARCODE_DBAR_STK_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 37.200001, 21, 56, 112, 74.400002, "" },
- /*367*/ { BARCODE_DBAR_STK_CC, 59, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 59, 21, 56, 112, 118, "" },
- /*368*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]01[90]1234567890123456", 0, 82, 12, 56, 112, 164, "CC-A 6 rows" },
- /*369*/ { BARCODE_DBAR_OMNSTK_CC, 1, "1234567890123", "[20]01[90]1234567890123456", 0, 17, 12, 56, 112, 34, "" },
- /*370*/ { BARCODE_DBAR_OMNSTK_CC, 4, "1234567890123", "[20]01[90]1234567890123456", 0, 17, 12, 56, 112, 34, "" },
- /*371*/ { BARCODE_DBAR_OMNSTK_CC, 80, "1234567890123", "[20]01[90]1234567890123456", 0, 80, 12, 56, 112, 160, "" },
- /*372*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 94, 18, 56, 112, 188, "CC-A 12 rows" },
- /*373*/ { BARCODE_DBAR_OMNSTK_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 29, 18, 56, 112, 58, "" },
- /*374*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 104, 23, 56, 112, 208, "CC-B 17 rows" },
- /*375*/ { BARCODE_DBAR_OMNSTK_CC, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 39, 23, 56, 112, 78, "" },
- /*376*/ { BARCODE_DBAR_OMNSTK_CC, 4, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 39, 23, 56, 112, 78, "" },
- /*377*/ { BARCODE_DBAR_OMNSTK_CC, 52, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 52, 23, 56, 112, 104, "" },
- /*378*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156, "3 rows, CC-A 3 rows" },
- /*379*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]12345678901231", "[20]01", 0, 11, 9, 102, 204, 22, "" },
- /*380*/ { BARCODE_DBAR_EXPSTK_CC, 4, "[01]12345678901231", "[20]01", 0, 11, 9, 102, 204, 22, "" },
- /*381*/ { BARCODE_DBAR_EXPSTK_CC, 77, "[01]12345678901231", "[20]01", 0, 77, 9, 102, 204, 154, "" },
- /*382*/ { BARCODE_DBAR_EXPSTK_CC, 78, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156, "" },
- /*383*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 189, 21, 102, 204, 378, "5 rows, CC-A 3 rows" },
- /*384*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 21.5, 21, 102, 204, 43, "" },
- /*385*/ { BARCODE_DBAR_EXPSTK_CC, 190, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 190, 21, 102, 204, 380, "" },
- /*386*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 80, 10, 102, 204, 160, "3 rows, CC-A 4 rows" },
- /*387*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 13, 10, 102, 204, 26, "" },
- /*388*/ { BARCODE_DBAR_EXPSTK_CC, 38, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 38, 10, 102, 204, 76, "" },
- /*389*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 92, 16, 102, 204, 184, "3 rows, CC-B 10 rows" },
- /*390*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 25, 16, 102, 204, 50, "" },
- /*391*/ { BARCODE_DBAR_EXPSTK_CC, 4, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 25, 16, 102, 204, 50, "" },
- /*392*/ { BARCODE_DBAR_EXPSTK_CC, 47, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 47, 16, 102, 204, 94, "" },
- /*393*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 203, 28, 102, 204, 406, "5 rows, CC-B 10 rows" },
- /*394*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 35.5, 28, 102, 204, 71, "" },
- /*395*/ { BARCODE_CHANNEL, 1, "1", "", 0, 1, 1, 19, 38, 2, "" },
- /*396*/ { BARCODE_CHANNEL, 4, "123", "", 0, 4, 1, 23, 46, 8, "" },
- /*397*/ { BARCODE_CODEONE, 1, "12345678901234567890", "", 0, 16, 16, 18, 36, 32, "Fixed height, symbol->height ignored" },
- /*398*/ { BARCODE_GRIDMATRIX, 1, "ABC", "", 0, 18, 18, 18, 36, 36, "Fixed width-to-height ratio, symbol->height ignored" },
- /*399*/ { BARCODE_UPNQR, 1, "1234567890AB", "", 0, 77, 77, 77, 154, 154, "Fixed width-to-height ratio, symbol->height ignored" },
- /*400*/ { BARCODE_ULTRA, 1, "1234567890", "", 0, 13, 13, 18, 36, 26, "Fixed width-to-height ratio, symbol->height ignored" },
- /*401*/ { BARCODE_RMQR, 1, "12345", "", 0, 11, 11, 27, 54, 22, "Fixed width-to-height ratio, symbol->height ignored" },
+ /* 0*/ { BARCODE_CODE11, -1, 1, "1234567890", "", 0, 1, 1, 108, 216, 2, "" },
+ /* 1*/ { BARCODE_CODE11, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 108, 216, 2, "TODO: Find doc" },
+ /* 2*/ { BARCODE_CODE11, -1, 4, "1234567890", "", 0, 4, 1, 108, 216, 8, "" },
+ /* 3*/ { BARCODE_CODE11, -1, 10, "1234567890", "", 0, 10, 1, 108, 216, 20, "" },
+ /* 4*/ { BARCODE_C25STANDARD, -1, 1, "1234567890", "", 0, 1, 1, 117, 234, 2, "" },
+ /* 5*/ { BARCODE_C25STANDARD, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 117, 234, 2, "No doc for C25 except C25INTER" },
+ /* 6*/ { BARCODE_C25STANDARD, -1, 4, "1234567890", "", 0, 4, 1, 117, 234, 8, "" },
+ /* 7*/ { BARCODE_C25STANDARD, -1, 11, "1234567890", "", 0, 11, 1, 117, 234, 22, "" },
+ /* 8*/ { BARCODE_C25INTER, -1, 1, "1234567890", "", 0, 1, 1, 99, 198, 2, "" },
+ /* 9*/ { BARCODE_C25INTER, -1, 15, "1234567890", "", 0, 15, 1, 99, 198, 30, "" },
+ /* 10*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, 15, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 15, 1, 99, 198, 30, "" },
+ /* 11*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, 15.5, "1234567890", "", 0, 15.5, 1, 99, 198, 31, "" },
+ /* 12*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, 17.5, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 17.5, 1, 117, 234, 35, "" },
+ /* 13*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, 17.75, "12345678901", "", 0, 17.75, 1, 117, 234, 35.5, "" },
+ /* 14*/ { BARCODE_C25IATA, -1, 1, "1234567890", "", 0, 1, 1, 149, 298, 2, "" },
+ /* 15*/ { BARCODE_C25IATA, -1, 4, "1234567890", "", 0, 4, 1, 149, 298, 8, "" },
+ /* 16*/ { BARCODE_C25IATA, -1, 30, "1234567890", "", 0, 30, 1, 149, 298, 60, "" },
+ /* 17*/ { BARCODE_C25LOGIC, -1, 1, "1234567890", "", 0, 1, 1, 109, 218, 2, "" },
+ /* 18*/ { BARCODE_C25LOGIC, -1, 4, "1234567890", "", 0, 4, 1, 109, 218, 8, "" },
+ /* 19*/ { BARCODE_C25LOGIC, -1, 41, "1234567890", "", 0, 41, 1, 109, 218, 82, "" },
+ /* 20*/ { BARCODE_C25IND, -1, 1, "1234567890", "", 0, 1, 1, 159, 318, 2, "" },
+ /* 21*/ { BARCODE_C25IND, -1, 4, "1234567890", "", 0, 4, 1, 159, 318, 8, "" },
+ /* 22*/ { BARCODE_C25IND, -1, 21, "1234567890", "", 0, 21, 1, 159, 318, 42, "" },
+ /* 23*/ { BARCODE_CODE39, -1, 1, "1234567890", "", 0, 1, 1, 155, 310, 2, "" },
+ /* 24*/ { BARCODE_CODE39, -1, 4, "1", "", 0, 4, 1, 38, 76, 8, "" },
+ /* 25*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, 4, "1", "", ZINT_WARN_NONCOMPLIANT, 4, 1, 38, 76, 8, "Min height data-length dependent" },
+ /* 26*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, 4.4, "1", "", 0, 4.4000001, 1, 38, 76, 8.8000002, "" },
+ /* 27*/ { BARCODE_CODE39, -1, 17, "1234567890", "", 0, 17, 1, 155, 310, 34, "" },
+ /* 28*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, 17, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 17, 1, 155, 310, 34, "Min height data-length dependent" },
+ /* 29*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, 17.85, "1234567890", "", 0, 17.85, 1, 155, 310, 35.700001, "" },
+ /* 30*/ { BARCODE_EXCODE39, -1, 1, "1234567890", "", 0, 1, 1, 155, 310, 2, "" },
+ /* 31*/ { BARCODE_EXCODE39, -1, 17.8, "1234567890", "", 0, 17.799999, 1, 155, 310, 35.599998, "" },
+ /* 32*/ { BARCODE_EXCODE39, COMPLIANT_HEIGHT, 17.8, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 17.799999, 1, 155, 310, 35.599998, "" },
+ /* 33*/ { BARCODE_EXCODE39, COMPLIANT_HEIGHT, 17.9, "1234567890", "", 0, 17.9, 1, 155, 310, 35.799999, "" },
+ /* 34*/ { BARCODE_EANX, -1, 1, "123456789012", "", 0, 1, 1, 95, 226, 12, "EAN-13" },
+ /* 35*/ { BARCODE_EANX, -1, 69, "123456789012", "", 0, 69, 1, 95, 226, 148, "" },
+ /* 36*/ { BARCODE_EANX, COMPLIANT_HEIGHT, 69, "123456789012", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /* 37*/ { BARCODE_EANX, COMPLIANT_HEIGHT, 69.25, "123456789012", "", 0, 69.25, 1, 95, 226, 148.5, "" },
+ /* 38*/ { BARCODE_EANX, -1, 55, "1234567", "", 0, 55, 1, 67, 162, 120, "EAN-8" },
+ /* 39*/ { BARCODE_EANX, COMPLIANT_HEIGHT, 55, "1234567", "", ZINT_WARN_NONCOMPLIANT, 55, 1, 67, 162, 120, "EAN-8" },
+ /* 40*/ { BARCODE_EANX, COMPLIANT_HEIGHT, 55.25, "1234567", "", 0, 55.25, 1, 67, 162, 120.5, "EAN-8" },
+ /* 41*/ { BARCODE_EANX_CHK, -1, 1, "1234567890128", "", 0, 1, 1, 95, 226, 12, "EAN-13" },
+ /* 42*/ { BARCODE_EANX_CHK, -1, 69, "1234567890128", "", 0, 69, 1, 95, 226, 148, "" },
+ /* 43*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, 69, "1234567890128", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /* 44*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, 69.25, "1234567890128", "", 0, 69.25, 1, 95, 226, 148.5, "" },
+ /* 45*/ { BARCODE_GS1_128, -1, 1, "[01]12345678901231", "", 0, 1, 1, 134, 268, 2, "" },
+ /* 46*/ { BARCODE_GS1_128, -1, 5.7, "[01]12345678901231", "", 0, 5.6999998, 1, 134, 268, 11.4, "" },
+ /* 47*/ { BARCODE_GS1_128, COMPLIANT_HEIGHT, 5.7, "[01]12345678901231", "", ZINT_WARN_NONCOMPLIANT, 5.6999998, 1, 134, 268, 11.4, "" },
+ /* 48*/ { BARCODE_GS1_128, COMPLIANT_HEIGHT, 5.725, "[01]12345678901231", "", 0, 5.7249999, 1, 134, 268, 11.45, "Note considered compliant even though rendered height same as before" },
+ /* 49*/ { BARCODE_GS1_128, -1, 50, "[01]12345678901231", "", 0, 50, 1, 134, 268, 100, "" },
+ /* 50*/ { BARCODE_CODABAR, -1, 1, "A0B", "", 0, 1, 1, 32, 64, 2, "" },
+ /* 51*/ { BARCODE_CODABAR, -1, 4, "A0B", "", 0, 4, 1, 32, 64, 8, "" },
+ /* 52*/ { BARCODE_CODABAR, -1, 26, "A0B", "", 0, 26, 1, 32, 64, 52, "" },
+ /* 53*/ { BARCODE_CODABAR, COMPLIANT_HEIGHT, 26, "A0B", "", ZINT_WARN_NONCOMPLIANT, 26, 1, 32, 64, 52, "" },
+ /* 54*/ { BARCODE_CODABAR, COMPLIANT_HEIGHT, 27, "A0B", "", 0, 27, 1, 32, 64, 54, "" },
+ /* 55*/ { BARCODE_CODE128, -1, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
+ /* 56*/ { BARCODE_CODE128, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
+ /* 57*/ { BARCODE_CODE128, -1, 4, "1234567890", "", 0, 4, 1, 90, 180, 8, "" },
+ /* 58*/ { BARCODE_CODE128, -1, 7, "1234567890", "", 0, 7, 1, 90, 180, 14, "" },
+ /* 59*/ { BARCODE_DPLEIT, -1, 1, "1234567890123", "", 0, 1, 1, 135, 270, 2, "" },
+ /* 60*/ { BARCODE_DPLEIT, COMPLIANT_HEIGHT, 1, "1234567890123", "", 0, 1, 1, 135, 270, 2, "TODO: Find doc" },
+ /* 61*/ { BARCODE_DPLEIT, -1, 4, "1234567890123", "", 0, 4, 1, 135, 270, 8, "" },
+ /* 62*/ { BARCODE_DPIDENT, -1, 1, "12345678901", "", 0, 1, 1, 117, 234, 2, "" },
+ /* 63*/ { BARCODE_DPIDENT, COMPLIANT_HEIGHT, 1, "12345678901", "", 0, 1, 1, 117, 234, 2, "TODO: Find doc" },
+ /* 64*/ { BARCODE_DPIDENT, -1, 4, "12345678901", "", 0, 4, 1, 117, 234, 8, "" },
+ /* 65*/ { BARCODE_CODE16K, -1, -1, "1234567890", "", 0, 20, 2, 70, 162, 44, "2 rows" },
+ /* 66*/ { BARCODE_CODE16K, -1, 1, "1234567890", "", 0, 1, 2, 70, 162, 6, "" },
+ /* 67*/ { BARCODE_CODE16K, -1, 4, "1234567890", "", 0, 4, 2, 70, 162, 12, "" },
+ /* 68*/ { BARCODE_CODE16K, -1, 16.75, "1234567890", "", 0, 16.75, 2, 70, 162, 37.5, "" },
+ /* 69*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, 16.75, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 16.75, 2, 70, 162, 37.5, "" },
+ /* 70*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, 17, "1234567890", "", 0, 17, 2, 70, 162, 38, "" },
+ /* 71*/ { BARCODE_CODE16K, -1, -1, "12345678901234567890123456789012345678901234567890", "", 0, 60, 6, 70, 162, 124, "6 rows" },
+ /* 72*/ { BARCODE_CODE16K, -1, 52.5, "12345678901234567890123456789012345678901234567890", "", 0, 52.5, 6, 70, 162, 109, "" },
+ /* 73*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, 52.5, "12345678901234567890123456789012345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 52.5, 6, 70, 162, 109, "" },
+ /* 74*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, 53, "12345678901234567890123456789012345678901234567890", "", 0, 53, 6, 70, 162, 110, "" },
+ /* 75*/ { BARCODE_CODE49, -1, -1, "1234567890", "", 0, 20, 2, 70, 162, 44, "2 rows" },
+ /* 76*/ { BARCODE_CODE49, -1, 1, "1234567890", "", 0, 1, 2, 70, 162, 6, "" },
+ /* 77*/ { BARCODE_CODE49, -1, 16.75, "1234567890", "", 0, 16.75, 2, 70, 162, 37.5, "" },
+ /* 78*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, 16.75, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 16.75, 2, 70, 162, 37.5, "" },
+ /* 79*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, 17, "1234567890", "", 0, 17, 2, 70, 162, 38, "" },
+ /* 80*/ { BARCODE_CODE49, -1, -1, "12345678901234567890", "", 0, 30, 3, 70, 162, 64, "3 rows" },
+ /* 81*/ { BARCODE_CODE49, -1, 25.75, "12345678901234567890", "", 0, 25.75, 3, 70, 162, 55.5, "" },
+ /* 82*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, 25.75, "12345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 25.75, 3, 70, 162, 55.5, "" },
+ /* 83*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, 26, "12345678901234567890", "", 0, 26, 3, 70, 162, 56, "" },
+ /* 84*/ { BARCODE_CODE93, -1, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "" },
+ /* 85*/ { BARCODE_CODE93, -1, 9.9, "1", "", 0, 9.8999996, 1, 46, 92, 19.799999, "" },
+ /* 86*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, 9.9, "1", "", ZINT_WARN_NONCOMPLIANT, 9.8999996, 1, 46, 92, 19.799999, "Min height data-length dependent" },
+ /* 87*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, 10, "1", "", 0, 10, 1, 46, 92, 20, "" },
+ /* 88*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, 22, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 22, 1, 127, 254, 44, "Min height data-length dependent" },
+ /* 89*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, 22.1, "1234567890", "", 0, 22.1, 1, 127, 254, 44.200001, "" },
+ /* 90*/ { BARCODE_FLAT, -1, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "" },
+ /* 91*/ { BARCODE_FLAT, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 90, 180, 2, "TODO: Find doc" },
+ /* 92*/ { BARCODE_FLAT, -1, 4, "1234567890", "", 0, 4, 1, 90, 180, 8, "" },
+ /* 93*/ { BARCODE_DBAR_OMN, -1, 1, "1234567890123", "", 0, 1, 1, 96, 192, 2, "" },
+ /* 94*/ { BARCODE_DBAR_OMN, -1, 12.9, "1234567890123", "", 0, 12.9, 1, 96, 192, 25.799999, "" },
+ /* 95*/ { BARCODE_DBAR_OMN, COMPLIANT_HEIGHT, 12.9, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 12.9, 1, 96, 192, 25.799999, "" },
+ /* 96*/ { BARCODE_DBAR_OMN, COMPLIANT_HEIGHT, 13, "1234567890123", "", 0, 13, 1, 96, 192, 26, "" },
+ /* 97*/ { BARCODE_DBAR_LTD, -1, 1, "1234567890123", "", 0, 1, 1, 79, 158, 2, "" },
+ /* 98*/ { BARCODE_DBAR_LTD, -1, 9, "1234567890123", "", 0, 9, 1, 79, 158, 18, "" },
+ /* 99*/ { BARCODE_DBAR_LTD, COMPLIANT_HEIGHT, 9, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 9, 1, 79, 158, 18, "" },
+ /*100*/ { BARCODE_DBAR_LTD, COMPLIANT_HEIGHT, 10, "1234567890123", "", 0, 10, 1, 79, 158, 20, "" },
+ /*101*/ { BARCODE_DBAR_EXP, -1, 1, "[01]12345678901231", "", 0, 1, 1, 134, 268, 2, "" },
+ /*102*/ { BARCODE_DBAR_EXP, -1, 33, "[01]12345678901231", "", 0, 33, 1, 134, 268, 66, "" },
+ /*103*/ { BARCODE_DBAR_EXP, COMPLIANT_HEIGHT, 33, "[01]12345678901231", "", ZINT_WARN_NONCOMPLIANT, 33, 1, 134, 268, 66, "" },
+ /*104*/ { BARCODE_DBAR_EXP, COMPLIANT_HEIGHT, 34, "[01]12345678901231", "", 0, 34, 1, 134, 268, 68, "" },
+ /*105*/ { BARCODE_TELEPEN, -1, 1, "1234567890", "", 0, 1, 1, 208, 416, 2, "" },
+ /*106*/ { BARCODE_TELEPEN, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 208, 416, 2, "No known min" },
+ /*107*/ { BARCODE_TELEPEN, -1, 4, "1234567890", "", 0, 4, 1, 208, 416, 8, "" },
+ /*108*/ { BARCODE_UPCA, -1, 1, "12345678901", "", 0, 1, 1, 95, 226, 12, "" },
+ /*109*/ { BARCODE_UPCA, -1, 69, "12345678901", "", 0, 69, 1, 95, 226, 148, "" },
+ /*110*/ { BARCODE_UPCA, COMPLIANT_HEIGHT, 69, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /*111*/ { BARCODE_UPCA, COMPLIANT_HEIGHT, 69.25, "12345678901", "", 0, 69.25, 1, 95, 226, 148.5, "" },
+ /*112*/ { BARCODE_UPCA_CHK, -1, 1, "123456789012", "", 0, 1, 1, 95, 226, 12, "" },
+ /*113*/ { BARCODE_UPCA_CHK, COMPLIANT_HEIGHT, 69, "123456789012", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /*114*/ { BARCODE_UPCA_CHK, COMPLIANT_HEIGHT, 69.5, "123456789012", "", 0, 69.5, 1, 95, 226, 149, "" },
+ /*115*/ { BARCODE_UPCE, -1, 1, "1234567", "", 0, 1, 1, 51, 134, 12, "" },
+ /*116*/ { BARCODE_UPCE, -1, 69, "1234567", "", 0, 69, 1, 51, 134, 148, "" },
+ /*117*/ { BARCODE_UPCE, COMPLIANT_HEIGHT, 69, "1234567", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 51, 134, 148, "" },
+ /*118*/ { BARCODE_UPCE, COMPLIANT_HEIGHT, 69.25, "1234567", "", 0, 69.25, 1, 51, 134, 148.5, "" },
+ /*119*/ { BARCODE_UPCE_CHK, -1, 1, "12345670", "", 0, 1, 1, 51, 134, 12, "" },
+ /*120*/ { BARCODE_UPCE_CHK, COMPLIANT_HEIGHT, 69.24, "12345670", "", ZINT_WARN_NONCOMPLIANT, 69.239998, 1, 51, 134, 148.48, "" },
+ /*121*/ { BARCODE_UPCE_CHK, COMPLIANT_HEIGHT, 69.25, "12345670", "", 0, 69.25, 1, 51, 134, 148.5, "" },
+ /*122*/ { BARCODE_POSTNET, -1, -1, "12345678901", "", 0, 12, 2, 123, 246, 24, "" },
+ /*123*/ { BARCODE_POSTNET, -1, 1, "12345678901", "", 0, 1, 2, 123, 246, 2, "" },
+ /*124*/ { BARCODE_POSTNET, -1, 4.5, "12345678901", "", 0, 4.5, 2, 123, 246, 9, "" },
+ /*125*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 4.5, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 4.5, 2, 123, 246, 9, "" },
+ /*126*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 4.6, "12345678901", "", 0, 4.5999999, 2, 123, 246, 9.1999998, "" },
+ /*127*/ { BARCODE_POSTNET, -1, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
+ /*128*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
+ /*129*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 9.1, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 9.1000004, 2, 123, 246, 18.200001, "" },
+ /*130*/ { BARCODE_POSTNET, -1, 20, "12345678901", "", 0, 20, 2, 123, 246, 40, "" },
+ /*131*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, 20, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 20, 2, 123, 246, 40, "" },
+ /*132*/ { BARCODE_MSI_PLESSEY, -1, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "" },
+ /*133*/ { BARCODE_MSI_PLESSEY, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 127, 254, 2, "TODO: Find doc" },
+ /*134*/ { BARCODE_MSI_PLESSEY, -1, 4, "1234567890", "", 0, 4, 1, 127, 254, 8, "" },
+ /*135*/ { BARCODE_FIM, -1, 1, "A", "", 0, 1, 1, 17, 34, 2, "" },
+ /*136*/ { BARCODE_FIM, -1, 12.7, "A", "", 0, 12.7, 1, 17, 34, 25.4, "" },
+ /*137*/ { BARCODE_FIM, COMPLIANT_HEIGHT, 12.7, "A", "", ZINT_WARN_NONCOMPLIANT, 12.7, 1, 17, 34, 25.4, "" },
+ /*138*/ { BARCODE_FIM, COMPLIANT_HEIGHT, 12.8, "A", "", 0, 12.8, 1, 17, 34, 25.6, "" },
+ /*139*/ { BARCODE_LOGMARS, -1, 1, "1234567890", "", 0, 1, 1, 191, 382, 2, "" },
+ /*140*/ { BARCODE_LOGMARS, -1, 6, "1234567890", "", 0, 6, 1, 191, 382, 12, "" },
+ /*141*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, 6, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 6, 1, 191, 382, 12, "" },
+ /*142*/ { BARCODE_LOGMARS, -1, 6.25, "1234567890", "", 0, 6.25, 1, 191, 382, 12.5, "" },
+ /*143*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, 6.25, "1234567890", "", 0, 6.25, 1, 191, 382, 12.5, "" },
+ /*144*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, 116, "1234567890", "", 0, 116, 1, 191, 382, 232, "" },
+ /*145*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, 117, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 117, 1, 191, 382, 234, "" },
+ /*146*/ { BARCODE_PHARMA, -1, 1, "123456", "", 0, 1, 1, 58, 116, 2, "" },
+ /*147*/ { BARCODE_PHARMA, -1, 15, "123456", "", 0, 15, 1, 58, 116, 30, "" },
+ /*148*/ { BARCODE_PHARMA, COMPLIANT_HEIGHT, 15, "123456", "", ZINT_WARN_NONCOMPLIANT, 15, 1, 58, 116, 30, "" },
+ /*149*/ { BARCODE_PHARMA, COMPLIANT_HEIGHT, 16, "123456", "", 0, 16, 1, 58, 116, 32, "" },
+ /*150*/ { BARCODE_PZN, -1, 1, "123456", "", 0, 1, 1, 142, 284, 2, "" },
+ /*151*/ { BARCODE_PZN, -1, 17.7, "123456", "", 0, 17.700001, 1, 142, 284, 35.400002, "" },
+ /*152*/ { BARCODE_PZN, COMPLIANT_HEIGHT, 17.7, "123456", "", ZINT_WARN_NONCOMPLIANT, 17.700001, 1, 142, 284, 35.400002, "" },
+ /*153*/ { BARCODE_PZN, COMPLIANT_HEIGHT, 17.8, "123456", "", 0, 17.799999, 1, 142, 284, 35.599998, "" },
+ /*154*/ { BARCODE_PHARMA_TWO, -1, -1, "12345678", "", 0, 10, 2, 29, 58, 20, "" },
+ /*155*/ { BARCODE_PHARMA_TWO, -1, 1, "12345678", "", 0, 1, 2, 29, 58, 2, "" },
+ /*156*/ { BARCODE_PHARMA_TWO, -1, 3.9, "12345678", "", 0, 3.9000001, 2, 29, 58, 7.8000002, "" },
+ /*157*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, 3.9, "12345678", "", ZINT_WARN_NONCOMPLIANT, 3.9000001, 2, 29, 58, 7.8000002, "" },
+ /*158*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, 4, "12345678", "", 0, 4, 2, 29, 58, 8, "" },
+ /*159*/ { BARCODE_PHARMA_TWO, -1, 15, "12345678", "", 0, 15, 2, 29, 58, 30, "" },
+ /*160*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, 15, "12345678", "", 0, 15, 2, 29, 58, 30, "" },
+ /*161*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, 15.1, "12345678", "", ZINT_WARN_NONCOMPLIANT, 15.1, 2, 29, 58, 30.200001, "" },
+ /*162*/ { BARCODE_PDF417, -1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 4, 8, 120, 240, 8, "8 rows" },
+ /*163*/ { BARCODE_PDF417, -1, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 4, 8, 120, 240, 8, "" },
+ /*164*/ { BARCODE_PDF417, -1, 23, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 23, 8, 120, 240, 46, "" },
+ /*165*/ { BARCODE_PDF417, -1, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 24, 8, 120, 240, 48, "" },
+ /*166*/ { BARCODE_PDF417, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 36, 12, 120, 240, 72, "12 rows" },
+ /*167*/ { BARCODE_PDF417, -1, 12, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 12, 12, 120, 240, 24, "" },
+ /*168*/ { BARCODE_PDF417COMP, -1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", "", ZINT_WARN_NONCOMPLIANT, 4.5, 9, 86, 172, 9, "9 rows" },
+ /*169*/ { BARCODE_PDF417COMP, -1, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", "", ZINT_WARN_NONCOMPLIANT, 24, 9, 86, 172, 48, "" },
+ /*170*/ { BARCODE_MAXICODE, -1, 1, "1234567890", "", 0, 16.5, 33, 30, 60, 57.733398, "Fixed size, symbol->height ignored" },
+ /*171*/ { BARCODE_QRCODE, -1, 1, "ABCD", "", 0, 21, 21, 21, 42, 42, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*172*/ { BARCODE_CODE128B, -1, 1, "1234567890", "", 0, 1, 1, 145, 290, 2, "" },
+ /*173*/ { BARCODE_CODE128B, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 145, 290, 2, "" },
+ /*174*/ { BARCODE_CODE128B, -1, 4, "1234567890", "", 0, 4, 1, 145, 290, 8, "" },
+ /*175*/ { BARCODE_AUSPOST, -1, -1, "12345678901234567890123", "", 0, 8, 3, 133, 266, 16, "" },
+ /*176*/ { BARCODE_AUSPOST, -1, 1, "12345678901234567890123", "", 0, 2, 3, 133, 266, 4, "" },
+ /*177*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 1, "12345678901234567890123", "", ZINT_WARN_NONCOMPLIANT, 1.9230771, 3, 133, 266, 3.8461542, "" },
+ /*178*/ { BARCODE_AUSPOST, -1, 6.9, "12345678901234567890123", "", 0, 6.9000001, 3, 133, 266, 13.8, "" },
+ /*179*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 6.9, "12345678901234567890123", "", ZINT_WARN_NONCOMPLIANT, 6.9000001, 3, 133, 266, 13.8, "" },
+ /*180*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 7, "12345678901234567890123", "", 0, 7, 3, 133, 266, 14, "" },
+ /*181*/ { BARCODE_AUSPOST, -1, 14, "12345678901234567890123", "", 0, 14, 3, 133, 266, 28, "" },
+ /*182*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 14, "12345678901234567890123", "", 0, 14, 3, 133, 266, 28, "" },
+ /*183*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, 14.1, "12345678901234567890123", "", ZINT_WARN_NONCOMPLIANT, 14.099999, 3, 133, 266, 28.199999, "" },
+ /*184*/ { BARCODE_AUSREPLY, -1, 14, "12345678", "", 0, 14, 3, 73, 146, 28, "" },
+ /*185*/ { BARCODE_AUSREPLY, COMPLIANT_HEIGHT, 14, "12345678", "", 0, 14, 3, 73, 146, 28, "" },
+ /*186*/ { BARCODE_AUSREPLY, COMPLIANT_HEIGHT, 14.25, "12345678", "", ZINT_WARN_NONCOMPLIANT, 14.25, 3, 73, 146, 28.5, "" },
+ /*187*/ { BARCODE_AUSROUTE, -1, 7, "12345678", "", 0, 7, 3, 73, 146, 14, "" },
+ /*188*/ { BARCODE_AUSROUTE, COMPLIANT_HEIGHT, 7, "12345678", "", 0, 7, 3, 73, 146, 14, "" },
+ /*189*/ { BARCODE_AUSREDIRECT, -1, 14, "12345678", "", 0, 14, 3, 73, 146, 28, "" },
+ /*190*/ { BARCODE_AUSREDIRECT, COMPLIANT_HEIGHT, 14, "12345678", "", 0, 14, 3, 73, 146, 28, "" },
+ /*191*/ { BARCODE_ISBNX, -1, 1, "123456789", "", 0, 1, 1, 95, 226, 12, "" },
+ /*192*/ { BARCODE_ISBNX, -1, 69, "123456789", "", 0, 69, 1, 95, 226, 148, "" },
+ /*193*/ { BARCODE_ISBNX, COMPLIANT_HEIGHT, 69, "123456789", "", ZINT_WARN_NONCOMPLIANT, 69, 1, 95, 226, 148, "" },
+ /*194*/ { BARCODE_ISBNX, COMPLIANT_HEIGHT, 69.5, "123456789", "", 0, 69.5, 1, 95, 226, 149, "" },
+ /*195*/ { BARCODE_RM4SCC, -1, -1, "1234567890", "", 0, 8, 3, 91, 182, 16, "" },
+ /*196*/ { BARCODE_RM4SCC, -1, 1, "1234567890", "", 0, 2, 3, 91, 182, 4, "" },
+ /*197*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1.9615386, 3, 91, 182, 3.9230771, "" },
+ /*198*/ { BARCODE_RM4SCC, -1, 4, "1234567890", "", 0, 4, 3, 91, 182, 8, "" },
+ /*199*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 4, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 4, 3, 91, 182, 8, "" },
+ /*200*/ { BARCODE_RM4SCC, -1, 6, "1234567890", "", 0, 6, 3, 91, 182, 12, "" },
+ /*201*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 6, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 6, 3, 91, 182, 12, "" },
+ /*202*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 6.5, "1234567890", "", 0, 6.5, 3, 91, 182, 13, "" },
+ /*203*/ { BARCODE_RM4SCC, -1, 10.8, "1234567890", "", 0, 10.8, 3, 91, 182, 21.6, "" },
+ /*204*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 10.8, "1234567890", "", 0, 10.8, 3, 91, 182, 21.6, "" },
+ /*205*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 11, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 11, 3, 91, 182, 22, "" },
+ /*206*/ { BARCODE_RM4SCC, -1, 16, "1234567890", "", 0, 16, 3, 91, 182, 32, "" },
+ /*207*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, 16, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 16, 3, 91, 182, 32, "" },
+ /*208*/ { BARCODE_DATAMATRIX, -1, 1, "ABCD", "", 0, 12, 12, 12, 24, 24, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*209*/ { BARCODE_EAN14, -1, 1, "1234567890123", "", 0, 1, 1, 134, 268, 2, "" },
+ /*210*/ { BARCODE_EAN14, -1, 5.7, "1234567890123", "", 0, 5.6999998, 1, 134, 268, 11.4, "" },
+ /*211*/ { BARCODE_EAN14, COMPLIANT_HEIGHT, 5.7, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 5.6999998, 1, 134, 268, 11.4, "" },
+ /*212*/ { BARCODE_EAN14, COMPLIANT_HEIGHT, 5.8, "1234567890123", "", 0, 5.8000002, 1, 134, 268, 11.6, "" },
+ /*213*/ { BARCODE_VIN, -1, 1, "12345678701234567", "", 0, 1, 1, 246, 492, 2, "" },
+ /*214*/ { BARCODE_VIN, COMPLIANT_HEIGHT, 1, "12345678701234567", "", 0, 1, 1, 246, 492, 2, "Doc unlikely" },
+ /*215*/ { BARCODE_VIN, -1, 4, "12345678701234567", "", 0, 4, 1, 246, 492, 8, "" },
+ /*216*/ { BARCODE_CODABLOCKF, -1, -1, "1234567890", "", 0, 20, 2, 101, 242, 44, "2 rows" },
+ /*217*/ { BARCODE_CODABLOCKF, -1, 1, "1234567890", "", 0, 1, 2, 101, 242, 6, "" },
+ /*218*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1, 2, 101, 242, 6, "" },
+ /*219*/ { BARCODE_CODABLOCKF, -1, 15.5, "1234567890", "", 0, 15.5, 2, 101, 242, 35, "" },
+ /*220*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 15.5, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 15.5, 2, 101, 242, 35, "" },
+ /*221*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 16, "1234567890", "", 0, 16, 2, 101, 242, 36, "" },
+ /*222*/ { BARCODE_CODABLOCKF, -1, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 110, 11, 156, 352, 224, "11 rows, 14 cols" },
+ /*223*/ { BARCODE_CODABLOCKF, -1, 87, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 87, 11, 156, 352, 178, "" },
+ /*224*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 87, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", ZINT_WARN_NONCOMPLIANT, 87, 11, 156, 352, 178, "" },
+ /*225*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 88, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 88, 11, 156, 352, 180, "" },
+ /*226*/ { BARCODE_CODABLOCKF, -1, 220, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 220, 11, 156, 352, 444, "" },
+ /*227*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 220, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs", "", 0, 220, 11, 156, 352, 444, "" },
+ /*228*/ { BARCODE_CODABLOCKF, -1, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 110, 11, 167, 374, 224, "11 rows, 15 cols" },
+ /*229*/ { BARCODE_CODABLOCKF, -1, 93, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 92.999992, 11, 167, 374, 189.99998, "" },
+ /*230*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 93, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", ZINT_WARN_NONCOMPLIANT, 92.999992, 11, 167, 374, 189.99998, "" },
+ /*231*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, 93.5, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv", "", 0, 93.5, 11, 167, 374, 191, "" },
+ /*232*/ { BARCODE_NVE18, -1, 1, "12345678901234567", "", 0, 1, 1, 156, 312, 2, "" },
+ /*233*/ { BARCODE_NVE18, -1, 5.7, "12345678901234567", "", 0, 5.6999998, 1, 156, 312, 11.4, "" },
+ /*234*/ { BARCODE_NVE18, COMPLIANT_HEIGHT, 5.7, "12345678901234567", "", ZINT_WARN_NONCOMPLIANT, 5.6999998, 1, 156, 312, 11.4, "" },
+ /*235*/ { BARCODE_NVE18, COMPLIANT_HEIGHT, 5.8, "12345678901234567", "", 0, 5.8000002, 1, 156, 312, 11.6, "" },
+ /*236*/ { BARCODE_JAPANPOST, -1, -1, "1234567890", "", 0, 8, 3, 133, 266, 16, "" },
+ /*237*/ { BARCODE_JAPANPOST, -1, 1, "1234567890", "", 0, 2, 3, 133, 266, 4, "" },
+ /*238*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 133, 266, 3, "" },
+ /*239*/ { BARCODE_JAPANPOST, -1, 4.8, "1234567890", "", 0, 4.8000002, 3, 133, 266, 9.6000004, "" },
+ /*240*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 4.8, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 4.8000002, 3, 133, 266, 9.6000004, "" },
+ /*241*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 4.9, "1234567890", "", 0, 4.9000001, 3, 133, 266, 9.8000002, "" },
+ /*242*/ { BARCODE_JAPANPOST, -1, 7, "1234567890", "", 0, 7, 3, 133, 266, 14, "" },
+ /*243*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 7, "1234567890", "", 0, 7, 3, 133, 266, 14, "" },
+ /*244*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 7.5, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 7.5, 3, 133, 266, 15, "" },
+ /*245*/ { BARCODE_JAPANPOST, -1, 16, "1234567890", "", 0, 16, 3, 133, 266, 32, "" },
+ /*246*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, 16, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 15.999999, 3, 133, 266, 31.999998, "" },
+ /*247*/ { BARCODE_KOREAPOST, -1, 1, "123456", "", 0, 1, 1, 167, 334, 2, "" },
+ /*248*/ { BARCODE_KOREAPOST, COMPLIANT_HEIGHT, 1, "123456", "", 0, 1, 1, 167, 334, 2, "TODO: Find doc" },
+ /*249*/ { BARCODE_KOREAPOST, -1, 4, "123456", "", 0, 4, 1, 167, 334, 8, "" },
+ /*250*/ { BARCODE_DBAR_STK, -1, -1, "1234567890123", "", 0, 13, 3, 50, 100, 26, "" },
+ /*251*/ { BARCODE_DBAR_STK, -1, 1, "1234567890123", "", 0, 2.2, 3, 50, 100, 4.4000001, "" },
+ /*252*/ { BARCODE_DBAR_STK, -1, 12, "1234567890123", "", 0, 12, 3, 50, 100, 24, "" },
+ /*253*/ { BARCODE_DBAR_STK, COMPLIANT_HEIGHT, 12, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 12, 3, 50, 100, 24, "" },
+ /*254*/ { BARCODE_DBAR_STK, COMPLIANT_HEIGHT, 13, "1234567890123", "", 0, 13, 3, 50, 100, 26, "" },
+ /*255*/ { BARCODE_DBAR_OMNSTK, -1, -1, "1234567890123", "", 0, 69, 5, 50, 100, 138, "" },
+ /*256*/ { BARCODE_DBAR_OMNSTK, -1, 1, "1234567890123", "", 0, 4, 5, 50, 100, 8, "" },
+ /*257*/ { BARCODE_DBAR_OMNSTK, -1, 68, "1234567890123", "", 0, 68, 5, 50, 100, 136, "" },
+ /*258*/ { BARCODE_DBAR_OMNSTK, COMPLIANT_HEIGHT, 68, "1234567890123", "", ZINT_WARN_NONCOMPLIANT, 68, 5, 50, 100, 136, "" },
+ /*259*/ { BARCODE_DBAR_OMNSTK, COMPLIANT_HEIGHT, 69, "1234567890123", "", 0, 69, 5, 50, 100, 138, "" },
+ /*260*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142, "2 rows" },
+ /*261*/ { BARCODE_DBAR_EXPSTK, -1, 1, "[01]12345678901231", "", 0, 4, 5, 102, 204, 8, "" },
+ /*262*/ { BARCODE_DBAR_EXPSTK, -1, 70, "[01]12345678901231", "", 0, 70, 5, 102, 204, 140, "" },
+ /*263*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, 70, "[01]12345678901231", "", ZINT_WARN_NONCOMPLIANT, 70, 5, 102, 204, 140, "" },
+ /*264*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, 71, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142, "" },
+ /*265*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]09501101530003[3920]123456789012345", "", 0, 108, 9, 102, 204, 216, "3 rows" },
+ /*266*/ { BARCODE_DBAR_EXPSTK, -1, 1, "[01]09501101530003[3920]123456789012345", "", 0, 7.5, 9, 102, 204, 15, "" },
+ /*267*/ { BARCODE_DBAR_EXPSTK, -1, 107.5, "[01]09501101530003[3920]123456789012345", "", 0, 107.5, 9, 102, 204, 215, "" },
+ /*268*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, 107.5, "[01]09501101530003[3920]123456789012345", "", ZINT_WARN_NONCOMPLIANT, 107.5, 9, 102, 204, 215, "" },
+ /*269*/ { BARCODE_DBAR_EXPSTK, COMPLIANT_HEIGHT, 108, "[01]09501101530003[3920]123456789012345", "", 0, 108, 9, 102, 204, 216, "" },
+ /*270*/ { BARCODE_PLANET, -1, -1, "12345678901", "", 0, 12, 2, 123, 246, 24, "" },
+ /*271*/ { BARCODE_PLANET, -1, 1, "12345678901", "", 0, 1, 2, 123, 246, 2, "" },
+ /*272*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 1, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 1.25, 2, 123, 246, 2.5, "" },
+ /*273*/ { BARCODE_PLANET, -1, 4.5, "12345678901", "", 0, 4.5, 2, 123, 246, 9, "" },
+ /*274*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 4.5, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 4.5, 2, 123, 246, 9, "" },
+ /*275*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 4.6, "12345678901", "", 0, 4.5999999, 2, 123, 246, 9.1999998, "" },
+ /*276*/ { BARCODE_PLANET, -1, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
+ /*277*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 9, "12345678901", "", 0, 9, 2, 123, 246, 18, "" },
+ /*278*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 9.1, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 9.1000004, 2, 123, 246, 18.200001, "" },
+ /*279*/ { BARCODE_PLANET, -1, 24, "12345678901", "", 0, 24, 2, 123, 246, 48, "" },
+ /*280*/ { BARCODE_PLANET, COMPLIANT_HEIGHT, 24, "12345678901", "", ZINT_WARN_NONCOMPLIANT, 24, 2, 123, 246, 48, "" },
+ /*281*/ { BARCODE_MICROPDF417, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 20, 10, 82, 164, 40, "10 rows" },
+ /*282*/ { BARCODE_MICROPDF417, -1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 5, 10, 82, 164, 10, "" },
+ /*283*/ { BARCODE_MICROPDF417, -1, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 5, 10, 82, 164, 10, "" },
+ /*284*/ { BARCODE_MICROPDF417, -1, 19, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 19, 10, 82, 164, 38, "" },
+ /*285*/ { BARCODE_MICROPDF417, -1, 30, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 30, 10, 82, 164, 60, "" },
+ /*286*/ { BARCODE_MICROPDF417, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, 40, 20, 55, 110, 80, "20 rows" },
+ /*287*/ { BARCODE_MICROPDF417, -1, 20, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", "", ZINT_WARN_NONCOMPLIANT, 20, 20, 55, 110, 40, "" },
+ /*288*/ { BARCODE_USPS_IMAIL, -1, -1, "12345678901234567890", "", 0, 8, 3, 129, 258, 16, "" },
+ /*289*/ { BARCODE_USPS_IMAIL, -1, 1, "12345678901234567890", "", 0, 2, 3, 129, 258, 4, "" },
+ /*290*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 1, "12345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 1.5104165, 3, 129, 258, 3.020833, "" },
+ /*291*/ { BARCODE_USPS_IMAIL, -1, 4.8, "12345678901234567890", "", 0, 4.8000002, 3, 129, 258, 9.6000004, "" },
+ /*292*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 4.8, "12345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 4.8000002, 3, 129, 258, 9.6000004, "" },
+ /*293*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 4.9, "12345678901234567890", "", 0, 4.9000001, 3, 129, 258, 9.8000002, "" },
+ /*294*/ { BARCODE_USPS_IMAIL, -1, 7.7, "12345678901234567890", "", 0, 7.6999998, 3, 129, 258, 15.4, "" },
+ /*295*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 7.7, "12345678901234567890", "", 0, 7.7000003, 3, 129, 258, 15.400001, "" },
+ /*296*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, 7.8, "12345678901234567890", "", ZINT_WARN_NONCOMPLIANT, 7.7999997, 3, 129, 258, 15.599999, "" },
+ /*297*/ { BARCODE_PLESSEY, -1, 1, "1234567890", "", 0, 1, 1, 227, 454, 2, "" },
+ /*298*/ { BARCODE_PLESSEY, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 227, 454, 2, "TODO: Find doc" },
+ /*299*/ { BARCODE_PLESSEY, -1, 4, "1234567890", "", 0, 4, 1, 227, 454, 8, "" },
+ /*300*/ { BARCODE_TELEPEN_NUM, -1, 1, "1234567890", "", 0, 1, 1, 128, 256, 2, "" },
+ /*301*/ { BARCODE_TELEPEN_NUM, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 128, 256, 2, "No known min" },
+ /*302*/ { BARCODE_TELEPEN_NUM, -1, 4, "1234567890", "", 0, 4, 1, 128, 256, 8, "" },
+ /*303*/ { BARCODE_ITF14, -1, 1, "1234567890", "", 0, 1, 1, 135, 330, 22, "" },
+ /*304*/ { BARCODE_ITF14, -1, 5.7, "1234567890", "", 0, 5.6999998, 1, 135, 330, 31.4, "" },
+ /*305*/ { BARCODE_ITF14, COMPLIANT_HEIGHT, 5.7, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 5.6999998, 1, 135, 330, 31.4, "" },
+ /*306*/ { BARCODE_ITF14, COMPLIANT_HEIGHT, 5.8, "1234567890", "", 0, 5.8000002, 1, 135, 330, 31.6, "" },
+ /*307*/ { BARCODE_KIX, -1, -1, "1234567890", "", 0, 8, 3, 79, 158, 16, "" },
+ /*308*/ { BARCODE_KIX, -1, 1, "1234567890", "", 0, 2, 3, 79, 158, 4, "" },
+ /*309*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1.9615386, 3, 79, 158, 3.9230771, "" },
+ /*310*/ { BARCODE_KIX, -1, 6.4, "1234567890", "", 0, 6.4000001, 3, 79, 158, 12.8, "" },
+ /*311*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 6.4, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 6.3999996, 3, 79, 158, 12.799999, "" },
+ /*312*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 6.5, "1234567890", "", 0, 6.5, 3, 79, 158, 13, "" },
+ /*313*/ { BARCODE_KIX, -1, 10.8, "1234567890", "", 0, 10.8, 3, 79, 158, 21.6, "" },
+ /*314*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 10.8, "1234567890", "", 0, 10.8, 3, 79, 158, 21.6, "" },
+ /*315*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 10.9, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 10.9, 3, 79, 158, 21.799999, "" },
+ /*316*/ { BARCODE_KIX, -1, 16, "1234567890", "", 0, 16, 3, 79, 158, 32, "" },
+ /*317*/ { BARCODE_KIX, COMPLIANT_HEIGHT, 16, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 16, 3, 79, 158, 32, "" },
+ /*318*/ { BARCODE_AZTEC, -1, 1, "1234567890AB", "", 0, 15, 15, 15, 30, 30, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*319*/ { BARCODE_DAFT, -1, -1, "DAFTDAFTDAFTDAFT", "", 0, 8, 3, 31, 62, 16, "" },
+ /*320*/ { BARCODE_DAFT, -1, 1, "DAFTDAFTDAFTDAFT", "", 0, 2, 3, 31, 62, 4, "" },
+ /*321*/ { BARCODE_DAFT, COMPLIANT_HEIGHT, 1, "DAFTDAFTDAFTDAFT", "", 0, 2, 3, 31, 62, 4, "" },
+ /*322*/ { BARCODE_DAFT, -1, 4, "DAFTDAFTDAFTDAFT", "", 0, 4, 3, 31, 62, 8, "" },
+ /*323*/ { BARCODE_DAFT, -1, 6, "DAFTDAFTDAFTDAFT", "", 0, 6, 3, 31, 62, 12, "" },
+ /*324*/ { BARCODE_DAFT, -1, 12, "DAFTDAFTDAFTDAFT", "", 0, 12, 3, 31, 62, 24, "" },
+ /*325*/ { BARCODE_DAFT, -1, 16, "DAFTDAFTDAFTDAFT", "", 0, 16, 3, 31, 62, 32, "" },
+ /*326*/ { BARCODE_DAFT, COMPLIANT_HEIGHT, 16, "DAFTDAFTDAFTDAFT", "", 0, 16, 3, 31, 62, 32, "" },
+ /*327*/ { BARCODE_DPD, -1, 1, "0123456789012345678901234567", "", 0, 1, 1, 189, 378, 2, "" },
+ /*328*/ { BARCODE_DPD, -1, 62, "0123456789012345678901234567", "", 0, 62, 1, 189, 378, 124, "" },
+ /*329*/ { BARCODE_DPD, COMPLIANT_HEIGHT, 62, "0123456789012345678901234567", "", ZINT_WARN_NONCOMPLIANT, 62, 1, 189, 378, 124, "" },
+ /*330*/ { BARCODE_DPD, COMPLIANT_HEIGHT, 62.5, "0123456789012345678901234567", "", 0, 62.5, 1, 189, 378, 125, "" },
+ /*331*/ { BARCODE_MICROQR, -1, 1, "12345", "", 0, 11, 11, 11, 22, 22, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*332*/ { BARCODE_HIBC_128, -1, 1, "1234567890", "", 0, 1, 1, 123, 246, 2, "" },
+ /*333*/ { BARCODE_HIBC_128, COMPLIANT_HEIGHT, 1, "1234567890", "", 0, 1, 1, 123, 246, 2, "" },
+ /*334*/ { BARCODE_HIBC_128, -1, 4, "1234567890", "", 0, 4, 1, 123, 246, 8, "" },
+ /*335*/ { BARCODE_HIBC_39, -1, 1, "1234567890", "", 0, 1, 1, 223, 446, 2, "" },
+ /*336*/ { BARCODE_HIBC_39, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1, 1, 223, 446, 2, "" },
+ /*337*/ { BARCODE_HIBC_39, -1, 4, "1234567890", "", 0, 4, 1, 223, 446, 8, "" },
+ /*338*/ { BARCODE_HIBC_DM, -1, 1, "ABC", "", 0, 12, 12, 12, 24, 24, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*339*/ { BARCODE_HIBC_QR, -1, 1, "1234567890AB", "", 0, 21, 21, 21, 42, 42, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*340*/ { BARCODE_HIBC_PDF, -1, -1, "ABCDEF", "", 0, 21, 7, 103, 206, 42, "7 rows" },
+ /*341*/ { BARCODE_HIBC_PDF, -1, 1, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3.5, 7, 103, 206, 7, "" },
+ /*342*/ { BARCODE_HIBC_PDF, -1, 4, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 4, 7, 103, 206, 8, "" },
+ /*343*/ { BARCODE_HIBC_PDF, -1, 36, "ABCDEF", "", 0, 36, 7, 103, 206, 72, "" },
+ /*344*/ { BARCODE_HIBC_MICPDF, -1, -1, "ABCDEF", "", 0, 12, 6, 82, 164, 24, "6 rows" },
+ /*345*/ { BARCODE_HIBC_MICPDF, -1, 1, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 3, 6, 82, 164, 6, "" },
+ /*346*/ { BARCODE_HIBC_MICPDF, -1, 4, "ABCDEF", "", ZINT_WARN_NONCOMPLIANT, 4, 6, 82, 164, 8, "" },
+ /*347*/ { BARCODE_HIBC_MICPDF, -1, 47, "ABCDEF", "", 0, 47, 6, 82, 164, 94, "" },
+ /*348*/ { BARCODE_HIBC_BLOCKF, -1, -1, "1234567890", "", 0, 30, 3, 101, 242, 64, "3 rows" },
+ /*349*/ { BARCODE_HIBC_BLOCKF, -1, 1, "1234567890", "", 0, 1.5, 3, 101, 242, 7, "" },
+ /*350*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 1.5, 3, 101, 242, 7, "" },
+ /*351*/ { BARCODE_HIBC_BLOCKF, -1, 4, "1234567890", "", 0, 4, 3, 101, 242, 12, "" },
+ /*352*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 4, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 4, 3, 101, 242, 12, "" },
+ /*353*/ { BARCODE_HIBC_BLOCKF, -1, 23, "1234567890", "", 0, 23, 3, 101, 242, 50, "" },
+ /*354*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 23, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 23, 3, 101, 242, 50, "" },
+ /*355*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 24, "1234567890", "", 0, 24, 3, 101, 242, 52, "" },
+ /*356*/ { BARCODE_HIBC_BLOCKF, -1, 60, "1234567890", "", 0, 60, 3, 101, 242, 124, "" },
+ /*357*/ { BARCODE_HIBC_BLOCKF, COMPLIANT_HEIGHT, 60, "1234567890", "", 0, 60, 3, 101, 242, 124, "" },
+ /*358*/ { BARCODE_HIBC_AZTEC, -1, 1, "1234567890AB", "", 0, 19, 19, 19, 38, 38, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*359*/ { BARCODE_DOTCODE, -1, 1, "ABC", "", 0, 11, 11, 16, 32, 22, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*360*/ { BARCODE_HANXIN, -1, 1, "1234567890AB", "", 0, 23, 23, 23, 46, 46, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*361*/ { BARCODE_MAILMARK, -1, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
+ /*362*/ { BARCODE_MAILMARK, -1, 1, "01000000000000000AA00AA0A", "", 0, 2.5, 3, 155, 310, 5, "" },
+ /*363*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 1, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 1.9615386, 3, 155, 310, 3.9230771, "" },
+ /*364*/ { BARCODE_MAILMARK, -1, 6.4, "01000000000000000AA00AA0A", "", 0, 6.4000001, 3, 155, 310, 12.8, "" },
+ /*365*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 6.4, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 6.3999996, 3, 155, 310, 12.799999, "" },
+ /*366*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 6.5, "01000000000000000AA00AA0A", "", 0, 6.5, 3, 155, 310, 13, "" },
+ /*367*/ { BARCODE_MAILMARK, -1, 10, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
+ /*368*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 10, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, "" },
+ /*369*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 11, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 11, 3, 155, 310, 22, "" },
+ /*370*/ { BARCODE_MAILMARK, -1, 15, "01000000000000000AA00AA0A", "", 0, 15, 3, 155, 310, 30, "" },
+ /*371*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 15, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 15, 3, 155, 310, 30, "" },
+ /*372*/ { BARCODE_MAILMARK, -1, 20, "01000000000000000AA00AA0A", "", 0, 20, 3, 155, 310, 40, "" },
+ /*373*/ { BARCODE_MAILMARK, COMPLIANT_HEIGHT, 20, "01000000000000000AA00AA0A", "", ZINT_WARN_NONCOMPLIANT, 20, 3, 155, 310, 40, "" },
+ /*374*/ { BARCODE_AZRUNE, -1, 1, "1", "", 0, 11, 11, 11, 22, 22, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*375*/ { BARCODE_CODE32, -1, 1, "12345678", "", 0, 1, 1, 103, 206, 2, "" },
+ /*376*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, 1, "12345678", "", ZINT_WARN_NONCOMPLIANT, 1, 1, 103, 206, 2, "" },
+ /*377*/ { BARCODE_CODE32, -1, 19, "12345678", "", 0, 19, 1, 103, 206, 38, "" },
+ /*378*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, 19, "12345678", "", ZINT_WARN_NONCOMPLIANT, 19, 1, 103, 206, 38, "" },
+ /*379*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, 20, "12345678", "", 0, 20, 1, 103, 206, 40, "" },
+ /*380*/ { BARCODE_EANX_CC, -1, -1, "123456789012", "[20]01", 0, 50, 7, 99, 234, 110, "EAN-13, CC-A 3 rows" },
+ /*381*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
+ /*382*/ { BARCODE_EANX_CC, -1, 81, "123456789012", "[20]01", 0, 81, 7, 99, 234, 172, "" },
+ /*383*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 81, "123456789012", "[20]01", ZINT_WARN_NONCOMPLIANT, 81, 7, 99, 234, 172, "" },
+ /*384*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 81.25, "123456789012", "[20]01", 0, 81.25, 7, 99, 234, 172.5, "" },
+ /*385*/ { BARCODE_EANX_CC, -1, -1, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 50, 9, 99, 234, 110, "EAN-13, CC-A 5 rows" },
+ /*386*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 16.5, 9, 99, 234, 43, "" },
+ /*387*/ { BARCODE_EANX_CC, -1, 85, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 85, 9, 99, 234, 180, "" },
+ /*388*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 85, "123456789012", "[20]01[90]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 85, 9, 99, 234, 180, "" },
+ /*389*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 85.25, "123456789012", "[20]01[90]123456789012345678901234567890", 0, 85.25, 9, 99, 234, 180.5, "" },
+ /*390*/ { BARCODE_EANX_CC, -1, -1, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 50, 11, 99, 234, 110, "EAN-13, CC-A 7 rows" },
+ /*391*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.5, 11, 99, 234, 51, "" },
+ /*392*/ { BARCODE_EANX_CC, -1, 89, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 89, 11, 99, 234, 188, "" },
+ /*393*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 89, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", ZINT_WARN_NONCOMPLIANT, 89, 11, 99, 234, 188, "" },
+ /*394*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 89.25, "123456789012", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 89.25, 11, 99, 234, 188.5, "" },
+ /*395*/ { BARCODE_EANX_CC, -1, -1, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 14, 99, 234, 110, "EAN-13, CC-B 10 rows" },
+ /*396*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 26.5, 14, 99, 234, 63, "" },
+ /*397*/ { BARCODE_EANX_CC, -1, 95, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 95, 14, 99, 234, 200, "" },
+ /*398*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 95, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 95, 14, 99, 234, 200, "" },
+ /*399*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 95.25, "123456789012", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 95.25, 14, 99, 234, 200.5, "" },
+ /*400*/ { BARCODE_EANX_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234", 0, 50, 10, 72, 172, 110, "EAN-8, CC-A 4 rows" },
+ /*401*/ { BARCODE_EANX_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234", 0, 18.5, 10, 72, 172, 47, "" },
+ /*402*/ { BARCODE_EANX_CC, -1, 73, "1234567", "[20]01[90]123456789012345678901234", 0, 73, 10, 72, 172, 156, "" },
+ /*403*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 73, "1234567", "[20]01[90]123456789012345678901234", ZINT_WARN_NONCOMPLIANT, 73, 10, 72, 172, 156, "" },
+ /*404*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 73.25, "1234567", "[20]01[90]123456789012345678901234", 0, 73.25, 10, 72, 172, 156.5, "" },
+ /*405*/ { BARCODE_EANX_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 50, 24, 82, 192, 110, "EAN-8, CC-B 15 rows" },
+ /*406*/ { BARCODE_EANX_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 46.5, 24, 82, 192, 103, "" },
+ /*407*/ { BARCODE_EANX_CC, -1, 101, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 101, 24, 82, 192, 212, "" },
+ /*408*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 101, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 101, 24, 82, 192, 212, "" },
+ /*409*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, 101.25, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 101.25, 24, 82, 192, 212.5, "" },
+ /*410*/ { BARCODE_GS1_128_CC, -1, -1, "[01]12345678901231", "[20]01", 0, 50, 5, 145, 290, 100, "CC-A 3 rows" },
+ /*411*/ { BARCODE_GS1_128_CC, -1, 1, "[01]12345678901231", "[20]01", 0, 7.5, 5, 145, 290, 15, "" },
+ /*412*/ { BARCODE_GS1_128_CC, -1, 12.5, "[01]12345678901231", "[20]01", 0, 12.5, 5, 145, 290, 25, "" },
+ /*413*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 12.5, "[01]12345678901231", "[20]01", ZINT_WARN_NONCOMPLIANT, 12.5, 5, 145, 290, 25, "" },
+ /*414*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 12.75, "[01]12345678901231", "[20]01", 0, 12.75, 5, 145, 290, 25.5, "" },
+ /*415*/ { BARCODE_GS1_128_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 50, 9, 145, 290, 100, "CC-A 7 rows" },
+ /*416*/ { BARCODE_GS1_128_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 15.5, 9, 145, 290, 31, "" },
+ /*417*/ { BARCODE_GS1_128_CC, -1, 20.7, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.700001, 9, 145, 290, 41.400002, "" },
+ /*418*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 20.7, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", ZINT_WARN_NONCOMPLIANT, 20.700001, 9, 145, 290, 41.400002, "" },
+ /*419*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 20.75, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 20.75, 9, 145, 290, 41.5, "" },
+ /*420*/ { BARCODE_GS1_128_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 12, 145, 290, 100, "CC-B 10 rows" },
+ /*421*/ { BARCODE_GS1_128_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 145, 290, 43, "" },
+ /*422*/ { BARCODE_GS1_128_CC, -1, 26.5, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 26.5, 12, 145, 290, 53, "" },
+ /*423*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 26.5, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 26.5, 12, 145, 290, 53, "" },
+ /*424*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 26.75, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 26.75, 12, 145, 290, 53.5, "" },
+ /*425*/ { BARCODE_GS1_128_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 91.5, 32, 154, 308, 183, "CC-C 30 rows" },
+ /*426*/ { BARCODE_GS1_128_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 91.5, 32, 154, 308, 183, "" },
+ /*427*/ { BARCODE_GS1_128_CC, -1, 96.5, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 96.5, 32, 154, 308, 193, "" },
+ /*428*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 96.5, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 96.5, 32, 154, 308, 193, "" },
+ /*429*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, 96.75, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890", 0, 96.75, 32, 154, 308, 193.5, "" },
+ /*430*/ { BARCODE_DBAR_OMN_CC, -1, -1, "1234567890123", "[20]01[90]1234567890", 0, 21, 5, 100, 200, 42, "CC-A 3 rows" },
+ /*431*/ { BARCODE_DBAR_OMN_CC, -1, 1, "1234567890123", "[20]01[90]1234567890", 0, 7.5, 5, 100, 200, 15, "" },
+ /*432*/ { BARCODE_DBAR_OMN_CC, -1, 19.9, "1234567890123", "[20]01[90]1234567890", 0, 19.9, 5, 100, 200, 39.799999, "" },
+ /*433*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 19.9, "1234567890123", "[20]01[90]1234567890", ZINT_WARN_NONCOMPLIANT, 19.9, 5, 100, 200, 39.799999, "" },
+ /*434*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 20, "1234567890123", "[20]01[90]1234567890", 0, 20, 5, 100, 200, 40, "" },
+ /*435*/ { BARCODE_DBAR_OMN_CC, -1, -1, "1234567890123", "[20]01[90]12345678901234567890", 0, 23, 6, 100, 200, 46, "CC-A 4 rows" },
+ /*436*/ { BARCODE_DBAR_OMN_CC, -1, 1, "1234567890123", "[20]01[90]12345678901234567890", 0, 9.5, 6, 100, 200, 19, "" },
+ /*437*/ { BARCODE_DBAR_OMN_CC, -1, 21.9, "1234567890123", "[20]01[90]12345678901234567890", 0, 21.9, 6, 100, 200, 43.799999, "" },
+ /*438*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 21.9, "1234567890123", "[20]01[90]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 21.9, 6, 100, 200, 43.799999, "" },
+ /*439*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 22, "1234567890123", "[20]01[90]12345678901234567890", 0, 22, 6, 100, 200, 44, "" },
+ /*440*/ { BARCODE_DBAR_OMN_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 35, 12, 100, 200, 70, "CC-B 10 rows" },
+ /*441*/ { BARCODE_DBAR_OMN_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 100, 200, 43, "" },
+ /*442*/ { BARCODE_DBAR_OMN_CC, -1, 33.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 33.900002, 12, 100, 200, 67.800003, "" },
+ /*443*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 33.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 33.900002, 12, 100, 200, 67.800003, "" },
+ /*444*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 34, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 34, 12, 100, 200, 68, "" },
+ /*445*/ { BARCODE_DBAR_OMN_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 39, 14, 100, 200, 78, "CC-B 12 rows" },
+ /*446*/ { BARCODE_DBAR_OMN_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 25.5, 14, 100, 200, 51, "" },
+ /*447*/ { BARCODE_DBAR_OMN_CC, -1, 37.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 37.900002, 14, 100, 200, 75.800003, "" },
+ /*448*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 37.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 37.900002, 14, 100, 200, 75.800003, "" },
+ /*449*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, 38, "1234567890123", "[20]01[90]123456789012345678901234567890[91]123456789012345678901234567890", 0, 38, 14, 100, 200, 76, "" },
+ /*450*/ { BARCODE_DBAR_LTD_CC, -1, -1, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 38, "CC-A 4 rows" },
+ /*451*/ { BARCODE_DBAR_LTD_CC, -1, 1, "1234567890123", "[20]01", 0, 9.5, 6, 79, 158, 19, "" },
+ /*452*/ { BARCODE_DBAR_LTD_CC, -1, 18, "1234567890123", "[20]01", 0, 18, 6, 79, 158, 36, "" },
+ /*453*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 18, "1234567890123", "[20]01", ZINT_WARN_NONCOMPLIANT, 18, 6, 79, 158, 36, "" },
+ /*454*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 19, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 38, "" },
+ /*455*/ { BARCODE_DBAR_LTD_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 25, 9, 79, 158, 50, "CC-A 7 rows" },
+ /*456*/ { BARCODE_DBAR_LTD_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 15.5, 9, 79, 158, 31, "" },
+ /*457*/ { BARCODE_DBAR_LTD_CC, -1, 24.9, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 24.9, 9, 79, 158, 49.799999, "" },
+ /*458*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 24.9, "1234567890123", "[20]01[90]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 24.9, 9, 79, 158, 49.799999, "" },
+ /*459*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 25, "1234567890123", "[20]01[90]123456789012345678901234567890", 0, 25, 9, 79, 158, 50, "" },
+ /*460*/ { BARCODE_DBAR_LTD_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 51, 22, 88, 176, 102, "CC-B 20 rows" },
+ /*461*/ { BARCODE_DBAR_LTD_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 41.5, 22, 88, 176, 83, "" },
+ /*462*/ { BARCODE_DBAR_LTD_CC, -1, 50.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 50.900002, 22, 88, 176, 101.8, "" },
+ /*463*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 50.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 50.900002, 22, 88, 176, 101.8, "" },
+ /*464*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, 51, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890", 0, 51, 22, 88, 176, 102, "" },
+ /*465*/ { BARCODE_DBAR_EXP_CC, -1, -1, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 82, "CC-A 3 rows" },
+ /*466*/ { BARCODE_DBAR_EXP_CC, -1, 1, "[01]12345678901231", "[20]01", 0, 7.5, 5, 134, 268, 15, "" },
+ /*467*/ { BARCODE_DBAR_EXP_CC, -1, 40, "[01]12345678901231", "[20]01", 0, 40, 5, 134, 268, 80, "" },
+ /*468*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 40, "[01]12345678901231", "[20]01", ZINT_WARN_NONCOMPLIANT, 40, 5, 134, 268, 80, "" },
+ /*469*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 41, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 82, "" },
+ /*470*/ { BARCODE_DBAR_EXP_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 45, 7, 134, 268, 90, "CC-A 5 rows" },
+ /*471*/ { BARCODE_DBAR_EXP_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 11.5, 7, 134, 268, 23, "" },
+ /*472*/ { BARCODE_DBAR_EXP_CC, -1, 44, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 44, 7, 134, 268, 88, "" },
+ /*473*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 44, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, 44, 7, 134, 268, 88, "" },
+ /*474*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 45, "[01]12345678901231", "[20]01[90]123456789012345678901234567890", 0, 45, 7, 134, 268, 90, "" },
+ /*475*/ { BARCODE_DBAR_EXP_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 55, 12, 134, 268, 110, "CC-B 10 rows" },
+ /*476*/ { BARCODE_DBAR_EXP_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 21.5, 12, 134, 268, 43, "" },
+ /*477*/ { BARCODE_DBAR_EXP_CC, -1, 54, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 54, 12, 134, 268, 108, "" },
+ /*478*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 54, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 54, 12, 134, 268, 108, "" },
+ /*479*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, 55, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 55, 12, 134, 268, 110, "" },
+ /*480*/ { BARCODE_UPCA_CC, -1, -1, "12345678901", "[20]01", 0, 50, 7, 99, 234, 110, "CC-A 3 rows" },
+ /*481*/ { BARCODE_UPCA_CC, -1, 1, "12345678901", "[20]01", 0, 12.5, 7, 99, 234, 35, "" },
+ /*482*/ { BARCODE_UPCA_CC, -1, 81.24, "12345678901", "[20]01", 0, 81.239998, 7, 99, 234, 172.48, "" },
+ /*483*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 81.24, "12345678901", "[20]01", ZINT_WARN_NONCOMPLIANT, 81.239998, 7, 99, 234, 172.48, "" },
+ /*484*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 81.25, "12345678901", "[20]01", 0, 81.25, 7, 99, 234, 172.5, "" },
+ /*485*/ { BARCODE_UPCA_CC, -1, -1, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 50, 10, 99, 234, 110, "CC-A 6 rows" },
+ /*486*/ { BARCODE_UPCA_CC, -1, 1, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 18.5, 10, 99, 234, 47, "" },
+ /*487*/ { BARCODE_UPCA_CC, -1, 87.24, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 87.239998, 10, 99, 234, 184.48, "" },
+ /*488*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 87.24, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", ZINT_WARN_NONCOMPLIANT, 87.239998, 10, 99, 234, 184.48, "" },
+ /*489*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 87.25, "12345678901", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 87.25, 10, 99, 234, 184.5, "" },
+ /*490*/ { BARCODE_UPCA_CC, -1, -1, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 50, 16, 99, 234, 110, "CC-B 12 rows" },
+ /*491*/ { BARCODE_UPCA_CC, -1, 1, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 30.5, 16, 99, 234, 71, "" },
+ /*492*/ { BARCODE_UPCA_CC, -1, 99, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 99, 16, 99, 234, 208, "" },
+ /*493*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 99, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", ZINT_WARN_NONCOMPLIANT, 99, 16, 99, 234, 208, "" },
+ /*494*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, 99.25, "12345678901", "[20]01[90]123456789012345678901234567890[91]123456789012345678912345678901234567", 0, 99.25, 16, 99, 234, 208.5, "" },
+ /*495*/ { BARCODE_UPCE_CC, -1, -1, "1234567", "[20]01[90]123456789012345678", 0, 50, 11, 55, 142, 110, "CC-A 7 rows" },
+ /*496*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[20]01[90]123456789012345678", 0, 20.5, 11, 55, 142, 51, "" },
+ /*497*/ { BARCODE_UPCE_CC, -1, 89, "1234567", "[20]01[90]123456789012345678", 0, 89, 11, 55, 142, 188, "" },
+ /*498*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 89, "1234567", "[20]01[90]123456789012345678", ZINT_WARN_NONCOMPLIANT, 89, 11, 55, 142, 188, "" },
+ /*499*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 89.25, "1234567", "[20]01[90]123456789012345678", 0, 89.25, 11, 55, 142, 188.5, "" },
+ /*500*/ { BARCODE_UPCE_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 50, 16, 55, 142, 110, "CC-A 12 rows" },
+ /*501*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 30.5, 16, 55, 142, 71, "" },
+ /*502*/ { BARCODE_UPCE_CC, -1, 99, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 99, 16, 55, 142, 208, "" },
+ /*503*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 99, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", ZINT_WARN_NONCOMPLIANT, 99, 16, 55, 142, 208, "" },
+ /*504*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 99.25, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 99.25, 16, 55, 142, 208.5, "" },
+ /*505*/ { BARCODE_UPCE_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 50, 21, 55, 142, 110, "CC-B 17 rows" },
+ /*506*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 40.5, 21, 55, 142, 91, "" },
+ /*507*/ { BARCODE_UPCE_CC, -1, 109, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 109, 21, 55, 142, 228, "" },
+ /*508*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 109, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 109, 21, 55, 142, 228, "" },
+ /*509*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 109.25, "1234567", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 109.25, 21, 55, 142, 228.5, "" },
+ /*510*/ { BARCODE_UPCE_CC, -1, -1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "CC-B 23 rows" },
+ /*511*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 52.5, 27, 55, 142, 115, "" },
+ /*512*/ { BARCODE_UPCE_CC, -1, 121, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 121, 27, 55, 142, 252, "" },
+ /*513*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 121, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", ZINT_WARN_NONCOMPLIANT, 121, 27, 55, 142, 252, "" },
+ /*514*/ { BARCODE_UPCE_CC, COMPLIANT_HEIGHT, 121.25, "1234567", "[20]01[90]123456789012345678901234567890[91]1234567890123456789012345678901234567", 0, 121.25, 27, 55, 142, 252.5, "" },
+ /*515*/ { BARCODE_DBAR_STK_CC, -1, -1, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "CC-A 5 rows" },
+ /*516*/ { BARCODE_DBAR_STK_CC, -1, 1, "1234567890123", "[20]01", 0, 13.2, 9, 56, 112, 26.4, "" },
+ /*517*/ { BARCODE_DBAR_STK_CC, -1, 23.9, "1234567890123", "[20]01", 0, 23.9, 9, 56, 112, 47.799999, "" },
+ /*518*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 23.9, "1234567890123", "[20]01", ZINT_WARN_NONCOMPLIANT, 23.9, 9, 56, 112, 47.799999, "" },
+ /*519*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 24, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48, "" },
+ /*520*/ { BARCODE_DBAR_STK_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 38, 16, 56, 112, 76, "CC-A 12 rows" },
+ /*521*/ { BARCODE_DBAR_STK_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 27.200001, 16, 56, 112, 54.400002, "" },
+ /*522*/ { BARCODE_DBAR_STK_CC, -1, 37.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 37.900002, 16, 56, 112, 75.800003, "" },
+ /*523*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 37.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", ZINT_WARN_NONCOMPLIANT, 37.900002, 16, 56, 112, 75.800003, "" },
+ /*524*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 38, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678", 0, 38, 16, 56, 112, 76, "" },
+ /*525*/ { BARCODE_DBAR_STK_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 48, 21, 56, 112, 96, "CC-B 17 rows" },
+ /*526*/ { BARCODE_DBAR_STK_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 37.200001, 21, 56, 112, 74.400002, "" },
+ /*527*/ { BARCODE_DBAR_STK_CC, -1, 47.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 47.900002, 21, 56, 112, 95.800003, "" },
+ /*528*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 47.9, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 47.900002, 21, 56, 112, 95.800003, "" },
+ /*529*/ { BARCODE_DBAR_STK_CC, COMPLIANT_HEIGHT, 48, "1234567890123", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 48, 21, 56, 112, 96, "" },
+ /*530*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, "1234567890123", "[20]01[90]1234567890123456", 0, 82, 12, 56, 112, 164, "CC-A 6 rows" },
+ /*531*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "1234567890123", "[20]01[90]1234567890123456", 0, 17, 12, 56, 112, 34, "" },
+ /*532*/ { BARCODE_DBAR_OMNSTK_CC, -1, 81, "1234567890123", "[20]01[90]1234567890123456", 0, 81, 12, 56, 112, 162, "" },
+ /*533*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 81, "1234567890123", "[20]01[90]1234567890123456", ZINT_WARN_NONCOMPLIANT, 81, 12, 56, 112, 162, "" },
+ /*534*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 82, "1234567890123", "[20]01[90]1234567890123456", 0, 82, 12, 56, 112, 164, "" },
+ /*535*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 94, 18, 56, 112, 188, "CC-A 12 rows" },
+ /*536*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 29, 18, 56, 112, 58, "" },
+ /*537*/ { BARCODE_DBAR_OMNSTK_CC, -1, 93.5, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 93.5, 18, 56, 112, 187, "" },
+ /*538*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 93.5, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", ZINT_WARN_NONCOMPLIANT, 93.5, 18, 56, 112, 187, "" },
+ /*539*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 94, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567", 0, 94, 18, 56, 112, 188, "" },
+ /*540*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 104, 23, 56, 112, 208, "CC-B 17 rows" },
+ /*541*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 39, 23, 56, 112, 78, "" },
+ /*542*/ { BARCODE_DBAR_OMNSTK_CC, -1, 103, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 103, 23, 56, 112, 206, "" },
+ /*543*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 103, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", ZINT_WARN_NONCOMPLIANT, 103, 23, 56, 112, 206, "" },
+ /*544*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, 104, "1234567890123", "[20]01[90]123456789012345678901234567890[91]1234567890", 0, 104, 23, 56, 112, 208, "" },
+ /*545*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156, "3 rows, CC-A 3 rows" },
+ /*546*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[01]12345678901231", "[20]01", 0, 11, 9, 102, 204, 22, "" },
+ /*547*/ { BARCODE_DBAR_EXPSTK_CC, -1, 77, "[01]12345678901231", "[20]01", 0, 77, 9, 102, 204, 154, "" },
+ /*548*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 77, "[01]12345678901231", "[20]01", ZINT_WARN_NONCOMPLIANT, 77, 9, 102, 204, 154, "" },
+ /*549*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 78, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156, "" },
+ /*550*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 189, 21, 102, 204, 378, "5 rows, CC-A 3 rows" },
+ /*551*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 21.5, 21, 102, 204, 43, "" },
+ /*552*/ { BARCODE_DBAR_EXPSTK_CC, -1, 188, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 188, 21, 102, 204, 376, "" },
+ /*553*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 188, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", ZINT_WARN_NONCOMPLIANT, 188, 21, 102, 204, 376, "" },
+ /*554*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 189, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01", 0, 189, 21, 102, 204, 378, "" },
+ /*555*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 80, 10, 102, 204, 160, "3 rows, CC-A 4 rows" },
+ /*556*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 13, 10, 102, 204, 26, "" },
+ /*557*/ { BARCODE_DBAR_EXPSTK_CC, -1, 79, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 79, 10, 102, 204, 158, "" },
+ /*558*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 79, "[01]12345678901231", "[20]01[90]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 79, 10, 102, 204, 158, "" },
+ /*559*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 80, "[01]12345678901231", "[20]01[90]12345678901234567890", 0, 80, 10, 102, 204, 160, "" },
+ /*560*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 92, 16, 102, 204, 184, "3 rows, CC-B 10 rows" },
+ /*561*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 25, 16, 102, 204, 50, "" },
+ /*562*/ { BARCODE_DBAR_EXPSTK_CC, -1, 91, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 91, 16, 102, 204, 182, "" },
+ /*563*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 91, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 91, 16, 102, 204, 182, "" },
+ /*564*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 92, "[01]12345678901231", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 92, 16, 102, 204, 184, "" },
+ /*565*/ { BARCODE_DBAR_EXPSTK_CC, -1, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 203, 28, 102, 204, 406, "5 rows, CC-B 10 rows" },
+ /*566*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 35.5, 28, 102, 204, 71, "" },
+ /*567*/ { BARCODE_DBAR_EXPSTK_CC, -1, 202, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 202, 28, 102, 204, 404, "" },
+ /*568*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 202, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", ZINT_WARN_NONCOMPLIANT, 202, 28, 102, 204, 404, "" },
+ /*569*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, 203, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", "[20]01[90]123456789012345678901234567890[91]12345678901234567890", 0, 203, 28, 102, 204, 406, "" },
+ /*570*/ { BARCODE_CHANNEL, -1, 1, "1", "", 0, 1, 1, 19, 38, 2, "" },
+ /*571*/ { BARCODE_CHANNEL, -1, 3.75, "123", "", 0, 3.75, 1, 23, 46, 7.5, "" },
+ /*572*/ { BARCODE_CHANNEL, COMPLIANT_HEIGHT, 3.75, "123", "", ZINT_WARN_NONCOMPLIANT, 3.75, 1, 23, 46, 7.5, "Min height data-length dependent" },
+ /*573*/ { BARCODE_CHANNEL, COMPLIANT_HEIGHT, 4, "123", "", 0, 4, 1, 23, 46, 8, "" },
+ /*574*/ { BARCODE_CODEONE, -1, 1, "12345678901234567890", "", 0, 16, 16, 18, 36, 32, "Fixed height, symbol->height ignored" },
+ /*575*/ { BARCODE_GRIDMATRIX, -1, 1, "ABC", "", 0, 18, 18, 18, 36, 36, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*576*/ { BARCODE_UPNQR, -1, 1, "1234567890AB", "", 0, 77, 77, 77, 154, 154, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*577*/ { BARCODE_ULTRA, -1, 1, "1234567890", "", 0, 13, 13, 18, 36, 26, "Fixed width-to-height ratio, symbol->height ignored" },
+ /*578*/ { BARCODE_RMQR, -1, 1, "12345", "", 0, 11, 11, 27, 54, 22, "Fixed width-to-height ratio, symbol->height ignored" },
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
@@ -1784,6 +1962,9 @@ static void test_height(int index, int generate, int debug) {
assert_nonnull(symbol, "Symbol not created\n");
symbol->symbology = data[i].symbology;
+ if (data[i].output_options != -1) {
+ symbol->output_options = data[i].output_options;
+ }
if (data[i].height != -1) {
symbol->height = data[i].height;
}
@@ -1807,8 +1988,9 @@ static void test_height(int index, int generate, int debug) {
assert_nonnull(symbol->vector, "i:%d ZBarcode_Buffer_Vector(%s) vector NULL\n", i, testUtilBarcodeName(data[i].symbology));
if (generate) {
- printf(" /*%3d*/ { %s, %.5g, \"%s\", \"%s\", %s, %.8g, %d, %d, %.8g, %.8g, \"%s\" },\n",
- i, testUtilBarcodeName(data[i].symbology), data[i].height, data[i].data, data[i].composite, testUtilErrorName(data[i].ret),
+ printf(" /*%3d*/ { %s, %s, %.5g, \"%s\", \"%s\", %s, %.8g, %d, %d, %.8g, %.8g, \"%s\" },\n",
+ i, testUtilBarcodeName(data[i].symbology), testUtilOutputOptionsName(data[i].output_options),
+ data[i].height, data[i].data, data[i].composite, testUtilErrorName(data[i].ret),
symbol->height, symbol->rows, symbol->width, symbol->vector->width, symbol->vector->height, data[i].comment);
} else {
assert_equal(symbol->height, data[i].expected_height, "i:%d (%s) symbol->height %.8g != %.8g\n", i, testUtilBarcodeName(data[i].symbology), symbol->height, data[i].expected_height);
diff --git a/backend/tests/testcommon.c b/backend/tests/testcommon.c
index fe841edf..a53d0d44 100644
--- a/backend/tests/testcommon.c
+++ b/backend/tests/testcommon.c
@@ -648,6 +648,7 @@ const char *testUtilOutputOptionsName(int output_options) {
{ "OUT_BUFFER_INTERMEDIATE", OUT_BUFFER_INTERMEDIATE, 1024 },
{ "BARCODE_QUIET_ZONES", BARCODE_QUIET_ZONES, 2048 },
{ "BARCODE_NO_QUIET_ZONES", BARCODE_NO_QUIET_ZONES, 4096 },
+ { "COMPLIANT_HEIGHT", COMPLIANT_HEIGHT, 0x2000 },
};
static int const data_size = ARRAY_SIZE(data);
int set = 0;
diff --git a/backend/ultra.c b/backend/ultra.c
index eec92526..77dca6aa 100644
--- a/backend/ultra.c
+++ b/backend/ultra.c
@@ -872,7 +872,7 @@ static int ultra_generate_codewords(struct zint_symbol *symbol, const unsigned c
return codeword_count;
}
-INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int length) {
+INTERNAL int ultra(struct zint_symbol *symbol, unsigned char source[], int length) {
int data_cw_count = 0;
int acc, qcc;
int scr[3] = {0}, scr_cw_count = 0; /* Symbol Control Region (only if have Structured Append) */
diff --git a/backend/upcean.c b/backend/upcean.c
index 6fe7617f..cbc6d410 100644
--- a/backend/upcean.c
+++ b/backend/upcean.c
@@ -30,9 +30,9 @@
*/
/* vim: set ts=4 sw=4 et : */
-#define SODIUM "0123456789+"
-#define ISBN_SANE "0123456789X"
-#define ISBN_ADDON_SANE "0123456789Xx+"
+#define SODIUM "0123456789+"
+#define ISBNX_SANE "0123456789X"
+#define ISBNX_ADDON_SANE "0123456789Xx+"
#define EAN2 102
#define EAN5 105
@@ -108,7 +108,6 @@ static void upca_draw(const unsigned char source[], const int length, char dest[
/* Make a UPC-A barcode, allowing for composite if `cc_rows` set */
static int upca_cc(struct zint_symbol *symbol, const unsigned char source[], int length, char dest[], int cc_rows) {
unsigned char *gtin = symbol->text;
- float height;
int error_number = 0;
ustrcpy(gtin, source);
@@ -130,23 +129,23 @@ static int upca_cc(struct zint_symbol *symbol, const unsigned char source[], int
upca_draw(gtin, length, dest);
-#ifdef COMPLIANT_HEIGHTS
- /* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
- same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
- height = (float) (22.85 / 0.33);
- if (symbol->symbology == BARCODE_UPCA_CC) {
- symbol->height = height; /* Pass back min row == default height */
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
+ same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
+ const float height = stripf(22.85f / 0.33f);
+ if (symbol->symbology == BARCODE_UPCA_CC) {
+ symbol->height = height; /* Pass back min row == default height */
+ } else {
+ error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ }
} else {
- error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ const float height = 50.0f;
+ if (symbol->symbology == BARCODE_UPCA_CC) {
+ symbol->height = height - cc_rows * 2 - 6.0f;
+ } else {
+ (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
+ }
}
-#else
- height = 50.0f;
- if (symbol->symbology == BARCODE_UPCA_CC) {
- symbol->height = height - cc_rows * 2 - 6.0f;
- } else {
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
- }
-#endif
return error_number;
}
@@ -163,7 +162,6 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
char src_check_digit = '\0';
unsigned char equivalent[12];
unsigned char *hrt = symbol->text;
- float height;
int error_number = 0;
if (length == 8 || symbol->symbology == BARCODE_UPCE_CHK) {
@@ -297,23 +295,23 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
printf("UPC-E: %s, equivalent: %s, hrt: %s, Check digit: %c\n", source, equivalent, hrt, check_digit);
}
-#ifdef COMPLIANT_HEIGHTS
- /* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
- same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
- height = (float) (22.85 / 0.33);
- if (symbol->symbology == BARCODE_UPCE_CC) {
- symbol->height = height; /* Pass back min row == default height */
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
+ same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
+ const float height = stripf(22.85f / 0.33f);
+ 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*/);
+ }
} else {
- error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ const float height = 50.0f;
+ if (symbol->symbology == BARCODE_UPCE_CC) {
+ symbol->height = height - cc_rows * 2 - 6.0f;
+ } else {
+ (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
+ }
}
-#else
- height = 50.0f;
- if (symbol->symbology == BARCODE_UPCE_CC) {
- symbol->height = height - cc_rows * 2 - 6.0f;
- } else {
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
- }
-#endif
return error_number;
}
@@ -390,7 +388,6 @@ static int ean13_cc(struct zint_symbol *symbol, const unsigned char source[], in
int i, half_way;
char parity[6];
unsigned char *gtin = symbol->text;
- float height;
int error_number = 0;
parity[0] = '\0';
@@ -437,23 +434,23 @@ static int ean13_cc(struct zint_symbol *symbol, const unsigned char source[], in
/* stop character */
strcat(dest, "111");
-#ifdef COMPLIANT_HEIGHTS
- /* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
- same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
- height = (float) (22.85 / 0.33);
- if (symbol->symbology == BARCODE_EANX_CC) {
- symbol->height = height; /* Pass back min row == default height */
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
+ same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
+ const float height = stripf(22.85f / 0.33f);
+ if (symbol->symbology == BARCODE_EANX_CC) {
+ symbol->height = height; /* Pass back min row == default height */
+ } else {
+ error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ }
} else {
- error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ const float height = 50.0f;
+ if (symbol->symbology == BARCODE_EANX_CC) {
+ symbol->height = height - cc_rows * 2 - 6.0f;
+ } else {
+ (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
+ }
}
-#else
- height = 50.0f;
- if (symbol->symbology == BARCODE_EANX_CC) {
- symbol->height = height - cc_rows * 2 - 6.0f;
- } else {
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
- }
-#endif
return error_number;
}
@@ -465,7 +462,6 @@ static int ean13(struct zint_symbol *symbol, const unsigned char source[], int l
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 */
unsigned char *gtin = symbol->text;
- float height;
int error_number = 0;
ustrcpy(gtin, source);
@@ -487,23 +483,23 @@ static int ean8_cc(struct zint_symbol *symbol, const unsigned char source[], int
upca_draw(gtin, length, dest);
-#ifdef COMPLIANT_HEIGHTS
- /* BS EN 797:1996 4.5.1 Nominal dimensions 18.23mm / 0.33mm (X) ~ 55.24,
- same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
- height = (float) (18.23 / 0.33);
- if (symbol->symbology == BARCODE_EANX_CC) {
- symbol->height = height; /* Pass back min row == default height */
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* BS EN 797:1996 4.5.1 Nominal dimensions 18.23mm / 0.33mm (X) ~ 55.24,
+ same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
+ const float height = stripf(18.23f / 0.33f);
+ if (symbol->symbology == BARCODE_EANX_CC) {
+ symbol->height = height; /* Pass back min row == default height */
+ } else {
+ error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ }
} else {
- error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ const float height = 50.0f;
+ if (symbol->symbology == BARCODE_EANX_CC) {
+ symbol->height = height - cc_rows * 2 - 6.0f;
+ } else {
+ (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
+ }
}
-#else
- height = 50.0f;
- if (symbol->symbology == BARCODE_EANX_CC) {
- symbol->height = height - cc_rows * 2 - 6.0f;
- } else {
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
- }
-#endif
return error_number;
}
@@ -514,7 +510,7 @@ static int ean8(struct zint_symbol *symbol, const unsigned char source[], int le
}
/* For ISBN(10) and SBN only */
-static char isbn_check(const unsigned char source[], const int length) {
+static char isbnx_check(const unsigned char source[], const int length) {
int i, weight, sum, check;
char check_char;
@@ -535,15 +531,14 @@ static char isbn_check(const unsigned char source[], const int length) {
}
/* Make an EAN-13 barcode from an SBN or ISBN */
-static int isbn(struct zint_symbol *symbol, unsigned char source[], const int src_len, char dest[]) {
- int i, error_number;
+static int isbnx(struct zint_symbol *symbol, unsigned char source[], const int src_len, char dest[]) {
+ int i;
char check_digit;
to_upper(source);
- error_number = is_sane(ISBN_SANE, source, src_len);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(ISBNX_SANE, source, src_len) != 0) {
strcpy(symbol->errtxt, "277: Invalid character in data (digits and \"X\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
/* Input must be 9, 10 or 13 characters */
@@ -560,10 +555,9 @@ static int isbn(struct zint_symbol *symbol, unsigned char source[], const int sr
}
/* "X" can only occur in last position */
- error_number = is_sane(NEON, source, 12);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, 12) != 0) {
strcpy(symbol->errtxt, "282: Invalid character in data, \"X\" allowed in last position only");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
check_digit = gs1_check_digit(source, 12);
@@ -584,13 +578,12 @@ static int isbn(struct zint_symbol *symbol, unsigned char source[], const int sr
}
/* "X" can only occur in last position */
- error_number = is_sane(NEON, source, 9);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, source, 9) != 0) {
strcpy(symbol->errtxt, "296: Invalid character in data, \"X\" allowed in last position only");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
- check_digit = isbn_check(source, 9);
+ check_digit = isbnx_check(source, 9);
if (check_digit != source[9]) {
sprintf(symbol->errtxt, "281: Invalid %s check digit '%c', expecting '%c'", src_len == 9 ? "SBN" : "ISBN",
source[9], check_digit);
@@ -758,10 +751,9 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int src
char dest[1000] = {0};
int latch, reader, writer;
int with_addon;
- int error_number, i, plus_count;
+ int error_number = 0, i, plus_count;
int addon_gap = 0;
int first_part_len, second_part_len;
- float height;
latch = FALSE;
writer = 0;
@@ -772,16 +764,14 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int src
}
if (symbol->symbology != BARCODE_ISBNX) {
/* ISBN has its own sanity routine */
- error_number = is_sane(SODIUM, source, src_len);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(SODIUM, source, src_len) != 0) {
strcpy(symbol->errtxt, "284: Invalid character in data (digits and \"+\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
} else {
- error_number = is_sane(ISBN_ADDON_SANE, source, src_len);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(ISBNX_ADDON_SANE, source, src_len) != 0) {
strcpy(symbol->errtxt, "285: Invalid character in data (digits, \"X\" and \"+\" only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
/* Add-on will be checked separately to be numeric only below */
}
@@ -845,25 +835,23 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int src
switch (first_part_len) {
case 2: ean_add_on(first_part, first_part_len, dest, 0);
ustrcpy(symbol->text, first_part);
-#ifdef COMPLIANT_HEIGHTS
- /* 21.9mm from GS1 General Specifications 5.2.6.6, Figure 5.2.6.6-5 */
- height = (float) (21.9 / 0.33); /* 21.9mm / 0.33mm ~ 66.36 */
- error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
-#else
- height = 50.0f;
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* 21.9mm from GS1 General Specifications 5.2.6.6, Figure 5.2.6.6-5 */
+ const float height = stripf(21.9f / 0.33f); /* 21.9mm / 0.33mm ~ 66.36 */
+ error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
break;
case 5: ean_add_on(first_part, first_part_len, dest, 0);
ustrcpy(symbol->text, first_part);
-#ifdef COMPLIANT_HEIGHTS
- /* 21.9mm from GS1 General Specifications 5.2.6.6, Figure 5.2.6.6-6 */
- height = (float) (21.9 / 0.33); /* 21.9mm / 0.33mm ~ 66.36 */
- error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
-#else
- height = 50.0f;
- (void) set_height(symbol, 0.0f, height, 0.0f, 1 /*no_errtxt*/);
-#endif
+ if (symbol->output_options & COMPLIANT_HEIGHT) {
+ /* 21.9mm from GS1 General Specifications 5.2.6.6, Figure 5.2.6.6-6 */
+ const float height = stripf(21.9f / 0.33f); /* 21.9mm / 0.33mm ~ 66.36 */
+ error_number = set_height(symbol, height, height, 0.0f, 0 /*no_errtxt*/);
+ } else {
+ (void) set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
+ }
break;
case 7:
case 8: error_number = ean8(symbol, first_part, first_part_len, dest);
@@ -961,7 +949,7 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int src
}
break;
case BARCODE_ISBNX:
- error_number = isbn(symbol, first_part, first_part_len, dest);
+ error_number = isbnx(symbol, first_part, first_part_len, dest);
break;
}
@@ -972,10 +960,9 @@ INTERNAL int eanx_cc(struct zint_symbol *symbol, unsigned char source[], int src
second_part_len = (int) ustrlen(second_part);
if (symbol->symbology == BARCODE_ISBNX) { /* Need to further check that add-on numeric only */
- error_number = is_sane(NEON, second_part, second_part_len);
- if (error_number == ZINT_ERROR_INVALID_DATA) {
+ if (is_sane(NEON, second_part, second_part_len) != 0) {
strcpy(symbol->errtxt, "295: Invalid add-on data (digits only)");
- return error_number;
+ return ZINT_ERROR_INVALID_DATA;
}
}
diff --git a/backend/vector.c b/backend/vector.c
index d04d0164..ec4426b1 100644
--- a/backend/vector.c
+++ b/backend/vector.c
@@ -30,8 +30,6 @@
*/
/* vim: set ts=4 sw=4 et : */
-#include
-
#ifdef _MSC_VER
#include
#endif
diff --git a/backend/zint.h b/backend/zint.h
index e5b13c48..b278f22e 100644
--- a/backend/zint.h
+++ b/backend/zint.h
@@ -110,7 +110,7 @@ extern "C" {
int fontsize; /* Unused */
int input_mode; /* Encoding of input data (see DATA_MODE etc below). Default DATA_MODE */
int eci; /* Extended Channel Interpretation. Default 0 (none) */
- float dot_size; /* Size of dots used in BARCODE_DOTTY_MODE */
+ float dot_size; /* Size of dots used in BARCODE_DOTTY_MODE. Default 0.8 */
float guard_descent; /* Height in X-dimensions that UPC/EAN guard bars descend. Default 5 */
struct zint_structapp structapp; /* Structured Append info. Default structapp.count 0 (none) */
int warn_level; /* Affects error/warning value returned by Zint API (see WARN_XXX below) */
@@ -255,29 +255,31 @@ extern "C" {
#define BARCODE_RMQR 145 /* Rectangular Micro QR Code (rMQR) */
/* Output options (`symbol->output_options`) */
-#define BARCODE_NO_ASCII 1 /* Legacy (no-op) */
-#define BARCODE_BIND 2 /* Boundary bars above & below the symbol and between stacked symbols */
-#define BARCODE_BOX 4 /* Box around symbol */
-#define BARCODE_STDOUT 8 /* Output to stdout */
-#define READER_INIT 16 /* Reader Initialisation (Programming) */
-#define SMALL_TEXT 32 /* Use smaller font */
-#define BOLD_TEXT 64 /* Use bold font */
-#define CMYK_COLOUR 128 /* CMYK colour space (Encapsulated PostScript and TIF) */
-#define BARCODE_DOTTY_MODE 256 /* Plot a matrix symbol using dots rather than squares */
-#define GS1_GS_SEPARATOR 512 /* Use GS instead of FNC1 as GS1 separator (Data Matrix) */
-#define OUT_BUFFER_INTERMEDIATE 1024 /* Return ASCII values in bitmap buffer (OUT_BUFFER only) */
-#define BARCODE_QUIET_ZONES 2048 /* Add compliant quiet zones (additional to any specified whitespace) */
- /* Note: CODE16K, CODE49, CODABLOCKF, ITF14, UPC/EAN have default quiet zones */
-#define BARCODE_NO_QUIET_ZONES 4096 /* Disable quiet zones, notably those with defaults as listed above */
+#define BARCODE_NO_ASCII 0x0001 /* Legacy (no-op) */
+#define BARCODE_BIND 0x0002 /* Boundary bars above & below the symbol and between stacked symbols */
+#define BARCODE_BOX 0x0004 /* Box around symbol */
+#define BARCODE_STDOUT 0x0008 /* Output to stdout */
+#define READER_INIT 0x0010 /* Reader Initialisation (Programming) */
+#define SMALL_TEXT 0x0020 /* Use smaller font */
+#define BOLD_TEXT 0x0040 /* Use bold font */
+#define CMYK_COLOUR 0x0080 /* CMYK colour space (Encapsulated PostScript and TIF) */
+#define BARCODE_DOTTY_MODE 0x0100 /* Plot a matrix symbol using dots rather than squares */
+#define GS1_GS_SEPARATOR 0x0200 /* Use GS instead of FNC1 as GS1 separator (Data Matrix) */
+#define OUT_BUFFER_INTERMEDIATE 0x0400 /* Return ASCII values in bitmap buffer (OUT_BUFFER only) */
+#define BARCODE_QUIET_ZONES 0x0800 /* Add compliant quiet zones (additional to any specified whitespace) */
+ /* Note: CODE16K, CODE49, CODABLOCKF, ITF14, UPC/EAN have default quiet zones
+ */
+#define BARCODE_NO_QUIET_ZONES 0x1000 /* Disable quiet zones, notably those with defaults as listed above */
+#define COMPLIANT_HEIGHT 0x2000 /* Warn if height not compliant and use standard height (if any) as default */
/* Input data types (`symbol->input_mode`) */
#define DATA_MODE 0 /* Binary */
#define UNICODE_MODE 1 /* UTF-8 */
#define GS1_MODE 2 /* GS1 */
/* The following may be OR-ed with above */
-#define ESCAPE_MODE 8 /* Process escape sequences */
-#define GS1PARENS_MODE 16 /* Process parentheses as GS1 AI delimiters (instead of square brackets) */
-#define GS1NOCHECK_MODE 32 /* Do not check validity of GS1 data (except that printable ASCII only) */
+#define ESCAPE_MODE 0x0008 /* Process escape sequences */
+#define GS1PARENS_MODE 0x0010 /* Process parentheses as GS1 AI delimiters (instead of square brackets) */
+#define GS1NOCHECK_MODE 0x0020 /* Do not check validity of GS1 data (except that printable ASCII only) */
/* Data Matrix specific options (`symbol->option_3`) */
#define DM_SQUARE 100 /* Only consider square versions on automatic symbol size selection */
@@ -290,46 +292,47 @@ extern "C" {
#define ULTRA_COMPRESSION 128 /* Enable Ultracode compression (experimental) */
/* Warning and error conditions (API return values) */
-#define ZINT_WARN_INVALID_OPTION 2 /* Invalid option given but overridden by Zint */
-#define ZINT_WARN_USES_ECI 3 /* Automatic ECI inserted by Zint */
-#define ZINT_WARN_NONCOMPLIANT 4 /* Symbol created not compliant with standards */
-#define ZINT_ERROR 5 /* Warn/error marker, not returned */
-#define ZINT_ERROR_TOO_LONG 5 /* Input data wrong length */
-#define ZINT_ERROR_INVALID_DATA 6 /* Input data incorrect */
-#define ZINT_ERROR_INVALID_CHECK 7 /* Input check digit incorrect */
-#define ZINT_ERROR_INVALID_OPTION 8 /* Incorrect option given */
-#define ZINT_ERROR_ENCODING_PROBLEM 9 /* Internal error (should not happen) */
-#define ZINT_ERROR_FILE_ACCESS 10 /* Error opening output file */
-#define ZINT_ERROR_MEMORY 11 /* Memory allocation (malloc) failure */
-#define ZINT_ERROR_FILE_WRITE 12 /* Error writing to output file */
-#define ZINT_ERROR_USES_ECI 13 /* Error counterpart of warning if WARN_FAIL_ALL set (see below) */
-#define ZINT_ERROR_NONCOMPLIANT 14 /* Error counterpart of warning if WARN_FAIL_ALL set */
+#define ZINT_WARN_INVALID_OPTION 2 /* Invalid option given but overridden by Zint */
+#define ZINT_WARN_USES_ECI 3 /* Automatic ECI inserted by Zint */
+#define ZINT_WARN_NONCOMPLIANT 4 /* Symbol created not compliant with standards */
+#define ZINT_ERROR 5 /* Warn/error marker, not returned */
+#define ZINT_ERROR_TOO_LONG 5 /* Input data wrong length */
+#define ZINT_ERROR_INVALID_DATA 6 /* Input data incorrect */
+#define ZINT_ERROR_INVALID_CHECK 7 /* Input check digit incorrect */
+#define ZINT_ERROR_INVALID_OPTION 8 /* Incorrect option given */
+#define ZINT_ERROR_ENCODING_PROBLEM 9 /* Internal error (should not happen) */
+#define ZINT_ERROR_FILE_ACCESS 10 /* Error opening output file */
+#define ZINT_ERROR_MEMORY 11 /* Memory allocation (malloc) failure */
+#define ZINT_ERROR_FILE_WRITE 12 /* Error writing to output file */
+#define ZINT_ERROR_USES_ECI 13 /* Error counterpart of warning if WARN_FAIL_ALL set (see below) */
+#define ZINT_ERROR_NONCOMPLIANT 14 /* Error counterpart of warning if WARN_FAIL_ALL set */
/* Warning warn (`symbol->warn_level`) */
#define WARN_DEFAULT 0 /* Default behaviour */
#define WARN_FAIL_ALL 2 /* Treat warning as error */
/* Capability flags (ZBarcode_Cap() `cap_flag`) */
-#define ZINT_CAP_HRT 0x0001 /* Prints Human Readable Text? */
-#define ZINT_CAP_STACKABLE 0x0002 /* Is stackable? */
-#define ZINT_CAP_EXTENDABLE 0x0004 /* Is extendable with add-on data? (Is UPC/EAN?) */
-#define ZINT_CAP_COMPOSITE 0x0008 /* Can have composite data? */
-#define ZINT_CAP_ECI 0x0010 /* Supports Extended Channel Interpretations? */
-#define ZINT_CAP_GS1 0x0020 /* Supports GS1 data? */
-#define ZINT_CAP_DOTTY 0x0040 /* Can be output as dots? */
-#define ZINT_CAP_QUIET_ZONES 0x0080 /* Has default quiet zones? */
-#define ZINT_CAP_FIXED_RATIO 0x0100 /* Has fixed width-to-height (aspect) ratio? */
-#define ZINT_CAP_READER_INIT 0x0200 /* Supports Reader Initialisation? */
-#define ZINT_CAP_FULL_MULTIBYTE 0x0400 /* Supports full-multibyte option? */
-#define ZINT_CAP_MASK 0x0800 /* Is mask selectable? */
-#define ZINT_CAP_STRUCTAPP 0x1000 /* Supports Structured Append? */
+#define ZINT_CAP_HRT 0x0001 /* Prints Human Readable Text? */
+#define ZINT_CAP_STACKABLE 0x0002 /* Is stackable? */
+#define ZINT_CAP_EXTENDABLE 0x0004 /* Is extendable with add-on data? (Is UPC/EAN?) */
+#define ZINT_CAP_COMPOSITE 0x0008 /* Can have composite data? */
+#define ZINT_CAP_ECI 0x0010 /* Supports Extended Channel Interpretations? */
+#define ZINT_CAP_GS1 0x0020 /* Supports GS1 data? */
+#define ZINT_CAP_DOTTY 0x0040 /* Can be output as dots? */
+#define ZINT_CAP_QUIET_ZONES 0x0080 /* Has default quiet zones? */
+#define ZINT_CAP_FIXED_RATIO 0x0100 /* Has fixed width-to-height (aspect) ratio? */
+#define ZINT_CAP_READER_INIT 0x0200 /* Supports Reader Initialisation? */
+#define ZINT_CAP_FULL_MULTIBYTE 0x0400 /* Supports full-multibyte option? */
+#define ZINT_CAP_MASK 0x0800 /* Is mask selectable? */
+#define ZINT_CAP_STRUCTAPP 0x1000 /* Supports Structured Append? */
+#define ZINT_CAP_COMPLIANT_HEIGHT 0x2000 /* Has compliant height? */
/* The largest amount of data that can be encoded is 4350 4-byte UTF-8 chars in Han Xin Code */
#define ZINT_MAX_DATA_LEN 17400
/* Debug flags (debug) */
-#define ZINT_DEBUG_PRINT 1 /* Print debug info (if any) to stdout */
-#define ZINT_DEBUG_TEST 2 /* For internal test use only */
+#define ZINT_DEBUG_PRINT 0x0001 /* Print debug info (if any) to stdout */
+#define ZINT_DEBUG_TEST 0x0002 /* For internal test use only */
#ifdef _WIN32
# if defined(DLL_EXPORT) || defined(PIC) || defined(_USRDLL)
diff --git a/backend_qt/CMakeLists.txt b/backend_qt/CMakeLists.txt
index 953cae8b..a4897c11 100644
--- a/backend_qt/CMakeLists.txt
+++ b/backend_qt/CMakeLists.txt
@@ -21,6 +21,9 @@ target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/backend")
target_link_libraries(${PROJECT_NAME} zint Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui)
+if(ZINT_TEST AND NOT WIN32) # Fails with "Test not available without configuration" on Windows so skip
+ add_subdirectory(tests)
+endif()
install(TARGETS ${PROJECT_NAME} ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES qzint.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
diff --git a/backend_qt/qzint.cpp b/backend_qt/qzint.cpp
index b884902c..453ffdee 100644
--- a/backend_qt/qzint.cpp
+++ b/backend_qt/qzint.cpp
@@ -65,6 +65,7 @@ namespace Zint {
m_gssep = false;
m_quiet_zones = false;
m_no_quiet_zones = false;
+ m_compliant_height = false;
m_reader_init = false;
m_rotate_angle = 0;
m_debug = false;
@@ -95,6 +96,9 @@ namespace Zint {
if (m_no_quiet_zones) {
m_zintSymbol->output_options |= BARCODE_NO_QUIET_ZONES;
}
+ if (m_compliant_height) {
+ m_zintSymbol->output_options |= COMPLIANT_HEIGHT;
+ }
m_zintSymbol->border_width = m_borderWidth;
m_zintSymbol->option_1 = m_option_1;
m_zintSymbol->option_2 = m_option_2;
@@ -153,6 +157,8 @@ namespace Zint {
m_whitespace = m_zintSymbol->whitespace_width;
m_vwhitespace = m_zintSymbol->whitespace_height;
emit encoded();
+ } else {
+ emit errored();
}
}
@@ -236,8 +242,12 @@ namespace Zint {
m_dotty = dotty;
}
- void QZint::setDotSize(float dot_size) {
- m_dot_size = dot_size;
+ float QZint::dotSize() const {
+ return m_dot_size;
+ }
+
+ void QZint::setDotSize(float dotSize) {
+ m_dot_size = dotSize;
}
float QZint::guardDescent() const {
@@ -248,6 +258,18 @@ namespace Zint {
m_guardDescent = guardDescent;
}
+ int QZint::structAppCount() const {
+ return m_structapp.count;
+ }
+
+ int QZint::structAppIndex() const {
+ return m_structapp.index;
+ }
+
+ QString QZint::structAppID() const {
+ return m_structapp.id;
+ }
+
void QZint::setStructApp(const int count, const int index, const QString& id) {
if (count) {
m_structapp.count = count;
@@ -289,6 +311,10 @@ namespace Zint {
m_bgColor = bgColor;
}
+ bool QZint::cmyk() const {
+ return m_cmyk;
+ }
+
void QZint::setCMYK(bool cmyk) {
m_cmyk = cmyk;
}
@@ -311,21 +337,33 @@ namespace Zint {
return m_borderWidth;
}
- void QZint::setBorderWidth(int boderWidth) {
- if (boderWidth < 0 || boderWidth > 16)
- boderWidth = 0;
- m_borderWidth = boderWidth;
+ void QZint::setBorderWidth(int borderWidth) {
+ if (borderWidth < 0 || borderWidth > 16)
+ borderWidth = 0;
+ m_borderWidth = borderWidth;
+ }
+
+ int QZint::whitespace() const {
+ return m_whitespace;
}
void QZint::setWhitespace(int whitespace) {
m_whitespace = whitespace;
}
- void QZint::setVWhitespace(int vwhitespace) {
- m_vwhitespace = vwhitespace;
+ int QZint::vWhitespace() const {
+ return m_vwhitespace;
}
- void QZint::setFontSetting(int fontSettingIndex) {
+ void QZint::setVWhitespace(int vWhitespace) {
+ m_vwhitespace = vWhitespace;
+ }
+
+ int QZint::fontSetting() const {
+ return m_fontSetting;
+ }
+
+ void QZint::setFontSetting(int fontSettingIndex) { // Sets from comboBox index
if (fontSettingIndex == 1) {
m_fontSetting = BOLD_TEXT;
} else if (fontSettingIndex == 2) {
@@ -337,27 +375,59 @@ namespace Zint {
}
}
- void QZint::setShowText(bool show) {
- m_show_hrt = show;
+ void QZint::setFontSettingValue(int fontSetting) { // Sets literal value
+ if ((fontSetting & (BOLD_TEXT | SMALL_TEXT)) == fontSetting) {
+ m_fontSetting = fontSetting;
+ } else {
+ m_fontSetting = 0;
+ }
}
- void QZint::setGSSep(bool gssep) {
- m_gssep = gssep;
+ bool QZint::showText() const {
+ return m_show_hrt;
}
- int QZint::rotateAngle() const {
- return m_rotate_angle;
+ void QZint::setShowText(bool showText) {
+ m_show_hrt = showText;
+ }
+
+ bool QZint::gsSep() const {
+ return m_gssep;
+ }
+
+ void QZint::setGSSep(bool gsSep) {
+ m_gssep = gsSep;
+ }
+
+ bool QZint::quietZones() const {
+ return m_quiet_zones;
}
void QZint::setQuietZones(bool quietZones) {
m_quiet_zones = quietZones;
}
+ bool QZint::noQuietZones() const {
+ return m_no_quiet_zones;
+ }
+
void QZint::setNoQuietZones(bool noQuietZones) {
m_no_quiet_zones = noQuietZones;
}
- void QZint::setRotateAngle(int rotateIndex) {
+ bool QZint::compliantHeight() const {
+ return m_compliant_height;
+ }
+
+ void QZint::setCompliantHeight(bool compliantHeight) {
+ m_compliant_height = compliantHeight;
+ }
+
+ int QZint::rotateAngle() const {
+ return m_rotate_angle;
+ }
+
+ void QZint::setRotateAngle(int rotateIndex) { // Sets from comboBox index
if (rotateIndex == 1) {
m_rotate_angle = 90;
} else if (rotateIndex == 2) {
@@ -369,7 +439,23 @@ namespace Zint {
}
}
- void QZint::setECI(int ECIIndex) {
+ void QZint::setRotateAngleValue(int rotateAngle) { // Sets literal value
+ if (rotateAngle == 90) {
+ m_rotate_angle = 90;
+ } else if (rotateAngle == 180) {
+ m_rotate_angle = 180;
+ } else if (rotateAngle == 270) {
+ m_rotate_angle = 270;
+ } else {
+ m_rotate_angle = 0;
+ }
+ }
+
+ int QZint::eci() const {
+ return m_eci;
+ }
+
+ void QZint::setECI(int ECIIndex) { // Sets from comboBox index
if (ECIIndex >= 1 && ECIIndex <= 11) {
m_eci = ECIIndex + 2;
} else if (ECIIndex >= 12 && ECIIndex <= 15) {
@@ -383,16 +469,40 @@ namespace Zint {
}
}
- void QZint::setGS1Parens(bool gs1parens) {
- m_gs1parens = gs1parens;
+ void QZint::setECIValue(int eci) { // Sets literal value
+ if (eci < 3 || (eci > 30 && eci != 899) || eci == 14 || eci == 19) {
+ m_eci = 0;
+ } else {
+ m_eci = eci;
+ }
}
- void QZint::setGS1NoCheck(bool gs1nocheck) {
- m_gs1nocheck = gs1nocheck;
+ bool QZint::gs1Parens() const {
+ return m_gs1parens;
}
- void QZint::setReaderInit(bool reader_init) {
- m_reader_init = reader_init;
+ void QZint::setGS1Parens(bool gs1Parens) {
+ m_gs1parens = gs1Parens;
+ }
+
+ bool QZint::gs1NoCheck() const {
+ return m_gs1nocheck;
+ }
+
+ void QZint::setGS1NoCheck(bool gs1NoCheck) {
+ m_gs1nocheck = gs1NoCheck;
+ }
+
+ bool QZint::readerInit() const {
+ return m_reader_init;
+ }
+
+ void QZint::setReaderInit(bool readerInit) {
+ m_reader_init = readerInit;
+ }
+
+ bool QZint::debug() const {
+ return m_debug;
}
void QZint::setDebug(bool debug) {
@@ -411,6 +521,7 @@ namespace Zint {
target_size_horiz = width;
target_size_vert = height;
}
+ QString QZint::error_message() const { return m_lastError; } /* Same as lastError() */
bool QZint::hasHRT(int symbology) const {
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_HRT);
@@ -444,12 +555,12 @@ namespace Zint {
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_READER_INIT);
}
- int QZint::getError() const {
- return m_error;
+ bool QZint::hasCompliantHeight(int symbology) const {
+ return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_COMPLIANT_HEIGHT);
}
- QString QZint::error_message() const {
- return m_lastError;
+ int QZint::getError() const {
+ return m_error;
}
const QString& QZint::lastError() const {
@@ -472,6 +583,7 @@ namespace Zint {
m_rotate_angle);
if (m_error >= ZINT_ERROR) {
m_lastError = m_zintSymbol->errtxt;
+ emit errored();
return false;
} else {
return true;
diff --git a/backend_qt/qzint.h b/backend_qt/qzint.h
index 4cd9f864..9f241bf7 100644
--- a/backend_qt/qzint.h
+++ b/backend_qt/qzint.h
@@ -67,11 +67,15 @@ public:
bool dotty() const;
void setDotty(bool botty);
+ float dotSize() const;
void setDotSize(float dot_size);
float guardDescent() const;
void setGuardDescent(float guardDescent);
+ int structAppCount() const;
+ int structAppIndex() const;
+ QString structAppID() const;
void setStructApp(const int count, const int index, const QString& id);
void clearStructApp();
@@ -81,38 +85,58 @@ public:
QColor bgColor() const;
void setBgColor(const QColor& bgColor);
+ bool cmyk() const;
void setCMYK(bool cmyk);
int borderType() const;
void setBorderType(int borderTypeIndex);
int borderWidth() const;
- void setBorderWidth(int boderWidth);
+ void setBorderWidth(int borderWidth);
+ int whitespace() const;
void setWhitespace(int whitespace);
- void setVWhitespace(int vwhitespace);
+ int vWhitespace() const;
+ void setVWhitespace(int vWhitespace);
- void setFontSetting(int fontSettingIndex);
+ int fontSetting() const;
+ void setFontSetting(int fontSettingIndex); // Sets from comboBox index
+ void setFontSettingValue(int fontSetting); // Sets literal value
- void setShowText(bool show);
+ bool showText() const;
+ void setShowText(bool showText);
- void setGSSep(bool gssep);
+ bool gsSep() const;
+ void setGSSep(bool gsSep);
+ bool quietZones() const;
void setQuietZones(bool quietZones);
+
+ bool noQuietZones() const;
void setNoQuietZones(bool noQuietZones);
+ bool compliantHeight() const;
+ void setCompliantHeight(bool compliantHeight);
+
int rotateAngle() const;
- void setRotateAngle(int rotateIndex);
+ void setRotateAngle(int rotateIndex); // Sets from comboBox index
+ void setRotateAngleValue(int rotateAngle); // Sets literal value
- void setECI(int ECIIndex);
+ int eci() const;
+ void setECI(int ECIIndex); // Sets from comboBox index
+ void setECIValue(int eci); // Sets literal value
- void setGS1Parens(bool gs1parens);
+ bool gs1Parens() const;
+ void setGS1Parens(bool gs1Parens);
- void setGS1NoCheck(bool gs1nocheck);
+ bool gs1NoCheck() const;
+ void setGS1NoCheck(bool gs1NoCheck);
- void setReaderInit(bool reader_init);
+ bool readerInit() const;
+ void setReaderInit(bool readerInit);
+ bool debug() const;
void setDebug(bool debug);
/* Legacy property getters/setters */
@@ -120,10 +144,11 @@ public:
int width() const;
void setSecurityLevel(int securityLevel); /* option_2 */
int securityLevel() const;
- void setPdf417CodeWords(int pdf417CodeWords); /* no op */
+ void setPdf417CodeWords(int pdf417CodeWords); /* No-op */
int pdf417CodeWords() const;
void setHideText(bool hide); /* setShowText(!hide) */
void setTargetSize(int width, int height);
+ QString error_message() const; /* Same as lastError() */
/* Test capabilities - ZBarcode_Cap() */
bool hasHRT(int symbology = 0) const;
@@ -134,11 +159,10 @@ public:
bool isFixedRatio(int symbology = 0) const;
bool isDotty(int symbology = 0) const;
bool supportsReaderInit(int symbology = 0) const;
+ bool hasCompliantHeight(int symbology = 0) const;
int getError() const;
- QString error_message() const;
-
const QString& lastError() const;
bool hasErrors() const;
@@ -151,6 +175,7 @@ public:
signals:
void encoded();
+ void errored();
private:
void resetSymbol();
@@ -190,6 +215,7 @@ private:
bool m_gssep;
bool m_quiet_zones;
bool m_no_quiet_zones;
+ bool m_compliant_height;
bool m_reader_init;
bool m_debug;
diff --git a/backend_qt/tests/CMakeLists.txt b/backend_qt/tests/CMakeLists.txt
new file mode 100644
index 00000000..ac7a6526
--- /dev/null
+++ b/backend_qt/tests/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Copyright (C) 2021 Robin Stuart
+# vim: set ts=4 sw=4 et :
+
+cmake_minimum_required(VERSION 3.5)
+project(QZint_tests LANGUAGES CXX)
+
+enable_testing()
+
+if(USE_QT6)
+ find_package(Qt6Test REQUIRED)
+else()
+ find_package(Qt5Test REQUIRED)
+endif()
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+
+add_executable(test_qzint test_qzint.cpp)
+add_test(NAME qzint COMMAND test_qzint)
+
+target_link_libraries(test_qzint PRIVATE QZint Qt${QT_VERSION_MAJOR}::Test)
diff --git a/backend_qt/tests/test_qzint.cpp b/backend_qt/tests/test_qzint.cpp
new file mode 100644
index 00000000..13861d47
--- /dev/null
+++ b/backend_qt/tests/test_qzint.cpp
@@ -0,0 +1,403 @@
+/***************************************************************************
+ * Copyright (C) 2021 by Robin Stuart *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program. If not, see . *
+ ***************************************************************************/
+/* vim: set ts=4 sw=4 et : */
+
+#include
+#include "../qzint.h" /* Don't use in case it's been changed */
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) ((int) (sizeof(x) / sizeof((x)[0])))
+#endif
+
+class TestQZint : public QObject
+{
+ Q_OBJECT
+
+public:
+ TestQZint() : m_skipIfFontUsed(false)
+ {
+ // Qt5 will trigger "detected memory leaks" if font used (libfontconfig) so skip if ASAN enabled
+#if QT_VERSION < 0x60000
+# if defined(__SANITIZE_ADDRESS__) || (defined(__has_feature) && __has_feature(address_sanitizer))
+ m_skipIfFontUsed = true;
+# endif
+#endif
+ }
+
+ virtual ~TestQZint() {} // Seems to be needed to generate vtable
+
+private:
+ bool m_skipIfFontUsed; // Hack to get around Qt5 ASAN leaks
+
+private slots:
+
+ void setGetTest()
+ {
+ Zint::QZint bc;
+
+ int symbology = BARCODE_CODE11;
+ bc.setSymbol(symbology);
+ QCOMPARE(bc.symbol(), symbology);
+
+ int inputMode = UNICODE_MODE;
+ bc.setInputMode(inputMode);
+ QCOMPARE(bc.inputMode(), inputMode);
+
+ QString text("text");
+ bc.setText(text);
+ QCOMPARE(bc.text(), text);
+
+ QString primaryMessage("primary message");
+ bc.setPrimaryMessage(primaryMessage);
+ QCOMPARE(bc.primaryMessage(), primaryMessage);
+
+ float height = 12.345f;
+ bc.setHeight(height);
+ QCOMPARE(bc.height(), height);
+
+ int option1 = 1;
+ bc.setOption1(option1);
+ QCOMPARE(bc.option1(), option1);
+
+ int option2 = 2;
+ bc.setOption2(option2);
+ QCOMPARE(bc.option2(), option2);
+
+ int option3 = 3;
+ bc.setOption3(option3);
+ QCOMPARE(bc.option3(), option3);
+
+ float scale = 0.678f;
+ bc.setScale(scale);
+ QCOMPARE(bc.scale(), scale);
+
+ bool dotty = true;
+ bc.setDotty(dotty);
+ QCOMPARE(bc.dotty(), dotty);
+
+ float dotSize = 1.234f;
+ bc.setDotSize(dotSize);
+ QCOMPARE(bc.dotSize(), dotSize);
+
+ float guardDescent = 0.678f;
+ bc.setGuardDescent(guardDescent);
+ QCOMPARE(bc.guardDescent(), guardDescent);
+
+ struct zint_structapp structapp = { 2, 3, "ID" };
+ bc.setStructApp(structapp.count, structapp.index, structapp.id);
+ QCOMPARE(bc.structAppCount(), structapp.count);
+ QCOMPARE(bc.structAppIndex(), structapp.index);
+ QCOMPARE(bc.structAppID(), QString(structapp.id));
+
+ QColor fgColor(0x12, 0x34, 0x45, 0x67);
+ bc.setFgColor(fgColor);
+ QCOMPARE(bc.fgColor(), fgColor);
+
+ QColor bgColor(0x89, 0xAB, 0xCD, 0xEF);
+ bc.setBgColor(bgColor);
+ QCOMPARE(bc.bgColor(), bgColor);
+
+ bool cmyk = true;
+ bc.setCMYK(cmyk);
+ QCOMPARE(bc.cmyk(), cmyk);
+
+ int borderTypes[] = { 0, BARCODE_BIND, BARCODE_BOX };
+ for (int i = 0; i < ARRAY_SIZE(borderTypes); i++) {
+ bc.setBorderType(i);
+ QCOMPARE(bc.borderType(), borderTypes[i]);
+ }
+
+ int borderWidth = 4;
+ bc.setBorderWidth(borderWidth);
+ QCOMPARE(bc.borderWidth(), borderWidth);
+
+ int whitespace = 5;
+ bc.setWhitespace(whitespace);
+ QCOMPARE(bc.whitespace(), whitespace);
+
+ int vWhitespace = 6;
+ bc.setVWhitespace(vWhitespace);
+ QCOMPARE(bc.vWhitespace(), vWhitespace);
+
+ int fontSettings[] = { 0, BOLD_TEXT, SMALL_TEXT, SMALL_TEXT | BOLD_TEXT };
+ for (int i = 0; i < ARRAY_SIZE(fontSettings); i++) {
+ bc.setFontSetting(i);
+ QCOMPARE(bc.fontSetting(), fontSettings[i]);
+
+ bc.setFontSettingValue(fontSettings[i]);
+ QCOMPARE(bc.fontSetting(), fontSettings[i]);
+ }
+ bc.setFontSetting(ARRAY_SIZE(fontSettings));
+ QCOMPARE(bc.fontSetting(), 0);
+ bc.setFontSetting(-1);
+ QCOMPARE(bc.fontSetting(), 0);
+
+ bc.setFontSettingValue(-1);
+ QCOMPARE(bc.fontSetting(), 0);
+ bc.setFontSettingValue(CMYK_COLOUR);
+ QCOMPARE(bc.fontSetting(), 0);
+
+ bool showText = false;
+ bc.setShowText(showText);
+ QCOMPARE(bc.showText(), showText);
+
+ bool gsSep = true;
+ bc.setGSSep(gsSep);
+ QCOMPARE(bc.gsSep(), gsSep);
+
+ bool quietZones = true;
+ bc.setQuietZones(quietZones);
+ QCOMPARE(bc.quietZones(), quietZones);
+
+ bool noQuietZones = true;
+ bc.setNoQuietZones(noQuietZones);
+ QCOMPARE(bc.noQuietZones(), noQuietZones);
+
+ bool compliantHeight = true;
+ bc.setCompliantHeight(compliantHeight);
+ QCOMPARE(bc.compliantHeight(), compliantHeight);
+
+ int rotateAngles[] = { 0, 90, 180, 270 };
+ for (int i = 0; i < ARRAY_SIZE(rotateAngles); i++) {
+ bc.setRotateAngle(i);
+ QCOMPARE(bc.rotateAngle(), rotateAngles[i]);
+
+ bc.setRotateAngleValue(rotateAngles[i]);
+ QCOMPARE(bc.rotateAngle(), rotateAngles[i]);
+ }
+ bc.setRotateAngle(ARRAY_SIZE(rotateAngles));
+ QCOMPARE(bc.rotateAngle(), 0);
+ bc.setRotateAngle(-1);
+ QCOMPARE(bc.rotateAngle(), 0);
+
+ bc.setRotateAngleValue(-1);
+ QCOMPARE(bc.rotateAngle(), 0);
+ bc.setRotateAngleValue(45);
+ QCOMPARE(bc.rotateAngle(), 0);
+
+ int ecis[] = {
+ 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 15, 16, 17, 18, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 899,
+ };
+ for (int i = 0; i < ARRAY_SIZE(ecis); i++) {
+ bc.setECI(i);
+ QCOMPARE(bc.eci(), ecis[i]);
+
+ bc.setECIValue(ecis[i]);
+ QCOMPARE(bc.eci(), ecis[i]);
+ }
+ bc.setECI(ARRAY_SIZE(ecis));
+ QCOMPARE(bc.eci(), 0);
+ bc.setECI(-1);
+ QCOMPARE(bc.eci(), 0);
+ // See also setGetECIValueTest()
+
+ bool gs1Parens = true;
+ bc.setGS1Parens(gs1Parens);
+ QCOMPARE(bc.gs1Parens(), gs1Parens);
+
+ bool gs1NoCheck = true;
+ bc.setGS1NoCheck(gs1NoCheck);
+ QCOMPARE(bc.gs1NoCheck(), gs1NoCheck);
+
+ bool readerInit = true;
+ bc.setReaderInit(readerInit);
+ QCOMPARE(bc.readerInit(), readerInit);
+
+ bool debug = true;
+ bc.setDebug(debug);
+ QCOMPARE(bc.debug(), debug);
+ }
+
+ void setGetECIValueTest_data()
+ {
+ QTest::addColumn("value");
+ QTest::addColumn("eci");
+
+ QTest::newRow("-1") << -1 << 0;
+ QTest::newRow("0") << 0 << 0;
+ QTest::newRow("1") << 1 << 0;
+ QTest::newRow("2") << 2 << 0;
+ QTest::newRow("14") << 14 << 0;
+ QTest::newRow("19") << 19 << 0;
+ QTest::newRow("31") << 31 << 0;
+ QTest::newRow("898") << 898 << 0;
+ QTest::newRow("900") << 900 << 0;
+ QTest::newRow("1000") << 1000 << 0;
+ }
+
+ void setGetECIValueTest()
+ {
+ Zint::QZint bc;
+
+ QFETCH(int, value);
+ QFETCH(int, eci);
+
+ bc.setECIValue(value);
+ QCOMPARE(bc.eci(), eci);
+ }
+
+ void legacyTest()
+ {
+ Zint::QZint bc;
+
+ int width = 12;
+ bc.setWidth(width);
+ QCOMPARE(bc.width(), width);
+ QCOMPARE(bc.option1(), width);
+
+ int securityLevel = 2;
+ bc.setSecurityLevel(securityLevel);
+ QCOMPARE(bc.securityLevel(), securityLevel);
+ QCOMPARE(bc.option2(), securityLevel);
+
+ int pdf417CodeWords = 123;
+ bc.setPdf417CodeWords(pdf417CodeWords);
+ QCOMPARE(bc.pdf417CodeWords(), 0); // No-op
+
+ bool hideText = true;
+ bc.setHideText(hideText);
+ QCOMPARE(bc.showText(), !hideText);
+
+ // No get for target size
+ }
+
+ void capTest_data()
+ {
+ QTest::addColumn("symbology");
+ QTest::addColumn("cap_flag");
+
+ QTest::newRow("BARCODE_CODE11") << BARCODE_CODE11 << (ZINT_CAP_HRT);
+ QTest::newRow("BARCODE_CODE128") << BARCODE_CODE128 << (ZINT_CAP_HRT | ZINT_CAP_READER_INIT);
+ QTest::newRow("BARCODE_EANX") << BARCODE_EANX << (ZINT_CAP_HRT | ZINT_CAP_EXTENDABLE | 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);
+ }
+
+ void capTest()
+ {
+ Zint::QZint bc;
+
+ QFETCH(int, symbology);
+ QFETCH(int, cap_flag);
+
+ bc.setSymbol(symbology);
+ QCOMPARE(bc.hasHRT(), (cap_flag & ZINT_CAP_HRT) != 0);
+ QCOMPARE(bc.isExtendable(), (cap_flag & ZINT_CAP_EXTENDABLE) != 0);
+ QCOMPARE(bc.supportsECI(), (cap_flag & ZINT_CAP_ECI) != 0);
+ QCOMPARE(bc.supportsGS1(), (cap_flag & ZINT_CAP_GS1) != 0);
+ QCOMPARE(bc.hasDefaultQuietZones(), (cap_flag & ZINT_CAP_QUIET_ZONES) != 0);
+ QCOMPARE(bc.isFixedRatio(), (cap_flag & ZINT_CAP_FIXED_RATIO) != 0);
+ QCOMPARE(bc.isDotty(), (cap_flag & ZINT_CAP_DOTTY) != 0);
+ QCOMPARE(bc.supportsReaderInit(), (cap_flag & ZINT_CAP_READER_INIT) != 0);
+ QCOMPARE(bc.hasCompliantHeight(), (cap_flag & ZINT_CAP_COMPLIANT_HEIGHT) != 0);
+ }
+
+ void renderTest_data()
+ {
+ QTest::addColumn("symbology");
+ QTest::addColumn("text");
+ QTest::addColumn("getError");
+ QTest::addColumn("error_message");
+
+ QTest::newRow("BARCODE_QRCODE") << BARCODE_QRCODE << "1234" << 0 << "";
+ if (!m_skipIfFontUsed) {
+ QTest::newRow("BARCODE_QRCODE no text") << BARCODE_QRCODE << "" << ZINT_ERROR_INVALID_DATA << "Error 205: No input data";
+ }
+ }
+
+ void renderTest()
+ {
+ Zint::QZint bc;
+
+ bool bRet;
+ QPainter painter;
+ constexpr int width = 100, height = 100;
+ QPixmap paintDevice(width, height);
+ QRectF paintRect(0, 0, width, height);
+ Zint::QZint::AspectRatioMode mode;
+ QSignalSpy spyEncoded(&bc, SIGNAL(encoded()));
+ QSignalSpy spyErrored(&bc, SIGNAL(errored()));
+
+ mode = Zint::QZint::AspectRatioMode::KeepAspectRatio; // Legacy - ignored
+
+ QFETCH(int, symbology);
+ QFETCH(QString, text);
+ QFETCH(int, getError);
+ QFETCH(QString, error_message);
+
+ bc.setSymbol(symbology);
+ bc.setText(text);
+
+ bRet = painter.begin(&paintDevice);
+ QCOMPARE(bRet, true);
+
+ bc.render(painter, paintRect, mode);
+
+ bRet = painter.end();
+ QCOMPARE(bRet, true);
+
+ QCOMPARE(bc.getError(), getError);
+ QCOMPARE(bc.error_message(), error_message);
+ QCOMPARE(bc.lastError(), error_message);
+ QCOMPARE(bc.hasErrors(), getError != 0);
+
+ if (getError) {
+ QCOMPARE(spyEncoded.count(), 0);
+ QCOMPARE(spyErrored.count(), 1);
+ } else {
+ QCOMPARE(spyEncoded.count(), 1);
+ QCOMPARE(spyErrored.count(), 0);
+ }
+ }
+
+ void saveToFileTest_data()
+ {
+ QTest::addColumn("symbology");
+ QTest::addColumn("text");
+ QTest::addColumn("fileName");
+ QTest::addColumn("expected_bRet");
+
+ QTest::newRow("BARCODE_DATAMATRIX gif") << BARCODE_DATAMATRIX << "1234" << "test_save_to_file.gif" << true;
+ QTest::newRow("BARCODE_DATAMATRIX unknown format") << BARCODE_DATAMATRIX << "1234" << "test_save_to_file.ext" << false;
+ }
+
+ void saveToFileTest()
+ {
+ Zint::QZint bc;
+
+ bool bRet;
+ int ret;
+
+ QFETCH(int, symbology);
+ QFETCH(QString, text);
+ QFETCH(QString, fileName);
+ QFETCH(bool, expected_bRet);
+
+ bc.setSymbol(symbology);
+ bc.setText(text);
+
+ bRet = bc.save_to_file(fileName);
+ QCOMPARE(bRet, expected_bRet);
+
+ if (bRet) {
+ ret = remove(fileName.toLatin1());
+ QCOMPARE(ret, 0);
+ }
+ }
+};
+
+QTEST_MAIN(TestQZint)
+#include "test_qzint.moc"
diff --git a/backend_tcl/zint.c b/backend_tcl/zint.c
index e99b2e85..3c798150 100644
--- a/backend_tcl/zint.c
+++ b/backend_tcl/zint.c
@@ -130,6 +130,8 @@
2021-09-27 GL
- Added -structapp
- Split up -to parsing (could seg fault if given non-int for X0 or Y0)
+2021-10-05 GL
+- Added -compliantheight option
*/
#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
@@ -452,6 +454,7 @@ static char help_message[] = "zint tcl(stub,obj) dll\n"
" -box bool: box around bar code, size set be -border\n"
/* cli option --cmyk not supported as no corresponding output */
" -cols integer: PDF417, Codablock F, DotCode: number of columns\n"
+ " -compliantheight bool: warn if height not compliant, and use standard default\n"
/* cli option --data is standard parameter */
" -dmre bool: Allow Data Matrix Rectangular Extended\n"
" -dotsize number: radius ratio of dots from 0.01 to 1.0\n"
@@ -715,8 +718,9 @@ static int Encode(Tcl_Interp *interp, int objc,
/* Option list and indexes */
char *optionList[] = {
"-addongap", "-barcode", "-bg", "-bind", "-bold", "-border", "-box",
- "-cols", "-dmre", "-dotsize", "-dotty", "-eci", "-fg", "-format",
- "-fullmultibyte", "-gs1nocheck", "-gs1parens", "-gssep", "-guarddescent",
+ "-cols", "-compliantheight", "-dmre", "-dotsize", "-dotty",
+ "-eci", "-fg", "-format", "-fullmultibyte",
+ "-gs1nocheck", "-gs1parens", "-gssep", "-guarddescent",
"-height", "-init", "-mask", "-mode",
"-nobackground", "-noquietzones", "-notext", "-primary", "-quietzones",
"-reverse", "-rotate", "-rows", "-scale", "-scmvv",
@@ -725,8 +729,9 @@ static int Encode(Tcl_Interp *interp, int objc,
NULL};
enum iOption {
iAddonGap, iBarcode, iBG, iBind, iBold, iBorder, iBox,
- iCols, iDMRE, iDotSize, iDotty, iECI, iFG, iFormat,
- iFullMultiByte, iGS1NoCheck, iGS1Parens, iGSSep, iGuardDescent,
+ iCols, iCompliantHeight, iDMRE, iDotSize, iDotty,
+ iECI, iFG, iFormat, iFullMultiByte,
+ iGS1NoCheck, iGS1Parens, iGSSep, iGuardDescent,
iHeight, iInit, iMask, iMode,
iNoBackground, iNoQuietZones, iNoText, iPrimary, iQuietZones,
iReverse, iRotate, iRows, iScale, iSCMvv,
@@ -751,6 +756,7 @@ static int Encode(Tcl_Interp *interp, int objc,
case iBind:
case iBold:
case iBox:
+ case iCompliantHeight:
case iDMRE:
case iDotty:
case iGS1NoCheck:
@@ -862,6 +868,13 @@ static int Encode(Tcl_Interp *interp, int objc,
my_symbol->output_options &= ~BARCODE_BOX;
}
break;
+ case iCompliantHeight:
+ if (intValue) {
+ my_symbol->output_options |= COMPLIANT_HEIGHT;
+ } else {
+ my_symbol->output_options &= ~COMPLIANT_HEIGHT;
+ }
+ break;
case iDotSize:
if (doubleValue < 0.01) {
Tcl_SetObjResult(interp,
diff --git a/docs/manual.txt b/docs/manual.txt
index fbc92c9a..ba4cad5e 100644
--- a/docs/manual.txt
+++ b/docs/manual.txt
@@ -1863,8 +1863,9 @@ purposes. The American Blood Commission adopted Codabar in 1977 as the standard
symbology for blood identification. Codabar can encode any length string
starting and ending with the letters A-D and containing between these letters
the numbers 0-9, dash (-), dollar ($), colon (:), slash (/), full stop (.) or
-plus (+). No check digit is generated by default, but a modulo-16 one can be
-added by setting option_2 = 1 or using --vers=1.
+plus (+). No check characater is generated by default, but a modulo-16 one can
+be added by setting option_2 = 1 or using --vers=1. To have the check character
+appear in the Human Readable Text, set option_2 = 2 or --vers=2.
6.1.10 Pharmacode
-----------------
@@ -2054,7 +2055,8 @@ in Codablock-F symbols.
Code 16K uses a Code 128 based system which can stack up to 16 rows in a block.
This gives a maximum data capacity of 77 characters or 154 numerical digits and
includes two modulo-107 check digits. Code 16K also supports extended ASCII
-character encoding in the same manner as Code 128.
+character encoding in the same manner as Code 128. GS1 data encoding is also
+supported.
6.2.4 PDF417 (ISO 15438)
------------------------
@@ -3171,7 +3173,7 @@ international standards:
> BS EN 797:1996 Bar coding - Symbology specifications - 'EAN/UPC'
> BS EN 798:1996 Bar coding - Symbology specifications - 'Codabar'
-> ISO/IEC 12323:2005 AIDC technologies - Symbology specifications - Code 16K
+> BS EN 12323:2005 AIDC technologies - Symbology specifications - Code 16K
> ISO/IEC 15417:2007 Information technology - Automatic identification and data
capture techniques - Code 128 bar code symbology specification
> ISO/IEC 15438:2015 Information technology - Automatic identification and data
diff --git a/frontend/main.c b/frontend/main.c
index d09f239f..af8c60e5 100644
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -127,6 +127,7 @@ static void usage(void) {
" --box Add a box around the symbol\n"
" --cmyk Use CMYK colour space in EPS/TIF symbols\n"
" --cols=NUMBER Set the number of data columns in symbol\n"
+ " --compliantheight Warn if height not compliant, and use standard default\n"
" -d, --data=DATA Set the symbol content\n"
" --direct Send output to stdout\n"
" --dmre Allow Data Matrix Rectangular Extended\n"
@@ -856,8 +857,8 @@ int main(int argc, char **argv) {
while (no_getopt_error) {
enum options {
- OPT_ADDONGAP = 128, OPT_BATCH, OPT_BINARY, OPT_BG, OPT_BIND, OPT_BOLD, OPT_BORDER,
- OPT_BOX, OPT_CMYK, OPT_COLS, OPT_DIRECT, OPT_DMRE, OPT_DOTSIZE, OPT_DOTTY, OPT_DUMP,
+ OPT_ADDONGAP = 128, OPT_BATCH, OPT_BINARY, OPT_BG, OPT_BIND, OPT_BOLD, OPT_BORDER, OPT_BOX,
+ OPT_CMYK, OPT_COLS, OPT_COMPLIANTHEIGHT, OPT_DIRECT, OPT_DMRE, OPT_DOTSIZE, OPT_DOTTY, OPT_DUMP,
OPT_ECI, OPT_ESC, OPT_FG, OPT_FILETYPE, OPT_FONTSIZE, OPT_FULLMULTIBYTE,
OPT_GS1, OPT_GS1NOCHECK, OPT_GS1PARENS, OPT_GSSEP, OPT_GUARDDESCENT,
OPT_HEIGHT, OPT_INIT, OPT_MIRROR, OPT_MASK, OPT_MODE,
@@ -879,6 +880,7 @@ int main(int argc, char **argv) {
{"box", 0, NULL, OPT_BOX},
{"cmyk", 0, NULL, OPT_CMYK},
{"cols", 1, NULL, OPT_COLS},
+ {"compliantheight", 0, NULL, OPT_COMPLIANTHEIGHT},
{"data", 1, NULL, 'd'},
{"direct", 0, NULL, OPT_DIRECT},
{"dmre", 0, NULL, OPT_DMRE},
@@ -995,6 +997,9 @@ int main(int argc, char **argv) {
fflush(stderr);
}
break;
+ case OPT_COMPLIANTHEIGHT:
+ my_symbol->output_options |= COMPLIANT_HEIGHT;
+ break;
case OPT_DIRECT:
my_symbol->output_options |= BARCODE_STDOUT;
break;
diff --git a/frontend/tests/test_args.c b/frontend/tests/test_args.c
index 281077ed..1b87b470 100644
--- a/frontend/tests/test_args.c
+++ b/frontend/tests/test_args.c
@@ -220,6 +220,15 @@ static void arg_output_options(char *cmd, int output_options) {
if (output_options & GS1_GS_SEPARATOR) {
sprintf(cmd + (int) strlen(cmd), "%s--gssep", strlen(cmd) ? " " : "");
}
+ if (output_options & BARCODE_QUIET_ZONES) {
+ sprintf(cmd + (int) strlen(cmd), "%s--quietzones", strlen(cmd) ? " " : "");
+ }
+ if (output_options & BARCODE_NO_QUIET_ZONES) {
+ sprintf(cmd + (int) strlen(cmd), "%s--noquietzones", strlen(cmd) ? " " : "");
+ }
+ if (output_options & COMPLIANT_HEIGHT) {
+ sprintf(cmd + (int) strlen(cmd), "%s--compliantheight", strlen(cmd) ? " " : "");
+ }
}
}
@@ -906,38 +915,39 @@ static void test_other_opts(int index, int debug) {
/* 5*/ { BARCODE_CODE128, "1", -1, " --fg=", "00000000", "" },
/* 6*/ { BARCODE_CODE128, "1", -1, " --fg=", "000000F", "Error 651: Malformed foreground colour target" },
/* 7*/ { BARCODE_CODE128, "1", -1, " --fg=", "000000FG", "Error 653: Malformed foreground colour target" },
- /* 8*/ { BARCODE_CODE128, "1", -1, " --fontsize=", "10", "" },
- /* 9*/ { BARCODE_CODE128, "1", -1, " --fontsize=", "101", "Warning 126: Font size out of range (0 to 100), ignoring" },
- /* 10*/ { BARCODE_CODE128, "1", -1, " --nobackground", "", "" },
- /* 11*/ { BARCODE_CODE128, "1", -1, " --noquietzones", "", "" },
- /* 12*/ { BARCODE_CODE128, "1", -1, " --notext", "", "" },
- /* 13*/ { BARCODE_CODE128, "1", -1, " --quietzones", "", "" },
- /* 14*/ { BARCODE_CODE128, "1", -1, " --reverse", "", "" },
- /* 15*/ { BARCODE_CODE128, "1", -1, " --werror", NULL, "" },
- /* 16*/ { 19, "1", -1, " --werror", NULL, "Error 207: Codabar 18 not supported" },
- /* 17*/ { BARCODE_GS1_128, "[01]12345678901231", -1, "", NULL, "" },
- /* 18*/ { BARCODE_GS1_128, "0112345678901231", -1, "", NULL, "Error 252: Data does not start with an AI" },
- /* 19*/ { BARCODE_GS1_128, "0112345678901231", -1, " --gs1nocheck", NULL, "Error 252: Data does not start with an AI" },
- /* 20*/ { BARCODE_GS1_128, "[00]376104250021234569", -1, "", NULL, "" },
- /* 21*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, "", NULL, "Warning 261: AI (00) position 18: Bad checksum '8', expected '9'" },
- /* 22*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --gs1nocheck", NULL, "" },
- /* 23*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --werror", NULL, "Error 261: AI (00) position 18: Bad checksum '8', expected '9'" },
- /* 24*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "1", "Error 155: Invalid Structured Append argument, expect \"index,count[,ID]\"" },
- /* 25*/ { BARCODE_AZTEC, "1", -1, " --structapp=", ",", "Error 156: Structured Append index too short" },
- /* 26*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "1234567890,", "Error 156: Structured Append index too long" },
- /* 27*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,", "Error 159: Structured Append count too short" },
- /* 28*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,1234567890", "Error 159: Structured Append count too long" },
- /* 29*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,", "Error 158: Structured Append ID too short" },
- /* 30*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,1234567890,", "Error 157: Structured Append count too long" },
- /* 31*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,123456789012345678901234567890123", "Error 158: Structured Append ID too long" },
- /* 32*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,12345678901234567890123456789012", "Error 701: Structured Append count out of range (2-26)" },
- /* 33*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,26,12345678901234567890123456789012", "" },
- /* 34*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "A,26,12345678901234567890123456789012", "Error 160: Invalid Structured Append index (digits only)" },
- /* 35*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,A,12345678901234567890123456789012", "Error 161: Invalid Structured Append count (digits only)" },
- /* 36*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,1,12345678901234567890123456789012", "Error 162: Invalid Structured Append count, must be >= 2" },
- /* 37*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "0,2,12345678901234567890123456789012", "Error 163: Structured Append index out of range (1-2)" },
- /* 38*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "3,2,12345678901234567890123456789012", "Error 163: Structured Append index out of range (1-2)" },
- /* 39*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "2,3,12345678901234567890123456789012", "" },
+ /* 8*/ { BARCODE_CODE128, "1", -1, " --compliantheight", "", "" },
+ /* 9*/ { BARCODE_CODE128, "1", -1, " --fontsize=", "10", "" },
+ /* 10*/ { BARCODE_CODE128, "1", -1, " --fontsize=", "101", "Warning 126: Font size out of range (0 to 100), ignoring" },
+ /* 11*/ { BARCODE_CODE128, "1", -1, " --nobackground", "", "" },
+ /* 12*/ { BARCODE_CODE128, "1", -1, " --noquietzones", "", "" },
+ /* 13*/ { BARCODE_CODE128, "1", -1, " --notext", "", "" },
+ /* 14*/ { BARCODE_CODE128, "1", -1, " --quietzones", "", "" },
+ /* 15*/ { BARCODE_CODE128, "1", -1, " --reverse", "", "" },
+ /* 16*/ { BARCODE_CODE128, "1", -1, " --werror", NULL, "" },
+ /* 17*/ { 19, "1", -1, " --werror", NULL, "Error 207: Codabar 18 not supported" },
+ /* 18*/ { BARCODE_GS1_128, "[01]12345678901231", -1, "", NULL, "" },
+ /* 19*/ { BARCODE_GS1_128, "0112345678901231", -1, "", NULL, "Error 252: Data does not start with an AI" },
+ /* 20*/ { BARCODE_GS1_128, "0112345678901231", -1, " --gs1nocheck", NULL, "Error 252: Data does not start with an AI" },
+ /* 21*/ { BARCODE_GS1_128, "[00]376104250021234569", -1, "", NULL, "" },
+ /* 22*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, "", NULL, "Warning 261: AI (00) position 18: Bad checksum '8', expected '9'" },
+ /* 23*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --gs1nocheck", NULL, "" },
+ /* 24*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --werror", NULL, "Error 261: AI (00) position 18: Bad checksum '8', expected '9'" },
+ /* 25*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "1", "Error 155: Invalid Structured Append argument, expect \"index,count[,ID]\"" },
+ /* 26*/ { BARCODE_AZTEC, "1", -1, " --structapp=", ",", "Error 156: Structured Append index too short" },
+ /* 27*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "1234567890,", "Error 156: Structured Append index too long" },
+ /* 28*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,", "Error 159: Structured Append count too short" },
+ /* 29*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,1234567890", "Error 159: Structured Append count too long" },
+ /* 30*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,", "Error 158: Structured Append ID too short" },
+ /* 31*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,1234567890,", "Error 157: Structured Append count too long" },
+ /* 32*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,123456789012345678901234567890123", "Error 158: Structured Append ID too long" },
+ /* 33*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,12345678901234567890123456789012", "Error 701: Structured Append count out of range (2-26)" },
+ /* 34*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,26,12345678901234567890123456789012", "" },
+ /* 35*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "A,26,12345678901234567890123456789012", "Error 160: Invalid Structured Append index (digits only)" },
+ /* 36*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,A,12345678901234567890123456789012", "Error 161: Invalid Structured Append count (digits only)" },
+ /* 37*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,1,12345678901234567890123456789012", "Error 162: Invalid Structured Append count, must be >= 2" },
+ /* 38*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "0,2,12345678901234567890123456789012", "Error 163: Structured Append index out of range (1-2)" },
+ /* 39*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "3,2,12345678901234567890123456789012", "Error 163: Structured Append index out of range (1-2)" },
+ /* 40*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "2,3,12345678901234567890123456789012", "" },
};
int data_size = ARRAY_SIZE(data);
int i;
diff --git a/frontend_qt/barcodeitem.cpp b/frontend_qt/barcodeitem.cpp
index 7fd622db..441ae7a7 100644
--- a/frontend_qt/barcodeitem.cpp
+++ b/frontend_qt/barcodeitem.cpp
@@ -16,7 +16,7 @@
***************************************************************************/
/* vim: set ts=4 sw=4 et : */
-#include
+//#include
#include "barcodeitem.h"
BarcodeItem::BarcodeItem()
diff --git a/frontend_qt/grpAztec.ui b/frontend_qt/grpAztec.ui
index aad58a84..efc4a6ba 100644
--- a/frontend_qt/grpAztec.ui
+++ b/frontend_qt/grpAztec.ui
@@ -54,6 +54,9 @@ be set based on data
-
+
+ 21
+
false
diff --git a/frontend_qt/grpC11.ui b/frontend_qt/grpC11.ui
index f967186b..e3082c83 100644
--- a/frontend_qt/grpC11.ui
+++ b/frontend_qt/grpC11.ui
@@ -25,12 +25,18 @@
Check Digits
+
+ Check digits options
+
-
&Two (Mod-11)
+
+ Add 2 mod-11 check digits
+
true
@@ -41,6 +47,9 @@
&One (Mod-11)
+
+ Add 1 mod-11 check digit
+
-
@@ -48,6 +57,9 @@
&No Check Digit
+
+ Do not add any check digits
+
diff --git a/frontend_qt/grpC16k.ui b/frontend_qt/grpC16k.ui
index 459f30b8..7c3bff0d 100644
--- a/frontend_qt/grpC16k.ui
+++ b/frontend_qt/grpC16k.ui
@@ -28,7 +28,8 @@
&Row Separator Height:
- Height in X-dimensions of horizontal lines separating rows
+ Height in X-dimensions of horizontal lines
+separating rows
cmbC16kRowSepHeight
@@ -38,7 +39,8 @@
-
- Height in X-dimensions of horizontal lines separating rows
+ Height in X-dimensions of horizontal lines
+separating rows
-
diff --git a/frontend_qt/grpC25.ui b/frontend_qt/grpC25.ui
index f74e1e9d..ab349b54 100644
--- a/frontend_qt/grpC25.ui
+++ b/frontend_qt/grpC25.ui
@@ -21,41 +21,50 @@
-
-
- -
-
-
- &No Check Digit
-
-
- true
-
-
- No check digit added
-
-
-
- -
-
-
- &Check Digit
-
-
- Add standard GS1 mod-10 weighted check digit
-
-
-
- -
-
-
- Check Digit, Not Shown in &Text
-
-
- Add standard GS1 check digit but do not display in Human Readable Text
-
-
-
-
+
+
+ Check Digit
+
+
+ Check digit options
+
+
+ -
+
+
+ &No Check Digit
+
+
+ true
+
+
+ Do not add check digit
+
+
+
+ -
+
+
+ &Check Digit
+
+
+ Add standard GS1 mod-10 check digit
+
+
+
+ -
+
+
+ &Hidden Check Digit
+
+
+ Add standard GS1 mod-10 check digit but
+do not display in Human Readable Text
+
+
+
+
+
-
diff --git a/frontend_qt/grpC39.ui b/frontend_qt/grpC39.ui
index 5abde122..c0ffb36b 100644
--- a/frontend_qt/grpC39.ui
+++ b/frontend_qt/grpC39.ui
@@ -21,32 +21,52 @@
-
-
- -
-
-
- &No Check Digit
-
-
- true
-
-
-
- -
-
-
- H&IBC 39
-
-
-
- -
-
-
- &Mod-43 Check Digit
-
-
-
-
+
+
+ Check Digit
+
+
+ Check character options
+
+
+ -
+
+
+ &No Check Digit
+
+
+ Do not add check character
+
+
+ true
+
+
+
+ -
+
+
+ H&IBC 39 (Mod-43 Check Digit added)
+
+
+ Process data as a Health Industry Barcode (HIBC)
+Labeler Identification Code (LIC)
+For Provider Applications Standard (PAS), preface
+the data with a slash "/"
+
+
+
+ -
+
+
+ &Mod-43 Check Digit
+
+
+ Add mod-43 check character
+
+
+
+
+
-
diff --git a/frontend_qt/grpC49.ui b/frontend_qt/grpC49.ui
index 691e6812..443eca10 100644
--- a/frontend_qt/grpC49.ui
+++ b/frontend_qt/grpC49.ui
@@ -28,7 +28,8 @@
&Row Separator Height:
- Height in X-dimensions of horizontal lines separating rows
+ Height in X-dimensions of horizontal lines
+separating rows
cmbC49RowSepHeight
@@ -38,7 +39,8 @@
-
- Height in X-dimensions of horizontal lines separating rows
+ Height in X-dimensions of horizontal lines
+separating rows
-
diff --git a/frontend_qt/grpC93.ui b/frontend_qt/grpC93.ui
index f11eb257..5322842b 100644
--- a/frontend_qt/grpC93.ui
+++ b/frontend_qt/grpC93.ui
@@ -20,7 +20,8 @@
Show &Check Characters in Text
- Display the 2 check characters in the Human Readable Text
+ Display the 2 check characters in
+the Human Readable Text
false
diff --git a/frontend_qt/grpChannel.ui b/frontend_qt/grpChannel.ui
index 1c6964bb..62fe84c7 100644
--- a/frontend_qt/grpChannel.ui
+++ b/frontend_qt/grpChannel.ui
@@ -26,6 +26,17 @@
&Number of Channels:
+
+ The number of channels determines the<br />range of numbers that can be encoded<table cellspacing="3">
+><tr><th align=left>Channels </th><th align=left>Range</th></tr>
+<tr><td>3 </td><td>0 to 26</td></tr>
+<tr><td>4 </td><td>0 to 292</td></tr>
+<tr><td>5 </td><td>0 to 3493</td></tr>
+<tr><td>6 </td><td>0 to 44072</td></tr>
+<tr><td>7 </td><td>0 to 576688</td></tr>
+<tr><td>8 </td><td>0 to 7742862</td></tr>
+</table>
+
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
@@ -36,6 +47,17 @@
-
+
+ The number of channels determines the<br />range of numbers that can be encoded<table cellspacing="3">
+><tr><th align=left>Channels </th><th align=left>Range</th></tr>
+<tr><td>3 </td><td>0 to 26</td></tr>
+<tr><td>4 </td><td>0 to 292</td></tr>
+<tr><td>5 </td><td>0 to 3493</td></tr>
+<tr><td>6 </td><td>0 to 44072</td></tr>
+<tr><td>7 </td><td>0 to 576688</td></tr>
+<tr><td>8 </td><td>0 to 7742862</td></tr>
+</table>
+
-
Automatic
diff --git a/frontend_qt/grpCodabar.ui b/frontend_qt/grpCodabar.ui
index d8e1007c..1167a9ef 100644
--- a/frontend_qt/grpCodabar.ui
+++ b/frontend_qt/grpCodabar.ui
@@ -15,13 +15,49 @@
-
-
-
- Add &Check Character (Mod-16)
+
+
+ Check Digit
-
- false
+
+ Check character options
+
+ -
+
+
+ &No Check Digit
+
+
+ true
+
+
+ Do not add check character
+
+
+
+ -
+
+
+ &Check Digit
+
+
+ Add mod-16 check character
+
+
+
+ -
+
+
+ &Hidden Check Digit
+
+
+ Add mod-16 check character but do
+not display in Human Readable Text
+
+
+
+
-
diff --git a/frontend_qt/grpCodablockF.ui b/frontend_qt/grpCodablockF.ui
index cc3887a0..b424b4ad 100644
--- a/frontend_qt/grpCodablockF.ui
+++ b/frontend_qt/grpCodablockF.ui
@@ -599,7 +599,8 @@
&Row Separator Height:
- Height in X-dimensions of horizontal lines separating rows
+ Height in X-dimensions of horizontal lines
+separating rows
cmbCbfRowSepHeight
@@ -609,7 +610,8 @@
-
- Height in X-dimensions of horizontal lines separating rows
+ Height in X-dimensions of horizontal lines
+separating rows
-
diff --git a/frontend_qt/grpCodeOne.ui b/frontend_qt/grpCodeOne.ui
index 925fa210..75435fb7 100644
--- a/frontend_qt/grpCodeOne.ui
+++ b/frontend_qt/grpCodeOne.ui
@@ -28,7 +28,11 @@
Symbol Si&ze:
- Set size (version) of symbol
+ Set size (H x W) of symbol
+Versions A to H have fixed heights and
+fixed widths
+Versions S and T have fixed heights but
+variable widths
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
@@ -40,8 +44,15 @@
-
+
+ 11
+
- Set size (version) of symbol
+ Set size (H x W) of symbol
+Versions A to H have fixed heights and
+fixed widths
+Versions S and T have fixed heights but
+variable widths
-
@@ -149,7 +160,8 @@ formatted with Application Identifiers (AIs)
Code One supports Structured Append of up to
-128 symbols
+128 symbols (not available for Version S)
+(ignored if disabled)
-
@@ -178,7 +190,7 @@ containing a total of this number of symbols
Value ranges from 1 (Disabled) to 128
- 1 (Disabled)
+ 1 (Disabled)
1
diff --git a/frontend_qt/grpDAFT.ui b/frontend_qt/grpDAFT.ui
index ae4f7dc7..00b343ad 100644
--- a/frontend_qt/grpDAFT.ui
+++ b/frontend_qt/grpDAFT.ui
@@ -80,7 +80,7 @@
Examples of tracker ratios:<table cellspacing="3">
<tr><td>Australia Post </td><td>26%</td></tr>
<tr><td>Japan Post </td><td>33%</td></tr>
-<tr><td>PLANET, POSTNET </td><td>40%</td></tr>
+<tr><td>PLANET, POSTNET </td><td><i>25% (Tracker and Ascender only)</i></td></tr>
<tr><td>Royal Mail, Dutch Post </td><td>25.6%</td></tr>
<tr><td>USPS Intelligent Mail </td><td>33.1%</td></tr>
<tr><td>Default </td><td>25%</td></tr>
diff --git a/frontend_qt/grpDotCode.ui b/frontend_qt/grpDotCode.ui
index 6d54a912..8c9fcb3f 100644
--- a/frontend_qt/grpDotCode.ui
+++ b/frontend_qt/grpDotCode.ui
@@ -1050,9 +1050,6 @@ as 0 to 3 with the corners lit
-
-
- 8
-
Manually specify which mask to use
The prime masks 0' to 3' are the same
diff --git a/frontend_qt/grpGrid.ui b/frontend_qt/grpGrid.ui
index d60063e4..fd572488 100644
--- a/frontend_qt/grpGrid.ui
+++ b/frontend_qt/grpGrid.ui
@@ -37,6 +37,9 @@
-
+
+ 14
+
Set size (version) of symbol
@@ -197,7 +200,8 @@ error correction codewords
false
- Use Hanzi multibyte encoding for binary and Latin data
+ Use Hanzi multibyte encoding for binary
+and Latin data
diff --git a/frontend_qt/grpHX.ui b/frontend_qt/grpHX.ui
index 2675c24e..c81886a5 100644
--- a/frontend_qt/grpHX.ui
+++ b/frontend_qt/grpHX.ui
@@ -27,6 +27,9 @@
Si&ze:
+
+ Set size (version) of symbol
+
cmbHXSize
@@ -37,6 +40,9 @@
21
+
+ Set size (version) of symbol
+
-
Automatic
@@ -469,6 +475,10 @@
E&rror Correction:
+
+ Set percentage of capacity to use for
+error correction codewords
+
cmbHXECC
@@ -476,6 +486,10 @@
-
+
+ Set percentage of capacity to use for
+error correction codewords
+
-
Automatic
@@ -508,6 +522,9 @@
&Mask:
+
+ Manually specify which mask to use
+
cmbHXMask
@@ -515,8 +532,8 @@
-
-
- 4
+
+ Manually specify which mask to use
-
@@ -556,7 +573,8 @@
false
- Use Hanzi multibyte encoding for binary and Latin data
+ Use Hanzi multibyte encoding for binary
+and Latin data
diff --git a/frontend_qt/grpMQR.ui b/frontend_qt/grpMQR.ui
index de624693..c4082f00 100644
--- a/frontend_qt/grpMQR.ui
+++ b/frontend_qt/grpMQR.ui
@@ -26,6 +26,9 @@
Si&ze:
+
+ Set size (version) of symbol
+
cmbMQRSize
@@ -33,6 +36,9 @@
-
+
+ Set size (version) of symbol
+
-
Automatic
@@ -65,6 +71,10 @@
E&rror Correction:
+
+ Set percentage of capacity to use for
+error correction codewords
+
cmbMQRECC
@@ -72,6 +82,10 @@
-
+
+ Set percentage of capacity to use for
+error correction codewords
+
-
Automatic
@@ -99,6 +113,9 @@
&Mask:
+
+ Manually specify which mask to use
+
cmbMQRMask
@@ -106,8 +123,8 @@
-
-
- 4
+
+ Manually specify which mask to use
-
@@ -147,7 +164,8 @@
false
- Use Kanji multibyte encoding for binary and Latin data
+ Use Kanji multibyte encoding for binary
+and Latin data
diff --git a/frontend_qt/grpMSICheck.ui b/frontend_qt/grpMSICheck.ui
index 0e9571ab..45b13874 100644
--- a/frontend_qt/grpMSICheck.ui
+++ b/frontend_qt/grpMSICheck.ui
@@ -91,7 +91,8 @@ Mod-11 (NCR) uses NCR weightings
Do not show check digit(s) in &Text
- Add check digit(s) but do not display in Human Readable Text
+ Add check digit(s) but do not display
+in Human Readable Text
false
diff --git a/frontend_qt/grpMicroPDF.ui b/frontend_qt/grpMicroPDF.ui
index 32edf2c1..d213081b 100644
--- a/frontend_qt/grpMicroPDF.ui
+++ b/frontend_qt/grpMicroPDF.ui
@@ -149,7 +149,7 @@ containing a total of this number of symbols
Value ranges from 1 (Disabled) to 99999
- 1 (Disabled)
+ 1 (Disabled)
1
diff --git a/frontend_qt/grpPDF417.ui b/frontend_qt/grpPDF417.ui
index ae8c270e..fe4e326b 100644
--- a/frontend_qt/grpPDF417.ui
+++ b/frontend_qt/grpPDF417.ui
@@ -39,6 +39,9 @@
-
+
+ 21
+
Set number of data characters in a row
@@ -362,7 +365,7 @@ containing a total of this number of symbols
Value ranges from 1 (Disabled) to 99999
- 1 (Disabled)
+ 1 (Disabled)
1
diff --git a/frontend_qt/grpQR.ui b/frontend_qt/grpQR.ui
index 3f3bbc0c..b4b7eb74 100644
--- a/frontend_qt/grpQR.ui
+++ b/frontend_qt/grpQR.ui
@@ -312,9 +312,6 @@ error correction codewords
-
-
- 8
-
Manually specify which mask to use
@@ -428,7 +425,8 @@ the data with a slash "/"
false
- Use Kanji multibyte encoding for binary and Latin data
+ Use Kanji multibyte encoding for binary
+and Latin data
diff --git a/frontend_qt/grpRMQR.ui b/frontend_qt/grpRMQR.ui
index 72c2d009..2af8a182 100644
--- a/frontend_qt/grpRMQR.ui
+++ b/frontend_qt/grpRMQR.ui
@@ -327,7 +327,8 @@ formatted with Application Identifiers (AIs)
false
- Use Kanji multibyte encoding for binary and Latin data
+ Use Kanji multibyte encoding for binary
+and Latin data
diff --git a/frontend_qt/grpUPCA.ui b/frontend_qt/grpUPCA.ui
index 7271609f..3733c7d5 100644
--- a/frontend_qt/grpUPCA.ui
+++ b/frontend_qt/grpUPCA.ui
@@ -73,8 +73,7 @@ main symbol and add-on (if any)
Height in X-dimensions that the guard bars
-descend below the main bars
-Default 5
+descend below the main bars (default 5X)
(ignored if disabled)
@@ -89,38 +88,70 @@ Default 5
-
-
-
+
+ -
+
+
Height in X-dimensions that the guard bars
-descend below the main bars
-Default 5
+descend below the main bars (default 5X)
(ignored if disabled)
-
-
-
-
-
- X
-
-
- 3
-
-
- 0.000000000000000
-
-
- 20.000000000000000
-
-
- 0.100000000000000
-
-
- 5.000000000000000
-
-
- true
-
-
+
+
+
+
+
+ X
+
+
+ 3
+
+
+ 0.000000000000000
+
+
+ 20.000000000000000
+
+
+ 0.100000000000000
+
+
+ 5.000000000000000
+
+
+ true
+
+
+
+ 2
+ 0
+
+
+
+
+ -
+
+
+ Reset guard bars descent height
+to default 5X
+
+
+ &Reset
+
+
+
+ 1
+ 0
+
+
+
+
+ 40
+ 20
+
+
+
+
+
diff --git a/frontend_qt/grpUPCEAN.ui b/frontend_qt/grpUPCEAN.ui
index 150f87d7..8ec339bd 100644
--- a/frontend_qt/grpUPCEAN.ui
+++ b/frontend_qt/grpUPCEAN.ui
@@ -83,8 +83,7 @@ main symbol and add-on (if any)
Height in X-dimensions that the guard bars
-descend below the main bars
-Default 5
+descend below the main bars (default 5X)
(ignored if disabled)
@@ -99,38 +98,70 @@ Default 5
-
-
-
- Height in X-dimensions that the guard bars
-descend below the main bars
-Default 5
+
+ -
+
+
+ Height in X-dimensions that the guard bars
+descend below the main bars (default 5X)
(ignored if disabled)
-
-
-
-
-
- X
-
-
- 3
-
-
- 0.000000000000000
-
-
- 20.000000000000000
-
-
- 0.100000000000000
-
-
- 5.000000000000000
-
-
- true
-
-
+
+
+
+
+
+ X
+
+
+ 3
+
+
+ 0.000000000000000
+
+
+ 20.000000000000000
+
+
+ 0.100000000000000
+
+
+ 5.000000000000000
+
+
+ true
+
+
+
+ 2
+ 0
+
+
+
+
+ -
+
+
+ Reset guard bars descent height
+to default 5X
+
+
+ &Reset
+
+
+
+ 1
+ 0
+
+
+
+
+ 40
+ 20
+
+
+
+
+
diff --git a/frontend_qt/grpVIN.ui b/frontend_qt/grpVIN.ui
index 25b8a412..3148270d 100644
--- a/frontend_qt/grpVIN.ui
+++ b/frontend_qt/grpVIN.ui
@@ -27,6 +27,10 @@
&Import Character Prefix
+
+ Preface data with import character 'I'
+(not shown in Human Readable Text)
+
false
diff --git a/frontend_qt/main.cpp b/frontend_qt/main.cpp
index ed34d1c4..33df3a2b 100644
--- a/frontend_qt/main.cpp
+++ b/frontend_qt/main.cpp
@@ -30,6 +30,8 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
MainWindow w;
+ // Seem to need to do this before showing the window
+ w.setWindowTitle(w.windowTitle() + ' ' + MainWindow::get_zint_version());
w.show();
return app.exec();
}
diff --git a/frontend_qt/mainWindow.ui b/frontend_qt/mainWindow.ui
index cdc1a90f..09dbccb8 100644
--- a/frontend_qt/mainWindow.ui
+++ b/frontend_qt/mainWindow.ui
@@ -41,9 +41,49 @@
-
+
-
-
+
+
+
+ 0
+ 10
+
+
+
+ Qt::CustomContextMenu
+
+
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Plain
+
+
+ Qt::Horizontal
+
+
+ false
+
+
+
+ Qt::CustomContextMenu
+
+
+ true
+
+
+
+
+
+ false
+
+
+
-
@@ -659,18 +699,37 @@ as delimiters for GS1 Application Identifiers
-
-
-
-
- Use default height
+
+ -
+
+
+ Use default height
(ignored if disabled)
-
-
- Auto&matic Height
-
-
- true
-
-
+
+
+ Auto&matic Height
+
+
+ true
+
+
+
+ -
+
+
+ Warn if height not compliant with specification
+and use standard height (if any) for default
+(ignored if disabled)
+
+
+ Com&pliant Height
+
+
+ false
+
+
+
+
-
@@ -701,6 +760,9 @@ as delimiters for GS1 Application Identifiers
Overall symbol height in X-dimensions
(ignored if disabled)
+
+ true
+
@@ -722,9 +784,6 @@ as delimiters for GS1 Application Identifiers
50.000000000000000
-
- true
-
-
@@ -1156,19 +1215,19 @@ in X-dimensions
-
-
-
+
- About Zint
+ Show menu
- Abo&ut
+ Men&u
-
-
-
- Qt::Horizontal
+
+
+ false
@@ -1176,7 +1235,7 @@ in X-dimensions
20
-
+
-
@@ -1184,7 +1243,7 @@ in X-dimensions
Copy to clipboard as BMP
- Copy &BMP
+ &BMP
@@ -1194,7 +1253,7 @@ in X-dimensions
Copy to clipboard as SVG
- Copy S&VG
+ S&VG
diff --git a/frontend_qt/mainwindow.cpp b/frontend_qt/mainwindow.cpp
index 06775e6e..6ebe8a5a 100644
--- a/frontend_qt/mainwindow.cpp
+++ b/frontend_qt/mainwindow.cpp
@@ -30,99 +30,109 @@
#include
#include
#include
+#include
+#include
#include "mainwindow.h"
#include "datawindow.h"
#include "sequencewindow.h"
#include
+// Shorthand
+#define QSL QStringLiteral
+
+static const int statusBarTimeout = 0; // Don't timeout
+
+static const QKeySequence quitKeySeq(Qt::CTRL | Qt::Key_Q); // Use on Windows also (i.e. not using QKeySequence::Quit)
+
struct bstyle_item {
- const char *text;
+ const QString text;
int symbology;
};
static const struct bstyle_item bstyle_items[] = {
- { "Australia Post Redirect Code", BARCODE_AUSREDIRECT },
- { "Australia Post Reply-Paid", BARCODE_AUSREPLY },
- { "Australia Post Routing Code", BARCODE_AUSROUTE },
- { "Australia Post Standard Customer", BARCODE_AUSPOST },
- { "Aztec Code (ISO 24778) (and HIBC)", BARCODE_AZTEC },
- { "Aztec Runes", BARCODE_AZRUNE },
- { "Channel Code", BARCODE_CHANNEL },
- { "Codabar", BARCODE_CODABAR },
- { "Codablock-F (and HIBC)", BARCODE_CODABLOCKF },
- { "Code 11", BARCODE_CODE11 },
- { "Code 128 (ISO 15417) (and GS1-128 and HIBC)", BARCODE_CODE128 },
- { "Code 16k (ISO 12323)", BARCODE_CODE16K },
- { "Code 2 of 5 Data Logic", BARCODE_C25LOGIC },
- { "Code 2 of 5 IATA", BARCODE_C25IATA },
- { "Code 2 of 5 Industrial", BARCODE_C25IND },
- { "Code 2 of 5 Interleaved (ISO 16390)", BARCODE_C25INTER },
- { "Code 2 of 5 Standard (Matrix)", BARCODE_C25STANDARD },
- { "Code 32 (Italian Pharmacode)", BARCODE_CODE32 },
- { "Code 39 (ISO 16388) (and HIBC)", BARCODE_CODE39 },
- { "Code 39 Extended", BARCODE_EXCODE39 },
- { "Code 49", BARCODE_CODE49 },
- { "Code 93", BARCODE_CODE93 },
- { "Code One", BARCODE_CODEONE },
- { "DAFT Code", BARCODE_DAFT },
- { "Data Matrix (ISO 16022) (and HIBC)", BARCODE_DATAMATRIX },
- { "Deutsche Post Identcode", BARCODE_DPIDENT },
- { "Deutsche Post Leitcode", BARCODE_DPLEIT },
- { "DotCode", BARCODE_DOTCODE },
- { "DPD Code", BARCODE_DPD },
- { "Dutch Post KIX", BARCODE_KIX },
- { "EAN-14", BARCODE_EAN14 },
- { "European Article Number (EAN)", BARCODE_EANX },
- { "Facing Identification Mark (FIM)", BARCODE_FIM },
- { "Flattermarken", BARCODE_FLAT },
- { "Grid Matrix", BARCODE_GRIDMATRIX },
- { "GS1 DataBar Expanded", BARCODE_DBAR_EXP },
- { "GS1 DataBar Expanded Stacked", BARCODE_DBAR_EXPSTK },
- { "GS1 DataBar Limited", BARCODE_DBAR_LTD },
- { "GS1 DataBar Omnidirectional (and Truncated)", BARCODE_DBAR_OMN },
- { "GS1 DataBar Stacked", BARCODE_DBAR_STK },
- { "GS1 DataBar Stacked Omnidirectional", BARCODE_DBAR_OMNSTK },
- { "Han Xin (Chinese Sensible) Code", BARCODE_HANXIN },
- { "International Standard Book Number (ISBN)", BARCODE_ISBNX },
- { "ITF-14", BARCODE_ITF14 },
- { "Japanese Postal Barcode", BARCODE_JAPANPOST },
- { "Korean Postal Barcode", BARCODE_KOREAPOST },
- { "LOGMARS", BARCODE_LOGMARS },
- { "MaxiCode (ISO 16023)", BARCODE_MAXICODE },
- { "MicroPDF417 (ISO 24728) (and HIBC)", BARCODE_MICROPDF417 },
- { "Micro QR Code", BARCODE_MICROQR },
- { "MSI Plessey", BARCODE_MSI_PLESSEY },
- { "NVE-18 (SSCC-18)", BARCODE_NVE18 },
- { "PDF417 (ISO 15438) (and Compact and HIBC)", BARCODE_PDF417 },
- { "Pharmacode", BARCODE_PHARMA },
- { "Pharmacode 2-track", BARCODE_PHARMA_TWO },
- { "Pharma Zentralnummer (PZN)", BARCODE_PZN },
- { "PLANET", BARCODE_PLANET },
- { "POSTNET", BARCODE_POSTNET },
- { "QR Code (ISO 18004) (and HIBC)", BARCODE_QRCODE },
- { "Rectangular Micro QR (rMQR)", BARCODE_RMQR },
- { "Royal Mail 4-state Barcode", BARCODE_RM4SCC },
- { "Royal Mail 4-state Mailmark", BARCODE_MAILMARK },
- { "Telepen", BARCODE_TELEPEN },
- { "Telepen Numeric", BARCODE_TELEPEN_NUM },
- { "UK Plessey", BARCODE_PLESSEY },
- { "Ultracode", BARCODE_ULTRA },
- { "Universal Product Code (UPC-A)", BARCODE_UPCA },
- { "Universal Product Code (UPC-E)", BARCODE_UPCE },
- { "UPNQR", BARCODE_UPNQR },
- { "USPS Intelligent Mail (OneCode)", BARCODE_USPS_IMAIL },
- { "VIN (Vehicle Identification Number)", BARCODE_VIN },
+ { QSL("Australia Post Redirect Code"), BARCODE_AUSREDIRECT },
+ { QSL("Australia Post Reply-Paid"), BARCODE_AUSREPLY },
+ { QSL("Australia Post Routing Code"), BARCODE_AUSROUTE },
+ { QSL("Australia Post Standard Customer"), BARCODE_AUSPOST },
+ { QSL("Aztec Code (ISO 24778) (and HIBC)"), BARCODE_AZTEC },
+ { QSL("Aztec Runes"), BARCODE_AZRUNE },
+ { QSL("Channel Code"), BARCODE_CHANNEL },
+ { QSL("Codabar"), BARCODE_CODABAR },
+ { QSL("Codablock-F (and HIBC)"), BARCODE_CODABLOCKF },
+ { QSL("Code 11"), BARCODE_CODE11 },
+ { QSL("Code 128 (ISO 15417) (and GS1-128 and HIBC)"), BARCODE_CODE128 },
+ { QSL("Code 16k (EN 12323)"), BARCODE_CODE16K },
+ { QSL("Code 2 of 5 Data Logic"), BARCODE_C25LOGIC },
+ { QSL("Code 2 of 5 IATA"), BARCODE_C25IATA },
+ { QSL("Code 2 of 5 Industrial"), BARCODE_C25IND },
+ { QSL("Code 2 of 5 Interleaved (ISO 16390)"), BARCODE_C25INTER },
+ { QSL("Code 2 of 5 Standard (Matrix)"), BARCODE_C25STANDARD },
+ { QSL("Code 32 (Italian Pharmacode)"), BARCODE_CODE32 },
+ { QSL("Code 39 (ISO 16388) (and HIBC)"), BARCODE_CODE39 },
+ { QSL("Code 39 Extended"), BARCODE_EXCODE39 },
+ { QSL("Code 49"), BARCODE_CODE49 },
+ { QSL("Code 93"), BARCODE_CODE93 },
+ { QSL("Code One"), BARCODE_CODEONE },
+ { QSL("DAFT Code"), BARCODE_DAFT },
+ { QSL("Data Matrix (ISO 16022) (and HIBC)"), BARCODE_DATAMATRIX },
+ { QSL("Deutsche Post Identcode"), BARCODE_DPIDENT },
+ { QSL("Deutsche Post Leitcode"), BARCODE_DPLEIT },
+ { QSL("DotCode"), BARCODE_DOTCODE },
+ { QSL("DPD Code"), BARCODE_DPD },
+ { QSL("Dutch Post KIX"), BARCODE_KIX },
+ { QSL("EAN-14"), BARCODE_EAN14 },
+ { QSL("European Article Number (EAN)"), BARCODE_EANX },
+ { QSL("Facing Identification Mark (FIM)"), BARCODE_FIM },
+ { QSL("Flattermarken"), BARCODE_FLAT },
+ { QSL("Grid Matrix"), BARCODE_GRIDMATRIX },
+ { QSL("GS1 DataBar Expanded"), BARCODE_DBAR_EXP },
+ { QSL("GS1 DataBar Expanded Stacked"), BARCODE_DBAR_EXPSTK },
+ { QSL("GS1 DataBar Limited"), BARCODE_DBAR_LTD },
+ { QSL("GS1 DataBar Omnidirectional (and Truncated)"), BARCODE_DBAR_OMN },
+ { QSL("GS1 DataBar Stacked"), BARCODE_DBAR_STK },
+ { QSL("GS1 DataBar Stacked Omnidirectional"), BARCODE_DBAR_OMNSTK },
+ { QSL("Han Xin (Chinese Sensible) Code"), BARCODE_HANXIN },
+ { QSL("International Standard Book Number (ISBN)"), BARCODE_ISBNX },
+ { QSL("ITF-14"), BARCODE_ITF14 },
+ { QSL("Japanese Postal Barcode"), BARCODE_JAPANPOST },
+ { QSL("Korean Postal Barcode"), BARCODE_KOREAPOST },
+ { QSL("LOGMARS"), BARCODE_LOGMARS },
+ { QSL("MaxiCode (ISO 16023)"), BARCODE_MAXICODE },
+ { QSL("MicroPDF417 (ISO 24728) (and HIBC)"), BARCODE_MICROPDF417 },
+ { QSL("Micro QR Code"), BARCODE_MICROQR },
+ { QSL("MSI Plessey"), BARCODE_MSI_PLESSEY },
+ { QSL("NVE-18 (SSCC-18)"), BARCODE_NVE18 },
+ { QSL("PDF417 (ISO 15438) (and Compact and HIBC)"), BARCODE_PDF417 },
+ { QSL("Pharmacode"), BARCODE_PHARMA },
+ { QSL("Pharmacode 2-track"), BARCODE_PHARMA_TWO },
+ { QSL("Pharma Zentralnummer (PZN)"), BARCODE_PZN },
+ { QSL("PLANET"), BARCODE_PLANET },
+ { QSL("POSTNET"), BARCODE_POSTNET },
+ { QSL("QR Code (ISO 18004) (and HIBC)"), BARCODE_QRCODE },
+ { QSL("Rectangular Micro QR (rMQR)"), BARCODE_RMQR },
+ { QSL("Royal Mail 4-state Barcode"), BARCODE_RM4SCC },
+ { QSL("Royal Mail 4-state Mailmark"), BARCODE_MAILMARK },
+ { QSL("Telepen"), BARCODE_TELEPEN },
+ { QSL("Telepen Numeric"), BARCODE_TELEPEN_NUM },
+ { QSL("UK Plessey"), BARCODE_PLESSEY },
+ { QSL("Ultracode"), BARCODE_ULTRA },
+ { QSL("Universal Product Code (UPC-A)"), BARCODE_UPCA },
+ { QSL("Universal Product Code (UPC-E)"), BARCODE_UPCE },
+ { QSL("UPNQR"), BARCODE_UPNQR },
+ { QSL("USPS Intelligent Mail (OneCode)"), BARCODE_USPS_IMAIL },
+ { QSL("VIN (Vehicle Identification Number)"), BARCODE_VIN },
};
MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
- : QWidget(parent, fl), m_optionWidget(nullptr), m_symbology(0)
+ : QWidget(parent, fl), m_optionWidget(nullptr), m_symbology(0), m_saveAsShortcut(nullptr), m_menu(nullptr)
{
- m_bc.bc.setDebug(QCoreApplication::arguments().contains("--verbose")); // Undocumented command line debug flag
+ // Undocumented command line debug flag
+ m_bc.bc.setDebug(QCoreApplication::arguments().contains(QSL("--verbose")));
- QCoreApplication::setOrganizationName("zint");
- QCoreApplication::setOrganizationDomain("zint.org.uk");
- QCoreApplication::setApplicationName("Barcode Studio");
+ QCoreApplication::setOrganizationName(QSL("zint"));
+ QCoreApplication::setOrganizationDomain(QSL("zint.org.uk"));
+ QCoreApplication::setApplicationName(QSL("Barcode Studio"));
QSettings settings;
#if QT_VERSION < 0x60000
@@ -132,21 +142,20 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
scene = new QGraphicsScene(this);
setupUi(this);
- view->setMinimumHeight(20);
view->setScene(scene);
- restoreGeometry(settings.value("studio/window_geometry").toByteArray());
+ restoreGeometry(settings.value(QSL("studio/window_geometry")).toByteArray());
- m_fgcolor.setRgb(settings.value("studio/ink/red", 0).toInt(),
- settings.value("studio/ink/green", 0).toInt(),
- settings.value("studio/ink/blue", 0).toInt(),
- settings.value("studio/ink/alpha", 0xff).toInt());
- m_bgcolor.setRgb(settings.value("studio/paper/red", 0xff).toInt(),
- settings.value("studio/paper/green", 0xff).toInt(),
- settings.value("studio/paper/blue", 0xff).toInt(),
- settings.value("studio/paper/alpha", 0xff).toInt());
+ m_fgcolor.setRgb(settings.value(QSL("studio/ink/red"), 0).toInt(),
+ settings.value(QSL("studio/ink/green"), 0).toInt(),
+ settings.value(QSL("studio/ink/blue"), 0).toInt(),
+ settings.value(QSL("studio/ink/alpha"), 0xff).toInt());
+ m_bgcolor.setRgb(settings.value(QSL("studio/paper/red"), 0xff).toInt(),
+ settings.value(QSL("studio/paper/green"), 0xff).toInt(),
+ settings.value(QSL("studio/paper/blue"), 0xff).toInt(),
+ settings.value(QSL("studio/paper/alpha"), 0xff).toInt());
- int cnt = (int) (sizeof(bstyle_items) / sizeof(bstyle_items[0]));
+ const int cnt = (int) (sizeof(bstyle_items) / sizeof(bstyle_items[0]));
for (int i = 0; i < cnt; i++) {
bstyle->addItem(bstyle_items[i].text);
}
@@ -158,39 +167,39 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
filter_bstyle->hide();
#endif
- bstyle->setCurrentIndex(settings.value("studio/symbology", 10).toInt());
+ bstyle->setCurrentIndex(settings.value(QSL("studio/symbology"), 10).toInt());
- txtData->setText(settings.value("studio/data", tr("Your Data Here!")).toString());
- txtComposite->setText(settings.value("studio/composite_text", tr("Your Data Here!")).toString());
- chkComposite->setChecked(settings.value("studio/chk_composite").toInt() ? true : false);
- cmbCompType->setCurrentIndex(settings.value("studio/comp_type", 0).toInt());
- cmbECI->setCurrentIndex(settings.value("studio/appearance/eci", 0).toInt());
- chkEscape->setChecked(settings.value("studio/chk_escape").toInt() ? true : false);
- chkData->setChecked(settings.value("studio/chk_data").toInt() ? true : false);
- chkRInit->setChecked(settings.value("studio/chk_rinit").toInt() ? true : false);
- chkGS1Parens->setChecked(settings.value("studio/chk_gs1parens").toInt() ? true : false);
- chkGS1NoCheck->setChecked(settings.value("studio/chk_gs1nocheck").toInt() ? true : false);
- chkAutoHeight->setChecked(settings.value("studio/appearance/autoheight", 1).toInt() ? true : false);
- heightb->setValue(settings.value("studio/appearance/height", 50.0f).toFloat());
- bwidth->setValue(settings.value("studio/appearance/border", 0).toInt());
- spnWhitespace->setValue(settings.value("studio/appearance/whitespace", 0).toInt());
- spnVWhitespace->setValue(settings.value("studio/appearance/vwhitespace", 0).toInt());
- spnScale->setValue(settings.value("studio/appearance/scale", 1.0).toFloat());
- btype->setCurrentIndex(settings.value("studio/appearance/border_type", 0).toInt());
- cmbFontSetting->setCurrentIndex(settings.value("studio/appearance/font_setting", 0).toInt());
- chkHRTShow->setChecked(settings.value("studio/appearance/chk_hrt_show", 1).toInt() ? true : false);
- chkCMYK->setChecked(settings.value("studio/appearance/chk_cmyk", 0).toInt() ? true : false);
- chkQuietZones->setChecked(settings.value("studio/appearance/chk_quiet_zones", 0).toInt() ? true : false);
- cmbRotate->setCurrentIndex(settings.value("studio/appearance/rotate", 0).toInt());
- chkDotty->setChecked(settings.value("studio/appearance/chk_dotty", 0).toInt() ? true : false);
- spnDotSize->setValue(settings.value("studio/appearance/dot_size", 4.0 / 5.0).toFloat());
+ txtData->setText(settings.value(QSL("studio/data"), tr("Your Data Here!")).toString());
+ txtComposite->setText(settings.value(QSL("studio/composite_text"), tr("Your Data Here!")).toString());
+ chkComposite->setChecked(settings.value(QSL("studio/chk_composite")).toInt() ? true : false);
+ cmbCompType->setCurrentIndex(settings.value(QSL("studio/comp_type"), 0).toInt());
+ cmbECI->setCurrentIndex(settings.value(QSL("studio/appearance/eci"), 0).toInt());
+ chkEscape->setChecked(settings.value(QSL("studio/chk_escape")).toInt() ? true : false);
+ chkData->setChecked(settings.value(QSL("studio/chk_data")).toInt() ? true : false);
+ chkRInit->setChecked(settings.value(QSL("studio/chk_rinit")).toInt() ? true : false);
+ chkGS1Parens->setChecked(settings.value(QSL("studio/chk_gs1parens")).toInt() ? true : false);
+ chkGS1NoCheck->setChecked(settings.value(QSL("studio/chk_gs1nocheck")).toInt() ? true : false);
+ chkAutoHeight->setChecked(settings.value(QSL("studio/appearance/autoheight"), 1).toInt() ? true : false);
+ chkCompliantHeight->setChecked(
+ settings.value(QSL("studio/appearance/compliantheight"), 1).toInt() ? true : false);
+ heightb->setValue(settings.value(QSL("studio/appearance/height"), 50.0f).toFloat());
+ bwidth->setValue(settings.value(QSL("studio/appearance/border"), 0).toInt());
+ spnWhitespace->setValue(settings.value(QSL("studio/appearance/whitespace"), 0).toInt());
+ spnVWhitespace->setValue(settings.value(QSL("studio/appearance/vwhitespace"), 0).toInt());
+ spnScale->setValue(settings.value(QSL("studio/appearance/scale"), 1.0).toFloat());
+ btype->setCurrentIndex(settings.value(QSL("studio/appearance/border_type"), 0).toInt());
+ cmbFontSetting->setCurrentIndex(settings.value(QSL("studio/appearance/font_setting"), 0).toInt());
+ chkHRTShow->setChecked(settings.value(QSL("studio/appearance/chk_hrt_show"), 1).toInt() ? true : false);
+ chkCMYK->setChecked(settings.value(QSL("studio/appearance/chk_cmyk"), 0).toInt() ? true : false);
+ chkQuietZones->setChecked(settings.value(QSL("studio/appearance/chk_quiet_zones"), 0).toInt() ? true : false);
+ cmbRotate->setCurrentIndex(settings.value(QSL("studio/appearance/rotate"), 0).toInt());
+ chkDotty->setChecked(settings.value(QSL("studio/appearance/chk_dotty"), 0).toInt() ? true : false);
+ spnDotSize->setValue(settings.value(QSL("studio/appearance/dot_size"), 4.0 / 5.0).toFloat());
change_options();
scene->addItem(&m_bc);
- update_preview();
-
connect(bstyle, SIGNAL(currentIndexChanged( int )), SLOT(change_options()));
connect(bstyle, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(filter_bstyle, SIGNAL(textChanged( const QString& )), SLOT(filter_symbologies()));
@@ -200,41 +209,54 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
connect(cmbFontSetting, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(txtData, SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
connect(txtComposite, SIGNAL(textChanged()), SLOT(update_preview()));
- connect(chkComposite, SIGNAL(stateChanged( int )), SLOT(composite_ui_set()));
- connect(chkComposite, SIGNAL(stateChanged( int )), SLOT(update_preview()));
+ connect(chkComposite, SIGNAL(toggled( bool )), SLOT(composite_ui_set()));
+ connect(chkComposite, SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(cmbCompType, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(cmbECI, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(chkEscape, SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(chkData, SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(chkRInit, SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(chkGS1Parens, SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(chkGS1NoCheck, SIGNAL(stateChanged( int )), SLOT(update_preview()));
+ connect(chkEscape, SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(chkData, SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(chkRInit, SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(chkGS1Parens, SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(chkGS1NoCheck, SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(spnWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(spnVWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(btnAbout, SIGNAL(clicked( bool )), SLOT(about()));
+ connect(btnMenu, SIGNAL(clicked( bool )), SLOT(menu()));
connect(btnSave, SIGNAL(clicked( bool )), SLOT(save()));
connect(spnScale, SIGNAL(valueChanged( double )), SLOT(change_print_scale()));
connect(btnExit, SIGNAL(clicked( bool )), SLOT(quit_now()));
- connect(btnReset, SIGNAL(clicked( bool )), SLOT(reset_view()));
+ connect(btnReset, SIGNAL(clicked( bool )), SLOT(reset_colours()));
connect(btnMoreData, SIGNAL(clicked( bool )), SLOT(open_data_dialog()));
connect(btnSequence, SIGNAL(clicked( bool )), SLOT(open_sequence_dialog()));
- connect(chkAutoHeight, SIGNAL(stateChanged( int )), SLOT(autoheight_ui_set()));
- connect(chkAutoHeight, SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(chkHRTShow, SIGNAL(stateChanged( int )), SLOT(HRTShow_ui_set()));
- connect(chkHRTShow, SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(chkCMYK, SIGNAL(stateChanged( int )), SLOT(change_cmyk()));
- connect(chkQuietZones, SIGNAL(stateChanged( int )), SLOT(update_preview()));
+ connect(chkAutoHeight, SIGNAL(toggled( bool )), SLOT(autoheight_ui_set()));
+ connect(chkAutoHeight, SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(chkCompliantHeight, SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(chkHRTShow, SIGNAL(toggled( bool )), SLOT(HRTShow_ui_set()));
+ connect(chkHRTShow, SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(chkCMYK, SIGNAL(toggled( bool )), SLOT(change_cmyk()));
+ connect(chkQuietZones, SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(cmbRotate, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(chkDotty, SIGNAL(stateChanged( int )), SLOT(dotty_ui_set()));
- connect(chkDotty, SIGNAL(stateChanged( int )), SLOT(update_preview()));
+ connect(chkDotty, SIGNAL(toggled( bool )), SLOT(dotty_ui_set()));
+ connect(chkDotty, SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(spnDotSize, SIGNAL(valueChanged( double )), SLOT(update_preview()));
connect(btnCopySVG, SIGNAL(clicked( bool )), SLOT(copy_to_clipboard_svg()));
connect(btnCopyBMP, SIGNAL(clicked( bool )), SLOT(copy_to_clipboard_bmp()));
connect(&m_bc.bc, SIGNAL(encoded()), SLOT(on_encoded()));
+ connect(&m_bc.bc, SIGNAL(errored()), SLOT(on_errored()));
- QShortcut *ctrl_q = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q), this);
- connect(ctrl_q, SIGNAL(activated()), SLOT(quit_now()));
+ connect(view, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(view_context_menu(const QPoint &)));
+ connect(errtxtBar, SIGNAL(customContextMenuRequested(const QPoint &)), this,
+ SLOT(errtxtBar_context_menu(const QPoint &)));
+
+ m_saveAsShortcut = new QShortcut(QKeySequence::Save, this); // Will enable/disable this on error
+ connect(m_saveAsShortcut, SIGNAL(activated()), SLOT(save()));
+ QShortcut *helpShortcut = new QShortcut(QKeySequence::HelpContents, this);
+ connect(helpShortcut, SIGNAL(activated()), SLOT(help()));
+ QShortcut *quitShortcut = new QShortcut(quitKeySeq, this);
+ connect(quitShortcut, SIGNAL(activated()), SLOT(quit_now()));
+
+ createActions();
+ createMenu();
}
MainWindow::~MainWindow()
@@ -244,134 +266,47 @@ MainWindow::~MainWindow()
settings.setIniCodec("UTF-8");
#endif
- settings.setValue("studio/window_geometry", saveGeometry());
- settings.setValue("studio/tab_index", tabMain->currentIndex());
- settings.setValue("studio/symbology", bstyle->currentIndex());
- settings.setValue("studio/ink/red", m_fgcolor.red());
- settings.setValue("studio/ink/green", m_fgcolor.green());
- settings.setValue("studio/ink/blue", m_fgcolor.blue());
- settings.setValue("studio/ink/alpha", m_fgcolor.alpha());
- settings.setValue("studio/paper/red", m_bgcolor.red());
- settings.setValue("studio/paper/green", m_bgcolor.green());
- settings.setValue("studio/paper/blue", m_bgcolor.blue());
- settings.setValue("studio/paper/alpha", m_bgcolor.alpha());
- settings.setValue("studio/data", txtData->text());
- settings.setValue("studio/composite_text", txtComposite->toPlainText());
- settings.setValue("studio/chk_composite", chkComposite->isChecked() ? 1 : 0);
- settings.setValue("studio/comp_type", cmbCompType->currentIndex());
- settings.setValue("studio/eci", cmbECI->currentIndex());
- settings.setValue("studio/chk_escape", chkEscape->isChecked() ? 1 : 0);
- settings.setValue("studio/chk_data", chkData->isChecked() ? 1 : 0);
- settings.setValue("studio/chk_rinit", chkRInit->isChecked() ? 1 : 0);
- settings.setValue("studio/chk_gs1parens", chkGS1Parens->isChecked() ? 1 : 0);
- settings.setValue("studio/chk_gs1nocheck", chkGS1NoCheck->isChecked() ? 1 : 0);
- settings.setValue("studio/appearance/autoheight", chkAutoHeight->isChecked() ? 1 : 0);
- settings.setValue("studio/appearance/height", heightb->value());
- settings.setValue("studio/appearance/border", bwidth->value());
- settings.setValue("studio/appearance/whitespace", spnWhitespace->value());
- settings.setValue("studio/appearance/vwhitespace", spnVWhitespace->value());
- settings.setValue("studio/appearance/scale", spnScale->value());
- settings.setValue("studio/appearance/border_type", btype->currentIndex());
- settings.setValue("studio/appearance/font_setting", cmbFontSetting->currentIndex());
- settings.setValue("studio/appearance/chk_hrt_show", chkHRTShow->isChecked() ? 1 : 0);
- settings.setValue("studio/appearance/chk_cmyk", chkCMYK->isChecked() ? 1 : 0);
- settings.setValue("studio/appearance/chk_quiet_zones", chkQuietZones->isChecked() ? 1 : 0);
- settings.setValue("studio/appearance/rotate", cmbRotate->currentIndex());
- settings.setValue("studio/appearance/chk_dotty", chkDotty->isChecked() ? 1 : 0);
- settings.setValue("studio/appearance/dot_size", spnDotSize->value());
+ settings.setValue(QSL("studio/window_geometry"), saveGeometry());
+ settings.setValue(QSL("studio/tab_index"), tabMain->currentIndex());
+ settings.setValue(QSL("studio/symbology"), bstyle->currentIndex());
+ settings.setValue(QSL("studio/ink/red"), m_fgcolor.red());
+ settings.setValue(QSL("studio/ink/green"), m_fgcolor.green());
+ settings.setValue(QSL("studio/ink/blue"), m_fgcolor.blue());
+ settings.setValue(QSL("studio/ink/alpha"), m_fgcolor.alpha());
+ settings.setValue(QSL("studio/paper/red"), m_bgcolor.red());
+ settings.setValue(QSL("studio/paper/green"), m_bgcolor.green());
+ settings.setValue(QSL("studio/paper/blue"), m_bgcolor.blue());
+ settings.setValue(QSL("studio/paper/alpha"), m_bgcolor.alpha());
+ settings.setValue(QSL("studio/data"), txtData->text());
+ settings.setValue(QSL("studio/composite_text"), txtComposite->toPlainText());
+ settings.setValue(QSL("studio/chk_composite"), chkComposite->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/comp_type"), cmbCompType->currentIndex());
+ settings.setValue(QSL("studio/eci"), cmbECI->currentIndex());
+ settings.setValue(QSL("studio/chk_escape"), chkEscape->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/chk_data"), chkData->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/chk_rinit"), chkRInit->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/chk_gs1parens"), chkGS1Parens->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/chk_gs1nocheck"), chkGS1NoCheck->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/appearance/autoheight"), chkAutoHeight->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/appearance/compliantheight"), chkCompliantHeight->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/appearance/height"), heightb->value());
+ settings.setValue(QSL("studio/appearance/border"), bwidth->value());
+ settings.setValue(QSL("studio/appearance/whitespace"), spnWhitespace->value());
+ settings.setValue(QSL("studio/appearance/vwhitespace"), spnVWhitespace->value());
+ settings.setValue(QSL("studio/appearance/scale"), spnScale->value());
+ settings.setValue(QSL("studio/appearance/border_type"), btype->currentIndex());
+ settings.setValue(QSL("studio/appearance/font_setting"), cmbFontSetting->currentIndex());
+ settings.setValue(QSL("studio/appearance/chk_hrt_show"), chkHRTShow->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/appearance/chk_cmyk"), chkCMYK->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/appearance/chk_quiet_zones"), chkQuietZones->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/appearance/rotate"), cmbRotate->currentIndex());
+ settings.setValue(QSL("studio/appearance/chk_dotty"), chkDotty->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/appearance/dot_size"), spnDotSize->value());
save_sub_settings(settings, m_bc.bc.symbol());
}
-void MainWindow::resizeEvent(QResizeEvent* event)
-{
- QWidget::resizeEvent(event);
- update_preview();
-}
-
-void MainWindow::reset_view()
-{
- m_fgcolor.setRgb(0, 0, 0, 0xff);
- m_bgcolor.setRgb(0xff, 0xff, 0xff, 0xff);
- update_preview();
-}
-
-bool MainWindow::save()
-{
- QSettings settings;
-#if QT_VERSION < 0x60000
- settings.setIniCodec("UTF-8");
-#endif
- QFileDialog save_dialog;
- QString filename;
- QString suffix;
-
- save_dialog.setAcceptMode(QFileDialog::AcceptSave);
- save_dialog.setWindowTitle(tr("Save Barcode Image"));
- save_dialog.setDirectory(settings.value("studio/default_dir",
- QDir::toNativeSeparators(QDir::homePath())).toString());
-
-#ifdef NO_PNG
- suffix = settings.value("studio/default_suffix", "gif").toString();
- save_dialog.setNameFilter(tr(
- "Encapsulated PostScript (*.eps);;Graphics Interchange Format (*.gif)"
- ";;Scalable Vector Graphic (*.svg);;Windows Bitmap (*.bmp);;ZSoft PC Painter Image (*.pcx)"
- ";;Enhanced Metafile (*.emf);;Tagged Image File Format (*.tif)"));
-#else
- suffix = settings.value("studio/default_suffix", "png").toString();
- save_dialog.setNameFilter(tr(
- "Portable Network Graphic (*.png);;Encapsulated PostScript (*.eps);;Graphics Interchange Format (*.gif)"
- ";;Scalable Vector Graphic (*.svg);;Windows Bitmap (*.bmp);;ZSoft PC Painter Image (*.pcx)"
- ";;Enhanced Metafile (*.emf);;Tagged Image File Format (*.tif)"));
-#endif
-
- if (QString::compare(suffix, "png", Qt::CaseInsensitive) == 0)
- save_dialog.selectNameFilter(tr("Portable Network Graphic (*.png)"));
- if (QString::compare(suffix, "eps", Qt::CaseInsensitive) == 0)
- save_dialog.selectNameFilter(tr("Encapsulated PostScript (*.eps)"));
- if (QString::compare(suffix, "gif", Qt::CaseInsensitive) == 0)
- save_dialog.selectNameFilter(tr("Graphics Interchange Format (*.gif)"));
- if (QString::compare(suffix, "svg", Qt::CaseInsensitive) == 0)
- save_dialog.selectNameFilter(tr("Scalable Vector Graphic (*.svg)"));
- if (QString::compare(suffix, "bmp", Qt::CaseInsensitive) == 0)
- save_dialog.selectNameFilter(tr("Windows Bitmap (*.bmp)"));
- if (QString::compare(suffix, "pcx", Qt::CaseInsensitive) == 0)
- save_dialog.selectNameFilter(tr("ZSoft PC Painter Image (*.pcx)"));
- if (QString::compare(suffix, "emf", Qt::CaseInsensitive) == 0)
- save_dialog.selectNameFilter(tr("Enhanced Metafile (*.emf)"));
- if (QString::compare(suffix, "tif", Qt::CaseInsensitive) == 0)
- save_dialog.selectNameFilter(tr("Tagged Image File Format (*.tif)"));
-
- if (save_dialog.exec()) {
- filename = save_dialog.selectedFiles().at(0);
- if ((filename.lastIndexOf(".") == -1) || (filename.lastIndexOf(".") < (filename.length() - 5))) {
- suffix = save_dialog.selectedNameFilter();
- suffix = suffix.mid((suffix.lastIndexOf(".") + 1), 3);
- filename.append(".");
- filename.append(suffix);
- } else {
- suffix = filename.right(filename.length() - (filename.lastIndexOf('.') + 1));
- }
- } else {
- return false;
- }
-
- if (m_bc.bc.save_to_file(filename) == false) {
- if (m_bc.bc.getError() >= ZINT_ERROR) {
- QMessageBox::critical(this, tr("Save Error"), m_bc.bc.error_message());
- return false;
- } else {
- QMessageBox::warning(this, tr("Save Warning"), m_bc.bc.error_message());
- return true;
- }
- }
-
- settings.setValue("studio/default_dir", filename.mid(0, filename.lastIndexOf(QDir::separator())));
- settings.setValue("studio/default_suffix", suffix);
- return true;
-}
-
-void MainWindow::about()
+QString MainWindow::get_zint_version()
{
QString zint_version;
@@ -385,13 +320,130 @@ void MainWindow::about()
/* This is a test release */
version_release = version_release / 10;
version_build = lib_version % 10;
- QTextStream(&zint_version) << version_major << "." << version_minor << "." << version_release
- << "." << version_build << " (dev)";
+ QTextStream(&zint_version) << version_major << '.' << version_minor << '.' << version_release
+ << '.' << version_build << QSL(" (dev)");
} else {
/* This is a stable release */
- QTextStream(&zint_version) << version_major << "." << version_minor << "." << version_release;
+ QTextStream(&zint_version) << version_major << '.' << version_minor << '.' << version_release;
}
+ return zint_version;
+}
+
+void MainWindow::resizeEvent(QResizeEvent *event)
+{
+ QWidget::resizeEvent(event);
+ update_preview();
+}
+
+bool MainWindow::event(QEvent *event)
+{
+ switch (event->type()) {
+ case QEvent::StatusTip:
+ statusBar->showMessage(static_cast(event)->tip());
+ break;
+ default:
+ break;
+ }
+
+ return QWidget::event(event);
+}
+
+void MainWindow::reset_colours()
+{
+ m_fgcolor.setRgb(0, 0, 0, 0xff);
+ m_bgcolor.setRgb(0xff, 0xff, 0xff, 0xff);
+ update_preview();
+}
+
+bool MainWindow::save()
+{
+ QSettings settings;
+#if QT_VERSION < 0x60000
+ settings.setIniCodec("UTF-8");
+#endif
+ QFileDialog save_dialog;
+ QString pathname;
+ QString suffix;
+
+ save_dialog.setAcceptMode(QFileDialog::AcceptSave);
+ save_dialog.setWindowTitle(tr("Save Barcode Image"));
+ save_dialog.setDirectory(settings.value(QSL("studio/default_dir"),
+ QDir::toNativeSeparators(QDir::homePath())).toString());
+
+#ifdef NO_PNG
+ suffix = settings.value(QSL("studio/default_suffix"), QSL("gif")).toString();
+ save_dialog.setNameFilter(tr(
+ "Encapsulated PostScript (*.eps);;Graphics Interchange Format (*.gif)"
+ ";;Scalable Vector Graphic (*.svg);;Windows Bitmap (*.bmp);;ZSoft PC Painter Image (*.pcx)"
+ ";;Enhanced Metafile (*.emf);;Tagged Image File Format (*.tif)"));
+#else
+ suffix = settings.value(QSL("studio/default_suffix"), QSL("png")).toString();
+ save_dialog.setNameFilter(tr(
+ "Portable Network Graphic (*.png);;Encapsulated PostScript (*.eps);;Graphics Interchange Format (*.gif)"
+ ";;Scalable Vector Graphic (*.svg);;Windows Bitmap (*.bmp);;ZSoft PC Painter Image (*.pcx)"
+ ";;Enhanced Metafile (*.emf);;Tagged Image File Format (*.tif)"));
+#endif
+
+ if (QString::compare(suffix, QSL("png"), Qt::CaseInsensitive) == 0)
+ save_dialog.selectNameFilter(tr("Portable Network Graphic (*.png)"));
+ else if (QString::compare(suffix, QSL("eps"), Qt::CaseInsensitive) == 0)
+ save_dialog.selectNameFilter(tr("Encapsulated PostScript (*.eps)"));
+ else if (QString::compare(suffix, QSL("gif"), Qt::CaseInsensitive) == 0)
+ save_dialog.selectNameFilter(tr("Graphics Interchange Format (*.gif)"));
+ else if (QString::compare(suffix, QSL("svg"), Qt::CaseInsensitive) == 0)
+ save_dialog.selectNameFilter(tr("Scalable Vector Graphic (*.svg)"));
+ else if (QString::compare(suffix, QSL("bmp"), Qt::CaseInsensitive) == 0)
+ save_dialog.selectNameFilter(tr("Windows Bitmap (*.bmp)"));
+ else if (QString::compare(suffix, QSL("pcx"), Qt::CaseInsensitive) == 0)
+ save_dialog.selectNameFilter(tr("ZSoft PC Painter Image (*.pcx)"));
+ else if (QString::compare(suffix, QSL("emf"), Qt::CaseInsensitive) == 0)
+ save_dialog.selectNameFilter(tr("Enhanced Metafile (*.emf)"));
+ else if (QString::compare(suffix, QSL("tif"), Qt::CaseInsensitive) == 0)
+ save_dialog.selectNameFilter(tr("Tagged Image File Format (*.tif)"));
+
+ if (save_dialog.exec()) {
+ pathname = save_dialog.selectedFiles().at(0);
+ if ((pathname.lastIndexOf('.') == -1) || (pathname.lastIndexOf('.') < (pathname.length() - 5))) {
+ suffix = save_dialog.selectedNameFilter();
+ suffix = suffix.mid((suffix.lastIndexOf('.') + 1), 3);
+ pathname.append('.');
+ pathname.append(suffix);
+ } else {
+ suffix = pathname.right(pathname.length() - (pathname.lastIndexOf('.') + 1));
+ }
+ } else {
+ return false;
+ }
+
+ if (m_bc.bc.save_to_file(pathname) == false) {
+ if (m_bc.bc.getError() >= ZINT_ERROR) {
+ QMessageBox::critical(this, tr("Save Error"), m_bc.bc.error_message());
+ return false;
+ }
+ QMessageBox::warning(this, tr("Save Warning"), m_bc.bc.error_message());
+ }
+
+ int lastSeparator = pathname.lastIndexOf(QDir::separator());
+ QString dirname = pathname.mid(0, lastSeparator);
+ if (dirname.isEmpty()) {
+ /*: %1 is path saved to */
+ statusBar->showMessage(tr("Saved as \"%1\"").arg(pathname), statusBarTimeout);
+ } else {
+ QString filename = pathname.right(pathname.length() - (lastSeparator + 1));
+ /*: %1 is base filename saved to, %2 is directory saved in */
+ statusBar->showMessage(tr("Saved as \"%1\" in \"%2\"").arg(filename).arg(dirname), statusBarTimeout);
+ }
+
+ settings.setValue(QSL("studio/default_dir"), dirname);
+ settings.setValue(QSL("studio/default_suffix"), suffix);
+ return true;
+}
+
+void MainWindow::about()
+{
+ QString zint_version = get_zint_version();
+
QMessageBox::about(this, tr("About Zint"),
/*: %1 is Zint version, %2 is Qt version */
tr("Zint Barcode Studio %1 "
@@ -407,15 +459,21 @@ void MainWindow::about()
"\"QR Code\" is a Registered Trademark of Denso Corp. "
"\"Telepen\" is a Registered Trademark of SB Electronics.
"
"
Currently supported standards include: "
- "BS 797:1996, BS 798:1996, ISO/IEC 12323:2005, ISO/IEC 15417:2007, "
+ "EN 797:1996, EN 798:1996, EN 12323:2005, ISO/IEC 15417:2007, "
"ISO/IEC 15438:2015, ISO/IEC 16022:2006, ISO/IEC 16023:2000, "
"ISO/IEC 16388:2007, ISO/IEC 18004:2015, ISO/IEC 24723:2010, "
"ISO/IEC 24724:2011, ISO/IEC 24728:2006, ISO/IEC 24778:2008, "
- "ISO/IEC 21471:2019, ANSI-HIBC 2.6-2016, ANSI/AIM BC6-2000, "
- "ANSI/AIM BC12-1998, AIMD014 (v 1.63), USPS-B-3200"
+ "ISO/IEC 16390:2007, ISO/IEC 21471:2019, ANSI-HIBC 2.6-2016, "
+ "ANSI/AIM BC6-2000, ANSI/AIM BC12-1998, ANSI/AIM BC5-1995, "
+ "AIM ISS-X-24, AIMD014 (v 1.63), USPS-B-3200"
"
").arg(zint_version).arg(QT_VERSION_STR));
}
+void MainWindow::help()
+{
+ QDesktopServices::openUrl(QSL("https://zint.org.uk/manual")); // TODO: manual.md
+}
+
int MainWindow::open_data_dialog()
{
int retval;
@@ -457,24 +515,16 @@ void MainWindow::on_bgcolor_clicked()
void MainWindow::autoheight_ui_set()
{
- if (!chkAutoHeight->isEnabled() || chkAutoHeight->isChecked()) {
- lblHeight->setEnabled(false);
- heightb->setEnabled(false);
- } else {
- lblHeight->setEnabled(true);
- heightb->setEnabled(true);
- }
+ bool enabled = chkAutoHeight->isEnabled() && !chkAutoHeight->isChecked();
+ lblHeight->setEnabled(enabled);
+ heightb->setEnabled(enabled);
}
void MainWindow::HRTShow_ui_set()
{
- if (chkHRTShow->isEnabled() && chkHRTShow->isChecked()) {
- lblFontSetting->setEnabled(true);
- cmbFontSetting->setEnabled(true);
- } else {
- lblFontSetting->setEnabled(false);
- cmbFontSetting->setEnabled(false);
- }
+ bool enabled = chkHRTShow->isEnabled() && chkHRTShow->isChecked();
+ lblFontSetting->setEnabled(enabled);
+ cmbFontSetting->setEnabled(enabled);
}
void MainWindow::dotty_ui_set()
@@ -486,13 +536,22 @@ void MainWindow::dotty_ui_set()
lblDotSize->setEnabled(true);
spnDotSize->setEnabled(true);
} else {
- if (chkDotty->isEnabled() && chkDotty->isChecked()) {
- lblDotSize->setEnabled(true);
- spnDotSize->setEnabled(true);
- } else {
- lblDotSize->setEnabled(false);
- spnDotSize->setEnabled(false);
- }
+ bool enabled = chkDotty->isEnabled() && chkDotty->isChecked();
+ lblDotSize->setEnabled(enabled);
+ spnDotSize->setEnabled(enabled);
+ }
+}
+
+void MainWindow::codeone_ui_set()
+{
+ int symbology = bstyle_items[bstyle->currentIndex()].symbology;
+ if (symbology != BARCODE_CODEONE)
+ return;
+
+ QGroupBox *groupBox = m_optionWidget->findChild(QSL("groupBoxC1StructApp"));
+ if (groupBox) {
+ bool enabled = get_cmb_index(QSL("cmbC1Size")) != 9; // Not Version S
+ groupBox->setEnabled(enabled);
}
}
@@ -501,58 +560,58 @@ void MainWindow::structapp_ui_set()
int symbology = bstyle_items[bstyle->currentIndex()].symbology;
QString name;
bool enabled = false;
- QWidget *widgetCount = NULL, *widgetIndex = NULL;
- QLabel *lblID2 = NULL;
- QWidget *widgetID = NULL, *widgetID2 = NULL;
+ QWidget *widgetCount = nullptr, *widgetIndex = nullptr;
+ QLabel *lblID2 = nullptr;
+ QWidget *widgetID = nullptr, *widgetID2 = nullptr;
if (symbology == BARCODE_AZTEC) {
- name = "Aztec";
- widgetID = m_optionWidget->findChild("txt" + name + "StructAppID");
+ name = QSL("Aztec");
+ widgetID = get_widget(QSL("txt") + name + QSL("StructAppID"));
} else if (symbology == BARCODE_CODEONE) {
- name = "C1";
- QSpinBox *spnCount = m_optionWidget->findChild("spn" + name + "StructAppCount");
+ name = QSL("C1");
+ QSpinBox *spnCount = m_optionWidget->findChild(QSL("spn") + name + QSL("StructAppCount"));
enabled = spnCount ? spnCount->value() > 1 : false;
widgetCount = spnCount;
- widgetIndex = m_optionWidget->findChild("spn" + name + "StructAppIndex");
+ widgetIndex = get_widget(QSL("spn") + name + QSL("StructAppIndex"));
} else if (symbology == BARCODE_DATAMATRIX) {
- name = "DM";
- widgetID = m_optionWidget->findChild("spn" + name + "StructAppID");
- widgetID2 = m_optionWidget->findChild("spn" + name + "StructAppID2");
+ name = QSL("DM");
+ widgetID = get_widget(QSL("spn") + name + QSL("StructAppID"));
+ widgetID2 = get_widget(QSL("spn") + name + QSL("StructAppID2"));
} else if (symbology == BARCODE_DOTCODE) {
- name = "Dot";
+ name = QSL("Dot");
} else if (symbology == BARCODE_MAXICODE) {
- name = "Maxi";
+ name = QSL("Maxi");
} else if (symbology == BARCODE_PDF417 || symbology == BARCODE_MICROPDF417) {
- name = symbology == BARCODE_PDF417 ? "PDF" : "MPDF";
- QSpinBox *spnCount = m_optionWidget->findChild("spn" + name + "StructAppCount");
+ name = symbology == BARCODE_PDF417 ? QSL("PDF") : QSL("MPDF");
+ QSpinBox *spnCount = m_optionWidget->findChild(QSL("spn") + name + QSL("StructAppCount"));
enabled = spnCount ? spnCount->value() > 1 : false;
widgetCount = spnCount;
- widgetIndex = m_optionWidget->findChild("spn" + name + "StructAppIndex");
- widgetID = m_optionWidget->findChild("txt" + name + "StructAppID");
+ widgetIndex = get_widget(QSL("spn") + name + QSL("StructAppIndex"));
+ widgetID = get_widget(QSL("txt") + name + QSL("StructAppID"));
} else if (symbology == BARCODE_QRCODE) {
- name = "QR";
- widgetID = m_optionWidget->findChild("spn" + name + "StructAppID");
+ name = QSL("QR");
+ widgetID = get_widget(QSL("spn") + name + QSL("StructAppID"));
} else if (symbology == BARCODE_GRIDMATRIX) {
- name = "Grid";
- widgetID = m_optionWidget->findChild("spn" + name + "StructAppID");
+ name = QSL("Grid");
+ widgetID = get_widget(QSL("spn") + name + QSL("StructAppID"));
} else if (symbology == BARCODE_ULTRA) {
- name = "Ultra";
- widgetID = m_optionWidget->findChild("spn" + name + "StructAppID");
+ name = QSL("Ultra");
+ widgetID = get_widget(QSL("spn") + name + QSL("StructAppID"));
}
if (!name.isEmpty()) {
- QLabel *lblIndex = m_optionWidget->findChild("lbl" + name + "StructAppIndex");
+ QLabel *lblIndex = m_optionWidget->findChild(QSL("lbl") + name + QSL("StructAppIndex"));
if (!widgetCount) {
- QComboBox *cmbCount = m_optionWidget->findChild("cmb" + name + "StructAppCount");
+ QComboBox *cmbCount = m_optionWidget->findChild(QSL("cmb") + name + QSL("StructAppCount"));
enabled = cmbCount ? cmbCount->currentIndex() != 0 : false;
widgetCount = cmbCount;
}
if (!widgetIndex) {
- widgetIndex = m_optionWidget->findChild("cmb" + name + "StructAppIndex");
+ widgetIndex = get_widget(QSL("cmb") + name + QSL("StructAppIndex"));
}
if (lblIndex && widgetCount && widgetIndex) {
lblIndex->setEnabled(enabled);
widgetIndex->setEnabled(enabled);
- QLabel *lblID = m_optionWidget->findChild("lbl" + name + "StructAppID");
+ QLabel *lblID = m_optionWidget->findChild(QSL("lbl") + name + QSL("StructAppID"));
if (lblID) {
lblID->setEnabled(enabled);
if (lblID2) {
@@ -571,6 +630,10 @@ void MainWindow::structapp_ui_set()
void MainWindow::on_encoded()
{
+ this->setMinimumHeight(m_bc.bc.getError() ? 455 : 435);
+ enableActions(true);
+ errtxtBar_set(false /*isError*/);
+
if (!chkAutoHeight->isEnabled() || chkAutoHeight->isChecked()) {
/* setValue() rounds up/down to precision (decimals 3), we want round up only */
float height = (float) (ceil(m_bc.bc.height() * 1000.0f) / 1000.0f);
@@ -578,6 +641,13 @@ void MainWindow::on_encoded()
}
}
+void MainWindow::on_errored()
+{
+ this->setMinimumHeight(455);
+ enableActions(false);
+ errtxtBar_set(true /*isError*/);
+}
+
void MainWindow::filter_symbologies()
{
// `simplified()` trims and reduces inner whitespace to a single space - nice!
@@ -594,7 +664,7 @@ void MainWindow::filter_symbologies()
QStringList filter_list;
if (!filter.isEmpty()) {
int i, j;
- for (i = 0; (j = filter.indexOf(" ", i)) != -1; i = j + 1) {
+ for (i = 0; (j = filter.indexOf(' ', i)) != -1; i = j + 1) {
filter_list << filter.mid(i, j - i);
}
filter_list << filter.mid(i);
@@ -613,7 +683,8 @@ void MainWindow::filter_symbologies()
}
}
if ((hide && !hidden) || (!hide && hidden)) {
- // https://stackoverflow.com/questions/25172220/how-to-hide-qcombobox-items-instead-of-clearing-them-out
+ // https://stackoverflow.com/questions/25172220
+ // /how-to-hide-qcombobox-items-instead-of-clearing-them-out
item = model->item(i);
item->setFlags(hide ? item->flags() & ~Qt::ItemIsEnabled : item->flags() | Qt::ItemIsEnabled);
lview->setRowHidden(i, hide);
@@ -633,7 +704,7 @@ void MainWindow::filter_symbologies()
void MainWindow::change_print_scale()
{
/* This value is only used when printing (saving) to file */
- m_bc.bc.setScale((float)spnScale->value());
+ m_bc.bc.setScale((float) spnScale->value());
}
void MainWindow::change_cmyk()
@@ -647,42 +718,113 @@ void MainWindow::quit_now()
close();
}
-void MainWindow::copy_to_clipboard_svg()
+void MainWindow::menu()
{
- QClipboard *clipboard = QGuiApplication::clipboard();
- QString filename = ".zint.svg";
- double scale = spnScale->value();
-
- spnScale->setValue(5);
-
- if (!m_bc.bc.save_to_file(filename)) {
- spnScale->setValue(scale);
- return;
- }
-
- QMimeData *mdata = new QMimeData;
- mdata->setImageData(QImage(filename));
- clipboard->setMimeData(mdata, QClipboard::Clipboard);
-
- QFile::remove(filename);
-
- spnScale->setValue(scale);
+ QSize size = m_menu->sizeHint();
+ m_menu->exec(btnMenu->mapToGlobal(QPoint(0, -size.height())));
}
void MainWindow::copy_to_clipboard_bmp()
{
- QClipboard *clipboard = QGuiApplication::clipboard();
- QString filename = ".zint.bmp";
+ copy_to_clipboard(QSL(".zint.bmp"), QSL("BMP"));
+}
- if (!m_bc.bc.save_to_file(filename)) {
- return;
+void MainWindow::copy_to_clipboard_emf()
+{
+ copy_to_clipboard(QSL(".zint.emf"), QSL("EMF"), "image/x-emf");
+}
+
+void MainWindow::copy_to_clipboard_eps()
+{
+ // TODO: try other possibles application/eps, application/x-eps, image/eps, image/x-eps
+ copy_to_clipboard(QSL(".zint.eps"), QSL("EPS"), "application/postscript");
+}
+
+void MainWindow::copy_to_clipboard_gif()
+{
+ copy_to_clipboard(QSL(".zint.gif"), QSL("GIF"));
+}
+
+void MainWindow::copy_to_clipboard_pcx()
+{
+ // TODO: try other mime types in various apps
+ copy_to_clipboard(QSL(".zint.pcx"), QSL("PCX"), "image/x-pcx");
+}
+
+#ifndef NO_PNG
+void MainWindow::copy_to_clipboard_png()
+{
+ copy_to_clipboard(QSL(".zint.png"), QSL("PNG"));
+}
+#endif
+
+void MainWindow::copy_to_clipboard_svg()
+{
+ copy_to_clipboard(QSL(".zint.svg"), QSL("SVG"));
+}
+
+void MainWindow::copy_to_clipboard_tif()
+{
+ copy_to_clipboard(QSL(".zint.tif"), QSL("TIF"));
+}
+
+void MainWindow::copy_to_clipboard_errtxt()
+{
+ if (m_bc.bc.hasErrors()) {
+ QClipboard *clipboard = QGuiApplication::clipboard();
+ QMimeData *mdata = new QMimeData;
+ mdata->setText(m_bc.bc.lastError());
+ clipboard->setMimeData(mdata, QClipboard::Clipboard);
+ statusBar->showMessage(tr("Copied message to clipboard"), statusBarTimeout);
}
+}
- QMimeData *mdata = new QMimeData;
- mdata->setImageData(QImage(filename));
- clipboard->setMimeData(mdata, QClipboard::Clipboard);
+void MainWindow::guard_reset_upcean()
+{
+ guard_reset(QSL("spnUPCEANGuardDescent"));
+}
- QFile::remove(filename);
+void MainWindow::guard_reset_upca()
+{
+ guard_reset(QSL("spnUPCAGuardDescent"));
+}
+
+void MainWindow::view_context_menu(const QPoint &pos)
+{
+ QMenu menu(tr("View Menu"), view);
+
+ if (m_bc.bc.getError() >= ZINT_ERROR) {
+ menu.addAction(m_copyErrtxtAct);
+
+ menu.exec(get_context_menu_pos(pos, view));
+ } else {
+ menu.addAction(m_copyBMPAct);
+ menu.addAction(m_copyEMFAct);
+#ifdef MAINWINDOW_COPY_EPS
+ menu.addAction(m_copyEPSAct);
+#endif
+ menu.addAction(m_copyGIFAct);
+#ifdef MAINWINDOW_COPY_PCX
+ menu.addAction(m_copyPCXAct);
+#endif
+#ifndef NO_PNG
+ menu.addAction(m_copyPNGAct);
+#endif
+ menu.addAction(m_copySVGAct);
+ menu.addAction(m_copyTIFAct);
+ menu.addAction(m_saveAsAct);
+
+ menu.exec(get_context_menu_pos(pos, view));
+ }
+}
+
+void MainWindow::errtxtBar_context_menu(const QPoint &pos)
+{
+ QMenu menu(tr("Message Menu"), errtxtBar);
+
+ menu.addAction(m_copyErrtxtAct);
+
+ menu.exec(get_context_menu_pos(pos, errtxtBar));
}
void MainWindow::change_options()
@@ -701,6 +843,7 @@ void MainWindow::change_options()
if (m_symbology) {
save_sub_settings(settings, m_symbology);
}
+ statusBar->clearMessage();
if (tabMain->count() == 3)
tabMain->removeTab(1);
@@ -712,417 +855,473 @@ void MainWindow::change_options()
combobox_item_enabled(cmbFontSetting, 1, true);
if (symbology == BARCODE_CODE128) {
- QFile file(":/grpC128.ui");
+ QFile file(QSL(":/grpC128.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 128"));
chkComposite->setText(tr("Add &2D Component (GS1-128 only)"));
combobox_item_enabled(cmbCompType, 3, true); // CC-C
- set_smaller_font(m_optionWidget->findChild("noteC128CompositeEAN"));
- connect(widget_obj("radC128EAN"), SIGNAL(toggled( bool )), SLOT(composite_ean_check()));
- connect(widget_obj("radC128Stand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC128CSup"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC128EAN"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC128HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ set_smaller_font(QSL("noteC128CompositeEAN"));
+ connect(get_widget(QSL("radC128Stand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC128CSup")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC128EAN")), SIGNAL(toggled( bool )), SLOT(composite_ean_check()));
+ connect(get_widget(QSL("radC128EAN")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC128HIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_PDF417) {
- QFile file(":/grpPDF417.ui");
+ QFile file(QSL(":/grpPDF417.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("PDF41&7"));
- connect(widget_obj("cmbPDFECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbPDFCols"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radPDFTruncated"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radPDFStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radPDFHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("spnPDFStructAppCount"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnPDFStructAppCount"), SIGNAL(valueChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("spnPDFStructAppIndex"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("txtPDFStructAppID"), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbPDFECC")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbPDFCols")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radPDFTruncated")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radPDFStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radPDFHIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnPDFStructAppCount")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnPDFStructAppCount")), SIGNAL(valueChanged( int )), SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("spnPDFStructAppIndex")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("txtPDFStructAppID")), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
} else if (symbology == BARCODE_MICROPDF417) {
- QFile file(":/grpMicroPDF.ui");
+ QFile file(QSL(":/grpMicroPDF.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("Micro PDF41&7"));
- connect(widget_obj("cmbMPDFCols"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radMPDFStand"), SIGNAL(toggled( bool )), SLOT(update_preview()));
- connect(widget_obj("spnMPDFStructAppCount"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnMPDFStructAppCount"), SIGNAL(valueChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("spnMPDFStructAppIndex"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("txtMPDFStructAppID"), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMPDFCols")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radMPDFStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnMPDFStructAppCount")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnMPDFStructAppCount")), SIGNAL(valueChanged( int )), SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("spnMPDFStructAppIndex")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("txtMPDFStructAppID")), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
} else if (symbology == BARCODE_DOTCODE) {
- QFile file(":/grpDotCode.ui");
+ QFile file(QSL(":/grpDotCode.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("DotCod&e"));
- connect(widget_obj("cmbDotCols"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbDotMask"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radDotStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radDotGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("cmbDotStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbDotStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("cmbDotStructAppIndex"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbDotCols")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbDotMask")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radDotStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radDotGS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbDotStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbDotStructAppCount")), SIGNAL(currentIndexChanged( int )),
+ SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("cmbDotStructAppIndex")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_AZTEC) {
- QFile file(":/grpAztec.ui");
+ QFile file(QSL(":/grpAztec.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("Aztec Cod&e"));
- connect(widget_obj("radAztecAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radAztecSize"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radAztecECC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("cmbAztecSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbAztecECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radAztecStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radAztecGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radAztecHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("cmbAztecStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbAztecStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("cmbAztecStructAppIndex"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("txtAztecStructAppID"), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
+ connect(get_widget(QSL("radAztecAuto")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radAztecSize")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radAztecECC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbAztecSize")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbAztecECC")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radAztecStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radAztecGS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radAztecHIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbAztecStructAppCount")), SIGNAL(currentIndexChanged( int )),
+ SLOT(update_preview()));
+ connect(get_widget(QSL("cmbAztecStructAppCount")), SIGNAL(currentIndexChanged( int )),
+ SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("cmbAztecStructAppIndex")), SIGNAL(currentIndexChanged( int )),
+ SLOT(update_preview()));
+ connect(get_widget(QSL("txtAztecStructAppID")), SIGNAL(textChanged( const QString& )),
+ SLOT(update_preview()));
} else if (symbology == BARCODE_MSI_PLESSEY) {
- QFile file(":/grpMSICheck.ui");
+ QFile file(QSL(":/grpMSICheck.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("MSI Pless&ey"));
- connect(widget_obj("cmbMSICheck"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbMSICheck"), SIGNAL(currentIndexChanged( int )), SLOT(msi_plessey_ui_set()));
- connect(widget_obj("chkMSICheckText"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMSICheck")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMSICheck")), SIGNAL(currentIndexChanged( int )), SLOT(msi_plessey_ui_set()));
+ connect(get_widget(QSL("chkMSICheckText")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_CODE11) {
- QFile file(":/grpC11.ui");
+ QFile file(QSL(":/grpC11.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 11"));
- connect(widget_obj("radC11TwoCheckDigits"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC11OneCheckDigit"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC11NoCheckDigits"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC11TwoCheckDigits")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC11OneCheckDigit")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC11NoCheckDigits")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_C25STANDARD || symbology == BARCODE_C25INTER || symbology == BARCODE_C25IATA
|| symbology == BARCODE_C25LOGIC || symbology == BARCODE_C25IND) {
- QFile file(":/grpC25.ui");
+ QFile file(QSL(":/grpC25.ui"));
if (file.open(QIODevice::ReadOnly)) {
m_optionWidget = uiload.load(&file);
file.close();
- static const char *names[] = {
- "Standard (Matrix)", "Interleaved", "IATA", "", "Data Logic", "Industrial"
+ load_sub_settings(settings, symbology);
+ static const QString names[] = {
+ QSL("Standard"), QSL("Interleaved"), QSL("IATA"), QSL(""), QSL("Data Logic"), QSL("Industrial")
};
/*: %1 is name of variant (Standard, Interleaved, IATA, Data Logic, Industrial) */
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 2 of 5 %1").arg(names[symbology - BARCODE_C25STANDARD]));
- connect(widget_obj("radC25Stand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC25Check"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC25CheckHide"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC25Stand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC25Check")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC25CheckHide")), SIGNAL(toggled( bool )), SLOT(update_preview()));
}
} else if (symbology == BARCODE_CODE39 || symbology == BARCODE_EXCODE39) {
- QFile file(":/grpC39.ui");
+ QFile file(QSL(":/grpC39.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
- connect(widget_obj("radC39Stand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC39Check"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radC39HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ load_sub_settings(settings, symbology);
+ connect(get_widget(QSL("radC39Stand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC39Check")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC39HIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
if (symbology == BARCODE_EXCODE39) {
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 39 Extended"));
- if (m_optionWidget->findChild("radC39HIBC")->isChecked()) {
- m_optionWidget->findChild("radC39HIBC")->setChecked(false);
- m_optionWidget->findChild("radC39Stand")->setChecked(true);
+ if (m_optionWidget->findChild(QSL("radC39HIBC"))->isChecked()) {
+ m_optionWidget->findChild(QSL("radC39HIBC"))->setChecked(false);
+ m_optionWidget->findChild(QSL("radC39Stand"))->setChecked(true);
}
- m_optionWidget->findChild("radC39HIBC")->setEnabled(false);
+ m_optionWidget->findChild(QSL("radC39HIBC"))->setEnabled(false);
} else {
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 39"));
- m_optionWidget->findChild("radC39HIBC")->setEnabled(true);
+ m_optionWidget->findChild(QSL("radC39HIBC"))->setEnabled(true);
}
} else if (symbology == BARCODE_LOGMARS) {
- QFile file(":/grpLOGMARS.ui");
+ QFile file(QSL(":/grpLOGMARS.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("LOGM&ARS"));
- connect(widget_obj("radLOGMARSStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radLOGMARSCheck"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radLOGMARSStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radLOGMARSCheck")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_CODE16K) {
- QFile file(":/grpC16k.ui");
+ QFile file(QSL(":/grpC16k.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 16K"));
btype->setItemText(0, tr("Default (bind)"));
- connect(widget_obj("cmbC16kRowSepHeight"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radC16kStand"), SIGNAL(toggled( bool )), SLOT(update_preview()));
- connect(widget_obj("chkC16kNoQuietZones"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbC16kRowSepHeight")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC16kStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkC16kNoQuietZones")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_CODABAR) {
- QFile file(":/grpCodabar.ui");
+ QFile file(QSL(":/grpCodabar.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Cod&abar"));
- connect(widget_obj("chkCodabarCheck"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radCodabarStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radCodabarCheckHide")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radCodabarCheck")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_CODABLOCKF) {
- QFile file (":/grpCodablockF.ui");
+ QFile file (QSL(":/grpCodablockF.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Codablock&-F"));
btype->setItemText(0, tr("Default (bind)"));
- connect(widget_obj("cmbCbfWidth"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbCbfHeight"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbCbfRowSepHeight"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radCbfStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radCbfHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("chkCbfNoQuietZones"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbCbfWidth")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbCbfHeight")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbCbfRowSepHeight")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radCbfStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radCbfHIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkCbfNoQuietZones")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_DAFT) {
- QFile file(":/grpDAFT.ui");
+ QFile file(QSL(":/grpDAFT.ui"));
if (file.open(QIODevice::ReadOnly)) {
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("DAFT"));
- set_smaller_font(m_optionWidget->findChild("noteTrackerRatios"));
- connect(widget_obj("spnDAFTTrackerRatio"), SIGNAL(valueChanged( double )), SLOT(update_preview()));
+ set_smaller_font(QSL("noteTrackerRatios"));
+ connect(get_widget(QSL("spnDAFTTrackerRatio")), SIGNAL(valueChanged( double )), SLOT(update_preview()));
}
} else if (symbology == BARCODE_DATAMATRIX) {
- QFile file(":/grpDM.ui");
+ QFile file(QSL(":/grpDM.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("D&ata Matrix"));
- connect(widget_obj("radDM200Stand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radDM200GS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radDM200HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("cmbDM200Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("chkDMRectangle"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(widget_obj("chkDMRE"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(widget_obj("chkDMGSSep"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbDMStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbDMStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("cmbDMStructAppIndex"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnDMStructAppID"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnDMStructAppID2"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radDM200Stand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radDM200GS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radDM200HIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbDM200Size")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkDMRectangle")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkDMRE")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkDMGSSep")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbDMStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbDMStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("cmbDMStructAppIndex")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnDMStructAppID")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnDMStructAppID2")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_ITF14) {
btype->setItemText(0, tr("Default (box, non-zero width)"));
- QFile file(":/grpITF14.ui");
+ QFile file(QSL(":/grpITF14.ui"));
if (file.open(QIODevice::ReadOnly)) {
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("ITF-1&4"));
- connect(widget_obj("chkITF14NoQuietZones"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkITF14NoQuietZones")), SIGNAL(toggled( bool )), SLOT(update_preview()));
}
} else if (symbology == BARCODE_QRCODE) {
- QFile file(":/grpQR.ui");
+ QFile file(QSL(":/grpQR.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("QR Cod&e"));
- connect(widget_obj("cmbQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbQRMask"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radQRStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radQRGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radQRHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("chkQRFullMultibyte"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbQRStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbQRStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("cmbQRStructAppIndex"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnQRStructAppID"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbQRSize")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbQRECC")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbQRMask")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radQRStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radQRGS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radQRHIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkQRFullMultibyte")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbQRStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbQRStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("cmbQRStructAppIndex")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnQRStructAppID")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_RMQR) {
- QFile file(":/grpRMQR.ui");
+ QFile file(QSL(":/grpRMQR.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("rMQR Cod&e"));
- connect(widget_obj("cmbRMQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbRMQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radRMQRStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radRMQRGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("chkRMQRFullMultibyte"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbRMQRSize")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbRMQRECC")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radRMQRStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radRMQRGS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkRMQRFullMultibyte")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_HANXIN) {
- QFile file(":/grpHX.ui");
+ QFile file(QSL(":/grpHX.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Han Xin Cod&e"));
cmbECI->setItemText(25, tr("29: GB 18030 (PRC)"));
- connect(widget_obj("cmbHXSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbHXECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbHXMask"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("chkHXFullMultibyte"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbHXSize")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbHXECC")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbHXMask")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkHXFullMultibyte")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_MICROQR) {
- QFile file(":/grpMQR.ui");
+ QFile file(QSL(":/grpMQR.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Micro QR Cod&e"));
- connect(widget_obj("cmbMQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbMQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbMQRMask"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("chkMQRFullMultibyte"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMQRSize")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMQRECC")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMQRMask")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkMQRFullMultibyte")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_GRIDMATRIX) {
- QFile file(":/grpGrid.ui");
+ QFile file(QSL(":/grpGrid.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("Grid M&atrix"));
- set_smaller_font(m_optionWidget->findChild("noteGridECC"));
- connect(widget_obj("cmbGridSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbGridECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("chkGridFullMultibyte"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbGridStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbGridStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("cmbGridStructAppIndex"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnGridStructAppID"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ set_smaller_font(QSL("noteGridECC"));
+ connect(get_widget(QSL("cmbGridSize")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbGridECC")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkGridFullMultibyte")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbGridStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbGridStructAppCount")), SIGNAL(currentIndexChanged( int )),
+ SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("cmbGridStructAppIndex")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnGridStructAppID")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_MAXICODE) {
- QFile file(":/grpMaxicode.ui");
+ QFile file(QSL(":/grpMaxicode.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("MaxiCod&e"));
- connect(widget_obj("cmbMaxiMode"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbMaxiMode"), SIGNAL(currentIndexChanged( int )), SLOT(maxi_scm()));
- connect(widget_obj("txtMaxiSCMPostcode"), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
- connect(widget_obj("spnMaxiSCMCountry"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnMaxiSCMService"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("chkMaxiSCMVV"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
- connect(widget_obj("chkMaxiSCMVV"), SIGNAL(stateChanged( int )), SLOT(maxi_scm()));
- connect(widget_obj("spnMaxiSCMVV"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbMaxiStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbMaxiStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("cmbMaxiStructAppIndex"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMaxiMode")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMaxiMode")), SIGNAL(currentIndexChanged( int )), SLOT(maxi_scm_ui_set()));
+ connect(get_widget(QSL("txtMaxiSCMPostcode")), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnMaxiSCMCountry")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnMaxiSCMService")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkMaxiSCMVV")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkMaxiSCMVV")), SIGNAL(toggled( bool )), SLOT(maxi_scm_ui_set()));
+ connect(get_widget(QSL("spnMaxiSCMVV")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMaxiStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbMaxiStructAppCount")), SIGNAL(currentIndexChanged( int )),
+ SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("cmbMaxiStructAppIndex")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ maxi_scm_ui_set();
} else if (symbology == BARCODE_CHANNEL) {
- QFile file(":/grpChannel.ui");
+ QFile file(QSL(":/grpChannel.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Channel Cod&e"));
- connect(widget_obj("cmbChannel"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbChannel")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_CODEONE) {
- QFile file(":/grpCodeOne.ui");
+ QFile file(QSL(":/grpCodeOne.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ codeone_ui_set();
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("Code On&e"));
- connect(widget_obj("cmbC1Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radC1GS1"), SIGNAL(toggled( bool )), SLOT(update_preview()));
- connect(widget_obj("spnC1StructAppCount"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnC1StructAppCount"), SIGNAL(valueChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("spnC1StructAppIndex"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbC1Size")), SIGNAL(currentIndexChanged( int )), SLOT(codeone_ui_set()));
+ connect(get_widget(QSL("cmbC1Size")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC1GS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnC1StructAppCount")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnC1StructAppCount")), SIGNAL(valueChanged( int )), SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("spnC1StructAppIndex")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_CODE49) {
- QFile file(":/grpC49.ui");
+ QFile file(QSL(":/grpC49.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 49"));
btype->setItemText(0, tr("Default (bind)"));
- connect(widget_obj("cmbC49RowSepHeight"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radC49GS1"), SIGNAL(toggled( bool )), SLOT(update_preview()));
- connect(widget_obj("chkC49NoQuietZones"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbC49RowSepHeight")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radC49GS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkC49NoQuietZones")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_CODE93) {
- QFile file(":/grpC93.ui");
+ QFile file(QSL(":/grpC93.ui"));
if (file.open(QIODevice::ReadOnly)) {
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 93"));
- connect(widget_obj("chkC93ShowChecks"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkC93ShowChecks")), SIGNAL(toggled( bool )), SLOT(update_preview()));
}
} else if (symbology == BARCODE_DBAR_EXPSTK) {
- QFile file(":/grpDBExtend.ui");
+ QFile file(QSL(":/grpDBExtend.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("GS1 DataBar Stack&ed"));
- connect(widget_obj("cmbCols"), SIGNAL(currentIndexChanged ( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbCols")), SIGNAL(currentIndexChanged ( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_ULTRA) {
- QFile file(":/grpUltra.ui");
+ QFile file(QSL(":/grpUltra.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
+ structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("Ultracod&e"));
- connect(widget_obj("radUltraAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radUltraEcc"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("cmbUltraEcc"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbUltraRevision"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("radUltraStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("radUltraGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
- connect(widget_obj("cmbUltraStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("cmbUltraStructAppCount"), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set()));
- connect(widget_obj("cmbUltraStructAppIndex"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnUltraStructAppID"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radUltraAuto")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radUltraEcc")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbUltraEcc")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbUltraRevision")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("radUltraStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("radUltraGS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbUltraStructAppCount")), SIGNAL(currentIndexChanged( int )),
+ SLOT(update_preview()));
+ connect(get_widget(QSL("cmbUltraStructAppCount")), SIGNAL(currentIndexChanged( int )),
+ SLOT(structapp_ui_set()));
+ connect(get_widget(QSL("cmbUltraStructAppIndex")), SIGNAL(currentIndexChanged( int )),
+ SLOT(update_preview()));
+ connect(get_widget(QSL("spnUltraStructAppID")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
} else if (symbology == BARCODE_UPCA || symbology == BARCODE_UPCA_CHK || symbology == BARCODE_UPCA_CC) {
- QFile file(":/grpUPCA.ui");
+ QFile file(QSL(":/grpUPCA.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("UPC-&A"));
combobox_item_enabled(cmbFontSetting, 1, false);
if (cmbFontSetting->currentIndex() == 1) {
cmbFontSetting->setCurrentIndex(0);
}
- connect(widget_obj("cmbUPCAAddonGap"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnUPCAGuardDescent"), SIGNAL(valueChanged( double )), SLOT(update_preview()));
- connect(widget_obj("chkUPCANoQuietZones"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbUPCAAddonGap")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnUPCAGuardDescent")), SIGNAL(valueChanged( double )), SLOT(update_preview()));
+ connect(get_widget(QSL("btnUPCAGuardReset")), SIGNAL(clicked( bool )), SLOT(guard_reset_upca()));
+ connect(get_widget(QSL("chkUPCANoQuietZones")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_EANX || symbology == BARCODE_EANX_CHK || symbology == BARCODE_EANX_CC
|| symbology == BARCODE_UPCE || symbology == BARCODE_UPCE_CHK || symbology == BARCODE_UPCE_CC
|| symbology == BARCODE_ISBNX) {
- QFile file(":/grpUPCEAN.ui");
+ QFile file(QSL(":/grpUPCEAN.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
if (symbology == BARCODE_UPCE || symbology == BARCODE_UPCE_CHK || symbology == BARCODE_UPCE_CC) {
tabMain->insertTab(1, m_optionWidget, tr("UPC-&E"));
} else if (symbology == BARCODE_ISBNX) {
@@ -1134,18 +1333,23 @@ void MainWindow::change_options()
if (cmbFontSetting->currentIndex() == 1) {
cmbFontSetting->setCurrentIndex(0);
}
- connect(widget_obj("cmbUPCEANAddonGap"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
- connect(widget_obj("spnUPCEANGuardDescent"), SIGNAL(valueChanged( double )), SLOT(update_preview()));
- connect(widget_obj("chkUPCEANNoQuietZones"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("cmbUPCEANAddonGap")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
+ connect(get_widget(QSL("spnUPCEANGuardDescent")), SIGNAL(valueChanged( double )), SLOT(update_preview()));
+ connect(get_widget(QSL("btnUPCEANGuardReset")), SIGNAL(clicked( bool )), SLOT(guard_reset_upcean()));
+ connect(get_widget(QSL("chkUPCEANNoQuietZones")), SIGNAL(toggled( bool )), SLOT(update_preview()));
} else if (symbology == BARCODE_VIN) {
- QFile file(":/grpVIN.ui");
+ QFile file(QSL(":/grpVIN.ui"));
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget = uiload.load(&file);
file.close();
+ load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("&VIN"));
- connect(widget_obj("chkVINImportChar"), SIGNAL(clicked( bool )), SLOT(update_preview()));
+ connect(get_widget(QSL("chkVINImportChar")), SIGNAL(toggled( bool )), SLOT(update_preview()));
+
+ } else {
+ load_sub_settings(settings, symbology);
}
switch (symbology) {
@@ -1166,25 +1370,20 @@ void MainWindow::change_options()
break;
}
- // ECI will need checking again in update_preview() as encoding mode dependent (HIBC)
- cmbECI->setEnabled(m_bc.bc.supportsECI(symbology));
- chkGS1Parens->setEnabled(m_bc.bc.supportsGS1(symbology)); /* Ditto (GS1) */
- chkGS1NoCheck->setEnabled(m_bc.bc.supportsGS1(symbology)); /* Ditto (GS1) */
- chkRInit->setEnabled(m_bc.bc.supportsReaderInit(symbology)); /* Ditto (HIBC and GS1) */
+ // ECI, GS1Parens, GS1NoCheck, RInit, CompliantHeight will be checked in update_preview() as
+ // encoding mode dependent (HIBC and/or GS1)
chkAutoHeight->setEnabled(!m_bc.bc.isFixedRatio(symbology));
chkHRTShow->setEnabled(m_bc.bc.hasHRT(symbology));
chkQuietZones->setEnabled(!m_bc.bc.hasDefaultQuietZones(symbology));
chkDotty->setEnabled(m_bc.bc.isDotty(symbology));
- load_sub_settings(settings, symbology);
-
composite_ui_set();
autoheight_ui_set();
HRTShow_ui_set();
dotty_ui_set();
if (initial_load) {
- tabMain->setCurrentIndex(settings.value("studio/tab_index", 0).toInt());
+ tabMain->setCurrentIndex(settings.value(QSL("studio/tab_index"), 0).toInt());
} else if (original_tab_count == tabMain->count()) {
tabMain->setCurrentIndex(original_tab_index);
} else if (original_tab_count > tabMain->count()) {
@@ -1196,22 +1395,20 @@ void MainWindow::change_options()
void MainWindow::composite_ui_set()
{
- if (!grpComposite->isHidden() && chkComposite->isChecked()) {
- lblCompType->setEnabled(true);
- cmbCompType->setEnabled(true);
- lblComposite->setEnabled(true);
- txtComposite->setEnabled(true);
+ bool enabled = !grpComposite->isHidden() && chkComposite->isChecked();
+
+ lblCompType->setEnabled(enabled);
+ cmbCompType->setEnabled(enabled);
+ lblComposite->setEnabled(enabled);
+ txtComposite->setEnabled(enabled);
+
+ if (enabled) {
if (bstyle_items[bstyle->currentIndex()].symbology == BARCODE_CODE128) {
- QRadioButton *radioButton = m_optionWidget->findChild("radC128EAN");
+ QRadioButton *radioButton = m_optionWidget->findChild(QSL("radC128EAN"));
if (radioButton) {
radioButton->setChecked(true);
}
}
- } else {
- lblCompType->setEnabled(false);
- cmbCompType->setEnabled(false);
- lblComposite->setEnabled(false);
- txtComposite->setEnabled(false);
}
}
@@ -1219,38 +1416,39 @@ void MainWindow::composite_ean_check()
{
if (bstyle_items[bstyle->currentIndex()].symbology != BARCODE_CODE128)
return;
- QRadioButton *radioButton = m_optionWidget->findChild("radC128EAN");
+ QRadioButton *radioButton = m_optionWidget->findChild(QSL("radC128EAN"));
if (radioButton && !radioButton->isChecked())
chkComposite->setChecked(false);
}
-void MainWindow::maxi_scm()
+void MainWindow::maxi_scm_ui_set()
{
if (bstyle_items[bstyle->currentIndex()].symbology != BARCODE_MAXICODE)
return;
+ QCheckBox *chkMaxiSCMVV = m_optionWidget ? m_optionWidget->findChild(QSL("chkMaxiSCMVV")) : nullptr;
+ if (!chkMaxiSCMVV)
+ return;
- QCheckBox *chkMaxiSCMVV = m_optionWidget->findChild("chkMaxiSCMVV");
+ bool isMode2or3 = get_cmb_index(QSL("cmbMaxiMode")) == 0;
- bool isMode2or3 = m_optionWidget->findChild("cmbMaxiMode")->currentIndex() == 0;
-
- m_optionWidget->findChild("lblMaxiSCMPostcode")->setEnabled(isMode2or3);
- m_optionWidget->findChild("txtMaxiSCMPostcode")->setEnabled(isMode2or3);
- m_optionWidget->findChild("lblMaxiSCMCountry")->setEnabled(isMode2or3);
- m_optionWidget->findChild("spnMaxiSCMCountry")->setEnabled(isMode2or3);
- m_optionWidget->findChild("lblMaxiSCMService")->setEnabled(isMode2or3);
- m_optionWidget->findChild("spnMaxiSCMService")->setEnabled(isMode2or3);
+ m_optionWidget->findChild(QSL("lblMaxiSCMPostcode"))->setEnabled(isMode2or3);
+ m_optionWidget->findChild(QSL("txtMaxiSCMPostcode"))->setEnabled(isMode2or3);
+ m_optionWidget->findChild(QSL("lblMaxiSCMCountry"))->setEnabled(isMode2or3);
+ m_optionWidget->findChild(QSL("spnMaxiSCMCountry"))->setEnabled(isMode2or3);
+ m_optionWidget->findChild(QSL("lblMaxiSCMService"))->setEnabled(isMode2or3);
+ m_optionWidget->findChild(QSL("spnMaxiSCMService"))->setEnabled(isMode2or3);
chkMaxiSCMVV->setEnabled(isMode2or3);
- m_optionWidget->findChild("lblMaxiSCMVV")->setEnabled(isMode2or3 && chkMaxiSCMVV->isChecked());
- m_optionWidget->findChild("spnMaxiSCMVV")->setEnabled(isMode2or3 && chkMaxiSCMVV->isChecked());
+ m_optionWidget->findChild(QSL("lblMaxiSCMVV"))->setEnabled(isMode2or3 && chkMaxiSCMVV->isChecked());
+ m_optionWidget->findChild(QSL("spnMaxiSCMVV"))->setEnabled(isMode2or3 && chkMaxiSCMVV->isChecked());
}
void MainWindow::msi_plessey_ui_set()
{
if (bstyle_items[bstyle->currentIndex()].symbology != BARCODE_MSI_PLESSEY)
return;
- QCheckBox *checkBox = m_optionWidget ? m_optionWidget->findChild("chkMSICheckText") : nullptr;
+ QCheckBox *checkBox = m_optionWidget ? m_optionWidget->findChild(QSL("chkMSICheckText")) : nullptr;
if (checkBox) {
- checkBox->setEnabled(get_combobox_index("cmbMSICheck") > 0);
+ checkBox->setEnabled(get_cmb_index(QSL("cmbMSICheck")) > 0);
}
}
@@ -1266,12 +1464,12 @@ void MainWindow::combobox_item_enabled(QComboBox *comboBox, int index, bool enab
}
}
-void MainWindow::upcean_addon_gap(const char *comboBoxName, const char *labelName, int base)
+void MainWindow::upcean_addon_gap(const QString &comboBoxName, const QString &labelName, int base)
{
QComboBox *comboBox = m_optionWidget->findChild(comboBoxName);
QLabel *label = m_optionWidget->findChild(labelName);
- const QRegularExpression addonRE("^[0-9X]+[+][0-9]+$");
+ const QRegularExpression addonRE(QSL("^[0-9X]+[+][0-9]+$"));
bool enabled = txtData->text().contains(addonRE);
if (comboBox) {
comboBox->setEnabled(enabled);
@@ -1287,7 +1485,7 @@ void MainWindow::upcean_addon_gap(const char *comboBoxName, const char *labelNam
}
}
-void MainWindow::upcean_guard_descent(const char *spnBoxName, const char *labelName)
+void MainWindow::upcean_guard_descent(const QString &spnBoxName, const QString &labelName)
{
QDoubleSpinBox *spnBox = m_optionWidget->findChild(spnBoxName);
QLabel *label = m_optionWidget->findChild(labelName);
@@ -1304,6 +1502,15 @@ void MainWindow::upcean_guard_descent(const char *spnBoxName, const char *labelN
}
}
+void MainWindow::guard_reset(const QString &spnBoxName)
+{
+ QDoubleSpinBox *spnBox = m_optionWidget->findChild(spnBoxName);
+ if (spnBox && spnBox->value() != 5.0) {
+ spnBox->setValue(5.0);
+ update_preview();
+ }
+}
+
void MainWindow::set_gs1_mode(bool gs1_mode)
{
if (gs1_mode) {
@@ -1314,8 +1521,9 @@ void MainWindow::set_gs1_mode(bool gs1_mode)
}
}
-void MainWindow::set_smaller_font(QLabel *label)
+void MainWindow::set_smaller_font(const QString &labelName)
{
+ QLabel *label = m_optionWidget ? m_optionWidget->findChild(labelName) : nullptr;
if (label) {
const QFont &appFont = QApplication::font();
qreal pointSize = appFont.pointSizeF();
@@ -1338,7 +1546,7 @@ void MainWindow::set_smaller_font(QLabel *label)
void MainWindow::update_preview()
{
int symbology = bstyle_items[bstyle->currentIndex()].symbology;
- int recheck_eci = true;
+ int eci_not_set = true;
int width = view->geometry().width();
int height = view->geometry().height();
int item_val;
@@ -1370,189 +1578,144 @@ void MainWindow::update_preview()
switch (symbology) {
case BARCODE_CODE128:
- if(m_optionWidget->findChild("radC128Stand")->isChecked())
- m_bc.bc.setSymbol(BARCODE_CODE128);
-
- if(m_optionWidget->findChild("radC128CSup")->isChecked())
+ if (get_rad_val(QSL("radC128CSup")))
m_bc.bc.setSymbol(BARCODE_CODE128B);
-
- if(m_optionWidget->findChild("radC128EAN")->isChecked())
- {
- if(chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_GS1_128_CC);
- else
- m_bc.bc.setSymbol(BARCODE_GS1_128);
- }
-
- if(m_optionWidget->findChild("radC128HIBC")->isChecked())
+ else if (get_rad_val(QSL("radC128EAN")))
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_GS1_128_CC : BARCODE_GS1_128);
+ else if (get_rad_val(QSL("radC128HIBC")))
m_bc.bc.setSymbol(BARCODE_HIBC_128);
+ else
+ m_bc.bc.setSymbol(BARCODE_CODE128);
break;
case BARCODE_EANX:
- if (chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_EANX_CC);
- else
- m_bc.bc.setSymbol(BARCODE_EANX);
- upcean_addon_gap("cmbUPCEANAddonGap", "lblUPCEANAddonGap", 7 /*base*/);
- upcean_guard_descent("spnUPCEANGuardDescent", "lblUPCEANGuardDescent");
- if (get_checkbox_val("chkUPCEANNoQuietZones")) {
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_EANX_CC : BARCODE_EANX);
+ upcean_addon_gap(QSL("cmbUPCEANAddonGap"), QSL("lblUPCEANAddonGap"), 7 /*base*/);
+ upcean_guard_descent(QSL("spnUPCEANGuardDescent"), QSL("lblUPCEANGuardDescent"));
+ if (get_chk_val(QSL("chkUPCEANNoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
}
break;
case BARCODE_ISBNX:
m_bc.bc.setSymbol(symbology);
- upcean_addon_gap("cmbUPCEANAddonGap", "lblUPCEANAddonGap", 7 /*base*/);
- upcean_guard_descent("spnUPCEANGuardDescent", "lblUPCEANGuardDescent");
- if (get_checkbox_val("chkUPCEANNoQuietZones")) {
+ upcean_addon_gap(QSL("cmbUPCEANAddonGap"), QSL("lblUPCEANAddonGap"), 7 /*base*/);
+ upcean_guard_descent(QSL("spnUPCEANGuardDescent"), QSL("lblUPCEANGuardDescent"));
+ if (get_chk_val(QSL("chkUPCEANNoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
}
break;
case BARCODE_UPCA:
- if (chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_UPCA_CC);
- else
- m_bc.bc.setSymbol(BARCODE_UPCA);
- upcean_addon_gap("cmbUPCAAddonGap", "lblUPCAAddonGap", 9 /*base*/);
- upcean_guard_descent("spnUPCAGuardDescent", "lblUPCAGuardDescent");
- if (get_checkbox_val("chkUPCANoQuietZones")) {
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_UPCA_CC : BARCODE_UPCA);
+ upcean_addon_gap(QSL("cmbUPCAAddonGap"), QSL("lblUPCAAddonGap"), 9 /*base*/);
+ upcean_guard_descent(QSL("spnUPCAGuardDescent"), QSL("lblUPCAGuardDescent"));
+ if (get_chk_val(QSL("chkUPCANoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
}
break;
case BARCODE_UPCE:
- if (chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_UPCE_CC);
- else
- m_bc.bc.setSymbol(BARCODE_UPCE);
- upcean_addon_gap("cmbUPCEANAddonGap", "lblUPCEANAddonGap", 7 /*base*/);
- upcean_guard_descent("spnUPCEANGuardDescent", "lblUPCEANGuardDescent");
- if (get_checkbox_val("chkUPCEANNoQuietZones")) {
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_UPCE_CC : BARCODE_UPCE);
+ upcean_addon_gap(QSL("cmbUPCEANAddonGap"), QSL("lblUPCEANAddonGap"), 7 /*base*/);
+ upcean_guard_descent(QSL("spnUPCEANGuardDescent"), QSL("lblUPCEANGuardDescent"));
+ if (get_chk_val(QSL("chkUPCEANNoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
}
break;
case BARCODE_DBAR_OMN:
- if(chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_DBAR_OMN_CC);
- else
- m_bc.bc.setSymbol(BARCODE_DBAR_OMN);
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_DBAR_OMN_CC : BARCODE_DBAR_OMN);
break;
-
case BARCODE_DBAR_LTD:
- if(chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_DBAR_LTD_CC);
- else
- m_bc.bc.setSymbol(BARCODE_DBAR_LTD);
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_DBAR_LTD_CC : BARCODE_DBAR_LTD);
break;
-
case BARCODE_DBAR_EXP:
- if(chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_DBAR_EXP_CC);
- else
- m_bc.bc.setSymbol(BARCODE_DBAR_EXP);
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_DBAR_EXP_CC : BARCODE_DBAR_EXP);
break;
-
case BARCODE_DBAR_STK:
- if(chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_DBAR_STK_CC);
- else
- m_bc.bc.setSymbol(BARCODE_DBAR_STK);
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_DBAR_STK_CC : BARCODE_DBAR_STK);
break;
-
case BARCODE_DBAR_OMNSTK:
- if(chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_DBAR_OMNSTK_CC);
- else
- m_bc.bc.setSymbol(BARCODE_DBAR_OMNSTK);
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_DBAR_OMNSTK_CC : BARCODE_DBAR_OMNSTK);
break;
-
case BARCODE_DBAR_EXPSTK:
- if(chkComposite->isChecked())
- m_bc.bc.setSymbol(BARCODE_DBAR_EXPSTK_CC);
- else
- m_bc.bc.setSymbol(BARCODE_DBAR_EXPSTK);
-
- if(m_optionWidget->findChild("cmbCols")->currentIndex() != 0)
- m_bc.bc.setOption2(m_optionWidget->findChild("cmbCols")->currentIndex());
+ m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_DBAR_EXPSTK_CC : BARCODE_DBAR_EXPSTK);
+ if ((item_val = get_cmb_index(QSL("cmbCols"))) != 0)
+ m_bc.bc.setOption2(item_val);
break;
case BARCODE_PDF417:
- m_bc.bc.setOption2(m_optionWidget->findChild("cmbPDFCols")->currentIndex());
- m_bc.bc.setOption1(m_optionWidget->findChild("cmbPDFECC")->currentIndex() - 1);
-
- if (m_optionWidget->findChild("radPDFTruncated")->isChecked())
+ if (get_rad_val(QSL("radPDFTruncated")))
m_bc.bc.setSymbol(BARCODE_PDF417COMP);
- else if (m_optionWidget->findChild("radPDFHIBC")->isChecked())
+ else if (get_rad_val(QSL("radPDFHIBC")))
m_bc.bc.setSymbol(BARCODE_HIBC_PDF);
else
m_bc.bc.setSymbol(BARCODE_PDF417);
- item_val = get_spinbox_val("spnPDFStructAppCount");
- if (item_val > 1) {
- m_bc.bc.setStructApp(item_val, get_spinbox_val("spnPDFStructAppIndex"),
- get_lineedit_val("txtPDFStructAppID"));
+ m_bc.bc.setOption2(get_cmb_index(QSL("cmbPDFCols")));
+ m_bc.bc.setOption1(get_cmb_index(QSL("cmbPDFECC")) - 1);
+
+ if ((item_val = get_spn_val(QSL("spnPDFStructAppCount"))) > 1) {
+ m_bc.bc.setStructApp(item_val, get_spn_val(QSL("spnPDFStructAppIndex")),
+ get_txt_val(QSL("txtPDFStructAppID")));
}
break;
case BARCODE_MICROPDF417:
- m_bc.bc.setOption2(m_optionWidget->findChild("cmbMPDFCols")->currentIndex());
-
- if (m_optionWidget->findChild("radMPDFHIBC")->isChecked())
+ if (get_rad_val(QSL("radMPDFHIBC")))
m_bc.bc.setSymbol(BARCODE_HIBC_MICPDF);
else
m_bc.bc.setSymbol(BARCODE_MICROPDF417);
- item_val = get_spinbox_val("spnMPDFStructAppCount");
- if (item_val > 1) {
- m_bc.bc.setStructApp(item_val, get_spinbox_val("spnMPDFStructAppIndex"),
- get_lineedit_val("txtMPDFStructAppID"));
+ m_bc.bc.setOption2(get_cmb_index(QSL("cmbMPDFCols")));
+
+ if ((item_val = get_spn_val(QSL("spnMPDFStructAppCount"))) > 1) {
+ m_bc.bc.setStructApp(item_val, get_spn_val(QSL("spnMPDFStructAppIndex")),
+ get_txt_val(QSL("txtMPDFStructAppID")));
}
break;
case BARCODE_DOTCODE:
m_bc.bc.setSymbol(BARCODE_DOTCODE);
- item_val = m_optionWidget->findChild("cmbDotCols")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbDotCols"))) != 0) {
m_bc.bc.setOption2(item_val + 4); // Cols 1-4 not listed
}
- item_val = m_optionWidget->findChild("cmbDotMask")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbDotMask"))) != 0) {
m_bc.bc.setOption3((item_val << 8) | m_bc.bc.option3());
}
- set_gs1_mode(m_optionWidget->findChild("radDotGS1")->isChecked());
+ set_gs1_mode(get_rad_val(QSL("radDotGS1")));
- item_val = get_combobox_index("cmbDotStructAppCount");
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbDotStructAppCount"))) != 0) {
QString id; // Dummy ID
- m_bc.bc.setStructApp(item_val + 1, get_combobox_index("cmbDotStructAppIndex") + 1, id);
+ m_bc.bc.setStructApp(item_val + 1, get_cmb_index(QSL("cmbDotStructAppIndex")) + 1, id);
}
break;
case BARCODE_AZTEC:
- m_bc.bc.setSymbol(BARCODE_AZTEC);
- if (m_optionWidget->findChild("radAztecSize")->isChecked())
- m_bc.bc.setOption2(m_optionWidget->findChild("cmbAztecSize")->currentIndex() + 1);
-
- if (m_optionWidget->findChild("radAztecECC")->isChecked())
- m_bc.bc.setOption1(m_optionWidget->findChild("cmbAztecECC")->currentIndex() + 1);
-
- set_gs1_mode(m_optionWidget->findChild("radAztecGS1")->isChecked());
- if (m_optionWidget->findChild("radAztecHIBC")->isChecked())
+ if (get_rad_val(QSL("radAztecHIBC")))
m_bc.bc.setSymbol(BARCODE_HIBC_AZTEC);
+ else
+ m_bc.bc.setSymbol(BARCODE_AZTEC);
- item_val = get_combobox_index("cmbAztecStructAppCount");
- if (item_val) {
- m_bc.bc.setStructApp(item_val + 1, get_combobox_index("cmbAztecStructAppIndex") + 1,
- get_lineedit_val("txtAztecStructAppID"));
+ if (get_rad_val(QSL("radAztecSize")))
+ m_bc.bc.setOption2(get_cmb_index(QSL("cmbAztecSize")) + 1);
+
+ if (get_rad_val(QSL("radAztecECC")))
+ m_bc.bc.setOption1(get_cmb_index(QSL("cmbAztecECC")) + 1);
+
+ set_gs1_mode(get_rad_val(QSL("radAztecGS1")));
+
+ if ((item_val = get_cmb_index(QSL("cmbAztecStructAppCount"))) != 0) {
+ m_bc.bc.setStructApp(item_val + 1, get_cmb_index(QSL("cmbAztecStructAppIndex")) + 1,
+ get_txt_val(QSL("txtAztecStructAppID")));
}
break;
case BARCODE_MSI_PLESSEY:
m_bc.bc.setSymbol(BARCODE_MSI_PLESSEY);
- item_val = get_combobox_index("cmbMSICheck");
- if (item_val && m_optionWidget->findChild("chkMSICheckText")->isChecked()) {
+ item_val = get_cmb_index(QSL("cmbMSICheck"));
+ if (item_val && get_chk_val(QSL("chkMSICheckText"))) {
item_val += 10;
}
m_bc.bc.setOption2(item_val);
@@ -1560,9 +1723,9 @@ void MainWindow::update_preview()
case BARCODE_CODE11:
m_bc.bc.setSymbol(BARCODE_CODE11);
- if (m_optionWidget->findChild("radC11OneCheckDigit")->isChecked()) {
+ if (get_rad_val(QSL("radC11OneCheckDigit"))) {
m_bc.bc.setOption2(1);
- } else if (m_optionWidget->findChild("radC11NoCheckDigits")->isChecked()) {
+ } else if (get_rad_val(QSL("radC11NoCheckDigits"))) {
m_bc.bc.setOption2(2);
}
break;
@@ -1573,76 +1736,68 @@ void MainWindow::update_preview()
case BARCODE_C25LOGIC:
case BARCODE_C25IND:
m_bc.bc.setSymbol(symbology);
- m_bc.bc.setOption2(get_button_group_index(
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide"));
+ m_bc.bc.setOption2(get_rad_grp_index(
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")));
break;
case BARCODE_CODE39:
- if(m_optionWidget->findChild("radC39HIBC")->isChecked())
+ if (get_rad_val(QSL("radC39HIBC")))
m_bc.bc.setSymbol(BARCODE_HIBC_39);
- else
- {
+ else {
m_bc.bc.setSymbol(BARCODE_CODE39);
- if(m_optionWidget->findChild("radC39Check")->isChecked())
+ if (get_rad_val(QSL("radC39Check")))
m_bc.bc.setOption2(1);
}
break;
-
case BARCODE_EXCODE39:
m_bc.bc.setSymbol(BARCODE_EXCODE39);
- if(m_optionWidget->findChild("radC39Check")->isChecked())
+ if (get_rad_val(QSL("radC39Check")))
m_bc.bc.setOption2(1);
break;
-
case BARCODE_LOGMARS:
m_bc.bc.setSymbol(BARCODE_LOGMARS);
- if (m_optionWidget->findChild("radLOGMARSCheck")->isChecked()) {
+ if (get_rad_val(QSL("radLOGMARSCheck"))) {
m_bc.bc.setOption2(1);
}
break;
case BARCODE_CODE16K:
m_bc.bc.setSymbol(BARCODE_CODE16K);
- set_gs1_mode(m_optionWidget->findChild("radC16kGS1")->isChecked());
+ set_gs1_mode(get_rad_val(QSL("radC16kGS1")));
// Row separator height selection uses option 3 in zint_symbol
- item_val = m_optionWidget->findChild("cmbC16kRowSepHeight")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbC16kRowSepHeight"))) != 0) {
m_bc.bc.setOption3(item_val + 1); // Zero-based
}
- if (get_checkbox_val("chkC16kNoQuietZones")) {
+ if (get_chk_val(QSL("chkC16kNoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
}
break;
case BARCODE_CODABAR:
m_bc.bc.setSymbol(BARCODE_CODABAR);
- if (get_checkbox_val("chkCodabarCheck")) {
- m_bc.bc.setOption2(1);
- }
+ m_bc.bc.setOption2(get_rad_grp_index(
+ QStringList() << QSL("radCodabarStand") << QSL("radCodabarCheckHide") << QSL("radCodabarCheck")));
break;
case BARCODE_CODABLOCKF:
- if (m_optionWidget->findChild("radCbfHIBC")->isChecked()) {
+ if (get_rad_val(QSL("radCbfHIBC"))) {
m_bc.bc.setSymbol(BARCODE_HIBC_BLOCKF);
} else {
m_bc.bc.setSymbol(BARCODE_CODABLOCKF);
}
- item_val = m_optionWidget->findChild("cmbCbfWidth")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbCbfWidth"))) != 0) {
m_bc.bc.setOption2(item_val - 1 + 9);
}
// Height selection uses option 1 in zint_symbol
- item_val = m_optionWidget->findChild("cmbCbfHeight")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbCbfHeight"))) != 0) {
m_bc.bc.setOption1(item_val);
}
// Row separator height selection uses option 3 in zint_symbol
- item_val = m_optionWidget->findChild("cmbCbfRowSepHeight")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbCbfRowSepHeight"))) != 0) {
m_bc.bc.setOption3(item_val + 1); // Zero-based
}
- if (get_checkbox_val("chkCbfNoQuietZones")) {
+ if (get_chk_val(QSL("chkCbfNoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
}
break;
@@ -1650,112 +1805,103 @@ void MainWindow::update_preview()
case BARCODE_DAFT:
m_bc.bc.setSymbol(BARCODE_DAFT);
// Kept as percentage, convert to thousandths
- m_bc.bc.setOption2((int) (get_doublespinbox_val("spnDAFTTrackerRatio") * 10));
+ m_bc.bc.setOption2((int) (get_dspn_val(QSL("spnDAFTTrackerRatio")) * 10));
break;
case BARCODE_DATAMATRIX:
- if (m_optionWidget->findChild("radDM200HIBC")->isChecked())
+ if (get_rad_val(QSL("radDM200HIBC")))
m_bc.bc.setSymbol(BARCODE_HIBC_DM);
else
m_bc.bc.setSymbol(BARCODE_DATAMATRIX);
- if (m_optionWidget->findChild("radDM200GS1")->isChecked()) {
+ checkBox = m_optionWidget->findChild(QSL("chkDMGSSep"));
+ if (get_rad_val(QSL("radDM200GS1"))) {
set_gs1_mode(true);
- checkBox = m_optionWidget->findChild("chkDMGSSep");
checkBox->setEnabled(true);
if (checkBox->isChecked()) {
m_bc.bc.setGSSep(true);
}
} else {
set_gs1_mode(false);
- m_optionWidget->findChild("chkDMGSSep")->setEnabled(false);
+ checkBox->setEnabled(false);
}
- m_bc.bc.setOption2(m_optionWidget->findChild("cmbDM200Size")->currentIndex());
+ m_bc.bc.setOption2(get_cmb_index(QSL("cmbDM200Size")));
- if (m_optionWidget->findChild("cmbDM200Size")->currentIndex() == 0) {
- // Supressing rectangles or allowing DMRE only makes sense if in automatic size mode
- findChild("chkDMRectangle")->setEnabled(true);
- if (m_optionWidget->findChild("chkDMRectangle")->isChecked()) {
+ if (get_cmb_index(QSL("cmbDM200Size")) == 0) {
+ // Suppressing rectangles or allowing DMRE only makes sense if in automatic size mode
+ m_optionWidget->findChild(QSL("chkDMRectangle"))->setEnabled(true);
+ if (m_optionWidget->findChild(QSL("chkDMRectangle"))->isChecked()) {
m_bc.bc.setOption3(DM_SQUARE);
- findChild("chkDMRE")->setEnabled(false);
+ m_optionWidget->findChild(QSL("chkDMRE"))->setEnabled(false);
} else {
- findChild("chkDMRE")->setEnabled(true);
- if (m_optionWidget->findChild("chkDMRE")->isChecked())
+ m_optionWidget->findChild(QSL("chkDMRE"))->setEnabled(true);
+ if (m_optionWidget->findChild(QSL("chkDMRE"))->isChecked())
m_bc.bc.setOption3(DM_DMRE);
else
m_bc.bc.setOption3(0);
}
} else {
- findChild("chkDMRectangle")->setEnabled(false);
- findChild("chkDMRE")->setEnabled(false);
+ m_optionWidget->findChild(QSL("chkDMRectangle"))->setEnabled(false);
+ m_optionWidget->findChild(QSL("chkDMRE"))->setEnabled(false);
m_bc.bc.setOption3(0);
}
- item_val = get_combobox_index("cmbDMStructAppCount");
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbDMStructAppCount"))) != 0) {
QString id;
- int id1 = get_spinbox_val("spnDMStructAppID");
- int id2 = get_spinbox_val("spnDMStructAppID2");
- m_bc.bc.setStructApp(item_val + 1, get_combobox_index("cmbDMStructAppIndex") + 1,
+ int id1 = get_spn_val(QSL("spnDMStructAppID"));
+ int id2 = get_spn_val(QSL("spnDMStructAppID2"));
+ m_bc.bc.setStructApp(item_val + 1, get_cmb_index(QSL("cmbDMStructAppIndex")) + 1,
id.setNum(id1 * 1000 + id2));
}
break;
case BARCODE_ITF14:
m_bc.bc.setSymbol(BARCODE_ITF14);
- if (get_checkbox_val("chkITF14NoQuietZones")) {
+ if (get_chk_val(QSL("chkITF14NoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
}
break;
case BARCODE_QRCODE:
- if(m_optionWidget->findChild("radQRHIBC")->isChecked())
+ if (get_rad_val(QSL("radQRHIBC")))
m_bc.bc.setSymbol(BARCODE_HIBC_QR);
else
m_bc.bc.setSymbol(BARCODE_QRCODE);
- set_gs1_mode(m_optionWidget->findChild("radQRGS1")->isChecked());
+ set_gs1_mode(get_rad_val(QSL("radQRGS1")));
- item_val = m_optionWidget->findChild("cmbQRSize")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbQRSize"))) != 0) {
m_bc.bc.setOption2(item_val);
}
- item_val = m_optionWidget->findChild("cmbQRECC")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbQRECC"))) != 0) {
m_bc.bc.setOption1(item_val);
}
- item_val = m_optionWidget->findChild("cmbQRMask")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbQRMask"))) != 0) {
m_bc.bc.setOption3((item_val << 8) | m_bc.bc.option3());
}
- if (m_optionWidget->findChild("chkQRFullMultibyte")->isChecked()) {
+ if (get_chk_val(QSL("chkQRFullMultibyte"))) {
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE | m_bc.bc.option3());
}
-
- item_val = get_combobox_index("cmbQRStructAppCount");
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbQRStructAppCount"))) != 0) {
QString id;
- int id_val = get_spinbox_val("spnQRStructAppID");
- m_bc.bc.setStructApp(item_val + 1, get_combobox_index("cmbQRStructAppIndex") + 1, id.setNum(id_val));
+ int id_val = get_spn_val(QSL("spnQRStructAppID"));
+ m_bc.bc.setStructApp(item_val + 1, get_cmb_index(QSL("cmbQRStructAppIndex")) + 1, id.setNum(id_val));
}
break;
case BARCODE_MICROQR:
m_bc.bc.setSymbol(BARCODE_MICROQR);
- item_val = m_optionWidget->findChild("cmbMQRSize")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbMQRSize"))) != 0) {
m_bc.bc.setOption2(item_val);
}
- item_val = m_optionWidget->findChild("cmbMQRECC")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbMQRECC"))) != 0) {
m_bc.bc.setOption1(item_val);
}
- item_val = m_optionWidget->findChild("cmbMQRMask")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbMQRMask"))) != 0) {
m_bc.bc.setOption3((item_val << 8) | m_bc.bc.option3());
}
- if (m_optionWidget->findChild("chkMQRFullMultibyte")->isChecked()) {
+ if (get_chk_val(QSL("chkMQRFullMultibyte"))) {
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE | m_bc.bc.option3());
}
break;
@@ -1763,156 +1909,141 @@ void MainWindow::update_preview()
case BARCODE_RMQR:
m_bc.bc.setSymbol(BARCODE_RMQR);
- set_gs1_mode(m_optionWidget->findChild("radRMQRGS1")->isChecked());
+ set_gs1_mode(get_rad_val(QSL("radRMQRGS1")));
- item_val = m_optionWidget->findChild("cmbRMQRSize")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbRMQRSize"))) != 0) {
m_bc.bc.setOption2(item_val);
}
- item_val = m_optionWidget->findChild("cmbRMQRECC")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbRMQRECC"))) != 0) {
m_bc.bc.setOption1(item_val * 2); // Levels 2 (M) and 4 (H) only
}
- if (m_optionWidget->findChild("chkRMQRFullMultibyte")->isChecked()) {
+ if (get_chk_val(QSL("chkRMQRFullMultibyte"))) {
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE);
}
break;
case BARCODE_GRIDMATRIX:
m_bc.bc.setSymbol(BARCODE_GRIDMATRIX);
- item_val = m_optionWidget->findChild("cmbGridSize")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbGridSize"))) != 0) {
m_bc.bc.setOption2(item_val);
}
- item_val = m_optionWidget->findChild("cmbGridECC")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbGridECC"))) != 0) {
m_bc.bc.setOption1(item_val);
}
- if (m_optionWidget->findChild("chkGridFullMultibyte")->isChecked()) {
+ if (get_chk_val(QSL("chkGridFullMultibyte"))) {
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE);
}
-
- item_val = get_combobox_index("cmbGridStructAppCount");
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbGridStructAppCount"))) != 0) {
QString id;
- int id_val = get_spinbox_val("spnGridStructAppID");
- m_bc.bc.setStructApp(item_val + 1, get_combobox_index("cmbGridStructAppIndex") + 1,
+ int id_val = get_spn_val(QSL("spnGridStructAppID"));
+ m_bc.bc.setStructApp(item_val + 1, get_cmb_index(QSL("cmbGridStructAppIndex")) + 1,
id.setNum(id_val));
}
break;
case BARCODE_MAXICODE:
m_bc.bc.setSymbol(BARCODE_MAXICODE);
- if (m_optionWidget->findChild("cmbMaxiMode")->currentIndex() == 0) {
+ if (get_cmb_index(QSL("cmbMaxiMode")) == 0) {
m_bc.bc.setOption1(0); // Auto-determine mode 2 or 3 from primary message (checks that it isn't empty)
m_bc.bc.setPrimaryMessage(QString::asprintf("%s%03d%03d",
- get_lineedit_val("txtMaxiSCMPostcode").toUtf8().constData(),
- get_spinbox_val("spnMaxiSCMCountry"), get_spinbox_val("spnMaxiSCMService")));
- QCheckBox *chkMaxiSCMVV = m_optionWidget->findChild("chkMaxiSCMVV");
- if (chkMaxiSCMVV->isEnabled() && chkMaxiSCMVV->isChecked()) {
- m_bc.bc.setOption2(m_optionWidget->findChild("spnMaxiSCMVV")->value() + 1);
+ get_txt_val(QSL("txtMaxiSCMPostcode")).toUtf8().constData(),
+ get_spn_val(QSL("spnMaxiSCMCountry")), get_spn_val(QSL("spnMaxiSCMService"))));
+ QCheckBox *chkMaxiSCMVV = m_optionWidget->findChild(QSL("chkMaxiSCMVV"));
+ if (chkMaxiSCMVV && chkMaxiSCMVV->isEnabled() && chkMaxiSCMVV->isChecked()) {
+ m_bc.bc.setOption2(get_spn_val(QSL("spnMaxiSCMVV")) + 1);
}
} else {
- m_bc.bc.setOption1(m_optionWidget->findChild("cmbMaxiMode")->currentIndex() + 3);
+ m_bc.bc.setOption1(get_cmb_index(QSL("cmbMaxiMode")) + 3);
}
- item_val = get_combobox_index("cmbMaxiStructAppCount");
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbMaxiStructAppCount"))) != 0) {
QString id; // Dummy ID
- m_bc.bc.setStructApp(item_val + 1, get_combobox_index("cmbMaxiStructAppIndex") + 1, id);
+ m_bc.bc.setStructApp(item_val + 1, get_cmb_index(QSL("cmbMaxiStructAppIndex")) + 1, id);
}
break;
case BARCODE_CHANNEL:
m_bc.bc.setSymbol(BARCODE_CHANNEL);
- if(m_optionWidget->findChild("cmbChannel")->currentIndex() == 0)
+ if ((item_val = get_cmb_index(QSL("cmbChannel"))) == 0)
m_bc.bc.setOption2(0);
else
- m_bc.bc.setOption2(m_optionWidget->findChild("cmbChannel")->currentIndex() + 2);
+ m_bc.bc.setOption2(item_val + 2);
break;
case BARCODE_CODEONE:
m_bc.bc.setSymbol(BARCODE_CODEONE);
- m_bc.bc.setOption2(m_optionWidget->findChild("cmbC1Size")->currentIndex());
+ m_bc.bc.setOption2(get_cmb_index(QSL("cmbC1Size")));
if (m_bc.bc.option2() == 9) { // Version S
- recheck_eci = false;
+ eci_not_set = false;
cmbECI->setEnabled(false);
lblECI->setEnabled(false);
- m_optionWidget->findChild("radC1GS1")->setEnabled(false);
+ m_optionWidget->findChild(QSL("radC1GS1"))->setEnabled(false);
} else {
- m_optionWidget->findChild("radC1GS1")->setEnabled(true);
- set_gs1_mode(m_optionWidget->findChild("radC1GS1")->isChecked());
+ m_optionWidget->findChild(QSL("radC1GS1"))->setEnabled(true);
+ set_gs1_mode(get_rad_val(QSL("radC1GS1")));
}
-
- item_val = get_spinbox_val("spnC1StructAppCount");
- if (item_val > 1) {
+ if (get_cmb_index(QSL("cmbC1Size")) != 9 && (item_val = get_spn_val(QSL("spnC1StructAppCount"))) > 1) {
QString id; // Dummy ID
- m_bc.bc.setStructApp(item_val, get_spinbox_val("spnC1StructAppIndex"), id);
+ m_bc.bc.setStructApp(item_val, get_spn_val(QSL("spnC1StructAppIndex")), id);
}
break;
case BARCODE_CODE49:
m_bc.bc.setSymbol(BARCODE_CODE49);
- set_gs1_mode(m_optionWidget->findChild("radC49GS1")->isChecked());
+ set_gs1_mode(get_rad_val(QSL("radC49GS1")));
// Row separator height selection uses option 3 in zint_symbol
- item_val = m_optionWidget->findChild("cmbC49RowSepHeight")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbC49RowSepHeight"))) != 0) {
m_bc.bc.setOption3(item_val + 1); // Zero-based
}
- if (get_checkbox_val("chkC49NoQuietZones")) {
+ if (get_chk_val(QSL("chkC49NoQuietZones"))) {
m_bc.bc.setNoQuietZones(true);
}
break;
case BARCODE_CODE93:
m_bc.bc.setSymbol(BARCODE_CODE93);
- if (get_checkbox_val("chkC93ShowChecks")) {
+ if (get_chk_val(QSL("chkC93ShowChecks"))) {
m_bc.bc.setOption2(1);
}
break;
case BARCODE_HANXIN:
m_bc.bc.setSymbol(BARCODE_HANXIN);
- item_val = m_optionWidget->findChild("cmbHXSize")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbHXSize"))) != 0) {
m_bc.bc.setOption2(item_val);
}
- item_val = m_optionWidget->findChild("cmbHXECC")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbHXECC"))) != 0) {
m_bc.bc.setOption1(item_val);
}
- item_val = m_optionWidget->findChild("cmbHXMask")->currentIndex();
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbHXMask"))) != 0) {
m_bc.bc.setOption3((item_val << 8) | m_bc.bc.option3());
}
- if (m_optionWidget->findChild("chkHXFullMultibyte")->isChecked()) {
+ if (get_chk_val(QSL("chkHXFullMultibyte"))) {
m_bc.bc.setOption3(ZINT_FULL_MULTIBYTE | m_bc.bc.option3());
}
break;
case BARCODE_ULTRA:
m_bc.bc.setSymbol(BARCODE_ULTRA);
- if (m_optionWidget->findChild("radUltraEcc")->isChecked())
- m_bc.bc.setOption1(get_combobox_index("cmbUltraEcc") + 1);
- set_gs1_mode(m_optionWidget->findChild("radUltraGS1")->isChecked());
+ if (get_rad_val(QSL("radUltraEcc")))
+ m_bc.bc.setOption1(get_cmb_index(QSL("cmbUltraEcc")) + 1);
- item_val = get_combobox_index("cmbUltraRevision");
- if (item_val > 0) {
+ set_gs1_mode(get_rad_val(QSL("radUltraGS1")));
+
+ if ((item_val = get_cmb_index(QSL("cmbUltraRevision"))) > 0) {
m_bc.bc.setOption2(item_val + 1); // Combobox 0-based
}
-
- item_val = get_combobox_index("cmbUltraStructAppCount");
- if (item_val) {
+ if ((item_val = get_cmb_index(QSL("cmbUltraStructAppCount"))) != 0) {
QString id;
- int id_val = get_spinbox_val("spnUltraStructAppID");
- m_bc.bc.setStructApp(item_val + 1, get_combobox_index("cmbUltraStructAppIndex") + 1,
+ int id_val = get_spn_val(QSL("spnUltraStructAppID"));
+ m_bc.bc.setStructApp(item_val + 1, get_cmb_index(QSL("cmbUltraStructAppIndex")) + 1,
id.setNum(id_val));
}
break;
case BARCODE_VIN:
m_bc.bc.setSymbol(BARCODE_VIN);
- if (m_optionWidget->findChild("chkVINImportChar")->isChecked()) {
+ if (get_chk_val(QSL("chkVINImportChar"))) {
m_bc.bc.setOption2(m_bc.bc.option2() | 1); // Import character 'I' prefix
}
break;
@@ -1923,14 +2054,14 @@ void MainWindow::update_preview()
}
m_symbology = m_bc.bc.symbol();
- /* Recheck ECI and Reader Init */
- if (recheck_eci) {
+ if (eci_not_set) {
cmbECI->setEnabled(m_bc.bc.supportsECI());
lblECI->setEnabled(cmbECI->isEnabled());
}
chkGS1Parens->setEnabled(m_bc.bc.supportsGS1());
chkGS1NoCheck->setEnabled(m_bc.bc.supportsGS1());
chkRInit->setEnabled(m_bc.bc.supportsReaderInit() && (m_bc.bc.inputMode() & 0x07) != GS1_MODE);
+ chkCompliantHeight->setEnabled(m_bc.bc.hasCompliantHeight());
if (!grpComposite->isHidden() && chkComposite->isChecked())
m_bc.bc.setOption1(cmbCompType->currentIndex());
@@ -1940,6 +2071,7 @@ void MainWindow::update_preview()
} else {
m_bc.bc.setHeight(heightb->value());
}
+ m_bc.bc.setCompliantHeight(chkCompliantHeight->isEnabled() && chkCompliantHeight->isChecked());
m_bc.bc.setECI(cmbECI->isEnabled() ? cmbECI->currentIndex() : 0);
m_bc.bc.setGS1Parens(chkGS1Parens->isEnabled() && chkGS1Parens->isChecked());
m_bc.bc.setGS1NoCheck(chkGS1NoCheck->isEnabled() && chkGS1NoCheck->isChecked());
@@ -1966,185 +2098,390 @@ void MainWindow::update_preview()
scene->update();
}
-/* Shorthand to find widget child as generic QObject */
-QObject *MainWindow::widget_obj(const char *name) {
- return m_optionWidget->findChild(name);
+void MainWindow::createActions()
+{
+ // SVG icons from https://github.com/feathericons/feather
+ // MIT license - see site and "frontend_qt/res/LICENSE_feathericons"
+ QIcon menuIcon(QSL(":res/menu.svg"));
+ QIcon copyIcon(QIcon::fromTheme(QSL("edit-copy"), QIcon(QSL(":res/copy.svg"))));
+ QIcon saveIcon(QIcon::fromTheme(QSL("document-save"), QIcon(QSL(":res/download.svg"))));
+ QIcon aboutIcon(QSL(":res/zint-qt.ico"));
+ QIcon helpIcon(QIcon::fromTheme(QSL("help-contents"), QIcon(QSL(":res/help-circle.svg"))));
+ QIcon quitIcon(QIcon::fromTheme(QSL("window-close"), QIcon(QSL(":res/x.svg"))));
+
+ btnMenu->setIcon(menuIcon);
+ btnCopyBMP->setIcon(copyIcon);
+ btnCopySVG->setIcon(copyIcon);
+ //btnSave->setIcon(saveIcon); // Makes it too big
+ btnExit->setIcon(quitIcon);
+
+ m_copyBMPAct = new QAction(copyIcon, tr("Copy as &BMP"), this);
+ m_copyBMPAct->setStatusTip(tr("Copy to clipboard as BMP"));
+ connect(m_copyBMPAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_bmp()));
+
+ m_copyEMFAct = new QAction(copyIcon, tr("Copy as E&MF"), this);
+ m_copyEMFAct->setStatusTip(tr("Copy to clipboard as EMF"));
+ connect(m_copyEMFAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_emf()));
+
+#ifdef MAINWINDOW_COPY_EPS /* TODO: see if can get this to work */
+ m_copyEPSAct = new QAction(copyIcon, tr("Copy as &EPS"), this);
+ m_copyEPSAct->setStatusTip(tr("Copy to clipboard as EPS"));
+ connect(m_copyEPSAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_eps()));
+#endif
+
+ m_copyGIFAct = new QAction(copyIcon, tr("Copy as &GIF"), this);
+ m_copyGIFAct->setStatusTip(tr("Copy to clipboard as GIF"));
+ connect(m_copyGIFAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_gif()));
+
+#ifdef MAINWINDOW_COPY_PCX /* TODO: see if can get this to work */
+ m_copyPCXAct = new QAction(copyIcon, tr("Copy as P&CX"), this);
+ m_copyPCXAct->setStatusTip(tr("Copy to clipboard as PCX"));
+ connect(m_copyPCXAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_pcx()));
+#endif
+
+#ifndef NO_PNG
+ m_copyPNGAct = new QAction(copyIcon, tr("Copy as &PNG"), this);
+ m_copyPNGAct->setStatusTip(tr("Copy to clipboard as PNG"));
+ connect(m_copyPNGAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_png()));
+#endif
+
+ m_copySVGAct = new QAction(copyIcon, tr("Copy as S&VG"), this);
+ m_copySVGAct->setStatusTip(tr("Copy to clipboard as SVG"));
+ connect(m_copySVGAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_svg()));
+
+ m_copyTIFAct = new QAction(copyIcon, tr("Copy as &TIF"), this);
+ m_copyTIFAct->setStatusTip(tr("Copy to clipboard as TIF"));
+ connect(m_copyTIFAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_tif()));
+
+ m_saveAsAct = new QAction(saveIcon, tr("&Save As..."), this);
+ m_saveAsAct->setStatusTip(tr("Output image to file"));
+ m_saveAsAct->setShortcut(QKeySequence::Save);
+ connect(m_saveAsAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ m_helpAct = new QAction(helpIcon, tr("&Help (online)"), this);
+ m_helpAct->setStatusTip(tr("Online manual"));
+ m_helpAct->setShortcut(QKeySequence::HelpContents);
+ connect(m_helpAct, SIGNAL(triggered()), this, SLOT(help()));
+
+ m_aboutAct = new QAction(aboutIcon, tr("&About"), this);
+ m_aboutAct->setStatusTip(tr("About Zint Barcode Studio"));
+ connect(m_aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ m_quitAct = new QAction(quitIcon, tr("&Quit"), this);
+ m_quitAct->setStatusTip(tr("Exit Zint Barcode Studio"));
+ m_quitAct->setShortcut(quitKeySeq);
+ connect(m_quitAct, SIGNAL(triggered()), this, SLOT(quit_now()));
+
+ m_copyErrtxtAct = new QAction(copyIcon, tr("&Copy"), this);
+ m_copyErrtxtAct->setStatusTip(tr("Copy message to clipboard"));
+ connect(m_copyErrtxtAct, SIGNAL(triggered()), this, SLOT(copy_to_clipboard_errtxt()));
+}
+
+void MainWindow::createMenu()
+{
+ m_menu = new QMenu(tr("Menu"), this);
+
+ m_menu->addAction(m_copyBMPAct);
+ m_menu->addAction(m_copyEMFAct);
+#ifdef MAINWINDOW_COPY_EPS
+ m_menu->addAction(m_copyEPSAct);
+#endif
+ m_menu->addAction(m_copyGIFAct);
+#ifdef MAINWINDOW_COPY_PCX
+ m_menu->addAction(m_copyPCXAct);
+#endif
+#ifndef NO_PNG
+ m_menu->addAction(m_copyPNGAct);
+#endif
+ m_menu->addAction(m_copySVGAct);
+ m_menu->addAction(m_copyTIFAct);
+ m_menu->addSeparator();
+
+ m_menu->addAction(m_saveAsAct);
+ m_menu->addSeparator();
+ m_menu->addAction(m_helpAct);
+ m_menu->addAction(m_aboutAct);
+ m_menu->addSeparator();
+ m_menu->addAction(m_quitAct);
+}
+
+void MainWindow::enableActions(bool enabled)
+{
+ btnCopyBMP->setEnabled(enabled);
+ btnCopySVG->setEnabled(enabled);
+ btnSave->setEnabled(enabled);
+
+ m_copyBMPAct->setEnabled(enabled);
+ m_copyEMFAct->setEnabled(enabled);
+#ifdef MAINWINDOW_COPY_EPS
+ m_copyEPSAct->setEnabled(enabled);
+#endif
+ m_copyGIFAct->setEnabled(enabled);
+#ifdef MAINWINDOW_COPY_PCX
+ m_copyPCXAct->setEnabled(enabled);
+#endif
+#ifndef NO_PNG
+ m_copyPNGAct->setEnabled(enabled);
+#endif
+ m_copySVGAct->setEnabled(enabled);
+ m_copyTIFAct->setEnabled(enabled);
+ m_saveAsAct->setEnabled(enabled);
+
+ m_saveAsShortcut->setEnabled(enabled);
+}
+
+void MainWindow::copy_to_clipboard(const QString &filename, const QString& name, const char *mimeType)
+{
+ QClipboard *clipboard = QGuiApplication::clipboard();
+
+ if (!m_bc.bc.save_to_file(filename)) {
+ return;
+ }
+
+ QMimeData *mdata = new QMimeData;
+ if (mimeType) {
+ QFile file(filename);
+ if (!file.open(QIODevice::ReadOnly)) {
+ delete mdata;
+ } else {
+ mdata->setData(mimeType, file.readAll());
+ file.close();
+ clipboard->setMimeData(mdata, QClipboard::Clipboard);
+ /*: %1 is format (BMP/EMF etc) */
+ statusBar->showMessage(tr("Copied to clipboard as %1").arg(name), statusBarTimeout);
+ }
+ } else {
+ mdata->setImageData(QImage(filename));
+ clipboard->setMimeData(mdata, QClipboard::Clipboard);
+ /*: %1 is format (BMP/EMF etc) */
+ statusBar->showMessage(tr("Copied to clipboard as %1").arg(name), statusBarTimeout);
+ }
+
+ QFile::remove(filename);
+}
+
+void MainWindow::errtxtBar_clear()
+{
+ errtxtBar->clearMessage();
+ if (!errtxtBarContainer->isHidden()) {
+ errtxtBarContainer->hide();
+ errtxtBarContainer->update();
+ update_preview();
+ }
+}
+
+void MainWindow::errtxtBar_set(bool isError)
+{
+ if (!m_bc.bc.hasErrors()) {
+ errtxtBar_clear();
+ } else {
+ errtxtBar->showMessage(m_bc.bc.lastError());
+ errtxtBar->setStyleSheet(isError
+ ? QSL("QStatusBar {background:white; color:#dd0000;}")
+ : QSL("QStatusBar {background:white; color:#ff6f00;}"));
+ if (errtxtBarContainer->isHidden()) {
+ errtxtBarContainer->show();
+ errtxtBarContainer->update();
+ update_preview();
+ }
+ }
+}
+
+QPoint MainWindow::get_context_menu_pos(const QPoint &pos, QWidget *widget)
+{
+ QPoint menuPos(pos);
+ if (menuPos.x() == 0 && menuPos.y() == 0) { // May have been invoked by menu key
+ QPoint mousePos(widget->mapFromGlobal(QCursor::pos()));
+ if (widget->rect().contains(mousePos)) {
+ menuPos = mousePos;
+ }
+ }
+
+ return widget->mapToGlobal(menuPos);
+}
+
+/* Shorthand to find widget child as generic QWidget */
+QWidget *MainWindow::get_widget(const QString &name)
+{
+ return m_optionWidget->findChild(name);
}
/* Return settings subsection name for a symbol */
-const char *MainWindow::get_setting_name(int symbology) {
+const QString &MainWindow::get_setting_name(int symbology)
+{
struct item {
- const char *name;
+ const QString name;
int define;
int val;
};
static const struct item ndata[] = {
- { "", -1, 0 },
- { "code11", BARCODE_CODE11, 1 },
- { "c25standard", BARCODE_C25STANDARD, 2 },
- { "c25inter", BARCODE_C25INTER, 3 },
- { "c25iata", BARCODE_C25IATA, 4 },
- { "", -1, 5 },
- { "c25logic", BARCODE_C25LOGIC, 6 },
- { "c25ind", BARCODE_C25IND, 7 },
- { "code39", BARCODE_CODE39, 8 },
- { "excode39", BARCODE_EXCODE39, 9 },
- { "", -1, 10 },
- { "", -1, 11 },
- { "", -1, 12 },
- { "eanx", BARCODE_EANX, 13 },
- { "eanx", BARCODE_EANX_CHK, 14 },
- { "", -1, 15 },
- { "code128", BARCODE_GS1_128, 16 },
- { "", -1, 17 },
- { "codabar", BARCODE_CODABAR, 18 },
- { "", -1, 19 },
- { "code128", BARCODE_CODE128, 20 },
- { "dpleit", BARCODE_DPLEIT, 21 },
- { "dpident", BARCODE_DPIDENT, 22 },
- { "code16k", BARCODE_CODE16K, 23 },
- { "code49", BARCODE_CODE49, 24 },
- { "code93", BARCODE_CODE93, 25 },
- { "", -1, 26 },
- { "", -1, 27 },
- { "flat", BARCODE_FLAT, 28 },
- { "dbar_omn", BARCODE_DBAR_OMN, 29 },
- { "dbar_ltd", BARCODE_DBAR_LTD, 30 },
- { "dbar_exp", BARCODE_DBAR_EXP, 31 },
- { "telepen", BARCODE_TELEPEN, 32 },
- { "", -1, 33 },
- { "upca", BARCODE_UPCA, 34 },
- { "upca", BARCODE_UPCA_CHK, 35 },
- { "", -1, 36 },
- { "upce", BARCODE_UPCE, 37 },
- { "upce", BARCODE_UPCE_CHK, 38 },
- { "", -1, 39 },
- { "postnet", BARCODE_POSTNET, 40 },
- { "", -1, 41 },
- { "", -1, 42 },
- { "", -1, 43 },
- { "", -1, 44 },
- { "", -1, 45 },
- { "", -1, 46 },
- { "msi_plessey", BARCODE_MSI_PLESSEY, 47 },
- { "", -1, 48 },
- { "fim", BARCODE_FIM, 49 },
- { "logmars", BARCODE_LOGMARS, 50 },
- { "pharma", BARCODE_PHARMA, 51 },
- { "pzn", BARCODE_PZN, 52 },
- { "pharma_two", BARCODE_PHARMA_TWO, 53 },
- { "", -1, 54 },
- { "pdf417", BARCODE_PDF417, 55 },
- { "pdf417", BARCODE_PDF417COMP, 56 },
- { "maxicode", BARCODE_MAXICODE, 57 },
- { "qrcode", BARCODE_QRCODE, 58 },
- { "", -1, 59 },
- { "code128", BARCODE_CODE128B, 60 },
- { "", -1, 61 },
- { "", -1, 62 },
- { "auspost", BARCODE_AUSPOST, 63 },
- { "", -1, 64 },
- { "", -1, 65 },
- { "ausreply", BARCODE_AUSREPLY, 66 },
- { "ausroute", BARCODE_AUSROUTE, 67 },
- { "ausredirect", BARCODE_AUSREDIRECT, 68 },
- { "isbnx", BARCODE_ISBNX, 69 },
- { "rm4scc", BARCODE_RM4SCC, 70 },
- { "datamatrix", BARCODE_DATAMATRIX, 71 },
- { "ean14", BARCODE_EAN14, 72 },
- { "vin", BARCODE_VIN, 73 },
- { "codablockf", BARCODE_CODABLOCKF, 74 },
- { "nve18", BARCODE_NVE18, 75 },
- { "japanpost", BARCODE_JAPANPOST, 76 },
- { "koreapost", BARCODE_KOREAPOST, 77 },
- { "", -1, 78 },
- { "dbar_stk", BARCODE_DBAR_STK, 79 },
- { "dbar_omnstk", BARCODE_DBAR_OMNSTK, 80 },
- { "dbar_expstk", BARCODE_DBAR_EXPSTK, 81 },
- { "planet", BARCODE_PLANET, 82 },
- { "", -1, 83 },
- { "micropdf417", BARCODE_MICROPDF417, 84 },
- { "usps_imail", BARCODE_USPS_IMAIL, 85 },
- { "plessey", BARCODE_PLESSEY, 86 },
- { "telepen_num", BARCODE_TELEPEN_NUM, 87 },
- { "", -1, 88 },
- { "itf14", BARCODE_ITF14, 89 },
- { "kix", BARCODE_KIX, 90 },
- { "", -1, 91 },
- { "aztec", BARCODE_AZTEC, 92 },
- { "daft", BARCODE_DAFT, 93 },
- { "", -1, 94 },
- { "", -1, 95 },
- { "dpd", BARCODE_DPD, 96 },
- { "microqr", BARCODE_MICROQR, 97 },
- { "code128", BARCODE_HIBC_128, 98 },
- { "code39", BARCODE_HIBC_39, 99 },
- { "", -1, 100 },
- { "", -1, 101 },
- { "datamatrix", BARCODE_HIBC_DM, 102 },
- { "", -1, 103 },
- { "qrcode", BARCODE_HIBC_QR, 104 },
- { "", -1, 105 },
- { "pdf417", BARCODE_HIBC_PDF, 106 },
- { "", -1, 107 },
- { "micropdf417", BARCODE_HIBC_MICPDF, 108 },
- { "", -1, 109 },
- { "codablockf", BARCODE_HIBC_BLOCKF, 110 },
- { "", -1, 111 },
- { "aztec", BARCODE_HIBC_AZTEC, 112 },
- { "", -1, 113 },
- { "", -1, 114 },
- { "dotcode", BARCODE_DOTCODE, 115 },
- { "hanxin", BARCODE_HANXIN, 116 },
- { "", -1, 117 },
- { "", -1, 118 },
- { "", -1, 119 },
- { "", -1, 120 },
- { "mailmark", BARCODE_MAILMARK, 121 },
- { "", -1, 122 },
- { "", -1, 123 },
- { "", -1, 124 },
- { "", -1, 125 },
- { "", -1, 126 },
- { "", -1, 127 },
- { "azrune", BARCODE_AZRUNE, 128 },
- { "code32", BARCODE_CODE32, 129 },
- { "eanx", BARCODE_EANX_CC, 130 },
- { "code128", BARCODE_GS1_128_CC, 131 },
- { "dbar_omn", BARCODE_DBAR_OMN_CC, 132 },
- { "dbar_ltd", BARCODE_DBAR_LTD_CC, 133 },
- { "dbar_exp", BARCODE_DBAR_EXP_CC, 134 },
- { "upca", BARCODE_UPCA_CC, 135 },
- { "upce", BARCODE_UPCE_CC, 136 },
- { "dbar_stk", BARCODE_DBAR_STK_CC, 137 },
- { "dbar_omnstk", BARCODE_DBAR_OMNSTK_CC, 138 },
- { "dbar_expstk", BARCODE_DBAR_EXPSTK_CC, 139 },
- { "channel", BARCODE_CHANNEL, 140 },
- { "codeone", BARCODE_CODEONE, 141 },
- { "gridmatrix", BARCODE_GRIDMATRIX, 142 },
- { "upnqr", BARCODE_UPNQR, 143 },
- { "ultra", BARCODE_ULTRA, 144 },
- { "rmqr", BARCODE_RMQR, 145 },
+ { QSL(""), -1, 0 },
+ { QSL("code11"), BARCODE_CODE11, 1 },
+ { QSL("c25standard"), BARCODE_C25STANDARD, 2 },
+ { QSL("c25inter"), BARCODE_C25INTER, 3 },
+ { QSL("c25iata"), BARCODE_C25IATA, 4 },
+ { QSL(""), -1, 5 },
+ { QSL("c25logic"), BARCODE_C25LOGIC, 6 },
+ { QSL("c25ind"), BARCODE_C25IND, 7 },
+ { QSL("code39"), BARCODE_CODE39, 8 },
+ { QSL("excode39"), BARCODE_EXCODE39, 9 },
+ { QSL(""), -1, 10 },
+ { QSL(""), -1, 11 },
+ { QSL(""), -1, 12 },
+ { QSL("eanx"), BARCODE_EANX, 13 },
+ { QSL("eanx"), BARCODE_EANX_CHK, 14 },
+ { QSL(""), -1, 15 },
+ { QSL("code128"), BARCODE_GS1_128, 16 },
+ { QSL(""), -1, 17 },
+ { QSL("codabar"), BARCODE_CODABAR, 18 },
+ { QSL(""), -1, 19 },
+ { QSL("code128"), BARCODE_CODE128, 20 },
+ { QSL("dpleit"), BARCODE_DPLEIT, 21 },
+ { QSL("dpident"), BARCODE_DPIDENT, 22 },
+ { QSL("code16k"), BARCODE_CODE16K, 23 },
+ { QSL("code49"), BARCODE_CODE49, 24 },
+ { QSL("code93"), BARCODE_CODE93, 25 },
+ { QSL(""), -1, 26 },
+ { QSL(""), -1, 27 },
+ { QSL("flat"), BARCODE_FLAT, 28 },
+ { QSL("dbar_omn"), BARCODE_DBAR_OMN, 29 },
+ { QSL("dbar_ltd"), BARCODE_DBAR_LTD, 30 },
+ { QSL("dbar_exp"), BARCODE_DBAR_EXP, 31 },
+ { QSL("telepen"), BARCODE_TELEPEN, 32 },
+ { QSL(""), -1, 33 },
+ { QSL("upca"), BARCODE_UPCA, 34 },
+ { QSL("upca"), BARCODE_UPCA_CHK, 35 },
+ { QSL(""), -1, 36 },
+ { QSL("upce"), BARCODE_UPCE, 37 },
+ { QSL("upce"), BARCODE_UPCE_CHK, 38 },
+ { QSL(""), -1, 39 },
+ { QSL("postnet"), BARCODE_POSTNET, 40 },
+ { QSL(""), -1, 41 },
+ { QSL(""), -1, 42 },
+ { QSL(""), -1, 43 },
+ { QSL(""), -1, 44 },
+ { QSL(""), -1, 45 },
+ { QSL(""), -1, 46 },
+ { QSL("msi_plessey"), BARCODE_MSI_PLESSEY, 47 },
+ { QSL(""), -1, 48 },
+ { QSL("fim"), BARCODE_FIM, 49 },
+ { QSL("logmars"), BARCODE_LOGMARS, 50 },
+ { QSL("pharma"), BARCODE_PHARMA, 51 },
+ { QSL("pzn"), BARCODE_PZN, 52 },
+ { QSL("pharma_two"), BARCODE_PHARMA_TWO, 53 },
+ { QSL(""), -1, 54 },
+ { QSL("pdf417"), BARCODE_PDF417, 55 },
+ { QSL("pdf417"), BARCODE_PDF417COMP, 56 },
+ { QSL("maxicode"), BARCODE_MAXICODE, 57 },
+ { QSL("qrcode"), BARCODE_QRCODE, 58 },
+ { QSL(""), -1, 59 },
+ { QSL("code128"), BARCODE_CODE128B, 60 },
+ { QSL(""), -1, 61 },
+ { QSL(""), -1, 62 },
+ { QSL("auspost"), BARCODE_AUSPOST, 63 },
+ { QSL(""), -1, 64 },
+ { QSL(""), -1, 65 },
+ { QSL("ausreply"), BARCODE_AUSREPLY, 66 },
+ { QSL("ausroute"), BARCODE_AUSROUTE, 67 },
+ { QSL("ausredirect"), BARCODE_AUSREDIRECT, 68 },
+ { QSL("isbnx"), BARCODE_ISBNX, 69 },
+ { QSL("rm4scc"), BARCODE_RM4SCC, 70 },
+ { QSL("datamatrix"), BARCODE_DATAMATRIX, 71 },
+ { QSL("ean14"), BARCODE_EAN14, 72 },
+ { QSL("vin"), BARCODE_VIN, 73 },
+ { QSL("codablockf"), BARCODE_CODABLOCKF, 74 },
+ { QSL("nve18"), BARCODE_NVE18, 75 },
+ { QSL("japanpost"), BARCODE_JAPANPOST, 76 },
+ { QSL("koreapost"), BARCODE_KOREAPOST, 77 },
+ { QSL(""), -1, 78 },
+ { QSL("dbar_stk"), BARCODE_DBAR_STK, 79 },
+ { QSL("dbar_omnstk"), BARCODE_DBAR_OMNSTK, 80 },
+ { QSL("dbar_expstk"), BARCODE_DBAR_EXPSTK, 81 },
+ { QSL("planet"), BARCODE_PLANET, 82 },
+ { QSL(""), -1, 83 },
+ { QSL("micropdf417"), BARCODE_MICROPDF417, 84 },
+ { QSL("usps_imail"), BARCODE_USPS_IMAIL, 85 },
+ { QSL("plessey"), BARCODE_PLESSEY, 86 },
+ { QSL("telepen_num"), BARCODE_TELEPEN_NUM, 87 },
+ { QSL(""), -1, 88 },
+ { QSL("itf14"), BARCODE_ITF14, 89 },
+ { QSL("kix"), BARCODE_KIX, 90 },
+ { QSL(""), -1, 91 },
+ { QSL("aztec"), BARCODE_AZTEC, 92 },
+ { QSL("daft"), BARCODE_DAFT, 93 },
+ { QSL(""), -1, 94 },
+ { QSL(""), -1, 95 },
+ { QSL("dpd"), BARCODE_DPD, 96 },
+ { QSL("microqr"), BARCODE_MICROQR, 97 },
+ { QSL("code128"), BARCODE_HIBC_128, 98 },
+ { QSL("code39"), BARCODE_HIBC_39, 99 },
+ { QSL(""), -1, 100 },
+ { QSL(""), -1, 101 },
+ { QSL("datamatrix"), BARCODE_HIBC_DM, 102 },
+ { QSL(""), -1, 103 },
+ { QSL("qrcode"), BARCODE_HIBC_QR, 104 },
+ { QSL(""), -1, 105 },
+ { QSL("pdf417"), BARCODE_HIBC_PDF, 106 },
+ { QSL(""), -1, 107 },
+ { QSL("micropdf417"), BARCODE_HIBC_MICPDF, 108 },
+ { QSL(""), -1, 109 },
+ { QSL("codablockf"), BARCODE_HIBC_BLOCKF, 110 },
+ { QSL(""), -1, 111 },
+ { QSL("aztec"), BARCODE_HIBC_AZTEC, 112 },
+ { QSL(""), -1, 113 },
+ { QSL(""), -1, 114 },
+ { QSL("dotcode"), BARCODE_DOTCODE, 115 },
+ { QSL("hanxin"), BARCODE_HANXIN, 116 },
+ { QSL(""), -1, 117 },
+ { QSL(""), -1, 118 },
+ { QSL(""), -1, 119 },
+ { QSL(""), -1, 120 },
+ { QSL("mailmark"), BARCODE_MAILMARK, 121 },
+ { QSL(""), -1, 122 },
+ { QSL(""), -1, 123 },
+ { QSL(""), -1, 124 },
+ { QSL(""), -1, 125 },
+ { QSL(""), -1, 126 },
+ { QSL(""), -1, 127 },
+ { QSL("azrune"), BARCODE_AZRUNE, 128 },
+ { QSL("code32"), BARCODE_CODE32, 129 },
+ { QSL("eanx"), BARCODE_EANX_CC, 130 },
+ { QSL("code128"), BARCODE_GS1_128_CC, 131 },
+ { QSL("dbar_omn"), BARCODE_DBAR_OMN_CC, 132 },
+ { QSL("dbar_ltd"), BARCODE_DBAR_LTD_CC, 133 },
+ { QSL("dbar_exp"), BARCODE_DBAR_EXP_CC, 134 },
+ { QSL("upca"), BARCODE_UPCA_CC, 135 },
+ { QSL("upce"), BARCODE_UPCE_CC, 136 },
+ { QSL("dbar_stk"), BARCODE_DBAR_STK_CC, 137 },
+ { QSL("dbar_omnstk"), BARCODE_DBAR_OMNSTK_CC, 138 },
+ { QSL("dbar_expstk"), BARCODE_DBAR_EXPSTK_CC, 139 },
+ { QSL("channel"), BARCODE_CHANNEL, 140 },
+ { QSL("codeone"), BARCODE_CODEONE, 141 },
+ { QSL("gridmatrix"), BARCODE_GRIDMATRIX, 142 },
+ { QSL("upnqr"), BARCODE_UPNQR, 143 },
+ { QSL("ultra"), BARCODE_ULTRA, 144 },
+ { QSL("rmqr"), BARCODE_RMQR, 145 },
};
static const int data_size = sizeof(ndata) / sizeof(struct item);
if (symbology < 0 || symbology >= data_size) {
- return "";
+ return ndata[0].name; // ""
}
if (ndata[symbology].val != symbology ||
(ndata[symbology].define != -1 && ndata[symbology].define != symbology)) { // Self-check
fprintf(stderr, "MainWindow::get_setting_name: ndata table out of sync (%d)\n", symbology);
- return "";
+ return ndata[0].name; // ""
}
return ndata[symbology].name;
}
/* Helper to return index of selected radio button in group, checking for NULL */
-int MainWindow::get_button_group_index(const QStringList &children) {
+int MainWindow::get_rad_grp_index(const QStringList &names)
+{
if (m_optionWidget) {
QRadioButton *radioButton;
- for (int index = 0; index < children.size(); index++) {
- radioButton = m_optionWidget->findChild(children[index]);
+ for (int index = 0; index < names.size(); index++) {
+ radioButton = m_optionWidget->findChild(names[index]);
if (radioButton && radioButton->isChecked()) {
return index;
}
@@ -2154,15 +2491,16 @@ int MainWindow::get_button_group_index(const QStringList &children) {
}
/* Helper to set radio button in group from index in settings, checking for NULL */
-void MainWindow::set_radiobutton_from_setting(QSettings &settings, const QString &setting,
- const QStringList &children, int default_val) {
+void MainWindow::set_rad_from_setting(QSettings &settings, const QString &setting,
+ const QStringList &names, int default_val)
+{
if (m_optionWidget) {
int index = settings.value(setting, default_val).toInt();
QRadioButton *radioButton;
- if (index >= 0 && index < children.size()) {
- radioButton = m_optionWidget->findChild(children[index]);
+ if (index >= 0 && index < names.size()) {
+ radioButton = m_optionWidget->findChild(names[index]);
} else {
- radioButton = m_optionWidget->findChild(children[0]);
+ radioButton = m_optionWidget->findChild(names[0]);
}
if (radioButton) {
radioButton->setChecked(true);
@@ -2170,134 +2508,149 @@ void MainWindow::set_radiobutton_from_setting(QSettings &settings, const QString
}
}
+/* Helper to see if radio button checked, checking for NULL and whether enabled */
+bool MainWindow::get_rad_val(const QString &name)
+{
+ QRadioButton *radioButton = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
+ return radioButton && radioButton->isEnabled() && radioButton->isChecked();
+}
+
/* Helper to return index of selected item in combobox, checking for NULL */
-int MainWindow::get_combobox_index(const QString &child) {
- QComboBox *comboBox = m_optionWidget ? m_optionWidget->findChild(child) : nullptr;
+int MainWindow::get_cmb_index(const QString &name)
+{
+ QComboBox *comboBox = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
return comboBox ? comboBox->currentIndex() : 0;
}
/* Helper to set item in combobox from index in settings, checking for NULL */
-void MainWindow::set_combobox_from_setting(QSettings &settings, const QString &setting, const QString &child,
- int default_val) {
- QComboBox *comboBox = m_optionWidget ? m_optionWidget->findChild(child) : nullptr;
+void MainWindow::set_cmb_from_setting(QSettings &settings, const QString &setting, const QString &name,
+ int default_val)
+{
+ QComboBox *comboBox = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
if (comboBox) {
comboBox->setCurrentIndex(settings.value(setting, default_val).toInt());
}
}
/* Helper to return if checkbox checked, checking for NULL */
-int MainWindow::get_checkbox_val(const QString &child) {
- QCheckBox *checkBox = m_optionWidget ? m_optionWidget->findChild(child) : nullptr;
+int MainWindow::get_chk_val(const QString &name)
+{
+ QCheckBox *checkBox = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
return checkBox && checkBox->isChecked() ? 1 : 0;
}
/* Helper to set checkbox from settings, checking for NULL */
-void MainWindow::set_checkbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
- int default_val) {
- QCheckBox *checkBox = m_optionWidget ? m_optionWidget->findChild(child) : nullptr;
+void MainWindow::set_chk_from_setting(QSettings &settings, const QString &setting, const QString &name,
+ int default_val)
+{
+ QCheckBox *checkBox = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
if (checkBox) {
checkBox->setChecked(settings.value(setting, default_val).toInt() ? true : false);
}
}
/* Helper to return value of double spinner, checking for NULL */
-double MainWindow::get_doublespinbox_val(const QString &child) {
- QDoubleSpinBox *spinBox = m_optionWidget->findChild(child);
+double MainWindow::get_dspn_val(const QString &name)
+{
+ QDoubleSpinBox *spinBox = m_optionWidget->findChild(name);
return spinBox ? spinBox->value() : 0.0;
}
/* Helper to set double spinner from settings, checking for NULL */
-void MainWindow::set_doublespinbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
- float default_val) {
- QDoubleSpinBox *spinBox = m_optionWidget->findChild(child);
+void MainWindow::set_dspn_from_setting(QSettings &settings, const QString &setting, const QString &name,
+ float default_val)
+{
+ QDoubleSpinBox *spinBox = m_optionWidget->findChild(name);
if (spinBox) {
spinBox->setValue(settings.value(setting, default_val).toFloat());
}
}
/* Helper to return text of line edit, checking for NULL */
-QString MainWindow::get_lineedit_val(const QString &child) {
- QLineEdit *lineEdit = m_optionWidget ? m_optionWidget->findChild(child) : nullptr;
- return lineEdit ? lineEdit->text() : "";
+QString MainWindow::get_txt_val(const QString &name)
+{
+ QLineEdit *lineEdit = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
+ return lineEdit ? lineEdit->text() : QSL("");
}
/* Helper to set line edit from settings, checking for NULL */
-void MainWindow::set_lineedit_from_setting(QSettings &settings, const QString &setting, const QString &child,
- const char *default_val) {
- QLineEdit *lineEdit = m_optionWidget ? m_optionWidget->findChild(child) : nullptr;
+void MainWindow::set_txt_from_setting(QSettings &settings, const QString &setting, const QString &name,
+ const QString &default_val)
+{
+ QLineEdit *lineEdit = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
if (lineEdit) {
lineEdit->setText(settings.value(setting, default_val).toString());
}
}
/* Helper to return value of spin box, checking for NULL */
-int MainWindow::get_spinbox_val(const QString &child) {
- QSpinBox *spinBox = m_optionWidget ? m_optionWidget->findChild(child) : nullptr;
+int MainWindow::get_spn_val(const QString &name)
+{
+ QSpinBox *spinBox = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
return spinBox ? spinBox->value() : 0;
}
/* Helper to set spin box from settings, checking for NULL */
-void MainWindow::set_spinbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
- int default_val) {
- QSpinBox *spinBox = m_optionWidget ? m_optionWidget->findChild(child) : nullptr;
+void MainWindow::set_spn_from_setting(QSettings &settings, const QString &setting, const QString &name,
+ int default_val)
+{
+ QSpinBox *spinBox = m_optionWidget ? m_optionWidget->findChild(name) : nullptr;
if (spinBox) {
spinBox->setValue(settings.value(setting, default_val).toInt());
}
}
/* Save settings for an individual symbol */
-void MainWindow::save_sub_settings(QSettings &settings, int symbology) {
-
- const char *name = get_setting_name(symbology);
- if (*name) {
- settings.setValue(QString("studio/bc/%1/data").arg(name), txtData->text());
+void MainWindow::save_sub_settings(QSettings &settings, int symbology)
+{
+ const QString &name = get_setting_name(symbology);
+ if (!name.isEmpty()) {
+ settings.setValue(QSL("studio/bc/%1/data").arg(name), txtData->text());
if (!grpComposite->isHidden()) {
- settings.setValue(QString("studio/bc/%1/composite_text").arg(name), txtComposite->toPlainText());
- settings.setValue(QString("studio/bc/%1/chk_composite").arg(name), chkComposite->isChecked() ? 1 : 0);
- settings.setValue(QString("studio/bc/%1/comp_type").arg(name), cmbCompType->currentIndex());
+ settings.setValue(QSL("studio/bc/%1/composite_text").arg(name), txtComposite->toPlainText());
+ settings.setValue(QSL("studio/bc/%1/chk_composite").arg(name), chkComposite->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/comp_type").arg(name), cmbCompType->currentIndex());
}
if (cmbECI->isEnabled()) {
- settings.setValue(QString("studio/bc/%1/eci").arg(name), cmbECI->currentIndex());
+ settings.setValue(QSL("studio/bc/%1/eci").arg(name), cmbECI->currentIndex());
}
- settings.setValue(QString("studio/bc/%1/chk_escape").arg(name), chkEscape->isChecked() ? 1 : 0);
- settings.setValue(QString("studio/bc/%1/chk_data").arg(name), chkData->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/chk_escape").arg(name), chkEscape->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/chk_data").arg(name), chkData->isChecked() ? 1 : 0);
if (chkRInit->isEnabled()) {
- settings.setValue(QString("studio/bc/%1/chk_rinit").arg(name), chkRInit->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/chk_rinit").arg(name), chkRInit->isChecked() ? 1 : 0);
}
- settings.setValue(QString("studio/bc/%1/chk_gs1parens").arg(name), chkGS1Parens->isChecked() ? 1 : 0);
- settings.setValue(QString("studio/bc/%1/chk_gs1nocheck").arg(name), chkGS1NoCheck->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/chk_gs1parens").arg(name), chkGS1Parens->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/chk_gs1nocheck").arg(name), chkGS1NoCheck->isChecked() ? 1 : 0);
if (chkAutoHeight->isEnabled()) {
settings.setValue(
- QString("studio/bc/%1/appearance/autoheight").arg(name), chkAutoHeight->isChecked() ? 1 : 0);
- settings.setValue(QString("studio/bc/%1/appearance/height").arg(name), heightb->value());
+ QSL("studio/bc/%1/appearance/autoheight").arg(name), chkAutoHeight->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/appearance/height").arg(name), heightb->value());
}
- settings.setValue(QString("studio/bc/%1/appearance/border").arg(name), bwidth->value());
- settings.setValue(QString("studio/bc/%1/appearance/whitespace").arg(name), spnWhitespace->value());
- settings.setValue(QString("studio/bc/%1/appearance/vwhitespace").arg(name), spnVWhitespace->value());
- settings.setValue(QString("studio/bc/%1/appearance/scale").arg(name), spnScale->value());
- settings.setValue(QString("studio/bc/%1/appearance/border_type").arg(name), btype->currentIndex());
+ settings.setValue(QSL("studio/bc/%1/appearance/border").arg(name), bwidth->value());
+ settings.setValue(QSL("studio/bc/%1/appearance/whitespace").arg(name), spnWhitespace->value());
+ settings.setValue(QSL("studio/bc/%1/appearance/vwhitespace").arg(name), spnVWhitespace->value());
+ settings.setValue(QSL("studio/bc/%1/appearance/scale").arg(name), spnScale->value());
+ settings.setValue(QSL("studio/bc/%1/appearance/border_type").arg(name), btype->currentIndex());
if (chkHRTShow->isEnabled()) {
- settings.setValue(
- QString("studio/bc/%1/appearance/font_setting").arg(name), cmbFontSetting->currentIndex());
- settings.setValue(
- QString("studio/bc/%1/appearance/chk_hrt_show").arg(name), chkHRTShow->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/appearance/font_setting").arg(name), cmbFontSetting->currentIndex());
+ settings.setValue(QSL("studio/bc/%1/appearance/chk_hrt_show").arg(name), chkHRTShow->isChecked() ? 1 : 0);
}
- settings.setValue(QString("studio/bc/%1/appearance/chk_cmyk").arg(name), chkCMYK->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/appearance/chk_cmyk").arg(name), chkCMYK->isChecked() ? 1 : 0);
settings.setValue(
- QString("studio/bc/%1/appearance/chk_quietzones").arg(name), chkQuietZones->isChecked() ? 1 : 0);
- settings.setValue(QString("studio/bc/%1/appearance/rotate").arg(name), cmbRotate->currentIndex());
+ QSL("studio/bc/%1/appearance/chk_quietzones").arg(name), chkQuietZones->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/appearance/rotate").arg(name), cmbRotate->currentIndex());
if (symbology == BARCODE_DOTCODE || chkDotty->isEnabled()) {
- settings.setValue(QString("studio/bc/%1/appearance/chk_dotty").arg(name), chkDotty->isChecked() ? 1 : 0);
- settings.setValue(QString("studio/bc/%1/appearance/dot_size").arg(name), spnDotSize->value());
+ settings.setValue(QSL("studio/bc/%1/appearance/chk_dotty").arg(name), chkDotty->isChecked() ? 1 : 0);
+ settings.setValue(QSL("studio/bc/%1/appearance/dot_size").arg(name), spnDotSize->value());
}
- settings.setValue(QString("studio/bc/%1/ink/red").arg(name), m_fgcolor.red());
- settings.setValue(QString("studio/bc/%1/ink/green").arg(name), m_fgcolor.green());
- settings.setValue(QString("studio/bc/%1/ink/blue").arg(name), m_fgcolor.blue());
- settings.setValue(QString("studio/bc/%1/ink/alpha").arg(name), m_fgcolor.alpha());
- settings.setValue(QString("studio/bc/%1/paper/red").arg(name), m_bgcolor.red());
- settings.setValue(QString("studio/bc/%1/paper/green").arg(name), m_bgcolor.green());
- settings.setValue(QString("studio/bc/%1/paper/blue").arg(name), m_bgcolor.blue());
- settings.setValue(QString("studio/bc/%1/paper/alpha").arg(name), m_bgcolor.alpha());
+ settings.setValue(QSL("studio/bc/%1/ink/red").arg(name), m_fgcolor.red());
+ settings.setValue(QSL("studio/bc/%1/ink/green").arg(name), m_fgcolor.green());
+ settings.setValue(QSL("studio/bc/%1/ink/blue").arg(name), m_fgcolor.blue());
+ settings.setValue(QSL("studio/bc/%1/ink/alpha").arg(name), m_fgcolor.alpha());
+ settings.setValue(QSL("studio/bc/%1/paper/red").arg(name), m_bgcolor.red());
+ settings.setValue(QSL("studio/bc/%1/paper/green").arg(name), m_bgcolor.green());
+ settings.setValue(QSL("studio/bc/%1/paper/blue").arg(name), m_bgcolor.blue());
+ settings.setValue(QSL("studio/bc/%1/paper/alpha").arg(name), m_bgcolor.alpha());
}
switch (symbology) {
@@ -2306,340 +2659,346 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) {
case BARCODE_GS1_128:
case BARCODE_GS1_128_CC:
case BARCODE_HIBC_128:
- settings.setValue("studio/bc/code128/encoding_mode", get_button_group_index(
- QStringList() << "radC128Stand" << "radC128EAN" << "radC128CSup" << "radC128HIBC"));
+ settings.setValue(QSL("studio/bc/code128/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radC128Stand") << QSL("radC128EAN") << QSL("radC128CSup")
+ << QSL("radC128HIBC")));
break;
case BARCODE_PDF417:
case BARCODE_PDF417COMP:
case BARCODE_HIBC_PDF:
- settings.setValue("studio/bc/pdf417/cols", get_combobox_index("cmbPDFCols"));
- settings.setValue("studio/bc/pdf417/ecc", get_combobox_index("cmbPDFECC"));
- settings.setValue("studio/bc/pdf417/encoding_mode", get_button_group_index(
- QStringList() << "radPDFStand" << "radPDFTruncated" << "radPDFHIBC"));
- settings.setValue("studio/bc/pdf417/structapp_count", get_spinbox_val("spnPDFStructAppCount"));
- settings.setValue("studio/bc/pdf417/structapp_index", get_spinbox_val("spnPDFStructAppIndex"));
- settings.setValue("studio/bc/pdf417/structapp_id", get_lineedit_val("txtPDFStructAppID"));
+ settings.setValue(QSL("studio/bc/pdf417/cols"), get_cmb_index(QSL("cmbPDFCols")));
+ settings.setValue(QSL("studio/bc/pdf417/ecc"), get_cmb_index(QSL("cmbPDFECC")));
+ settings.setValue(QSL("studio/bc/pdf417/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radPDFStand") << QSL("radPDFTruncated") << QSL("radPDFHIBC")));
+ settings.setValue(QSL("studio/bc/pdf417/structapp_count"), get_spn_val(QSL("spnPDFStructAppCount")));
+ settings.setValue(QSL("studio/bc/pdf417/structapp_index"), get_spn_val(QSL("spnPDFStructAppIndex")));
+ settings.setValue(QSL("studio/bc/pdf417/structapp_id"), get_txt_val(QSL("txtPDFStructAppID")));
break;
case BARCODE_MICROPDF417:
case BARCODE_HIBC_MICPDF:
- settings.setValue("studio/bc/micropdf417/cols", get_combobox_index("cmbMPDFCols"));
- settings.setValue("studio/bc/micropdf417/encoding_mode", get_button_group_index(
- QStringList() << "radMPDFStand" << "radMPDFHIBC"));
- settings.setValue("studio/bc/micropdf417/structapp_count", get_spinbox_val("spnMPDFStructAppCount"));
- settings.setValue("studio/bc/micropdf417/structapp_index", get_spinbox_val("spnMPDFStructAppIndex"));
- settings.setValue("studio/bc/micropdf417/structapp_id", get_lineedit_val("txtMPDFStructAppID"));
+ settings.setValue(QSL("studio/bc/micropdf417/cols"), get_cmb_index(QSL("cmbMPDFCols")));
+ settings.setValue(QSL("studio/bc/micropdf417/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radMPDFStand") << QSL("radMPDFHIBC")));
+ settings.setValue(QSL("studio/bc/micropdf417/structapp_count"),
+ get_spn_val(QSL("spnMPDFStructAppCount")));
+ settings.setValue(QSL("studio/bc/micropdf417/structapp_index"),
+ get_spn_val(QSL("spnMPDFStructAppIndex")));
+ settings.setValue(QSL("studio/bc/micropdf417/structapp_id"), get_txt_val(QSL("txtMPDFStructAppID")));
break;
case BARCODE_DOTCODE:
- settings.setValue("studio/bc/dotcode/cols", get_combobox_index("cmbDotCols"));
- settings.setValue("studio/bc/dotcode/mask", get_combobox_index("cmbDotMask"));
- settings.setValue("studio/bc/dotcode/encoding_mode", get_button_group_index(
- QStringList() << "radDotStand" << "radDotGS1"));
- settings.setValue("studio/bc/dotcode/structapp_count", get_combobox_index("cmbDotStructAppCount"));
- settings.setValue("studio/bc/dotcode/structapp_index", get_combobox_index("cmbDotStructAppIndex"));
+ settings.setValue(QSL("studio/bc/dotcode/cols"), get_cmb_index(QSL("cmbDotCols")));
+ settings.setValue(QSL("studio/bc/dotcode/mask"), get_cmb_index(QSL("cmbDotMask")));
+ settings.setValue(QSL("studio/bc/dotcode/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radDotStand") << QSL("radDotGS1")));
+ settings.setValue(QSL("studio/bc/dotcode/structapp_count"), get_cmb_index(QSL("cmbDotStructAppCount")));
+ settings.setValue(QSL("studio/bc/dotcode/structapp_index"), get_cmb_index(QSL("cmbDotStructAppIndex")));
break;
case BARCODE_AZTEC:
case BARCODE_HIBC_AZTEC:
- settings.setValue("studio/bc/aztec/autoresizing", get_button_group_index(
- QStringList() << "radAztecAuto" << "radAztecSize" << "radAztecECC"));
- settings.setValue("studio/bc/aztec/size", get_combobox_index("cmbAztecSize"));
- settings.setValue("studio/bc/aztec/ecc", get_combobox_index("cmbAztecECC"));
- settings.setValue("studio/bc/aztec/encoding_mode", get_button_group_index(
- QStringList() << "radAztecStand" << "radAztecGS1" << "radAztecHIBC"));
- settings.setValue("studio/bc/aztec/structapp_count", get_combobox_index("cmbAztecStructAppCount"));
- settings.setValue("studio/bc/aztec/structapp_index", get_combobox_index("cmbAztecStructAppIndex"));
- settings.setValue("studio/bc/aztec/structapp_id", get_lineedit_val("txtAztecStructAppID"));
+ settings.setValue(QSL("studio/bc/aztec/autoresizing"), get_rad_grp_index(
+ QStringList() << QSL("radAztecAuto") << QSL("radAztecSize") << QSL("radAztecECC")));
+ settings.setValue(QSL("studio/bc/aztec/size"), get_cmb_index(QSL("cmbAztecSize")));
+ settings.setValue(QSL("studio/bc/aztec/ecc"), get_cmb_index(QSL("cmbAztecECC")));
+ settings.setValue(QSL("studio/bc/aztec/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radAztecStand") << QSL("radAztecGS1") << QSL("radAztecHIBC")));
+ settings.setValue(QSL("studio/bc/aztec/structapp_count"), get_cmb_index(QSL("cmbAztecStructAppCount")));
+ settings.setValue(QSL("studio/bc/aztec/structapp_index"), get_cmb_index(QSL("cmbAztecStructAppIndex")));
+ settings.setValue(QSL("studio/bc/aztec/structapp_id"), get_txt_val(QSL("txtAztecStructAppID")));
break;
case BARCODE_MSI_PLESSEY:
- settings.setValue("studio/bc/msi_plessey/check_digit", get_combobox_index("cmbMSICheck"));
- settings.setValue("studio/bc/msi_plessey/check_text", get_checkbox_val("chkMSICheckText"));
+ settings.setValue(QSL("studio/bc/msi_plessey/check_digit"), get_cmb_index(QSL("cmbMSICheck")));
+ settings.setValue(QSL("studio/bc/msi_plessey/check_text"), get_chk_val(QSL("chkMSICheckText")));
break;
case BARCODE_CODE11:
- settings.setValue("studio/bc/code11/check_digit", get_button_group_index(
- QStringList() << "radC11TwoCheckDigits" << "radC11OneCheckDigit" << "radC11NoCheckDigits"));
+ settings.setValue(QSL("studio/bc/code11/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radC11TwoCheckDigits") << QSL("radC11OneCheckDigit")
+ << QSL("radC11NoCheckDigits")));
break;
case BARCODE_C25STANDARD:
- settings.setValue("studio/bc/c25standard/check_digit", get_button_group_index(
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide"));
+ settings.setValue(QSL("studio/bc/c25standard/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")));
break;
case BARCODE_C25INTER:
- settings.setValue("studio/bc/c25inter/check_digit", get_button_group_index(
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide"));
+ settings.setValue(QSL("studio/bc/c25inter/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")));
break;
case BARCODE_C25IATA:
- settings.setValue("studio/bc/c25iata/check_digit", get_button_group_index(
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide"));
+ settings.setValue(QSL("studio/bc/c25iata/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")));
break;
case BARCODE_C25LOGIC:
- settings.setValue("studio/bc/c25logic/check_digit", get_button_group_index(
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide"));
+ settings.setValue(QSL("studio/bc/c25logic/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")));
break;
case BARCODE_C25IND:
- settings.setValue("studio/bc/c25ind/check_digit", get_button_group_index(
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide"));
+ settings.setValue(QSL("studio/bc/c25ind/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")));
break;
case BARCODE_CODE39:
case BARCODE_HIBC_39:
- settings.setValue("studio/bc/code39/check_digit", get_button_group_index(
- QStringList() << "radC39Stand" << "radC39Check" << "radC39HIBC"));
+ settings.setValue(QSL("studio/bc/code39/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radC39Stand") << QSL("radC39Check") << QSL("radC39HIBC")));
break;
case BARCODE_EXCODE39:
- settings.setValue("studio/bc/excode39/check_digit", get_button_group_index(
- QStringList() << "radC39Stand" << "radC39Check"));
+ settings.setValue(QSL("studio/bc/excode39/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radC39Stand") << QSL("radC39Check")));
break;
case BARCODE_LOGMARS:
- settings.setValue("studio/bc/logmars/check_digit", get_button_group_index(
- QStringList() << "radLOGMARSStand" << "radLOGMARSCheck"));
+ settings.setValue(QSL("studio/bc/logmars/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radLOGMARSStand") << QSL("radLOGMARSCheck")));
break;
case BARCODE_CODE16K:
- settings.setValue("studio/bc/code16k/row_sep_height", get_combobox_index("cmbC16kRowSepHeight"));
- settings.setValue("studio/bc/code16k/encoding_mode", get_button_group_index(
- QStringList() << "radC16kStand" << "radC16kGS1"));
- settings.setValue("studio/bc/code16k/chk_no_quiet_zones", get_checkbox_val("chkC16kNoQuietZones"));
+ settings.setValue(QSL("studio/bc/code16k/row_sep_height"), get_cmb_index(QSL("cmbC16kRowSepHeight")));
+ settings.setValue(QSL("studio/bc/code16k/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radC16kStand") << QSL("radC16kGS1")));
+ settings.setValue(QSL("studio/bc/code16k/chk_no_quiet_zones"), get_chk_val(QSL("chkC16kNoQuietZones")));
break;
case BARCODE_CODABAR:
- settings.setValue("studio/bc/codabar/chk_check_char", get_checkbox_val("chkCodabarCheck"));
+ settings.setValue(QSL("studio/bc/codabar/check_digit"), get_rad_grp_index(
+ QStringList() << QSL("radCodabarStand") << QSL("radCodabarCheckHide") << QSL("radCodabarCheck")));
break;
case BARCODE_CODABLOCKF:
case BARCODE_HIBC_BLOCKF:
- settings.setValue("studio/bc/codablockf/width", get_combobox_index("cmbCbfWidth"));
- settings.setValue("studio/bc/codablockf/height", get_combobox_index("cmbCbfHeight"));
- settings.setValue("studio/bc/codablockf/row_sep_height", get_combobox_index("cmbCbfRowSepHeight"));
- settings.setValue("studio/bc/codablockf/encoding_mode", get_button_group_index(
- QStringList() << "radCbfStand" << "radCbfHIBC"));
- settings.setValue("studio/bc/codablockf/chk_no_quiet_zones", get_checkbox_val("chkCbfNoQuietZones"));
+ settings.setValue(QSL("studio/bc/codablockf/width"), get_cmb_index(QSL("cmbCbfWidth")));
+ settings.setValue(QSL("studio/bc/codablockf/height"), get_cmb_index(QSL("cmbCbfHeight")));
+ settings.setValue(QSL("studio/bc/codablockf/row_sep_height"), get_cmb_index(QSL("cmbCbfRowSepHeight")));
+ settings.setValue(QSL("studio/bc/codablockf/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radCbfStand") << QSL("radCbfHIBC")));
+ settings.setValue(QSL("studio/bc/codablockf/chk_no_quiet_zones"), get_chk_val(QSL("chkCbfNoQuietZones")));
break;
case BARCODE_DAFT:
- settings.setValue("studio/bc/daft/tracker_ratio",
- QString::number(get_doublespinbox_val("spnDAFTTrackerRatio"), 'f', 1 /*precision*/));
+ settings.setValue(QSL("studio/bc/daft/tracker_ratio"),
+ QString::number(get_dspn_val(QSL("spnDAFTTrackerRatio")), 'f', 1 /*precision*/));
break;
case BARCODE_DATAMATRIX:
case BARCODE_HIBC_DM:
- settings.setValue("studio/bc/datamatrix/size", get_combobox_index("cmbDM200Size"));
- settings.setValue("studio/bc/datamatrix/encoding_mode", get_button_group_index(
- QStringList() << "radDM200Stand" << "radDM200GS1" << "radDM200HIBC"));
- settings.setValue("studio/bc/datamatrix/chk_suppress_rect", get_checkbox_val("chkDMRectangle"));
- settings.setValue("studio/bc/datamatrix/chk_allow_dmre", get_checkbox_val("chkDMRE"));
- settings.setValue("studio/bc/datamatrix/chk_gs_sep", get_checkbox_val("chkDMGSSep"));
- settings.setValue("studio/bc/datamatrix/structapp_count", get_combobox_index("cmbDMStructAppCount"));
- settings.setValue("studio/bc/datamatrix/structapp_index", get_combobox_index("cmbDMStructAppIndex"));
- settings.setValue("studio/bc/datamatrix/structapp_id", get_spinbox_val("spnDMStructAppID"));
- settings.setValue("studio/bc/datamatrix/structapp_id2", get_spinbox_val("spnDMStructAppID2"));
+ settings.setValue(QSL("studio/bc/datamatrix/size"), get_cmb_index(QSL("cmbDM200Size")));
+ settings.setValue(QSL("studio/bc/datamatrix/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radDM200Stand") << QSL("radDM200GS1") << QSL("radDM200HIBC")));
+ settings.setValue(QSL("studio/bc/datamatrix/chk_suppress_rect"), get_chk_val(QSL("chkDMRectangle")));
+ settings.setValue(QSL("studio/bc/datamatrix/chk_allow_dmre"), get_chk_val(QSL("chkDMRE")));
+ settings.setValue(QSL("studio/bc/datamatrix/chk_gs_sep"), get_chk_val(QSL("chkDMGSSep")));
+ settings.setValue(QSL("studio/bc/datamatrix/structapp_count"), get_cmb_index(QSL("cmbDMStructAppCount")));
+ settings.setValue(QSL("studio/bc/datamatrix/structapp_index"), get_cmb_index(QSL("cmbDMStructAppIndex")));
+ settings.setValue(QSL("studio/bc/datamatrix/structapp_id"), get_spn_val(QSL("spnDMStructAppID")));
+ settings.setValue(QSL("studio/bc/datamatrix/structapp_id2"), get_spn_val(QSL("spnDMStructAppID2")));
break;
case BARCODE_ITF14:
- settings.setValue("studio/bc/itf14/chk_no_quiet_zones", get_checkbox_val("chkITF14NoQuietZones"));
+ settings.setValue(QSL("studio/bc/itf14/chk_no_quiet_zones"), get_chk_val(QSL("chkITF14NoQuietZones")));
break;
case BARCODE_QRCODE:
case BARCODE_HIBC_QR:
- settings.setValue("studio/bc/qrcode/size", get_combobox_index("cmbQRSize"));
- settings.setValue("studio/bc/qrcode/ecc", get_combobox_index("cmbQRECC"));
- settings.setValue("studio/bc/qrcode/mask", get_combobox_index("cmbQRMask"));
- settings.setValue("studio/bc/qrcode/encoding_mode", get_button_group_index(
- QStringList() << "radDM200Stand" << "radQRGS1" << "radQRHIBC"));
- settings.setValue("studio/bc/qrcode/chk_full_multibyte", get_checkbox_val("chkQRFullMultibyte"));
- settings.setValue("studio/bc/qrcode/structapp_count", get_combobox_index("cmbQRStructAppCount"));
- settings.setValue("studio/bc/qrcode/structapp_index", get_combobox_index("cmbQRStructAppIndex"));
- settings.setValue("studio/bc/qrcode/structapp_id", get_spinbox_val("spnQRStructAppID"));
+ settings.setValue(QSL("studio/bc/qrcode/size"), get_cmb_index(QSL("cmbQRSize")));
+ settings.setValue(QSL("studio/bc/qrcode/ecc"), get_cmb_index(QSL("cmbQRECC")));
+ settings.setValue(QSL("studio/bc/qrcode/mask"), get_cmb_index(QSL("cmbQRMask")));
+ settings.setValue(QSL("studio/bc/qrcode/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radDM200Stand") << QSL("radQRGS1") << QSL("radQRHIBC")));
+ settings.setValue(QSL("studio/bc/qrcode/chk_full_multibyte"), get_chk_val(QSL("chkQRFullMultibyte")));
+ settings.setValue(QSL("studio/bc/qrcode/structapp_count"), get_cmb_index(QSL("cmbQRStructAppCount")));
+ settings.setValue(QSL("studio/bc/qrcode/structapp_index"), get_cmb_index(QSL("cmbQRStructAppIndex")));
+ settings.setValue(QSL("studio/bc/qrcode/structapp_id"), get_spn_val(QSL("spnQRStructAppID")));
break;
case BARCODE_RMQR:
- settings.setValue("studio/bc/rmqr/size", get_combobox_index("cmbRMQRSize"));
- settings.setValue("studio/bc/rmqr/ecc", get_combobox_index("cmbRMQRECC"));
- settings.setValue("studio/bc/rmqr/encoding_mode", get_button_group_index(
- QStringList() << "radQRStand" << "radRMQRGS1"));
- settings.setValue("studio/bc/rmqr/chk_full_multibyte", get_checkbox_val("chkRMQRFullMultibyte"));
+ settings.setValue(QSL("studio/bc/rmqr/size"), get_cmb_index(QSL("cmbRMQRSize")));
+ settings.setValue(QSL("studio/bc/rmqr/ecc"), get_cmb_index(QSL("cmbRMQRECC")));
+ settings.setValue(QSL("studio/bc/rmqr/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radQRStand") << QSL("radRMQRGS1")));
+ settings.setValue(QSL("studio/bc/rmqr/chk_full_multibyte"), get_chk_val(QSL("chkRMQRFullMultibyte")));
break;
case BARCODE_HANXIN:
- settings.setValue("studio/bc/hanxin/size", get_combobox_index("cmbHXSize"));
- settings.setValue("studio/bc/hanxin/ecc", get_combobox_index("cmbHXECC"));
- settings.setValue("studio/bc/hanxin/mask", get_combobox_index("cmbHXMask"));
- settings.setValue("studio/bc/hanxin/chk_full_multibyte", get_checkbox_val("chkHXFullMultibyte"));
+ settings.setValue(QSL("studio/bc/hanxin/size"), get_cmb_index(QSL("cmbHXSize")));
+ settings.setValue(QSL("studio/bc/hanxin/ecc"), get_cmb_index(QSL("cmbHXECC")));
+ settings.setValue(QSL("studio/bc/hanxin/mask"), get_cmb_index(QSL("cmbHXMask")));
+ settings.setValue(QSL("studio/bc/hanxin/chk_full_multibyte"), get_chk_val(QSL("chkHXFullMultibyte")));
break;
case BARCODE_MICROQR:
- settings.setValue("studio/bc/microqr/size", get_combobox_index("cmbMQRSize"));
- settings.setValue("studio/bc/microqr/ecc", get_combobox_index("cmbMQRECC"));
- settings.setValue("studio/bc/microqr/mask", get_combobox_index("cmbMQRMask"));
- settings.setValue("studio/bc/microqr/chk_full_multibyte", get_checkbox_val("chkMQRFullMultibyte"));
+ settings.setValue(QSL("studio/bc/microqr/size"), get_cmb_index(QSL("cmbMQRSize")));
+ settings.setValue(QSL("studio/bc/microqr/ecc"), get_cmb_index(QSL("cmbMQRECC")));
+ settings.setValue(QSL("studio/bc/microqr/mask"), get_cmb_index(QSL("cmbMQRMask")));
+ settings.setValue(QSL("studio/bc/microqr/chk_full_multibyte"), get_chk_val(QSL("chkMQRFullMultibyte")));
break;
case BARCODE_GRIDMATRIX:
- settings.setValue("studio/bc/gridmatrix/size", get_combobox_index("cmbGridSize"));
- settings.setValue("studio/bc/gridmatrix/ecc", get_combobox_index("cmbGridECC"));
- settings.setValue("studio/bc/gridmatrix/chk_full_multibyte", get_checkbox_val("chkGridFullMultibyte"));
- settings.setValue("studio/bc/gridmatrix/structapp_count", get_combobox_index("cmbGridStructAppCount"));
- settings.setValue("studio/bc/gridmatrix/structapp_index", get_combobox_index("cmbGridStructAppIndex"));
- settings.setValue("studio/bc/gridmatrix/structapp_id", get_spinbox_val("spnGridStructAppID"));
+ settings.setValue(QSL("studio/bc/gridmatrix/size"), get_cmb_index(QSL("cmbGridSize")));
+ settings.setValue(QSL("studio/bc/gridmatrix/ecc"), get_cmb_index(QSL("cmbGridECC")));
+ settings.setValue(QSL("studio/bc/gridmatrix/chk_full_multibyte"),
+ get_chk_val(QSL("chkGridFullMultibyte")));
+ settings.setValue(QSL("studio/bc/gridmatrix/structapp_count"),
+ get_cmb_index(QSL("cmbGridStructAppCount")));
+ settings.setValue(QSL("studio/bc/gridmatrix/structapp_index"),
+ get_cmb_index(QSL("cmbGridStructAppIndex")));
+ settings.setValue(QSL("studio/bc/gridmatrix/structapp_id"), get_spn_val(QSL("spnGridStructAppID")));
break;
case BARCODE_MAXICODE:
- settings.setValue("studio/bc/maxicode/mode", get_combobox_index("cmbMaxiMode"));
- settings.setValue("studio/bc/maxicode/scm_postcode", get_lineedit_val("txtMaxiSCMPostcode"));
- settings.setValue("studio/bc/maxicode/scm_country", get_spinbox_val("spnMaxiSCMCountry"));
- settings.setValue("studio/bc/maxicode/scm_service", get_spinbox_val("spnMaxiSCMService"));
- settings.setValue("studio/bc/maxicode/chk_scm_vv", get_checkbox_val("chkMaxiSCMVV"));
- settings.setValue("studio/bc/maxicode/spn_scm_vv", get_spinbox_val("spnMaxiSCMVV"));
- settings.setValue("studio/bc/maxicode/structapp_count", get_combobox_index("cmbMaxiStructAppCount"));
- settings.setValue("studio/bc/maxicode/structapp_index", get_combobox_index("cmbMaxiStructAppIndex"));
+ settings.setValue(QSL("studio/bc/maxicode/mode"), get_cmb_index(QSL("cmbMaxiMode")));
+ settings.setValue(QSL("studio/bc/maxicode/scm_postcode"), get_txt_val(QSL("txtMaxiSCMPostcode")));
+ settings.setValue(QSL("studio/bc/maxicode/scm_country"), get_spn_val(QSL("spnMaxiSCMCountry")));
+ settings.setValue(QSL("studio/bc/maxicode/scm_service"), get_spn_val(QSL("spnMaxiSCMService")));
+ settings.setValue(QSL("studio/bc/maxicode/chk_scm_vv"), get_chk_val(QSL("chkMaxiSCMVV")));
+ settings.setValue(QSL("studio/bc/maxicode/spn_scm_vv"), get_spn_val(QSL("spnMaxiSCMVV")));
+ settings.setValue(QSL("studio/bc/maxicode/structapp_count"), get_cmb_index(QSL("cmbMaxiStructAppCount")));
+ settings.setValue(QSL("studio/bc/maxicode/structapp_index"), get_cmb_index(QSL("cmbMaxiStructAppIndex")));
break;
case BARCODE_CODEONE:
- settings.setValue("studio/bc/codeone/size", get_combobox_index("cmbC1Size"));
- settings.setValue("studio/bc/codeone/encoding_mode", get_button_group_index(
- QStringList() << "radC1Stand" << "radC1GS1"));
- settings.setValue("studio/bc/codeone/structapp_count", get_spinbox_val("spnC1StructAppCount"));
- settings.setValue("studio/bc/codeone/structapp_index", get_spinbox_val("spnC1StructAppIndex"));
+ settings.setValue(QSL("studio/bc/codeone/size"), get_cmb_index(QSL("cmbC1Size")));
+ settings.setValue(QSL("studio/bc/codeone/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radC1Stand") << QSL("radC1GS1")));
+ settings.setValue(QSL("studio/bc/codeone/structapp_count"), get_spn_val(QSL("spnC1StructAppCount")));
+ settings.setValue(QSL("studio/bc/codeone/structapp_index"), get_spn_val(QSL("spnC1StructAppIndex")));
break;
case BARCODE_CODE49:
- settings.setValue("studio/bc/code49/row_sep_height", get_combobox_index("cmbC49RowSepHeight"));
- settings.setValue("studio/bc/code49/encoding_mode", get_button_group_index(
- QStringList() << "radC49Stand" << "radC49GS1"));
- settings.setValue("studio/bc/code49/chk_no_quiet_zones", get_checkbox_val("chkC49NoQuietZones"));
+ settings.setValue(QSL("studio/bc/code49/row_sep_height"), get_cmb_index(QSL("cmbC49RowSepHeight")));
+ settings.setValue(QSL("studio/bc/code49/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radC49Stand") << QSL("radC49GS1")));
+ settings.setValue(QSL("studio/bc/code49/chk_no_quiet_zones"), get_chk_val(QSL("chkC49NoQuietZones")));
break;
case BARCODE_CODE93:
- settings.setValue("studio/bc/code93/chk_show_checks", get_checkbox_val("chkC93ShowChecks"));
+ settings.setValue(QSL("studio/bc/code93/chk_show_checks"), get_chk_val(QSL("chkC93ShowChecks")));
break;
case BARCODE_DBAR_EXPSTK:
case BARCODE_DBAR_EXPSTK_CC:
- settings.setValue("studio/bc/dbar_expstk/cols", get_combobox_index("cmbCols"));
+ settings.setValue(QSL("studio/bc/dbar_expstk/cols"), get_cmb_index(QSL("cmbCols")));
break;
case BARCODE_ULTRA:
- settings.setValue("studio/bc/ultra/autoresizing", get_button_group_index(
- QStringList() << "radUltraAuto" << "radUltraEcc"));
- settings.setValue("studio/bc/ultra/ecc", get_combobox_index("cmbUltraEcc"));
- settings.setValue("studio/bc/ultra/revision", get_combobox_index("cmbUltraRevision"));
- settings.setValue("studio/bc/ultra/encoding_mode", get_button_group_index(
- QStringList() << "radUltraStand" << "radUltraGS1"));
- settings.setValue("studio/bc/ultra/structapp_count", get_combobox_index("cmbUltraStructAppCount"));
- settings.setValue("studio/bc/ultra/structapp_index", get_combobox_index("cmbUltraStructAppIndex"));
- settings.setValue("studio/bc/ultra/structapp_id", get_spinbox_val("spnUltraStructAppID"));
+ settings.setValue(QSL("studio/bc/ultra/autoresizing"), get_rad_grp_index(
+ QStringList() << QSL("radUltraAuto") << QSL("radUltraEcc")));
+ settings.setValue(QSL("studio/bc/ultra/ecc"), get_cmb_index(QSL("cmbUltraEcc")));
+ settings.setValue(QSL("studio/bc/ultra/revision"), get_cmb_index(QSL("cmbUltraRevision")));
+ settings.setValue(QSL("studio/bc/ultra/encoding_mode"), get_rad_grp_index(
+ QStringList() << QSL("radUltraStand") << QSL("radUltraGS1")));
+ settings.setValue(QSL("studio/bc/ultra/structapp_count"), get_cmb_index(QSL("cmbUltraStructAppCount")));
+ settings.setValue(QSL("studio/bc/ultra/structapp_index"), get_cmb_index(QSL("cmbUltraStructAppIndex")));
+ settings.setValue(QSL("studio/bc/ultra/structapp_id"), get_spn_val(QSL("spnUltraStructAppID")));
break;
case BARCODE_UPCA:
case BARCODE_UPCA_CHK:
case BARCODE_UPCA_CC:
- settings.setValue("studio/bc/upca/addongap", get_combobox_index("cmbUPCAAddonGap"));
- settings.setValue("studio/bc/upca/guard_descent",
- QString::number(get_doublespinbox_val("spnUPCAGuardDescent"), 'f', 3 /*precision*/));
- settings.setValue("studio/bc/upca/chk_no_quiet_zones", get_checkbox_val("chkUPCANoQuietZones"));
+ settings.setValue(QSL("studio/bc/upca/addongap"), get_cmb_index(QSL("cmbUPCAAddonGap")));
+ settings.setValue(QSL("studio/bc/upca/guard_descent"),
+ QString::number(get_dspn_val(QSL("spnUPCAGuardDescent")), 'f', 3 /*precision*/));
+ settings.setValue(QSL("studio/bc/upca/chk_no_quiet_zones"), get_chk_val(QSL("chkUPCANoQuietZones")));
break;
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EANX_CC:
- settings.setValue("studio/bc/eanx/addongap", get_combobox_index("cmbUPCEANAddonGap"));
- settings.setValue("studio/bc/eanx/guard_descent",
- QString::number(get_doublespinbox_val("spnUPCEANGuardDescent"), 'f', 3 /*precision*/));
- settings.setValue("studio/bc/eanx/chk_no_quiet_zones", get_checkbox_val("chkUPCEANNoQuietZones"));
+ settings.setValue(QSL("studio/bc/eanx/addongap"), get_cmb_index(QSL("cmbUPCEANAddonGap")));
+ settings.setValue(QSL("studio/bc/eanx/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")));
break;
case BARCODE_UPCE:
case BARCODE_UPCE_CHK:
case BARCODE_UPCE_CC:
- settings.setValue("studio/bc/upce/addongap", get_combobox_index("cmbUPCEANAddonGap"));
- settings.setValue("studio/bc/upce/guard_descent",
- QString::number(get_doublespinbox_val("spnUPCEANGuardDescent"), 'f', 3 /*precision*/));
- settings.setValue("studio/bc/upce/chk_no_quiet_zones", get_checkbox_val("chkUPCEANNoQuietZones"));
+ settings.setValue(QSL("studio/bc/upce/addongap"), get_cmb_index(QSL("cmbUPCEANAddonGap")));
+ settings.setValue(QSL("studio/bc/upce/guard_descent"),
+ QString::number(get_dspn_val(QSL("spnUPCEANGuardDescent")), 'f', 3 /*precision*/));
+ settings.setValue(QSL("studio/bc/upce/chk_no_quiet_zones"), get_chk_val(QSL("chkUPCEANNoQuietZones")));
break;
case BARCODE_ISBNX:
- settings.setValue("studio/bc/isnbx/addongap", get_combobox_index("cmbUPCEANAddonGap"));
- settings.setValue("studio/bc/isnbx/guard_descent",
- QString::number(get_doublespinbox_val("spnUPCEANGuardDescent"), 'f', 3 /*precision*/));
- settings.setValue("studio/bc/isnbx/chk_no_quiet_zones", get_checkbox_val("chkUPCEANNoQuietZones"));
+ settings.setValue(QSL("studio/bc/isnbx/addongap"), get_cmb_index(QSL("cmbUPCEANAddonGap")));
+ settings.setValue(QSL("studio/bc/isnbx/guard_descent"),
+ QString::number(get_dspn_val(QSL("spnUPCEANGuardDescent")), 'f', 3 /*precision*/));
+ settings.setValue(QSL("studio/bc/isnbx/chk_no_quiet_zones"), get_chk_val(QSL("chkUPCEANNoQuietZones")));
break;
case BARCODE_VIN:
- settings.setValue("studio/bc/vin/chk_import_char_prefix", get_checkbox_val("chkVINImportChar"));
+ settings.setValue(QSL("studio/bc/vin/chk_import_char_prefix"), get_chk_val(QSL("chkVINImportChar")));
break;
}
}
/* Load settings for an individual symbol */
-void MainWindow::load_sub_settings(QSettings &settings, int symbology) {
-
- const char *name = get_setting_name(symbology);
- if (*name) {
- const QString &tdata = settings.value(QString("studio/bc/%1/data").arg(name), "").toString();
+void MainWindow::load_sub_settings(QSettings &settings, int symbology)
+{
+ const QString &name = get_setting_name(symbology);
+ if (!name.isEmpty()) {
+ const QString &tdata = settings.value(QSL("studio/bc/%1/data").arg(name), QSL("")).toString();
if (!tdata.isEmpty()) {
txtData->setText(tdata);
}
if (!grpComposite->isHidden()) {
const QString &composite_text = settings.value(
- QString("studio/bc/%1/composite_text").arg(name), "").toString();
+ QSL("studio/bc/%1/composite_text").arg(name), QSL("")).toString();
if (!composite_text.isEmpty()) {
txtComposite->setText(composite_text);
}
chkComposite->setChecked(settings.value(
- QString("studio/bc/%1/chk_composite").arg(name), 0).toInt() ? true : false);
- cmbCompType->setCurrentIndex(settings.value(QString("studio/bc/%1/comp_type").arg(name), 0).toInt());
+ QSL("studio/bc/%1/chk_composite").arg(name), 0).toInt() ? true : false);
+ cmbCompType->setCurrentIndex(settings.value(QSL("studio/bc/%1/comp_type").arg(name), 0).toInt());
}
if (cmbECI->isEnabled()) {
- cmbECI->setCurrentIndex(settings.value(QString("studio/bc/%1/eci").arg(name), 0).toInt());
+ cmbECI->setCurrentIndex(settings.value(QSL("studio/bc/%1/eci").arg(name), 0).toInt());
}
- chkEscape->setChecked(settings.value(QString("studio/bc/%1/chk_escape").arg(name)).toInt() ? true : false);
- chkData->setChecked(settings.value(QString("studio/bc/%1/chk_data").arg(name)).toInt() ? true : false);
+ chkEscape->setChecked(settings.value(QSL("studio/bc/%1/chk_escape").arg(name)).toInt() ? true : false);
+ chkData->setChecked(settings.value(QSL("studio/bc/%1/chk_data").arg(name)).toInt() ? true : false);
if (chkRInit->isEnabled()) {
- chkRInit->setChecked(settings.value(QString("studio/bc/%1/chk_rinit").arg(name)).toInt() ? true : false);
+ chkRInit->setChecked(settings.value(QSL("studio/bc/%1/chk_rinit").arg(name)).toInt() ? true : false);
}
- chkGS1Parens->setChecked(settings.value(
- QString("studio/bc/%1/chk_gs1parens").arg(name)).toInt() ? true : false);
+ chkGS1Parens->setChecked(settings.value(QSL("studio/bc/%1/chk_gs1parens").arg(name)).toInt() ? true : false);
chkGS1NoCheck->setChecked(settings.value(
- QString("studio/bc/%1/chk_gs1nocheck").arg(name)).toInt() ? true : false);
+ QSL("studio/bc/%1/chk_gs1nocheck").arg(name)).toInt() ? true : false);
if (chkAutoHeight->isEnabled()) {
chkAutoHeight->setChecked(settings.value(
- QString("studio/bc/%1/appearance/autoheight").arg(name), 1).toInt() ? true : false);
- heightb->setValue(settings.value(QString("studio/bc/%1/appearance/height").arg(name), 50.0f).toFloat());
+ QSL("studio/bc/%1/appearance/autoheight").arg(name), 1).toInt() ? true : false);
+ heightb->setValue(settings.value(QSL("studio/bc/%1/appearance/height").arg(name), 50.0f).toFloat());
}
- bwidth->setValue(settings.value(QString("studio/bc/%1/appearance/border").arg(name), 0).toInt());
- spnWhitespace->setValue(settings.value(QString("studio/bc/%1/appearance/whitespace").arg(name), 0).toInt());
- spnVWhitespace->setValue(settings.value(QString("studio/bc/%1/appearance/vwhitespace").arg(name), 0).toInt());
- spnScale->setValue(settings.value(QString("studio/bc/%1/appearance/scale").arg(name), 1.0).toFloat());
- btype->setCurrentIndex(settings.value(QString("studio/bc/%1/appearance/border_type").arg(name), 0).toInt());
+ bwidth->setValue(settings.value(QSL("studio/bc/%1/appearance/border").arg(name), 0).toInt());
+ spnWhitespace->setValue(settings.value(QSL("studio/bc/%1/appearance/whitespace").arg(name), 0).toInt());
+ spnVWhitespace->setValue(settings.value(QSL("studio/bc/%1/appearance/vwhitespace").arg(name), 0).toInt());
+ spnScale->setValue(settings.value(QSL("studio/bc/%1/appearance/scale").arg(name), 1.0).toFloat());
+ btype->setCurrentIndex(settings.value(QSL("studio/bc/%1/appearance/border_type").arg(name), 0).toInt());
if (chkHRTShow->isEnabled()) {
cmbFontSetting->setCurrentIndex(settings.value(
- QString("studio/bc/%1/appearance/font_setting").arg(name), 0).toInt());
+ QSL("studio/bc/%1/appearance/font_setting").arg(name), 0).toInt());
chkHRTShow->setChecked(settings.value(
- QString("studio/bc/%1/appearance/chk_hrt_show").arg(name), 1).toInt() ? true : false);
+ QSL("studio/bc/%1/appearance/chk_hrt_show").arg(name), 1).toInt() ? true : false);
}
- chkCMYK->setChecked(settings.value(
- QString("studio/bc/%1/appearance/cmyk").arg(name), 0).toInt() ? true : false);
- cmbRotate->setCurrentIndex(settings.value(QString("studio/bc/%1/appearance/rotate").arg(name), 0).toInt());
+ chkCMYK->setChecked(settings.value(QSL("studio/bc/%1/appearance/cmyk").arg(name), 0).toInt() ? true : false);
+ cmbRotate->setCurrentIndex(settings.value(QSL("studio/bc/%1/appearance/rotate").arg(name), 0).toInt());
if (symbology == BARCODE_DOTCODE || chkDotty->isEnabled()) {
chkDotty->setChecked(settings.value(
- QString("studio/bc/%1/appearance/chk_dotty").arg(name), 0).toInt() ? true : false);
+ QSL("studio/bc/%1/appearance/chk_dotty").arg(name), 0).toInt() ? true : false);
spnDotSize->setValue(settings.value(
- QString("studio/bc/%1/appearance/dot_size").arg(name), 0.4f / 0.5f).toFloat());
+ QSL("studio/bc/%1/appearance/dot_size").arg(name), 0.4f / 0.5f).toFloat());
}
- m_fgcolor.setRgb(settings.value(QString("studio/bc/%1/ink/red").arg(name), 0).toInt(),
- settings.value(QString("studio/bc/%1/ink/green").arg(name), 0).toInt(),
- settings.value(QString("studio/bc/%1/ink/blue").arg(name), 0).toInt(),
- settings.value(QString("studio/bc/%1/ink/alpha").arg(name), 0xff).toInt());
- m_bgcolor.setRgb(settings.value(QString("studio/bc/%1/paper/red").arg(name), 0xff).toInt(),
- settings.value(QString("studio/bc/%1/paper/green").arg(name), 0xff).toInt(),
- settings.value(QString("studio/bc/%1/paper/blue").arg(name), 0xff).toInt(),
- settings.value(QString("studio/bc/%1/paper/alpha").arg(name), 0xff).toInt());
+ m_fgcolor.setRgb(settings.value(QSL("studio/bc/%1/ink/red").arg(name), 0).toInt(),
+ settings.value(QSL("studio/bc/%1/ink/green").arg(name), 0).toInt(),
+ settings.value(QSL("studio/bc/%1/ink/blue").arg(name), 0).toInt(),
+ settings.value(QSL("studio/bc/%1/ink/alpha").arg(name), 0xff).toInt());
+ m_bgcolor.setRgb(settings.value(QSL("studio/bc/%1/paper/red").arg(name), 0xff).toInt(),
+ settings.value(QSL("studio/bc/%1/paper/green").arg(name), 0xff).toInt(),
+ settings.value(QSL("studio/bc/%1/paper/blue").arg(name), 0xff).toInt(),
+ settings.value(QSL("studio/bc/%1/paper/alpha").arg(name), 0xff).toInt());
}
switch (symbology) {
@@ -2648,268 +3007,277 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) {
case BARCODE_GS1_128:
case BARCODE_GS1_128_CC:
case BARCODE_HIBC_128:
- set_radiobutton_from_setting(settings, "studio/bc/code128/encoding_mode",
- QStringList() << "radC128Stand" << "radC128EAN" << "radC128CSup" << "radC128HIBC");
+ set_rad_from_setting(settings, QSL("studio/bc/code128/encoding_mode"),
+ QStringList() << QSL("radC128Stand") << QSL("radC128EAN") << QSL("radC128CSup")
+ << QSL("radC128HIBC"));
break;
case BARCODE_PDF417:
case BARCODE_PDF417COMP:
case BARCODE_HIBC_PDF:
- set_combobox_from_setting(settings, "studio/bc/pdf417/cols", "cmbPDFCols");
- set_combobox_from_setting(settings, "studio/bc/pdf417/ecc", "cmbPDFECC");
- set_radiobutton_from_setting(settings, "studio/bc/pdf417/encoding_mode",
- QStringList() << "radPDFStand" << "radPDFTruncated" << "radPDFHIBC");
- set_spinbox_from_setting(settings, "studio/bc/pdf417/structapp_count", "spnPDFStructAppCount", 1);
- set_spinbox_from_setting(settings, "studio/bc/pdf417/structapp_index", "spnPDFStructAppIndex", 0);
- set_lineedit_from_setting(settings, "studio/bc/pdf417/structapp_id", "txtPDFStructAppID", "");
+ set_cmb_from_setting(settings, QSL("studio/bc/pdf417/cols"), QSL("cmbPDFCols"));
+ set_cmb_from_setting(settings, QSL("studio/bc/pdf417/ecc"), QSL("cmbPDFECC"));
+ set_rad_from_setting(settings, QSL("studio/bc/pdf417/encoding_mode"),
+ QStringList() << QSL("radPDFStand") << QSL("radPDFTruncated") << QSL("radPDFHIBC"));
+ set_spn_from_setting(settings, QSL("studio/bc/pdf417/structapp_count"), QSL("spnPDFStructAppCount"), 1);
+ set_spn_from_setting(settings, QSL("studio/bc/pdf417/structapp_index"), QSL("spnPDFStructAppIndex"), 0);
+ set_txt_from_setting(settings, QSL("studio/bc/pdf417/structapp_id"), QSL("txtPDFStructAppID"), QSL(""));
break;
case BARCODE_MICROPDF417:
case BARCODE_HIBC_MICPDF:
- set_combobox_from_setting(settings, "studio/bc/micropdf417/cols", "cmbMPDFCols");
- set_radiobutton_from_setting(settings, "studio/bc/micropdf417/encoding_mode",
- QStringList() << "radMPDFStand" << "radMPDFHIBC");
- set_spinbox_from_setting(settings, "studio/bc/micropdf417/structapp_count", "spnMPDFStructAppCount", 1);
- set_spinbox_from_setting(settings, "studio/bc/micropdf417/structapp_index", "spnMPDFStructAppIndex", 0);
- set_lineedit_from_setting(settings, "studio/bc/micropdf417/structapp_id", "txtMPDFStructAppID", "");
+ set_cmb_from_setting(settings, QSL("studio/bc/micropdf417/cols"), QSL("cmbMPDFCols"));
+ set_rad_from_setting(settings, QSL("studio/bc/micropdf417/encoding_mode"),
+ QStringList() << QSL("radMPDFStand") << QSL("radMPDFHIBC"));
+ set_spn_from_setting(settings, QSL("studio/bc/micropdf417/structapp_count"),
+ QSL("spnMPDFStructAppCount"), 1);
+ set_spn_from_setting(settings, QSL("studio/bc/micropdf417/structapp_index"),
+ QSL("spnMPDFStructAppIndex"), 0);
+ set_txt_from_setting(settings, QSL("studio/bc/micropdf417/structapp_id"), QSL("txtMPDFStructAppID"),
+ QSL(""));
break;
case BARCODE_DOTCODE:
- set_combobox_from_setting(settings, "studio/bc/dotcode/cols", "cmbDotCols");
- set_combobox_from_setting(settings, "studio/bc/dotcode/mask", "cmbDotMask");
- set_radiobutton_from_setting(settings, "studio/bc/dotcode/encoding_mode",
- QStringList() << "radDotStand" << "radDotGS1");
- set_combobox_from_setting(settings, "studio/bc/dotcode/structapp_count", "cmbDotStructAppCount");
- set_combobox_from_setting(settings, "studio/bc/dotcode/structapp_index", "cmbDotStructAppIndex");
+ set_cmb_from_setting(settings, QSL("studio/bc/dotcode/cols"), QSL("cmbDotCols"));
+ set_cmb_from_setting(settings, QSL("studio/bc/dotcode/mask"), QSL("cmbDotMask"));
+ set_rad_from_setting(settings, QSL("studio/bc/dotcode/encoding_mode"),
+ QStringList() << QSL("radDotStand") << QSL("radDotGS1"));
+ set_cmb_from_setting(settings, QSL("studio/bc/dotcode/structapp_count"), QSL("cmbDotStructAppCount"));
+ set_cmb_from_setting(settings, QSL("studio/bc/dotcode/structapp_index"), QSL("cmbDotStructAppIndex"));
break;
case BARCODE_AZTEC:
case BARCODE_HIBC_AZTEC:
- set_radiobutton_from_setting(settings, "studio/bc/aztec/autoresizing",
- QStringList() << "radAztecAuto" << "radAztecSize" << "radAztecECC");
- set_combobox_from_setting(settings, "studio/bc/aztec/size", "cmbAztecSize");
- set_combobox_from_setting(settings, "studio/bc/aztec/ecc", "cmbAztecECC");
- set_radiobutton_from_setting(settings, "studio/bc/aztec/encoding_mode",
- QStringList() << "radAztecStand" << "radAztecGS1" << "radAztecHIBC");
- set_combobox_from_setting(settings, "studio/bc/aztec/structapp_count", "cmbAztecStructAppCount");
- set_combobox_from_setting(settings, "studio/bc/aztec/structapp_index", "cmbAztecStructAppIndex");
- set_lineedit_from_setting(settings, "studio/bc/aztec/structapp_id", "txtAztecStructAppID", "");
+ set_rad_from_setting(settings, QSL("studio/bc/aztec/autoresizing"),
+ QStringList() << QSL("radAztecAuto") << QSL("radAztecSize") << QSL("radAztecECC"));
+ set_cmb_from_setting(settings, QSL("studio/bc/aztec/size"), QSL("cmbAztecSize"));
+ set_cmb_from_setting(settings, QSL("studio/bc/aztec/ecc"), QSL("cmbAztecECC"));
+ set_rad_from_setting(settings, QSL("studio/bc/aztec/encoding_mode"),
+ QStringList() << QSL("radAztecStand") << QSL("radAztecGS1") << QSL("radAztecHIBC"));
+ set_cmb_from_setting(settings, QSL("studio/bc/aztec/structapp_count"), QSL("cmbAztecStructAppCount"));
+ set_cmb_from_setting(settings, QSL("studio/bc/aztec/structapp_index"), QSL("cmbAztecStructAppIndex"));
+ set_txt_from_setting(settings, QSL("studio/bc/aztec/structapp_id"), QSL("txtAztecStructAppID"), QSL(""));
break;
case BARCODE_MSI_PLESSEY:
- set_combobox_from_setting(settings, "studio/bc/msi_plessey/check_digit", "cmbMSICheck");
- set_checkbox_from_setting(settings, "studio/bc/msi_plessey/check_text", "chkMSICheckText");
+ set_cmb_from_setting(settings, QSL("studio/bc/msi_plessey/check_digit"), QSL("cmbMSICheck"));
+ set_chk_from_setting(settings, QSL("studio/bc/msi_plessey/check_text"), QSL("chkMSICheckText"));
msi_plessey_ui_set();
break;
case BARCODE_CODE11:
- set_radiobutton_from_setting(settings, "studio/bc/code11/check_digit",
- QStringList() << "radC11TwoCheckDigits" << "radC11OneCheckDigit" << "radC11NoCheckDigits");
+ set_rad_from_setting(settings, QSL("studio/bc/code11/check_digit"),
+ QStringList() << QSL("radC11TwoCheckDigits") << QSL("radC11OneCheckDigit")
+ << QSL("radC11NoCheckDigits"));
break;
case BARCODE_C25STANDARD:
- set_radiobutton_from_setting(settings, "studio/bc/c25standard/check_digit",
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide");
+ set_rad_from_setting(settings, QSL("studio/bc/c25standard/check_digit"),
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide"));
break;
case BARCODE_C25INTER:
- set_radiobutton_from_setting(settings, "studio/bc/c25inter/check_digit",
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide");
+ set_rad_from_setting(settings, QSL("studio/bc/c25inter/check_digit"),
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide"));
break;
case BARCODE_C25IATA:
- set_radiobutton_from_setting(settings, "studio/bc/c25iata/check_digit",
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide");
+ set_rad_from_setting(settings, QSL("studio/bc/c25iata/check_digit"),
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide"));
break;
case BARCODE_C25LOGIC:
- set_radiobutton_from_setting(settings, "studio/bc/c25logic/check_digit",
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide");
+ set_rad_from_setting(settings, QSL("studio/bc/c25logic/check_digit"),
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide"));
break;
case BARCODE_C25IND:
- set_radiobutton_from_setting(settings, "studio/bc/c25ind/check_digit",
- QStringList() << "radC25Stand" << "radC25Check" << "radC25CheckHide");
+ set_rad_from_setting(settings, QSL("studio/bc/c25ind/check_digit"),
+ QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide"));
break;
case BARCODE_CODE39:
case BARCODE_HIBC_39:
- set_radiobutton_from_setting(settings, "studio/bc/code39/check_digit",
- QStringList() << "radC39Stand" << "radC39Check" << "radC39HIBC");
+ set_rad_from_setting(settings, QSL("studio/bc/code39/check_digit"),
+ QStringList() << QSL("radC39Stand") << QSL("radC39Check") << QSL("radC39HIBC"));
break;
case BARCODE_EXCODE39:
- set_radiobutton_from_setting(settings, "studio/bc/excode39/check_digit",
- QStringList() << "radC39Stand" << "radC39Check");
+ set_rad_from_setting(settings, QSL("studio/bc/excode39/check_digit"),
+ QStringList() << QSL("radC39Stand") << QSL("radC39Check"));
break;
case BARCODE_LOGMARS:
- set_radiobutton_from_setting(settings, "studio/bc/logmars/check_digit",
- QStringList() << "radLOGMARSStand" << "radLOGMARSCheck");
+ set_rad_from_setting(settings, QSL("studio/bc/logmars/check_digit"),
+ QStringList() << QSL("radLOGMARSStand") << QSL("radLOGMARSCheck"));
break;
case BARCODE_CODE16K:
- set_combobox_from_setting(settings, "studio/bc/code16k/row_sep_height", "cmbC16kRowSepHeight");
- set_radiobutton_from_setting(settings, "studio/bc/code16k/encoding_mode",
- QStringList() << "radC16kStand" << "radC16kGS1");
- set_checkbox_from_setting(settings, "studio/bc/code16k/chk_no_quiet_zones", "chkC16kNoQuietZones");
+ set_cmb_from_setting(settings, QSL("studio/bc/code16k/row_sep_height"), QSL("cmbC16kRowSepHeight"));
+ set_rad_from_setting(settings, QSL("studio/bc/code16k/encoding_mode"),
+ QStringList() << QSL("radC16kStand") << QSL("radC16kGS1"));
+ set_chk_from_setting(settings, QSL("studio/bc/code16k/chk_no_quiet_zones"), QSL("chkC16kNoQuietZones"));
break;
case BARCODE_CODABAR:
- set_checkbox_from_setting(settings, "studio/bc/codabar/chk_check_char", "chkCodabarCheck");
+ set_rad_from_setting(settings, QSL("studio/bc/codabar/check_digit"),
+ QStringList() << QSL("radCodabarStand") << QSL("radCodabarCheckHide") << QSL("radCodabarCheck"));
break;
case BARCODE_CODABLOCKF:
case BARCODE_HIBC_BLOCKF:
- set_combobox_from_setting(settings, "studio/bc/codablockf/width", "cmbCbfWidth");
- set_combobox_from_setting(settings, "studio/bc/codablockf/height", "cmbCbfHeight");
- set_combobox_from_setting(settings, "studio/bc/codablockf/row_sep_height", "cmbCbfRowSepHeight");
- set_radiobutton_from_setting(settings, "studio/bc/codablockf/encoding_mode",
- QStringList() << "radCbfStand" << "radCbfHIBC");
- set_checkbox_from_setting(settings, "studio/bc/codablockf/chk_no_quiet_zones", "chkCbfNoQuietZones");
+ set_cmb_from_setting(settings, QSL("studio/bc/codablockf/width"), QSL("cmbCbfWidth"));
+ set_cmb_from_setting(settings, QSL("studio/bc/codablockf/height"), QSL("cmbCbfHeight"));
+ set_cmb_from_setting(settings, QSL("studio/bc/codablockf/row_sep_height"),
+ QSL("cmbCbfRowSepHeight"));
+ set_rad_from_setting(settings, QSL("studio/bc/codablockf/encoding_mode"),
+ QStringList() << QSL("radCbfStand") << QSL("radCbfHIBC"));
+ set_chk_from_setting(settings, QSL("studio/bc/codablockf/chk_no_quiet_zones"), QSL("chkCbfNoQuietZones"));
break;
case BARCODE_DAFT:
- set_doublespinbox_from_setting(settings, "studio/bc/daft/tracker_ratio", "spnDAFTTrackerRatio", 25.0f);
+ set_dspn_from_setting(settings, QSL("studio/bc/daft/tracker_ratio"), QSL("spnDAFTTrackerRatio"), 25.0f);
break;
case BARCODE_DATAMATRIX:
case BARCODE_HIBC_DM:
- set_combobox_from_setting(settings, "studio/bc/datamatrix/size", "cmbDM200Size");
- set_radiobutton_from_setting(settings, "studio/bc/datamatrix/encoding_mode",
- QStringList() << "radDM200Stand" << "radDM200GS1" << "radDM200HIBC");
- set_checkbox_from_setting(settings, "studio/bc/datamatrix/chk_suppress_rect", "chkDMRectangle");
- set_checkbox_from_setting(settings, "studio/bc/datamatrix/chk_allow_dmre", "chkDMRE");
- set_checkbox_from_setting(settings, "studio/bc/datamatrix/chk_gs_sep", "chkDMGSSep");
- set_combobox_from_setting(settings, "studio/bc/datamatrix/structapp_count", "cmbDMStructAppCount");
- set_combobox_from_setting(settings, "studio/bc/datamatrix/structapp_index", "cmbDMStructAppIndex");
- set_spinbox_from_setting(settings, "studio/bc/datamatrix/structapp_id", "spnDMStructAppID", 1);
- set_spinbox_from_setting(settings, "studio/bc/datamatrix/structapp_id2", "spnDMStructAppID2", 1);
+ set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/size"), QSL("cmbDM200Size"));
+ set_rad_from_setting(settings, QSL("studio/bc/datamatrix/encoding_mode"),
+ QStringList() << QSL("radDM200Stand") << QSL("radDM200GS1") << QSL("radDM200HIBC"));
+ set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_suppress_rect"), QSL("chkDMRectangle"));
+ set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_allow_dmre"), QSL("chkDMRE"));
+ set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_gs_sep"), QSL("chkDMGSSep"));
+ set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/structapp_count"), QSL("cmbDMStructAppCount"));
+ set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/structapp_index"), QSL("cmbDMStructAppIndex"));
+ set_spn_from_setting(settings, QSL("studio/bc/datamatrix/structapp_id"), QSL("spnDMStructAppID"), 1);
+ set_spn_from_setting(settings, QSL("studio/bc/datamatrix/structapp_id2"), QSL("spnDMStructAppID2"), 1);
break;
case BARCODE_ITF14:
- set_checkbox_from_setting(settings, "studio/bc/itf14/chk_no_quiet_zones", "chkITF14NoQuietZones");
+ set_chk_from_setting(settings, QSL("studio/bc/itf14/chk_no_quiet_zones"), QSL("chkITF14NoQuietZones"));
break;
case BARCODE_QRCODE:
case BARCODE_HIBC_QR:
- set_combobox_from_setting(settings, "studio/bc/qrcode/size", "cmbQRSize");
- set_combobox_from_setting(settings, "studio/bc/qrcode/ecc", "cmbQRECC");
- set_combobox_from_setting(settings, "studio/bc/qrcode/mask", "cmbQRMask");
- set_radiobutton_from_setting(settings, "studio/bc/qrcode/encoding_mode",
- QStringList() << "radDM200Stand" << "radQRGS1" << "radQRHIBC");
- set_checkbox_from_setting(settings, "studio/bc/qrcode/chk_full_multibyte", "chkQRFullMultibyte");
- set_combobox_from_setting(settings, "studio/bc/qrcode/structapp_count", "cmbQRStructAppCount");
- set_combobox_from_setting(settings, "studio/bc/qrcode/structapp_index", "cmbQRStructAppIndex");
- set_spinbox_from_setting(settings, "studio/bc/qrcode/structapp_id", "spnQRStructAppID", 0);
+ set_cmb_from_setting(settings, QSL("studio/bc/qrcode/size"), QSL("cmbQRSize"));
+ set_cmb_from_setting(settings, QSL("studio/bc/qrcode/ecc"), QSL("cmbQRECC"));
+ set_cmb_from_setting(settings, QSL("studio/bc/qrcode/mask"), QSL("cmbQRMask"));
+ set_rad_from_setting(settings, QSL("studio/bc/qrcode/encoding_mode"),
+ QStringList() << QSL("radDM200Stand") << QSL("radQRGS1") << QSL("radQRHIBC"));
+ set_chk_from_setting(settings, QSL("studio/bc/qrcode/chk_full_multibyte"), QSL("chkQRFullMultibyte"));
+ set_cmb_from_setting(settings, QSL("studio/bc/qrcode/structapp_count"), QSL("cmbQRStructAppCount"));
+ set_cmb_from_setting(settings, QSL("studio/bc/qrcode/structapp_index"), QSL("cmbQRStructAppIndex"));
+ set_spn_from_setting(settings, QSL("studio/bc/qrcode/structapp_id"), QSL("spnQRStructAppID"), 0);
break;
case BARCODE_RMQR:
- set_combobox_from_setting(settings, "studio/bc/rmqr/size", "cmbRMQRSize");
- set_combobox_from_setting(settings, "studio/bc/rmqr/ecc", "cmbRMQRECC");
- set_radiobutton_from_setting(settings, "studio/bc/rmqr/encoding_mode",
- QStringList() << "radQRStand" << "radRMQRGS1");
- set_checkbox_from_setting(settings, "studio/bc/rmqr/chk_full_multibyte", "chkRMQRFullMultibyte");
+ set_cmb_from_setting(settings, QSL("studio/bc/rmqr/size"), QSL("cmbRMQRSize"));
+ set_cmb_from_setting(settings, QSL("studio/bc/rmqr/ecc"), QSL("cmbRMQRECC"));
+ set_rad_from_setting(settings, QSL("studio/bc/rmqr/encoding_mode"),
+ QStringList() << QSL("radQRStand") << QSL("radRMQRGS1"));
+ set_chk_from_setting(settings, QSL("studio/bc/rmqr/chk_full_multibyte"), QSL("chkRMQRFullMultibyte"));
break;
case BARCODE_HANXIN:
- set_combobox_from_setting(settings, "studio/bc/hanxin/size", "cmbHXSize");
- set_combobox_from_setting(settings, "studio/bc/hanxin/ecc", "cmbHXECC");
- set_combobox_from_setting(settings, "studio/bc/hanxin/mask", "cmbHXMask");
- set_checkbox_from_setting(settings, "studio/bc/hanxin/chk_full_multibyte", "chkHXFullMultibyte");
+ set_cmb_from_setting(settings, QSL("studio/bc/hanxin/size"), QSL("cmbHXSize"));
+ set_cmb_from_setting(settings, QSL("studio/bc/hanxin/ecc"), QSL("cmbHXECC"));
+ set_cmb_from_setting(settings, QSL("studio/bc/hanxin/mask"), QSL("cmbHXMask"));
+ set_chk_from_setting(settings, QSL("studio/bc/hanxin/chk_full_multibyte"), QSL("chkHXFullMultibyte"));
break;
case BARCODE_MICROQR:
- set_combobox_from_setting(settings, "studio/bc/microqr/size", "cmbMQRSize");
- set_combobox_from_setting(settings, "studio/bc/microqr/ecc", "cmbMQRECC");
- set_combobox_from_setting(settings, "studio/bc/microqr/mask", "cmbMQRMask");
- set_checkbox_from_setting(settings, "studio/bc/microqr/chk_full_multibyte", "chkMQRFullMultibyte");
+ set_cmb_from_setting(settings, QSL("studio/bc/microqr/size"), QSL("cmbMQRSize"));
+ set_cmb_from_setting(settings, QSL("studio/bc/microqr/ecc"), QSL("cmbMQRECC"));
+ set_cmb_from_setting(settings, QSL("studio/bc/microqr/mask"), QSL("cmbMQRMask"));
+ set_chk_from_setting(settings, QSL("studio/bc/microqr/chk_full_multibyte"), QSL("chkMQRFullMultibyte"));
break;
case BARCODE_GRIDMATRIX:
- set_combobox_from_setting(settings, "studio/bc/gridmatrix/size", "cmbGridSize");
- set_combobox_from_setting(settings, "studio/bc/gridmatrix/ecc", "cmbGridECC");
- set_checkbox_from_setting(settings, "studio/bc/gridmatrix/chk_full_multibyte", "chkGridFullMultibyte");
- set_combobox_from_setting(settings, "studio/bc/gridmatrix/structapp_count", "cmbGridStructAppCount");
- set_combobox_from_setting(settings, "studio/bc/gridmatrix/structapp_index", "cmbGridStructAppIndex");
- set_spinbox_from_setting(settings, "studio/bc/gridmatrix/structapp_id", "spnGridStructAppID", 0);
+ set_cmb_from_setting(settings, QSL("studio/bc/gridmatrix/size"), QSL("cmbGridSize"));
+ set_cmb_from_setting(settings, QSL("studio/bc/gridmatrix/ecc"), QSL("cmbGridECC"));
+ set_chk_from_setting(settings, QSL("studio/bc/gridmatrix/chk_full_multibyte"),
+ QSL("chkGridFullMultibyte"));
+ set_cmb_from_setting(settings, QSL("studio/bc/gridmatrix/structapp_count"), QSL("cmbGridStructAppCount"));
+ set_cmb_from_setting(settings, QSL("studio/bc/gridmatrix/structapp_index"), QSL("cmbGridStructAppIndex"));
+ set_spn_from_setting(settings, QSL("studio/bc/gridmatrix/structapp_id"), QSL("spnGridStructAppID"), 0);
break;
case BARCODE_MAXICODE:
- set_combobox_from_setting(settings, "studio/bc/maxicode/mode", "cmbMaxiMode", 1);
- set_lineedit_from_setting(settings, "studio/bc/maxicode/scm_postcode", "txtMaxiSCMPostcode", "");
- set_spinbox_from_setting(settings, "studio/bc/maxicode/scm_country", "spnMaxiSCMCountry", 0);
- set_spinbox_from_setting(settings, "studio/bc/maxicode/scm_service", "spnMaxiSCMService", 0);
- set_checkbox_from_setting(settings, "studio/bc/maxicode/chk_scm_vv", "chkMaxiSCMVV");
+ set_cmb_from_setting(settings, QSL("studio/bc/maxicode/mode"), QSL("cmbMaxiMode"), 1);
+ set_txt_from_setting(settings, QSL("studio/bc/maxicode/scm_postcode"), QSL("txtMaxiSCMPostcode"),
+ QSL(""));
+ set_spn_from_setting(settings, QSL("studio/bc/maxicode/scm_country"), QSL("spnMaxiSCMCountry"), 0);
+ set_spn_from_setting(settings, QSL("studio/bc/maxicode/scm_service"), QSL("spnMaxiSCMService"), 0);
+ set_chk_from_setting(settings, QSL("studio/bc/maxicode/chk_scm_vv"), QSL("chkMaxiSCMVV"));
// 96 is ASC MH10/SC 8
- set_spinbox_from_setting(settings, "studio/bc/maxicode/spn_scm_vv", "spnMaxiSCMVV", 96);
- set_combobox_from_setting(settings, "studio/bc/maxicode/structapp_count", "cmbMaxiStructAppCount");
- set_combobox_from_setting(settings, "studio/bc/maxicode/structapp_index", "cmbMaxiStructAppIndex");
+ set_spn_from_setting(settings, QSL("studio/bc/maxicode/spn_scm_vv"), QSL("spnMaxiSCMVV"), 96);
+ set_cmb_from_setting(settings, QSL("studio/bc/maxicode/structapp_count"), QSL("cmbMaxiStructAppCount"));
+ set_cmb_from_setting(settings, QSL("studio/bc/maxicode/structapp_index"), QSL("cmbMaxiStructAppIndex"));
break;
case BARCODE_CODEONE:
- set_combobox_from_setting(settings, "studio/bc/codeone/size", "cmbC1Size");
- set_radiobutton_from_setting(settings, "studio/bc/codeone/encoding_mode",
- QStringList() << "radC1Stand" << "radC1GS1");
- set_spinbox_from_setting(settings, "studio/bc/codeone/structapp_count", "spnC1StructAppCount", 1);
- set_spinbox_from_setting(settings, "studio/bc/codeone/structapp_index", "spnC1StructAppIndex", 0);
+ set_cmb_from_setting(settings, QSL("studio/bc/codeone/size"), QSL("cmbC1Size"));
+ set_rad_from_setting(settings, QSL("studio/bc/codeone/encoding_mode"),
+ QStringList() << QSL("radC1Stand") << QSL("radC1GS1"));
+ set_spn_from_setting(settings, QSL("studio/bc/codeone/structapp_count"), QSL("spnC1StructAppCount"), 1);
+ set_spn_from_setting(settings, QSL("studio/bc/codeone/structapp_index"), QSL("spnC1StructAppIndex"), 0);
break;
case BARCODE_CODE49:
- set_combobox_from_setting(settings, "studio/bc/code49/row_sep_height", "cmbC49RowSepHeight");
- set_radiobutton_from_setting(settings, "studio/bc/code49/encoding_mode",
- QStringList() << "radC49Stand" << "radC49GS1");
- set_checkbox_from_setting(settings, "studio/bc/code49/chk_no_quiet_zones", "chkC49NoQuietZones");
+ set_cmb_from_setting(settings, QSL("studio/bc/code49/row_sep_height"), QSL("cmbC49RowSepHeight"));
+ set_rad_from_setting(settings, QSL("studio/bc/code49/encoding_mode"),
+ QStringList() << QSL("radC49Stand") << QSL("radC49GS1"));
+ set_chk_from_setting(settings, QSL("studio/bc/code49/chk_no_quiet_zones"), QSL("chkC49NoQuietZones"));
break;
case BARCODE_CODE93:
- set_checkbox_from_setting(settings, "studio/bc/code93/chk_show_checks", "chkC93ShowChecks");
+ set_chk_from_setting(settings, QSL("studio/bc/code93/chk_show_checks"), QSL("chkC93ShowChecks"));
break;
case BARCODE_DBAR_EXPSTK:
- set_combobox_from_setting(settings, "studio/bc/dbar_expstk/cols", "cmbCols");
+ set_cmb_from_setting(settings, QSL("studio/bc/dbar_expstk/cols"), QSL("cmbCols"));
break;
case BARCODE_ULTRA:
- set_radiobutton_from_setting(settings, "studio/bc/ultra/autoresizing",
- QStringList() << "radUltraAuto" << "radUltraEcc");
- set_combobox_from_setting(settings, "studio/bc/ultra/ecc", "cmbUltraEcc");
- set_combobox_from_setting(settings, "studio/bc/ultra/revision", "cmbUltraRevision");
- set_radiobutton_from_setting(settings, "studio/bc/ultra/encoding_mode",
- QStringList() << "radUltraStand" << "radUltraGS1");
- set_combobox_from_setting(settings, "studio/bc/ultra/structapp_count", "cmbUltraStructAppCount");
- set_combobox_from_setting(settings, "studio/bc/ultra/structapp_index", "cmbUltraStructAppIndex");
- set_spinbox_from_setting(settings, "studio/bc/ultra/structapp_id", "spnUltraStructAppID", 0);
+ set_rad_from_setting(settings, QSL("studio/bc/ultra/autoresizing"),
+ QStringList() << QSL("radUltraAuto") << QSL("radUltraEcc"));
+ set_cmb_from_setting(settings, QSL("studio/bc/ultra/ecc"), QSL("cmbUltraEcc"));
+ set_cmb_from_setting(settings, QSL("studio/bc/ultra/revision"), QSL("cmbUltraRevision"));
+ set_rad_from_setting(settings, QSL("studio/bc/ultra/encoding_mode"),
+ QStringList() << QSL("radUltraStand") << QSL("radUltraGS1"));
+ set_cmb_from_setting(settings, QSL("studio/bc/ultra/structapp_count"), QSL("cmbUltraStructAppCount"));
+ set_cmb_from_setting(settings, QSL("studio/bc/ultra/structapp_index"), QSL("cmbUltraStructAppIndex"));
+ set_spn_from_setting(settings, QSL("studio/bc/ultra/structapp_id"), QSL("spnUltraStructAppID"), 0);
break;
case BARCODE_UPCA:
case BARCODE_UPCA_CHK:
case BARCODE_UPCA_CC:
- set_combobox_from_setting(settings, "studio/bc/upca/addongap", "cmbUPCAAddonGap");
- set_doublespinbox_from_setting(settings, "studio/bc/upca/guard_descent", "spnUPCAGuardDescent", 5.0f);
- set_checkbox_from_setting(settings, "studio/bc/upca/chk_no_quiet_zones", "chkUPCANoQuietZones");
+ set_cmb_from_setting(settings, QSL("studio/bc/upca/addongap"), QSL("cmbUPCAAddonGap"));
+ set_dspn_from_setting(settings, QSL("studio/bc/upca/guard_descent"), QSL("spnUPCAGuardDescent"), 5.0f);
+ set_chk_from_setting(settings, QSL("studio/bc/upca/chk_no_quiet_zones"), QSL("chkUPCANoQuietZones"));
break;
case BARCODE_EANX:
case BARCODE_EANX_CHK:
case BARCODE_EANX_CC:
- set_combobox_from_setting(settings, "studio/bc/eanx/addongap", "cmbUPCEANAddonGap");
- set_doublespinbox_from_setting(settings, "studio/bc/eanx/guard_descent", "spnUPCEANGuardDescent", 5.0f);
- set_checkbox_from_setting(settings, "studio/bc/eanx/chk_no_quiet_zones", "chkUPCEANNoQuietZones");
+ 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"));
break;
case BARCODE_UPCE:
case BARCODE_UPCE_CHK:
case BARCODE_UPCE_CC:
- set_combobox_from_setting(settings, "studio/bc/upce/addongap", "cmbUPCEANAddonGap");
- set_doublespinbox_from_setting(settings, "studio/bc/upce/guard_descent", "spnUPCEANGuardDescent", 5.0f);
- set_checkbox_from_setting(settings, "studio/bc/upce/chk_no_quiet_zones", "chkUPCEANNoQuietZones");
+ set_cmb_from_setting(settings, QSL("studio/bc/upce/addongap"), QSL("cmbUPCEANAddonGap"));
+ set_dspn_from_setting(settings, QSL("studio/bc/upce/guard_descent"), QSL("spnUPCEANGuardDescent"), 5.0f);
+ set_chk_from_setting(settings, QSL("studio/bc/upce/chk_no_quiet_zones"), QSL("chkUPCEANNoQuietZones"));
break;
case BARCODE_ISBNX:
- set_combobox_from_setting(settings, "studio/bc/isbnx/addongap", "cmbUPCEANAddonGap");
- set_doublespinbox_from_setting(settings, "studio/bc/isbnx/guard_descent", "spnUPCEANGuardDescent", 5.0f);
- set_checkbox_from_setting(settings, "studio/bc/isbnx/chk_no_quiet_zones", "chkUPCEANNoQuietZones");
+ set_cmb_from_setting(settings, QSL("studio/bc/isbnx/addongap"), QSL("cmbUPCEANAddonGap"));
+ set_dspn_from_setting(settings, QSL("studio/bc/isbnx/guard_descent"), QSL("spnUPCEANGuardDescent"), 5.0f);
+ set_chk_from_setting(settings, QSL("studio/bc/isbnx/chk_no_quiet_zones"), QSL("chkUPCEANNoQuietZones"));
break;
case BARCODE_VIN:
- set_checkbox_from_setting(settings, "studio/bc/vin/chk_import_char_prefix", "chkVINImportChar");
+ set_chk_from_setting(settings, QSL("studio/bc/vin/chk_import_char_prefix"), QSL("chkVINImportChar"));
break;
}
}
diff --git a/frontend_qt/mainwindow.h b/frontend_qt/mainwindow.h
index 2640c1ef..73601c94 100644
--- a/frontend_qt/mainwindow.h
+++ b/frontend_qt/mainwindow.h
@@ -1,6 +1,6 @@
/***************************************************************************
* Copyright (C) 2008 by BogDan Vatra *
- * Copyright (C) 2009-2020 by Robin Stuart *
+ * Copyright (C) 2009-2021 by Robin Stuart *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see . *
***************************************************************************/
+/* vim: set ts=4 sw=4 et : */
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
@@ -26,6 +27,7 @@
#include "barcodeitem.h"
class QLabel;
+class QShortcut;
class MainWindow : public QWidget, private Ui::mainWindow
{
@@ -35,6 +37,8 @@ public:
MainWindow(QWidget *parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
~MainWindow();
+ static QString get_zint_version();
+
public slots:
void update_preview();
void change_options();
@@ -42,72 +46,120 @@ public slots:
void on_bgcolor_clicked();
void composite_ui_set();
void composite_ean_check();
- void maxi_scm();
+ void maxi_scm_ui_set();
void msi_plessey_ui_set();
void change_print_scale();
void change_cmyk();
void autoheight_ui_set();
void HRTShow_ui_set();
void dotty_ui_set();
+ void codeone_ui_set();
void structapp_ui_set();
void on_encoded();
- void filter_symbologies();
+ void on_errored();
+ void filter_symbologies();
+
+ bool save();
+ void about();
+ void help();
+ void quit_now();
+ void menu();
+
+ void reset_colours();
+ int open_data_dialog();
+ int open_sequence_dialog();
+
+ void copy_to_clipboard_bmp();
+ void copy_to_clipboard_emf();
+ void copy_to_clipboard_eps();
+ void copy_to_clipboard_gif();
+#ifndef NO_PNG
+ void copy_to_clipboard_png();
+#endif
+ void copy_to_clipboard_pcx();
+ void copy_to_clipboard_svg();
+ void copy_to_clipboard_tif();
+
+ void copy_to_clipboard_errtxt();
+
+ void guard_reset_upcean();
+ void guard_reset_upca();
+
+ void view_context_menu(const QPoint &pos);
+ void errtxtBar_context_menu(const QPoint &pos);
protected:
void resizeEvent(QResizeEvent *event);
- void combobox_item_enabled(QComboBox *comboBox, int index, bool enabled);
- void upcean_addon_gap(const char *comboBoxName, const char *labelName, int base);
- void upcean_guard_descent(const char *spnBoxName, const char *labelName);
+ bool event(QEvent *event) override;
+
+ void combobox_item_enabled(QComboBox *comboBox, int index, bool enabled);
+ void upcean_addon_gap(const QString &comboBoxName, const QString &labelName, int base);
+ void upcean_guard_descent(const QString &spnBoxName, const QString &labelName);
+ void guard_reset(const QString &spnBoxName);
void set_gs1_mode(bool gs1_mode);
- void set_smaller_font(QLabel *note);
+ void set_smaller_font(const QString &labelName);
- QObject *widget_obj(const char *name);
+ void createActions();
+ void createMenu();
+ void enableActions(bool enabled);
- const char *get_setting_name(int symbology);
+ void copy_to_clipboard(const QString &filename, const QString &name, const char *mimeType = nullptr);
- int get_button_group_index(const QStringList &children);
- void set_radiobutton_from_setting(QSettings &settings, const QString &setting, const QStringList &children,
- int default_val = 0);
+ void errtxtBar_clear();
+ void errtxtBar_set(bool isError);
- int get_combobox_index(const QString &child);
- void set_combobox_from_setting(QSettings &settings, const QString &setting, const QString &child,
- int default_val = 0);
+ QPoint get_context_menu_pos(const QPoint &pos, QWidget *widget);
- int get_checkbox_val(const QString &child);
- void set_checkbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
- int default_val = 0);
+ QWidget *get_widget(const QString &name);
- double get_doublespinbox_val(const QString &child);
- void set_doublespinbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
- float default_val = 0.0f);
+ const QString &get_setting_name(int symbology);
- QString get_lineedit_val(const QString &child);
- void set_lineedit_from_setting(QSettings &settings, const QString &setting, const QString &child,
- const char *default_val = "");
+ int get_rad_grp_index(const QStringList &names);
+ void set_rad_from_setting(QSettings &settings, const QString &setting, const QStringList &names,
+ int default_val = 0);
+ bool get_rad_val(const QString &name);
- int get_spinbox_val(const QString &child);
- void set_spinbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
- int default_val = 0);
+ int get_cmb_index(const QString &name);
+ void set_cmb_from_setting(QSettings &settings, const QString &setting, const QString &name, int default_val = 0);
- void save_sub_settings(QSettings &settings, int symbology);
- void load_sub_settings(QSettings &settings, int symbology);
+ int get_chk_val(const QString &name);
+ void set_chk_from_setting(QSettings &settings, const QString &setting, const QString &name, int default_val = 0);
-private slots:
- bool save();
- void about();
- void quit_now();
- void reset_view();
- int open_data_dialog();
- int open_sequence_dialog();
- void copy_to_clipboard_svg();
- void copy_to_clipboard_bmp();
+ double get_dspn_val(const QString &name);
+ void set_dspn_from_setting(QSettings &settings, const QString &setting, const QString &name,
+ float default_val = 0.0f);
+
+ QString get_txt_val(const QString &name);
+ void set_txt_from_setting(QSettings &settings, const QString &setting, const QString &name,
+ const QString &default_val);
+
+ int get_spn_val(const QString &name);
+ void set_spn_from_setting(QSettings &settings, const QString &setting, const QString &name, int default_val = 0);
+
+ void save_sub_settings(QSettings &settings, int symbology);
+ void load_sub_settings(QSettings &settings, int symbology);
private:
QColor m_fgcolor,m_bgcolor;
BarcodeItem m_bc;
QWidget *m_optionWidget;
QGraphicsScene *scene;
- int m_symbology;
+ int m_symbology;
+ QShortcut *m_saveAsShortcut;
+ QMenu *m_menu;
+ QAction *m_copyBMPAct;
+ QAction *m_copyEMFAct;
+ QAction *m_copyEPSAct;
+ QAction *m_copyGIFAct;
+ QAction *m_copyPCXAct;
+ QAction *m_copyPNGAct;
+ QAction *m_copySVGAct;
+ QAction *m_copyTIFAct;
+ QAction *m_saveAsAct;
+ QAction *m_aboutAct;
+ QAction *m_helpAct;
+ QAction *m_quitAct;
+ QAction *m_copyErrtxtAct;
};
#endif
diff --git a/frontend_qt/res/LICENSE_feathericons b/frontend_qt/res/LICENSE_feathericons
new file mode 100644
index 00000000..c2f512f4
--- /dev/null
+++ b/frontend_qt/res/LICENSE_feathericons
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-2017 Cole Bemis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/frontend_qt/res/copy.svg b/frontend_qt/res/copy.svg
new file mode 100644
index 00000000..4e0b09f1
--- /dev/null
+++ b/frontend_qt/res/copy.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/frontend_qt/res/download.svg b/frontend_qt/res/download.svg
new file mode 100644
index 00000000..76767a92
--- /dev/null
+++ b/frontend_qt/res/download.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/frontend_qt/res/help-circle.svg b/frontend_qt/res/help-circle.svg
new file mode 100644
index 00000000..51fddd80
--- /dev/null
+++ b/frontend_qt/res/help-circle.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/frontend_qt/res/menu.svg b/frontend_qt/res/menu.svg
new file mode 100644
index 00000000..e8a84a95
--- /dev/null
+++ b/frontend_qt/res/menu.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/frontend_qt/res/x.svg b/frontend_qt/res/x.svg
new file mode 100644
index 00000000..7d5875ca
--- /dev/null
+++ b/frontend_qt/res/x.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/frontend_qt/resources.qrc b/frontend_qt/resources.qrc
index 039cd02b..3a77a2d3 100644
--- a/frontend_qt/resources.qrc
+++ b/frontend_qt/resources.qrc
@@ -32,5 +32,10 @@
grpUPCEAN.ui
grpVIN.ui
res/zint-qt.ico
+ res/copy.svg
+ res/download.svg
+ res/help-circle.svg
+ res/menu.svg
+ res/x.svg