PDF417: some tweaks to MR #151 [e8a125], update test suite

This commit is contained in:
gitlost 2022-08-18 22:25:09 +01:00
parent e8a125a2e1
commit 1a25927b73
22 changed files with 1464 additions and 608 deletions

View File

@ -28,6 +28,8 @@ Changes
- GS1: new AI 4309 with latlong checker, new currency code 925 - GS1: new AI 4309 with latlong checker, new currency code 925
- GUI: add automatic info feedback to "Automatic" combo item of size/row/height - GUI: add automatic info feedback to "Automatic" combo item of size/row/height
comboboxes comboboxes
- PDF417: encodation now simpler and closer to ISO/IEC 24728:2006 Annex N
algorithm, props Jeff Skaistis
Bugs Bugs
---- ----
@ -43,6 +45,10 @@ Bugs
- vector: ensure separators don't overlap with other rectangles so that - vector: ensure separators don't overlap with other rectangles so that
they render correctly when have RGBA alpha channel they render correctly when have RGBA alpha channel
- GUI: update_preview() after Data Dialog return to ensure preview in sync - GUI: update_preview() after Data Dialog return to ensure preview in sync
- PDF417: fix invalid numeric -> byte shift transitions, MR #151, props Jeff
Skaistis
- PDF417: fix extraneous text latch after a byte shift, MR #151, props Jeff
Skaistis
Version 2.11.0 (2022-05-24) Version 2.11.0 (2022-05-24)

View File

@ -51,10 +51,17 @@
#include "pdf417.h" #include "pdf417.h"
#include "pdf417_tabs.h" #include "pdf417_tabs.h"
/* Modes */
#define TEX 900 #define TEX 900
#define BYT 901 #define BYT 901
#define NUM 902 #define NUM 902
/* TEX mode sub-modes */
#define T_ALPHA 1
#define T_LOWER 2
#define T_MIXED 4
#define T_PUNCT 8
/* /*
Three figure numbers in comments give the location of command equivalents in the Three figure numbers in comments give the location of command equivalents in the
original Visual Basic source code file pdf417.frm original Visual Basic source code file pdf417.frm
@ -62,6 +69,7 @@
/* text mode processing tables */ /* text mode processing tables */
/* TEX sub-mode assignments */
static const char pdf_asciix[127] = { static const char pdf_asciix[127] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 8, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 8, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
7, 8, 8, 4, 12, 4, 4, 8, 8, 8, 12, 4, 12, 12, 12, 12, 4, 4, 4, 4, 4, 4, 4, 4, 7, 8, 8, 4, 12, 4, 4, 8, 8, 8, 12, 4, 12, 12, 12, 12, 4, 4, 4, 4, 4, 4, 4, 4,
@ -70,6 +78,7 @@ static const char pdf_asciix[127] = {
2, 2, 2, 2, 8, 8, 8, 8 2, 2, 2, 2, 8, 8, 8, 8
}; };
/* TEX sub-mode values */
static const char pdf_asciiy[127] = { static const char pdf_asciiy[127] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 15, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 15, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
26, 10, 20, 15, 18, 21, 10, 28, 23, 24, 22, 20, 13, 16, 17, 19, 0, 1, 2, 3, 26, 10, 20, 15, 18, 21, 10, 28, 23, 24, 22, 20, 13, 16, 17, 19, 0, 1, 2, 3,
@ -106,11 +115,10 @@ static int pdf_quelmode(const unsigned char codeascii) {
return BYT; return BYT;
} }
static int pdf_text_num_length(int liste[2][PDF_MAX_LEN], int* indexliste, const int start) /* Check consecutive segments for text/num and return the length */
{ static int pdf_text_num_length(const int liste[3][PDF_MAX_LEN], const int indexliste, const int start) {
/* check consecutive segments for text/num and return the length */
int i, len = 0; int i, len = 0;
for (i = start; i < *(indexliste); i++) { for (i = start; i < indexliste; i++) {
if (liste[1][i] == BYT) if (liste[1][i] == BYT)
break; break;
@ -122,8 +130,131 @@ static int pdf_text_num_length(int liste[2][PDF_MAX_LEN], int* indexliste, const
return len; return len;
} }
/* Pack segments using the method described in Appendix D of the AIM specification */ /* Calculate length of TEX allowing for sub-mode switches (no-output version of `pdf_textprocess()`) */
static void pdf_appendix_d_encode(int liste[2][PDF_MAX_LEN], int* indexliste, const int debug_print) { static int pdf_text_submode_length(const unsigned char chaine[], const int start, const int length, int *p_curtable) {
int j, indexlistet, curtable, listet[PDF_MAX_LEN], wnet;
wnet = 0;
curtable = *p_curtable;
for (indexlistet = 0; indexlistet < length; indexlistet++) {
listet[indexlistet] = pdf_asciix[chaine[start + indexlistet]];
}
for (j = 0; j < length; j++) {
if (listet[j] & curtable) {
/* The character is in the current table */
wnet++;
} else {
/* Obliged to change table */
int newtable;
if (j == (length - 1) || !(listet[j] & listet[j + 1])) {
/* we change only one character - look for temporary switch */
if ((listet[j] & T_ALPHA) && (curtable == T_LOWER)) {
wnet += 2; /* AS+char */
continue;
}
if (listet[j] & T_PUNCT) { /* (T_PUNCT and T_ALPHA not both possible) */
wnet += 2; /* PS+char */
continue;
}
/* No temporary switch available */
newtable = listet[j];
} else {
newtable = listet[j] & listet[j + 1];
}
/* 599 */
/* Maintain the first if several tables are possible */
if (newtable == 7) { /* (T_ALPHA | T_LOWER | T_MIXED) */
newtable = T_ALPHA;
} else if (newtable == 12) { /* (T_MIXED | T_PUNCT) */
newtable = T_MIXED;
}
/* 619 - select the switch */
switch (curtable) {
case T_ALPHA:
switch (newtable) {
case T_LOWER:
case T_MIXED: wnet++; /* LL or ML */
break;
case T_PUNCT: wnet += 2; /* ML+PL */
break;
}
break;
case T_LOWER:
switch (newtable) {
case T_ALPHA: wnet += 2; /* ML+AL */
break;
case T_MIXED: wnet++; /* ML */
break;
case T_PUNCT: wnet += 2; /* ML+PL */
break;
}
break;
case T_MIXED:
switch (newtable) {
case T_ALPHA:
case T_LOWER:
case T_PUNCT: wnet++; /* AL or LL or PL */
break;
}
break;
case T_PUNCT:
switch (newtable) {
case T_ALPHA: wnet++; /* AL */
break;
case T_LOWER:
case T_MIXED: wnet += 2; /* AL+LL or AL+ML */
break;
}
break;
}
curtable = newtable;
wnet++;
}
}
*p_curtable = curtable;
return wnet;
}
/* Whether to stay in numeric mode or not */
static int pdf_num_stay(const unsigned char *chaine, const int indexliste, const int liste[3][PDF_MAX_LEN],
const int i) {
int curtable, last_len, last_ml, next_len, num_cws, tex_cws;
if (liste[0][i] >= 13 || (indexliste == 1 && liste[0][i] > 5)) {
return 1;
}
if (liste[0][i] < 11) {
return 0;
}
curtable = T_ALPHA;
last_len = i == 0 ? 0 : pdf_text_submode_length(chaine, liste[2][i - 1], liste[0][i - 1], &curtable);
last_ml = curtable == T_MIXED;
curtable = T_ALPHA; /* Next len if after NUM, sub-mode will be alpha */
next_len = i == indexliste - 1 ? 0 : pdf_text_submode_length(chaine, liste[2][i + 1], liste[0][i + 1], &curtable);
num_cws = (last_len + 1) / 2 + 1 + 4 + (liste[0][i] > 11) + 1 + (next_len + 1) / 2;
curtable = T_MIXED; /* Next len if stay TEX, sub-mode will be mixed */
next_len = i == indexliste - 1 ? 0 : pdf_text_submode_length(chaine, liste[2][i + 1], liste[0][i + 1], &curtable);
tex_cws = (last_len + !last_ml + liste[0][i] + next_len + 1) / 2;
if (num_cws > tex_cws) {
return 0;
}
return 1;
}
/* Pack segments using the method described in Appendix D of the AIM specification (ISO/IEC 15438:2015 Annex N) */
static void pdf_appendix_d_encode(const unsigned char *chaine, int liste[3][PDF_MAX_LEN], int *indexliste,
const int debug_print) {
int i = 0, next, last = 0, stayintext = 0; int i = 0, next, last = 0, stayintext = 0;
while (i < *(indexliste)) { while (i < *(indexliste)) {
@ -131,25 +262,27 @@ static void pdf_appendix_d_encode(int liste[2][PDF_MAX_LEN], int* indexliste, co
printf("Encoding block %d = %d (%d)\n", i, liste[1][i], liste[0][i]); printf("Encoding block %d = %d (%d)\n", i, liste[1][i], liste[0][i]);
} }
if ((liste[1][i] == NUM) && (liste[0][i] >= 13)) { if ((liste[1][i] == NUM) && pdf_num_stay(chaine, *indexliste, liste, i)) {
/* leave as numeric */ /* leave as numeric */
liste[0][last] = liste[0][i]; liste[0][last] = liste[0][i];
liste[1][last] = NUM; liste[1][last] = NUM;
liste[2][last] = liste[2][i];
stayintext = 0; stayintext = 0;
last++; last++;
} else if (((liste[1][i] == TEX) || (liste[1][i] == NUM)) && } else if (((liste[1][i] == TEX) || (liste[1][i] == NUM))
(stayintext || (liste[0][i] >= 5) || (pdf_text_num_length(liste, indexliste, i) >= 5))) { && (stayintext || i == *indexliste - 1 || (liste[0][i] >= 5)
|| (pdf_text_num_length(liste, *indexliste, i) >= 5))) {
/* set to text and combine additional text/short numeric segments */ /* set to text and combine additional text/short numeric segments */
liste[0][last] = liste[0][i]; liste[0][last] = liste[0][i];
liste[1][last] = TEX; liste[1][last] = TEX;
liste[2][last] = liste[2][i];
stayintext = 0; stayintext = 0;
next = i + 1; next = i + 1;
while (next < *(indexliste)) { while (next < *(indexliste)) {
if ((liste[1][next] == NUM) && (liste[0][next] >= 13)) { if ((liste[1][next] == NUM) && pdf_num_stay(chaine, *indexliste, liste, next)) {
break; break;
} } else if (liste[1][next] == BYT) {
else if (liste[1][next] == BYT) {
break; break;
} }
@ -164,6 +297,7 @@ static void pdf_appendix_d_encode(int liste[2][PDF_MAX_LEN], int* indexliste, co
/* build byte segment, including combining numeric/text segments that aren't long enough on their own */ /* build byte segment, including combining numeric/text segments that aren't long enough on their own */
liste[0][last] = liste[0][i]; liste[0][last] = liste[0][i];
liste[1][last] = BYT; liste[1][last] = BYT;
liste[2][last] = liste[2][i];
stayintext = 0; stayintext = 0;
next = i + 1; next = i + 1;
@ -175,7 +309,7 @@ static void pdf_appendix_d_encode(int liste[2][PDF_MAX_LEN], int* indexliste, co
break; break;
} }
if ((liste[0][next] >= 5) || (pdf_text_num_length(liste, indexliste, next) >= 5)) { if ((liste[0][next] >= 5) || (pdf_text_num_length(liste, *indexliste, next) >= 5)) {
break; break;
} }
} }
@ -197,11 +331,12 @@ static void pdf_appendix_d_encode(int liste[2][PDF_MAX_LEN], int* indexliste, co
} }
/* 547 */ /* 547 */
static void pdf_textprocess(int *chainemc, int *mclength, const unsigned char chaine[], int start, const int length, static void pdf_textprocess(int *chainemc, int *mclength, const unsigned char chaine[], const int start,
const int lastmode, int *curtable) { const int length, const int lastmode, int *p_curtable, int *p_tex_padded) {
int j, indexlistet, listet[2][PDF_MAX_LEN] = {{0}}, chainet[PDF_MAX_LEN], wnet; int j, indexlistet, curtable, listet[2][PDF_MAX_LEN] = {{0}}, chainet[PDF_MAX_LEN], wnet;
wnet = 0; wnet = 0;
curtable = *p_curtable;
/* listet will contain the table numbers and the value of each characters */ /* listet will contain the table numbers and the value of each characters */
for (indexlistet = 0; indexlistet < length; indexlistet++) { for (indexlistet = 0; indexlistet < length; indexlistet++) {
@ -212,11 +347,11 @@ static void pdf_textprocess(int *chainemc, int *mclength, const unsigned char ch
/* 570 */ /* 570 */
if (lastmode != TEX) { if (lastmode != TEX) {
*curtable = 1; /* set default table upper alpha */ curtable = T_ALPHA; /* set default table upper alpha */
} }
for (j = 0; j < length; j++) { for (j = 0; j < length; j++) {
if (listet[0][j] & *curtable) { if (listet[0][j] & curtable) {
/* The character is in the current table */ /* The character is in the current table */
chainet[wnet++] = listet[1][j]; chainet[wnet++] = listet[1][j];
} else { } else {
@ -224,13 +359,13 @@ static void pdf_textprocess(int *chainemc, int *mclength, const unsigned char ch
int newtable; int newtable;
if (j == (length - 1) || !(listet[0][j] & listet[0][j + 1])) { if (j == (length - 1) || !(listet[0][j] & listet[0][j + 1])) {
/* we change only one character - look for temporary switch */ /* we change only one character - look for temporary switch */
if ((listet[0][j] & 1) && (*curtable == 2)) { /* T_UPP */ if ((listet[0][j] & T_ALPHA) && (curtable == T_LOWER)) {
chainet[wnet++] = 27; chainet[wnet++] = 27; /* AS */
chainet[wnet++] = listet[1][j]; chainet[wnet++] = listet[1][j];
continue; continue;
} }
if (listet[0][j] & 8) { /* T_PUN (T_PUN and T_UPP not both possible) */ if (listet[0][j] & T_PUNCT) { /* (T_PUNCT and T_ALPHA not both possible) */
chainet[wnet++] = 29; chainet[wnet++] = 29; /* PS */
chainet[wnet++] = listet[1][j]; chainet[wnet++] = listet[1][j];
continue; continue;
} }
@ -243,68 +378,69 @@ static void pdf_textprocess(int *chainemc, int *mclength, const unsigned char ch
/* 599 */ /* 599 */
/* Maintain the first if several tables are possible */ /* Maintain the first if several tables are possible */
if (newtable == 7) { if (newtable == 7) { /* (T_ALPHA | T_LOWER | T_MIXED) */
newtable = 1; newtable = T_ALPHA;
} else if (newtable == 12) { } else if (newtable == 12) { /* (T_MIXED | T_PUNCT) */
newtable = 4; newtable = T_MIXED;
} }
/* 619 - select the switch */ /* 619 - select the switch */
switch (*curtable) { switch (curtable) {
case 1: case T_ALPHA:
switch (newtable) { switch (newtable) {
case 2: chainet[wnet++] = 27; case T_LOWER: chainet[wnet++] = 27; /* LL */
break; break;
case 4: chainet[wnet++] = 28; case T_MIXED: chainet[wnet++] = 28; /* ML */
break; break;
case 8: chainet[wnet++] = 28; case T_PUNCT: chainet[wnet++] = 28; /* ML+PL */
chainet[wnet++] = 25; chainet[wnet++] = 25;
break; break;
} }
break; break;
case 2: case T_LOWER:
switch (newtable) { switch (newtable) {
case 1: chainet[wnet++] = 28; case T_ALPHA: chainet[wnet++] = 28; /* ML+AL */
chainet[wnet++] = 28; chainet[wnet++] = 28;
break; break;
case 4: chainet[wnet++] = 28; case T_MIXED: chainet[wnet++] = 28; /* ML */
break; break;
case 8: chainet[wnet++] = 28; case T_PUNCT: chainet[wnet++] = 28; /* ML+PL */
chainet[wnet++] = 25; chainet[wnet++] = 25;
break; break;
} }
break; break;
case 4: case T_MIXED:
switch (newtable) { switch (newtable) {
case 1: chainet[wnet++] = 28; case T_ALPHA: chainet[wnet++] = 28; /* AL */
break; break;
case 2: chainet[wnet++] = 27; case T_LOWER: chainet[wnet++] = 27; /* LL */
break; break;
case 8: chainet[wnet++] = 25; case T_PUNCT: chainet[wnet++] = 25; /* PL */
break; break;
} }
break; break;
case 8: case T_PUNCT:
switch (newtable) { switch (newtable) {
case 1: chainet[wnet++] = 29; case T_ALPHA: chainet[wnet++] = 29; /* AL */
break; break;
case 2: chainet[wnet++] = 29; case T_LOWER: chainet[wnet++] = 29; /* AL+LL */
chainet[wnet++] = 27; chainet[wnet++] = 27;
break; break;
case 4: chainet[wnet++] = 29; case T_MIXED: chainet[wnet++] = 29; /* AL+ML */
chainet[wnet++] = 28; chainet[wnet++] = 28;
break; break;
} }
break; break;
} }
*curtable = newtable; curtable = newtable;
/* 659 - at last we add the character */ /* 659 - at last we add the character */
chainet[wnet++] = listet[1][j]; chainet[wnet++] = listet[1][j];
} }
} }
/* 663 */ /* 663 */
if (wnet & 1) { *p_tex_padded = wnet & 1;
if (*p_tex_padded) {
chainet[wnet++] = 29; chainet[wnet++] = 29;
} }
/* Now translate the string chainet into codewords */ /* Now translate the string chainet into codewords */
@ -318,6 +454,8 @@ static void pdf_textprocess(int *chainemc, int *mclength, const unsigned char ch
const int cw_number = (30 * chainet[j]) + chainet[j + 1]; const int cw_number = (30 * chainet[j]) + chainet[j + 1];
chainemc[(*mclength)++] = cw_number; chainemc[(*mclength)++] = cw_number;
} }
*p_curtable = curtable;
} }
/* 671 */ /* 671 */
@ -380,18 +518,18 @@ INTERNAL void pdf_byteprocess(int *chainemc, int *mclength, const unsigned char
} }
/* 712 */ /* 712 */
static void pdf_numbprocess(int *chainemc, int *mclength, const unsigned char chaine[], int start, const int length) { static void pdf_numbprocess(int *chainemc, int *mclength, const unsigned char chaine[], const int start,
int j, loop, dummy[50] = {0}, diviseur, nombre; const int length) {
char chainemod[45]; int j;
chainemc[(*mclength)++] = 902; chainemc[(*mclength)++] = 902;
j = 0; j = 0;
while (j < length) { while (j < length) {
int longueur;
int dumlength = 0; int dumlength = 0;
int p, len; int p, len, loop, nombre, dummy[50];
longueur = length - j; char chainemod[45];
int longueur = length - j;
if (longueur > 44) { if (longueur > 44) {
longueur = 44; longueur = 44;
} }
@ -401,27 +539,24 @@ static void pdf_numbprocess(int *chainemc, int *mclength, const unsigned char ch
chainemod[loop] = ctoi(chaine[start + loop + j - 1]); chainemod[loop] = ctoi(chaine[start + loop + j - 1]);
} }
do { do {
diviseur = 900;
/* 877 - gosub Modulo */ /* 877 - gosub Modulo */
p = 0; p = 0;
nombre = 0; nombre = 0;
for (loop = 0; loop < len; loop++) { for (loop = 0; loop < len; loop++) {
nombre *= 10; nombre *= 10;
nombre += chainemod[loop]; nombre += chainemod[loop];
if (nombre < diviseur) { if (nombre < 900) {
if (p) { if (p) {
chainemod[p++] = 0; chainemod[p++] = 0;
} }
} else { } else {
chainemod[p++] = (nombre / diviseur); chainemod[p] = (nombre / 900);
nombre = nombre % diviseur; nombre -= chainemod[p++] * 900; /* nombre % 900 */
} }
} }
diviseur = nombre;
/* return to 723 */ /* return to 723 */
dummy[dumlength++] = diviseur; dummy[dumlength++] = nombre;
len = p; len = p;
} while (p); } while (p);
for (loop = dumlength - 1; loop >= 0; loop--) { for (loop = dumlength - 1; loop >= 0; loop--) {
@ -431,11 +566,25 @@ static void pdf_numbprocess(int *chainemc, int *mclength, const unsigned char ch
} }
} }
#ifdef ZINT_TEST /* Wrapper for direct testing */
INTERNAL void pdf_numbprocess_test(int *chainemc, int *mclength, const unsigned char chaine[], const int start,
const int length) {
pdf_numbprocess(chainemc, mclength, chaine, start, length);
}
#endif
/* Return mode text */
static const char *pdf_mode_str(const int mode) {
static const char *modes[3] = { "Text", "Byte", "Number" };
return mode >= TEX && mode <= NUM ? modes[mode - TEX] : "ERROR";
}
/* Initial processing of data, shared by `pdf417()` and `micropdf417()` */ /* Initial processing of data, shared by `pdf417()` and `micropdf417()` */
static int pdf_initial(struct zint_symbol *symbol, unsigned char chaine[], const int length, const int eci, static int pdf_initial(struct zint_symbol *symbol, const unsigned char chaine[], const int length, const int eci,
const int is_micro, int chainemc[PDF_MAX_LEN], int *p_mclength) { const int is_micro, int *p_lastmode, int *p_curtable, int *p_tex_padded, int chainemc[PDF_MAX_LEN],
int i, indexchaine, indexliste, mode, currenttext; int *p_mclength) {
int liste[2][PDF_MAX_LEN] = {{0}}; int i, indexchaine, indexliste, mode;
int liste[3][PDF_MAX_LEN] = {{0}};
int mclength; int mclength;
const int debug_print = symbol->debug & ZINT_DEBUG_PRINT; const int debug_print = symbol->debug & ZINT_DEBUG_PRINT;
@ -448,6 +597,7 @@ static int pdf_initial(struct zint_symbol *symbol, unsigned char chaine[], const
/* 463 */ /* 463 */
do { do {
liste[1][indexliste] = mode; liste[1][indexliste] = mode;
liste[2][indexliste] = indexchaine;
while ((liste[1][indexliste] == mode) && (indexchaine < length)) { while ((liste[1][indexliste] == mode) && (indexchaine < length)) {
liste[0][indexliste]++; liste[0][indexliste]++;
indexchaine++; indexchaine++;
@ -457,38 +607,18 @@ static int pdf_initial(struct zint_symbol *symbol, unsigned char chaine[], const
} while (indexchaine < length); } while (indexchaine < length);
if (debug_print) { if (debug_print) {
printf("\r\nInitial block pattern:\n"); printf("\nInitial block pattern:\n");
for (i = 0; i < indexliste; i++) { for (i = 0; i < indexliste; i++) {
printf("Len: %d Type: ", liste[0][i]); printf("Start: %d Len: %d Type: %s\n", liste[2][i], liste[0][i], pdf_mode_str(liste[1][i]));
switch (liste[1][i]) {
case TEX: printf("Text\n");
break;
case BYT: printf("Byte\n");
break;
case NUM: printf("Number\n");
break;
default: printf("ERROR\n"); /* Should never happen */ /* Not reached */
break;
}
} }
} }
pdf_appendix_d_encode(liste, &indexliste, debug_print); pdf_appendix_d_encode(chaine, liste, &indexliste, debug_print);
if (debug_print) { if (debug_print) {
printf("\r\nCompacted block pattern:\n"); printf("\nCompacted block pattern:\n");
for (i = 0; i < indexliste; i++) { for (i = 0; i < indexliste; i++) {
printf("Len: %d Type: ", liste[0][i]); printf("Start: %d Len: %d Type: %s\n", liste[2][i], liste[0][i], pdf_mode_str(liste[1][i]));
switch (liste[1][i]) {
case TEX: printf("Text\n");
break;
case BYT: printf("Byte\n");
break;
case NUM: printf("Number\n");
break;
default: printf("ERROR\n"); /* Should never happen */ /* Not reached */
break;
}
} }
} }
@ -522,25 +652,25 @@ static int pdf_initial(struct zint_symbol *symbol, unsigned char chaine[], const
} }
} }
/* Default mode for PDF417 is Text Compaction Alpha (ISO/IEC 1543:2015 5.4.2.1), and for MICROPDF417 is Byte
* Compaction (ISO/IEC 24728:2006 5.4.3) */
mode = is_micro ? BYT : TEX;
currenttext = 1; /* Start in upper alpha - tracked across calls to pdf_textprocess to allow for interleaving byte shifts */
for (i = 0; i < indexliste; i++) { for (i = 0; i < indexliste; i++) {
switch (liste[1][i]) { switch (liste[1][i]) {
case TEX: /* 547 - text mode */ case TEX: /* 547 - text mode */
pdf_textprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], mode, &currenttext); pdf_textprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], *p_lastmode, p_curtable,
mode = TEX; p_tex_padded);
*p_lastmode = TEX;
break; break;
case BYT: /* 670 - octet stream mode */ case BYT: /* 670 - octet stream mode */
pdf_byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], mode, debug_print); pdf_byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], *p_lastmode, debug_print);
if (mode != TEX || liste[0][i] != 1) { /* don't switch mode on single byte shift from text mode */ if (*p_lastmode != TEX || liste[0][i] != 1) { /* don't switch mode on single byte shift from text mode */
mode = BYT; *p_lastmode = BYT;
} else if (*p_curtable == T_PUNCT && *p_tex_padded) { /* If T_PUNCT and padded with AL */
/* Then need to reset to alpha - ISO/IEC 15438:2015 5.4.2.4 b) 2) */
*p_curtable = T_ALPHA;
} }
break; break;
case NUM: /* 712 - numeric mode */ case NUM: /* 712 - numeric mode */
pdf_numbprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i]); pdf_numbprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i]);
mode = NUM; *p_lastmode = NUM;
break; break;
} }
indexchaine = indexchaine + liste[0][i]; indexchaine = indexchaine + liste[0][i];
@ -558,6 +688,9 @@ static int pdf_initial_segs(struct zint_symbol *symbol, struct zint_seg segs[],
int i; int i;
int error_number = 0; int error_number = 0;
int structapp_cp = 0; int structapp_cp = 0;
int lastmode;
int curtable;
int tex_padded;
*p_mclength = 0; *p_mclength = 0;
@ -612,9 +745,15 @@ static int pdf_initial_segs(struct zint_symbol *symbol, struct zint_seg segs[],
} }
*p_structapp_cp = structapp_cp; *p_structapp_cp = structapp_cp;
/* Default mode for PDF417 is Text Compaction Alpha (ISO/IEC 15438:2015 5.4.2.1), and for MICROPDF417 is Byte
* Compaction (ISO/IEC 24728:2006 5.4.3) */
lastmode = is_micro ? BYT : TEX;
/* Start in upper alpha - tracked across calls to `pdf_textprocess()` to allow for interleaving byte shifts */
curtable = T_ALPHA;
for (i = 0; i < seg_count; i++) { for (i = 0; i < seg_count; i++) {
error_number = pdf_initial(symbol, segs[i].source, segs[i].length, segs[i].eci, is_micro, chainemc, error_number = pdf_initial(symbol, segs[i].source, segs[i].length, segs[i].eci, is_micro, &lastmode,
p_mclength); &curtable, &tex_padded, chainemc, p_mclength);
if (error_number) { /* Only errors return >= ZINT_ERROR */ if (error_number) { /* Only errors return >= ZINT_ERROR */
return error_number; return error_number;
} }
@ -1251,4 +1390,9 @@ INTERNAL int micropdf417(struct zint_symbol *symbol, struct zint_seg segs[], con
#undef BYT #undef BYT
#undef NUM #undef NUM
#undef T_ALPHA
#undef T_LOWER
#undef T_MIXED
#undef T_PUNCT
/* vim: set ts=4 sw=4 et : */ /* vim: set ts=4 sw=4 et : */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 942 B

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 192 B

View File

@ -1,6 +1,6 @@
/* /*
libzint - the open source barcode library libzint - the open source barcode library
Copyright (C) 2020 - 2021 Robin Stuart <rstuart114@gmail.com> Copyright (C) 2020-2022 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions modification, are permitted provided that the following conditions
@ -27,7 +27,7 @@
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE. SUCH DAMAGE.
*/ */
/* vim: set ts=4 sw=4 et : */ /* SPDX-License-Identifier: BSD-3-Clause */
#include "testcommon.h" #include "testcommon.h"
#include <sys/stat.h> #include <sys/stat.h>
@ -43,7 +43,7 @@ static void test_pixel_plot(int index, int debug) {
int repeat; int repeat;
int ret; int ret;
}; };
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
struct item data[] = { struct item data[] = {
/* 0*/ { 1, 1, "1", 0, 0 }, /* 0*/ { 1, 1, "1", 0, 0 },
/* 1*/ { 2, 1, "11", 0, 0 }, /* 1*/ { 2, 1, "11", 0, 0 },
@ -266,3 +266,5 @@ int main(int argc, char *argv[]) {
return 0; return 0;
} }
/* vim: set ts=4 sw=4 et : */

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@ static void test_pixel_plot(int index, int debug) {
int repeat; int repeat;
int ret; int ret;
}; };
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
struct item data[] = { struct item data[] = {
/* 0*/ { 1, 1, "1", 0, 0 }, /* 0*/ { 1, 1, "1", 0, 0 },
/* 1*/ { 2, 1, "11", 0, 0 }, /* 1*/ { 2, 1, "11", 0, 0 },
@ -352,14 +352,14 @@ static void test_wpng_error_handler(void) {
wpng_error.symbol = &symbol; wpng_error.symbol = &symbol;
// Create empty file /* Create empty file */
(void) remove(filename); // In case junk hanging around (void) remove(filename); /* In case junk hanging around */
fp = fopen(filename, "w+"); fp = fopen(filename, "w+");
assert_nonnull(fp, "fopen(%s) failed\n", filename); assert_nonnull(fp, "fopen(%s) failed\n", filename);
ret = fclose(fp); ret = fclose(fp);
assert_zero(ret, "fclose(%s) %d != 0\n", filename, ret); assert_zero(ret, "fclose(%s) %d != 0\n", filename, ret);
// Re-open for read, which will cause libpng to error /* Re-open for read, which will cause libpng to error */
fp = fopen(filename, "r"); fp = fopen(filename, "r");
assert_nonnull(fp, "fopen(%s) for read failed\n", filename); assert_nonnull(fp, "fopen(%s) for read failed\n", filename);
@ -378,7 +378,7 @@ static void test_wpng_error_handler(void) {
} else { } else {
png_init_io(png_ptr, fp); png_init_io(png_ptr, fp);
// This should fail and jmp to setjmp /* This should fail and jmp to setjmp */
png_write_info(png_ptr, info_ptr); png_write_info(png_ptr, info_ptr);
assert_zero(1, "libpng error setjmp failed\n"); assert_zero(1, "libpng error setjmp failed\n");
} }
@ -386,7 +386,7 @@ static void test_wpng_error_handler(void) {
testFinish(); testFinish();
} }
// Check compliant height printable for max CODABLOCKF with 44 rows * ((62 cols) * 0.55 + 3)) = 1632.4 /* Check compliant height printable for max CODABLOCKF with 44 rows * ((62 cols) * 0.55 + 3)) = 1632.4 */
static void test_large_compliant_height(void) { static void test_large_compliant_height(void) {
int ret; int ret;
struct zint_symbol *symbol = NULL; struct zint_symbol *symbol = NULL;

View File

@ -1128,48 +1128,48 @@ static void test_scale(int index, int debug) {
/* 6*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 0, 0, "1234", "", 0, 10, 2, 13, 26, 20, 0 /*set_row*/, 20, 20, 2 }, /* With no scaling */ /* 6*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 0, 0, "1234", "", 0, 10, 2, 13, 26, 20, 0 /*set_row*/, 20, 20, 2 }, /* With no scaling */
/* 7*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 0, 3, "1234", "", 0, 10, 2, 13, 26 * 3, 20 * 3, 0 /*set_row*/, 20 * 3, 20 * 3, 2 * 3 }, /* 7*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 0, 3, "1234", "", 0, 10, 2, 13, 26 * 3, 20 * 3, 0 /*set_row*/, 20 * 3, 20 * 3, 2 * 3 },
/* 8*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 13, 3, "1234", "", 0, 13, 2, 13, 26 * 3, 78, 0 /*set_row*/, 78, 20 * 3, 2 * 3 }, /* Height specified */ /* 8*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 13, 3, "1234", "", 0, 13, 2, 13, 26 * 3, 78, 0 /*set_row*/, 78, 20 * 3, 2 * 3 }, /* Height specified */
/* 9*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 18, 6, 103, 206, 36, 0 /*set_row*/, 36, 170, 14 }, /* With no scaling */ /* 9*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 15, 5, 103, 206, 30, 0 /*set_row*/, 30, 170, 14 }, /* With no scaling */
/* 10*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 18, 6, 103, 206 * 0.6, 36 * 0.6, 0 /*set_row*/, 36 * 0.6, 170 * 0.6 + 1, 14 * 0.6 }, /* +1 set_col due to some scaling inversion difference */ /* 10*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 15, 5, 103, 206 * 0.6, 30 * 0.6, 0 /*set_row*/, 30 * 0.6, 170 * 0.6 + 1, 14 * 0.6 }, /* +1 set_col due to some scaling inversion difference */
/* 11*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.2, "1", "", 0, 18, 6, 103, 206 * 1.2, 36 * 1.2, 0 /*set_row*/, 36 * 1.2, 170 * 1.2 + 1, 14 * 1.2 }, /* +1 set_col due to some scaling inversion difference */ /* 11*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.2, "1", "", 0, 15, 5, 103, 206 * 1.2, 30 * 1.2, 0 /*set_row*/, 30 * 1.2, 170 * 1.2 + 1, 14 * 1.2 }, /* +1 set_col due to some scaling inversion difference */
/* 12*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 36 * 0.5, 0 /*set_row*/, 36 * 0.5, 170 * 0.5, 14 * 0.5 }, /* 12*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 15, 5, 103, 206 * 0.5, 30 * 0.5, 0 /*set_row*/, 30 * 0.5, 170 * 0.5, 14 * 0.5 },
/* 13*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.0, "1", "", 0, 18, 6, 103, 206 * 1.0, 36 * 1.0, 0 /*set_row*/, 36 * 1.0, 170 * 1.0, 14 * 1.0 }, /* 13*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.0, "1", "", 0, 15, 5, 103, 206 * 1.0, 30 * 1.0, 0 /*set_row*/, 30 * 1.0, 170 * 1.0, 14 * 1.0 },
/* 14*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.5, "1", "", 0, 18, 6, 103, 206 * 1.5, 36 * 1.5, 0 /*set_row*/, 36 * 1.5, 170 * 1.5, 14 * 1.5 }, /* 14*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.5, "1", "", 0, 15, 5, 103, 206 * 1.5, 30 * 1.5, 0 /*set_row*/, 30 * 1.5, 170 * 1.5, 14 * 1.5 },
/* 15*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.0, "1", "", 0, 18, 6, 103, 206 * 2.0, 36 * 2.0, 0 /*set_row*/, 36 * 2.0, 170 * 2.0, 14 * 2.0 }, /* 15*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.0, "1", "", 0, 15, 5, 103, 206 * 2.0, 30 * 2.0, 0 /*set_row*/, 30 * 2.0, 170 * 2.0, 14 * 2.0 },
/* 16*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.5, "1", "", 0, 18, 6, 103, 206 * 2.5, 36 * 2.5, 0 /*set_row*/, 36 * 2.5, 170 * 2.5, 14 * 2.5 }, /* 16*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.5, "1", "", 0, 15, 5, 103, 206 * 2.5, 30 * 2.5, 0 /*set_row*/, 30 * 2.5, 170 * 2.5, 14 * 2.5 },
/* 17*/ { BARCODE_PDF417, -1, -1, -1, 0, 3.0, "1", "", 0, 18, 6, 103, 206 * 3.0, 36 * 3.0, 0 /*set_row*/, 36 * 3.0, 170 * 3.0, 14 * 3.0 }, /* 17*/ { BARCODE_PDF417, -1, -1, -1, 0, 3.0, "1", "", 0, 15, 5, 103, 206 * 3.0, 30 * 3.0, 0 /*set_row*/, 30 * 3.0, 170 * 3.0, 14 * 3.0 },
/* 18*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0, "1", "", 0, 18, 6, 103, 218, 48, 0 /*set_row*/, 48, 176, 14 }, /* With no scaling */ /* 18*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0, "1", "", 0, 15, 5, 103, 218, 42, 0 /*set_row*/, 42, 176, 14 }, /* With no scaling */
/* 19*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0.6, "1", "", 0, 18, 6, 103, 218 * 0.6, 48 * 0.6, 0 /*set_row*/, 48 * 0.6, 176 * 0.6 + 1, 14 * 0.6 }, /* +1 set_col due to some scaling inversion difference */ /* 19*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0.6, "1", "", 0, 15, 5, 103, 218 * 0.6, 42 * 0.6, 0 /*set_row*/, 42 * 0.6, 176 * 0.6 + 1, 14 * 0.6 }, /* +1 set_col due to some scaling inversion difference */
/* 20*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.6, "1", "", 0, 18, 6, 103, 218 * 1.6, 48 * 1.6, 0 /*set_row*/, 48 * 1.6, 176 * 1.6 + 1, 14 * 1.6 }, /* +1 set_col due to some scaling inversion difference */ /* 20*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.6, "1", "", 0, 15, 5, 103, 218 * 1.6, 42 * 1.6, 0 /*set_row*/, 42 * 1.6, 176 * 1.6 + 1, 14 * 1.6 }, /* +1 set_col due to some scaling inversion difference */
/* 21*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.5, "1", "", 0, 18, 6, 103, 218 * 1.5, 48 * 1.5, 0 /*set_row*/, 48 * 1.5, 176 * 1.5, 14 * 1.5 }, /* 21*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.5, "1", "", 0, 15, 5, 103, 218 * 1.5, 42 * 1.5, 0 /*set_row*/, 42 * 1.5, 176 * 1.5, 14 * 1.5 },
/* 22*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 2.5, "1", "", 0, 18, 6, 103, 218 * 2.5, 48 * 2.5, 0 /*set_row*/, 48 * 2.5, 176 * 2.5, 14 * 2.5 }, /* 22*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 2.5, "1", "", 0, 15, 5, 103, 218 * 2.5, 42 * 2.5, 0 /*set_row*/, 42 * 2.5, 176 * 2.5, 14 * 2.5 },
/* 23*/ { BARCODE_PDF417, -1, 3, OUT_BUFFER_INTERMEDIATE, 0, 1.3, "1", "", 0, 18, 6, 103, 206 * 1.3, 36 * 1.3, 0 /*set_row*/, 36 * 1.3, 170 * 1.3, 14 * 1.3 }, /* 23*/ { BARCODE_PDF417, -1, 3, OUT_BUFFER_INTERMEDIATE, 0, 1.3, "1", "", 0, 15, 5, 103, 206 * 1.3, 30 * 1.3, 0 /*set_row*/, 30 * 1.3, 170 * 1.3, 14 * 1.3 },
/* 24*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 36 * 0.5, 0 /*set_row*/, 36 * 0.5, 170 * 0.5, 14 * 0.5 }, /* 24*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 15, 5, 103, 206 * 0.5, 30 * 0.5, 0 /*set_row*/, 30 * 0.5, 170 * 0.5, 14 * 0.5 },
/* 25*/ { BARCODE_PDF417, -1, -1, -1, 1, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 25*/ { BARCODE_PDF417, -1, -1, -1, 1, 0.5, "1", "", 0, 5, 5, 103, 206 * 0.5, 5, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 26*/ { BARCODE_PDF417, -1, -1, -1, 5, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 26*/ { BARCODE_PDF417, -1, -1, -1, 5, 0.5, "1", "", 0, 5, 5, 103, 206 * 0.5, 5, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 27*/ { BARCODE_PDF417, -1, -1, -1, 6, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 27*/ { BARCODE_PDF417, -1, -1, -1, 6, 0.5, "1", "", 0, 5, 5, 103, 206 * 0.5, 5, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 28*/ { BARCODE_PDF417, -1, -1, -1, 7, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 28*/ { BARCODE_PDF417, -1, -1, -1, 7, 0.5, "1", "", 0, 5, 5, 103, 206 * 0.5, 5, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 29*/ { BARCODE_PDF417, -1, -1, -1, 8, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 29*/ { BARCODE_PDF417, -1, -1, -1, 8, 0.5, "1", "", 0, 10, 5, 103, 206 * 0.5, 10, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 30*/ { BARCODE_PDF417, -1, -1, -1, 9, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 30*/ { BARCODE_PDF417, -1, -1, -1, 9, 0.5, "1", "", 0, 10, 5, 103, 206 * 0.5, 10, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 31*/ { BARCODE_PDF417, -1, -1, -1, 10, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 31*/ { BARCODE_PDF417, -1, -1, -1, 10, 0.5, "1", "", 0, 10, 5, 103, 206 * 0.5, 10, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 32*/ { BARCODE_PDF417, -1, -1, -1, 11, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 32*/ { BARCODE_PDF417, -1, -1, -1, 11, 0.5, "1", "", 0, 10, 5, 103, 206 * 0.5, 10, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 33*/ { BARCODE_PDF417, -1, -1, -1, 12, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 33*/ { BARCODE_PDF417, -1, -1, -1, 12, 0.5, "1", "", 0, 10, 5, 103, 206 * 0.5, 10, 0 /*set_row*/, 5, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 34*/ { BARCODE_PDF417, -1, -1, -1, 13, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 34*/ { BARCODE_PDF417, -1, -1, -1, 13, 0.5, "1", "", 0, 15, 5, 103, 206 * 0.5, 15, 0 /*set_row*/, 15, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 35*/ { BARCODE_PDF417, -1, -1, -1, 14, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 35*/ { BARCODE_PDF417, -1, -1, -1, 14, 0.5, "1", "", 0, 15, 5, 103, 206 * 0.5, 15, 0 /*set_row*/, 15, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 36*/ { BARCODE_PDF417, -1, -1, -1, 15, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 36*/ { BARCODE_PDF417, -1, -1, -1, 15, 0.5, "1", "", 0, 15, 5, 103, 206 * 0.5, 15, 0 /*set_row*/, 15, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 37*/ { BARCODE_PDF417, -1, -1, -1, 16, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 37*/ { BARCODE_PDF417, -1, -1, -1, 16, 0.5, "1", "", 0, 15, 5, 103, 206 * 0.5, 15, 0 /*set_row*/, 15, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 38*/ { BARCODE_PDF417, -1, -1, -1, 17, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 38*/ { BARCODE_PDF417, -1, -1, -1, 17, 0.5, "1", "", 0, 15, 5, 103, 206 * 0.5, 15, 0 /*set_row*/, 15, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 39*/ { BARCODE_PDF417, -1, -1, -1, 18, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 39*/ { BARCODE_PDF417, -1, -1, -1, 18, 0.5, "1", "", 0, 20, 5, 103, 206 * 0.5, 20, 0 /*set_row*/, 20, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 40*/ { BARCODE_PDF417, -1, -1, -1, 19, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 40*/ { BARCODE_PDF417, -1, -1, -1, 19, 0.5, "1", "", 0, 20, 5, 103, 206 * 0.5, 20, 0 /*set_row*/, 20, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 41*/ { BARCODE_PDF417, -1, -1, -1, 20, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 41*/ { BARCODE_PDF417, -1, -1, -1, 20, 0.5, "1", "", 0, 20, 5, 103, 206 * 0.5, 20, 0 /*set_row*/, 20, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 42*/ { BARCODE_PDF417, -1, -1, -1, 21, 0.5, "1", "", 0, 24, 6, 103, 206 * 0.5, 24, 0 /*set_row*/, 24, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 42*/ { BARCODE_PDF417, -1, -1, -1, 21, 0.5, "1", "", 0, 20, 5, 103, 206 * 0.5, 20, 0 /*set_row*/, 20, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 43*/ { BARCODE_PDF417, -1, -1, -1, 38, 0.5, "1", "", 0, 36, 6, 103, 206 * 0.5, 36, 0 /*set_row*/, 36, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 43*/ { BARCODE_PDF417, -1, -1, -1, 38, 0.5, "1", "", 0, 40, 5, 103, 206 * 0.5, 40, 0 /*set_row*/, 40, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 44*/ { BARCODE_PDF417, -1, -1, -1, 39, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 44*/ { BARCODE_PDF417, -1, -1, -1, 39, 0.5, "1", "", 0, 40, 5, 103, 206 * 0.5, 40, 0 /*set_row*/, 40, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 45*/ { BARCODE_PDF417, -1, -1, -1, 40, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 45*/ { BARCODE_PDF417, -1, -1, -1, 40, 0.5, "1", "", 0, 40, 5, 103, 206 * 0.5, 40, 0 /*set_row*/, 40, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 46*/ { BARCODE_PDF417, -1, -1, -1, 41, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 46*/ { BARCODE_PDF417, -1, -1, -1, 41, 0.5, "1", "", 0, 40, 5, 103, 206 * 0.5, 40, 0 /*set_row*/, 40, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 47*/ { BARCODE_PDF417, -1, -1, -1, 42, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 47*/ { BARCODE_PDF417, -1, -1, -1, 42, 0.5, "1", "", 0, 40, 5, 103, 206 * 0.5, 40, 0 /*set_row*/, 40, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 48*/ { BARCODE_PDF417, -1, -1, -1, 43, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 48*/ { BARCODE_PDF417, -1, -1, -1, 43, 0.5, "1", "", 0, 45, 5, 103, 206 * 0.5, 45, 0 /*set_row*/, 45, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 49*/ { BARCODE_PDF417, -1, -1, -1, 44, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 49*/ { BARCODE_PDF417, -1, -1, -1, 44, 0.5, "1", "", 0, 45, 5, 103, 206 * 0.5, 45, 0 /*set_row*/, 45, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 50*/ { BARCODE_PDF417, -1, -1, -1, 45, 0.5, "1", "", 0, 48, 6, 103, 206 * 0.5, 48, 0 /*set_row*/, 48, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 50*/ { BARCODE_PDF417, -1, -1, -1, 45, 0.5, "1", "", 0, 45, 5, 103, 206 * 0.5, 45, 0 /*set_row*/, 45, 170 * 0.5, 14 * 0.5 }, /* Height specified */
/* 51*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 0, "123456789012", "", 0, 50, 1, 79, 158, 116, 104 /*set_row*/, 114, 20, 2 }, /* With no scaling */ /* 51*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 0, "123456789012", "", 0, 50, 1, 79, 158, 116, 104 /*set_row*/, 114, 20, 2 }, /* With no scaling */
/* 52*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 1.5, "123456789012", "", 0, 50, 1, 79, 158 * 1.5, 116 * 1.5, 104 * 1.5 /*set_row*/, 114 * 1.5, 20 * 1.5, 1 * 1.5 }, /* 52*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 1.5, "123456789012", "", 0, 50, 1, 79, 158 * 1.5, 116 * 1.5, 104 * 1.5 /*set_row*/, 114 * 1.5, 20 * 1.5, 1 * 1.5 },
/* 53*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 2.0, "123456789012", "", 0, 50, 1, 79, 158 * 2.0, 116 * 2.0, 104 * 2.0 /*set_row*/, 114 * 2.0, 20 * 2.0, 1 * 2.0 }, /* 53*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 2.0, "123456789012", "", 0, 50, 1, 79, 158 * 2.0, 116 * 2.0, 104 * 2.0 /*set_row*/, 114 * 2.0, 20 * 2.0, 1 * 2.0 },
@ -1788,56 +1788,59 @@ static void test_buffer_plot(int index, int generate, int debug) {
char *expected_bitmap; char *expected_bitmap;
}; };
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_PDF417, 0, 1, -1, -1, 15, "", "", "1", 0, 15, 5, 86, 86, 15, /* 0*/ { BARCODE_PDF417, 0, 1, -1, -1, 15, "", "", "1", 0, 16, 4, 86, 86, 16,
"11111111010101000111101010111100001110101001110000011101010111000000111111101000101001" "11111111010101000111101010111100001111101010111110011101010111000000111111101000101001"
"11111111010101000111101010111100001110101001110000011101010111000000111111101000101001" "11111111010101000111101010111100001111101010111110011101010111000000111111101000101001"
"11111111010101000111101010111100001110101001110000011101010111000000111111101000101001" "11111111010101000111101010111100001111101010111110011101010111000000111111101000101001"
"11111111010101000111111010101110001011111101001100011111101010111000111111101000101001" "11111111010101000111101010111100001111101010111110011101010111000000111111101000101001"
"11111111010101000111111010101110001011111101001100011111101010111000111111101000101001" "11111111010101000111110101011000001111000001000101011111101010111000111111101000101001"
"11111111010101000111111010101110001011111101001100011111101010111000111111101000101001" "11111111010101000111110101011000001111000001000101011111101010111000111111101000101001"
"11111111010101000110101011111000001111110101101000011101010111111000111111101000101001" "11111111010101000111110101011000001111000001000101011111101010111000111111101000101001"
"11111111010101000110101011111000001111110101101000011101010111111000111111101000101001" "11111111010101000111110101011000001111000001000101011111101010111000111111101000101001"
"11111111010101000110101011111000001111110101101000011101010111111000111111101000101001" "11111111010101000110101011111000001111011111101011011010101111100000111111101000101001"
"11111111010101000101011110011110001110111101100100011010111101111100111111101000101001" "11111111010101000110101011111000001111011111101011011010101111100000111111101000101001"
"11111111010101000101011110011110001110111101100100011010111101111100111111101000101001" "11111111010101000110101011111000001111011111101011011010101111100000111111101000101001"
"11111111010101000101011110011110001110111101100100011010111101111100111111101000101001" "11111111010101000110101011111000001111011111101011011010101111100000111111101000101001"
"11111111010101000111010111001100001110100111000110011101011100110000111111101000101001" "11111111010101000101011110011110001010000010001000011010111101111100111111101000101001"
"11111111010101000111010111001100001110100111000110011101011100110000111111101000101001" "11111111010101000101011110011110001010000010001000011010111101111100111111101000101001"
"11111111010101000111010111001100001110100111000110011101011100110000111111101000101001" "11111111010101000101011110011110001010000010001000011010111101111100111111101000101001"
"11111111010101000101011110011110001010000010001000011010111101111100111111101000101001"
}, },
/* 1*/ { BARCODE_PDF417, 0, 1, -1, -1, 15, "FF0000", "00FF0099", "1", 0, 15, 5, 86, 86, 15, /* 1*/ { BARCODE_PDF417, 0, 1, -1, -1, 15, "FF0000", "00FF0099", "1", 0, 16, 4, 86, 86, 16,
"RRRRRRRRGRGRGRGGGRRRRGRGRGRRRRGGGGRRRGRGRGGRRRGGGGGRRRGRGRGRRRGGGGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRRRGRGRGRRRRGGGGRRRRRGRGRGRRRRRGGRRRGRGRGRRRGGGGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRRRGRGRGRRRRGGGGRRRGRGRGGRRRGGGGGRRRGRGRGRRRGGGGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRRRGRGRGRRRRGGGGRRRRRGRGRGRRRRRGGRRRGRGRGRRRGGGGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRRRGRGRGRRRRGGGGRRRGRGRGGRRRGGGGGRRRGRGRGRRRGGGGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRRRGRGRGRRRRGGGGRRRRRGRGRGRRRRRGGRRRGRGRGRRRGGGGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRRRRRGRGRGRRRGGGRGRRRRRRGRGGRRGGGRRRRRRGRGRGRRRGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRRRGRGRGRRRRGGGGRRRRRGRGRGRRRRRGGRRRGRGRGRRRGGGGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRRRRRGRGRGRRRGGGRGRRRRRRGRGGRRGGGRRRRRRGRGRGRRRGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRRRRGRGRGRRGGGGGRRRRGGGGGRGGGRGRGRRRRRRGRGRGRRRGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRRRRRGRGRGRRRGGGRGRRRRRRGRGGRRGGGRRRRRRGRGRGRRRGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRRRRGRGRGRRGGGGGRRRRGGGGGRGGGRGRGRRRRRRGRGRGRRRGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRGRGRGRRRRRGGGGGRRRRRRGRGRRGRGGGGRRRGRGRGRRRRRRGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRRRRGRGRGRRGGGGGRRRRGGGGGRGGGRGRGRRRRRRGRGRGRRRGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRGRGRGRRRRRGGGGGRRRRRRGRGRRGRGGGGRRRGRGRGRRRRRRGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRRRRGRGRGRRGGGGGRRRRGGGGGRGGGRGRGRRRRRRGRGRGRRRGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRGRGRGRRRRRGGGGGRRRRRRGRGRRGRGGGGRRRGRGRGRRRRRRGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRGRGRGRRRRRGGGGGRRRRGRRRRRRGRGRRGRRGRGRGRRRRRGGGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRGRGRRRRGGRRRRGGGRRRGRRRRGRRGGRGGGRRGRGRRRRGRRRRRGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRGRGRGRRRRRGGGGGRRRRGRRRRRRGRGRRGRRGRGRGRRRRRGGGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRGRGRRRRGGRRRRGGGRRRGRRRRGRRGGRGGGRRGRGRRRRGRRRRRGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRGRGRGRRRRRGGGGGRRRRGRRRRRRGRGRRGRRGRGRGRRRRRGGGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRGRGRRRRGGRRRRGGGRRRGRRRRGRRGGRGGGRRGRGRRRRGRRRRRGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRRGRGRGRRRRRGGGGGRRRRGRRRRRRGRGRRGRRGRGRGRRRRRGGGGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRRGRGRRRGGRRGGGGRRRGRGGRRRGGGRRGGRRRGRGRRRGGRRGGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRGRGRRRRGGRRRRGGGRGRGGGGGRGGGRGGGGRRGRGRRRRGRRRRRGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRRGRGRRRGGRRGGGGRRRGRGGRRRGGGRRGGRRRGRGRRRGGRRGGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRGRGRRRRGGRRRRGGGRGRGGGGGRGGGRGGGGRRGRGRRRRGRRRRRGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRRRGRGRRRGGRRGGGGRRRGRGGRRRGGGRRGGRRRGRGRRRGGRRGGGGRRRRRRRGRGGGRGRGGR" "RRRRRRRRGRGRGRGGGRGRGRRRRGGRRRRGGGRGRGGGGGRGGGRGGGGRRGRGRRRRGRRRRRGGRRRRRRRGRGGGRGRGGR"
"RRRRRRRRGRGRGRGGGRGRGRRRRGGRRRRGGGRGRGGGGGRGGGRGGGGRRGRGRRRRGRRRRRGGRRRRRRRGRGGGRGRGGR"
}, },
/* 2*/ { BARCODE_PDF417, 0, 1, 1, -1, 15, "FFFF0033", "00FF00", "1", 0, 15, 5, 86, 88, 15, /* 2*/ { BARCODE_PDF417, 0, 1, 1, -1, 15, "FFFF0033", "00FF00", "1", 0, 16, 4, 86, 88, 16,
"GYYYYYYYYGYGYGYGGGYYYYGYGYGYYYYGGGGYYYGYGYGGYYYGGGGGYYYGYGYGYYYGGGGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYYYGYGYGYYYYGGGGYYYYYGYGYGYYYYYGGYYYGYGYGYYYGGGGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYYYGYGYGYYYYGGGGYYYGYGYGGYYYGGGGGYYYGYGYGYYYGGGGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYYYGYGYGYYYYGGGGYYYYYGYGYGYYYYYGGYYYGYGYGYYYGGGGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYYYGYGYGYYYYGGGGYYYGYGYGGYYYGGGGGYYYGYGYGYYYGGGGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYYYGYGYGYYYYGGGGYYYYYGYGYGYYYYYGGYYYGYGYGYYYGGGGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYYYYYGYGYGYYYGGGYGYYYYYYGYGGYYGGGYYYYYYGYGYGYYYGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYYYGYGYGYYYYGGGGYYYYYGYGYGYYYYYGGYYYGYGYGYYYGGGGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYYYYYGYGYGYYYGGGYGYYYYYYGYGGYYGGGYYYYYYGYGYGYYYGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYYYYGYGYGYYGGGGGYYYYGGGGGYGGGYGYGYYYYYYGYGYGYYYGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYYYYYGYGYGYYYGGGYGYYYYYYGYGGYYGGGYYYYYYGYGYGYYYGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYYYYGYGYGYYGGGGGYYYYGGGGGYGGGYGYGYYYYYYGYGYGYYYGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYGYGYGYYYYYGGGGGYYYYYYGYGYYGYGGGGYYYGYGYGYYYYYYGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYYYYGYGYGYYGGGGGYYYYGGGGGYGGGYGYGYYYYYYGYGYGYYYGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYGYGYGYYYYYGGGGGYYYYYYGYGYYGYGGGGYYYGYGYGYYYYYYGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYYYYGYGYGYYGGGGGYYYYGGGGGYGGGYGYGYYYYYYGYGYGYYYGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYGYGYGYYYYYGGGGGYYYYYYGYGYYGYGGGGYYYGYGYGYYYYYYGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYGYGYGYYYYYGGGGGYYYYGYYYYYYGYGYYGYYGYGYGYYYYYGGGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYGYGYYYYGGYYYYGGGYYYGYYYYGYYGGYGGGYYGYGYYYYGYYYYYGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYGYGYGYYYYYGGGGGYYYYGYYYYYYGYGYYGYYGYGYGYYYYYGGGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYGYGYYYYGGYYYYGGGYYYGYYYYGYYGGYGGGYYGYGYYYYGYYYYYGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYGYGYGYYYYYGGGGGYYYYGYYYYYYGYGYYGYYGYGYGYYYYYGGGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYGYGYYYYGGYYYYGGGYYYGYYYYGYYGGYGGGYYGYGYYYYGYYYYYGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYYGYGYGYYYYYGGGGGYYYYGYYYYYYGYGYYGYYGYGYGYYYYYGGGGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYYGYGYYYGGYYGGGGYYYGYGGYYYGGGYYGGYYYGYGYYYGGYYGGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYGYGYYYYGGYYYYGGGYGYGGGGGYGGGYGGGGYYGYGYYYYGYYYYYGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYYGYGYYYGGYYGGGGYYYGYGGYYYGGGYYGGYYYGYGYYYGGYYGGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYGYGYYYYGGYYYYGGGYGYGGGGGYGGGYGGGGYYGYGYYYYGYYYYYGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYYYGYGYYYGGYYGGGGYYYGYGGYYYGGGYYGGYYYGYGYYYGGYYGGGGYYYYYYYGYGGGYGYGGYG" "GYYYYYYYYGYGYGYGGGYGYGYYYYGGYYYYGGGYGYGGGGGYGGGYGGGGYYGYGYYYYGYYYYYGGYYYYYYYGYGGGYGYGGYG"
"GYYYYYYYYGYGYGYGGGYGYGYYYYGGYYYYGGGYGYGGGGGYGGGYGGGGYYGYGYYYYGYYYYYGGYYYYYYYGYGGGYGYGGYG"
}, },
/* 3*/ { BARCODE_ULTRA, -1, -1, -1, -1, 13, "FF00007F", "00FF0000", "1", 0, 13, 13, 13, 13, 13, /* 3*/ { BARCODE_ULTRA, -1, -1, -1, -1, 13, "FF00007F", "00FF0000", "1", 0, 13, 13, 13, 13, 13,
"1111111111111" "1111111111111"

View File

@ -905,10 +905,10 @@ static void test_scale(int index, int debug) {
}; };
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 18, 6, 103, 206, 36, 1, 52, 0, 8, 6 }, /* With no scaling */ /* 0*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 15, 5, 103, 206, 30, 1, 52, 0, 8, 6 }, /* With no scaling */
/* 1*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.1, "1", "", 0, 18, 6, 103, 206 * 0.1, 3.6000001, 1, 5.2000003, 0, 8 * 0.1, 6 * 0.1 }, /* 1*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.1, "1", "", 0, 15, 5, 103, 206 * 0.1, 3, 1, 5.2000003, 0, 8 * 0.1, 6 * 0.1 },
/* 2*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.3, "1", "", 0, 18, 6, 103, 61.8000031, 36 * 0.3, 1, 52 * 0.3, 0, 2.4000001, 1.8000001 }, /* 2*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.3, "1", "", 0, 15, 5, 103, 61.8000031, 30 * 0.3, 1, 52 * 0.3, 0, 2.4000001, 1.8000001 },
/* 3*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 18, 6, 103, 123.600006, 36 * 0.6, 1, 52 * 0.6, 0, 4.8000002, 3.6000001 }, /* 3*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 15, 5, 103, 123.600006, 30 * 0.6, 1, 52 * 0.6, 0, 4.8000002, 3.6000001 },
/* 4*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142, 116.400002, 1, 34, 36, 2, 64 }, /* With no scaling */ /* 4*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142, 116.400002, 1, 34, 36, 2, 64 }, /* With no scaling */
/* 5*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0.1, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 0.1, 11.6400003, 1, 34 * 0.1, 3.6000001, 2 * 0.1, 64 * 0.1 }, /* 5*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0.1, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 0.1, 11.6400003, 1, 34 * 0.1, 3.6000001, 2 * 0.1, 64 * 0.1 },
/* 6*/ { BARCODE_UPCE_CC, -1, -1, -1, 0.1, 0.1, "1234567", "[17]010615[10]A123456\"", 0, 18.5, 10, 55, 142 * 0.1, 5.34000015, 1, 34 * 0.1, 3.6000001, 2 * 0.1, 0.1 }, /* Height specified */ /* 6*/ { BARCODE_UPCE_CC, -1, -1, -1, 0.1, 0.1, "1234567", "[17]010615[10]A123456\"", 0, 18.5, 10, 55, 142 * 0.1, 5.34000015, 1, 34 * 0.1, 3.6000001, 2 * 0.1, 0.1 }, /* Height specified */

View File

@ -39,6 +39,7 @@ run_bwipp_test "test_maxicode" "input"
run_bwipp_test "test_maxicode" "encode" run_bwipp_test "test_maxicode" "encode"
run_bwipp_test "test_maxicode" "encode_segs" run_bwipp_test "test_maxicode" "encode_segs"
run_bwipp_test "test_medical" "encode" run_bwipp_test "test_medical" "encode"
run_bwipp_test "test_pdf417" "input"
run_bwipp_test "test_pdf417" "encode" run_bwipp_test "test_pdf417" "encode"
run_bwipp_test "test_pdf417" "encode_segs" run_bwipp_test "test_pdf417" "encode_segs"
run_bwipp_test "test_plessey" "encode" run_bwipp_test "test_plessey" "encode"

View File

@ -31,6 +31,8 @@ run_zxingcpp_test "test_maxicode" "input"
run_zxingcpp_test "test_maxicode" "encode" run_zxingcpp_test "test_maxicode" "encode"
run_zxingcpp_test "test_maxicode" "encode_segs" run_zxingcpp_test "test_maxicode" "encode_segs"
run_zxingcpp_test "test_medical" "encode" run_zxingcpp_test "test_medical" "encode"
run_zxingcpp_test "test_pdf417" "reader_init"
run_zxingcpp_test "test_pdf417" "input"
run_zxingcpp_test "test_pdf417" "encode" run_zxingcpp_test "test_pdf417" "encode"
run_zxingcpp_test "test_pdf417" "encode_segs" run_zxingcpp_test "test_pdf417" "encode_segs"
run_zxingcpp_test "test_qr" run_zxingcpp_test "test_qr"

51
docs/images/bc412.svg Normal file
View File

@ -0,0 +1,51 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="123" height="32" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol
</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="123" height="32" fill="#FFFFFF" />
<rect x="0.00" y="0.00" width="1.20" height="20.00" />
<rect x="3.60" y="0.00" width="1.20" height="20.00" />
<rect x="6.00" y="0.00" width="1.20" height="20.00" />
<rect x="10.80" y="0.00" width="1.20" height="20.00" />
<rect x="14.40" y="0.00" width="1.20" height="20.00" />
<rect x="18.00" y="0.00" width="1.20" height="20.00" />
<rect x="22.80" y="0.00" width="1.20" height="20.00" />
<rect x="25.20" y="0.00" width="1.20" height="20.00" />
<rect x="27.60" y="0.00" width="1.20" height="20.00" />
<rect x="32.40" y="0.00" width="1.20" height="20.00" />
<rect x="37.20" y="0.00" width="1.20" height="20.00" />
<rect x="39.60" y="0.00" width="1.20" height="20.00" />
<rect x="42.00" y="0.00" width="1.20" height="20.00" />
<rect x="46.80" y="0.00" width="1.20" height="20.00" />
<rect x="49.20" y="0.00" width="1.20" height="20.00" />
<rect x="51.60" y="0.00" width="1.20" height="20.00" />
<rect x="58.80" y="0.00" width="1.20" height="20.00" />
<rect x="61.20" y="0.00" width="1.20" height="20.00" />
<rect x="63.60" y="0.00" width="1.20" height="20.00" />
<rect x="67.20" y="0.00" width="1.20" height="20.00" />
<rect x="69.60" y="0.00" width="1.20" height="20.00" />
<rect x="75.60" y="0.00" width="1.20" height="20.00" />
<rect x="78.00" y="0.00" width="1.20" height="20.00" />
<rect x="81.60" y="0.00" width="1.20" height="20.00" />
<rect x="85.20" y="0.00" width="1.20" height="20.00" />
<rect x="90.00" y="0.00" width="1.20" height="20.00" />
<rect x="92.40" y="0.00" width="1.20" height="20.00" />
<rect x="96.00" y="0.00" width="1.20" height="20.00" />
<rect x="100.80" y="0.00" width="1.20" height="20.00" />
<rect x="104.40" y="0.00" width="1.20" height="20.00" />
<rect x="106.80" y="0.00" width="1.20" height="20.00" />
<rect x="109.20" y="0.00" width="1.20" height="20.00" />
<rect x="111.60" y="0.00" width="1.20" height="20.00" />
<rect x="118.80" y="0.00" width="1.20" height="20.00" />
<rect x="121.20" y="0.00" width="1.20" height="20.00" />
<text x="61.20" y="29.24" text-anchor="middle"
font-family="Helvetica, sans-serif" font-size="8.4" >
AQQ45670
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -11,89 +11,109 @@
<rect x="12.00" y="1.20" width="2.40" height="36.00" /> <rect x="12.00" y="1.20" width="2.40" height="36.00" />
<rect x="15.60" y="1.20" width="1.20" height="36.00" /> <rect x="15.60" y="1.20" width="1.20" height="36.00" />
<rect x="21.60" y="1.20" width="1.20" height="36.00" /> <rect x="21.60" y="1.20" width="1.20" height="36.00" />
<rect x="25.20" y="1.20" width="1.20" height="36.00" /> <rect x="25.20" y="1.20" width="1.20" height="11.40" />
<rect x="27.60" y="1.20" width="4.80" height="36.00" /> <rect x="27.60" y="1.20" width="4.80" height="11.40" />
<rect x="33.60" y="1.20" width="3.60" height="36.00" /> <rect x="33.60" y="1.20" width="3.60" height="11.40" />
<rect x="38.40" y="1.20" width="1.20" height="12.00" /> <rect x="38.40" y="1.20" width="1.20" height="11.40" />
<rect x="42.00" y="1.20" width="1.20" height="12.00" /> <rect x="42.00" y="1.20" width="1.20" height="11.40" />
<rect x="44.40" y="1.20" width="2.40" height="12.00" /> <rect x="44.40" y="1.20" width="2.40" height="11.40" />
<rect x="51.60" y="1.20" width="1.20" height="36.00" /> <rect x="51.60" y="1.20" width="1.20" height="11.40" />
<rect x="56.40" y="1.20" width="1.20" height="12.00" /> <rect x="56.40" y="1.20" width="1.20" height="11.40" />
<rect x="61.20" y="1.20" width="2.40" height="12.00" /> <rect x="61.20" y="1.20" width="2.40" height="11.40" />
<rect x="64.80" y="1.20" width="1.20" height="12.00" /> <rect x="64.80" y="1.20" width="1.20" height="11.40" />
<rect x="69.60" y="1.20" width="3.60" height="12.00" /> <rect x="69.60" y="1.20" width="3.60" height="11.40" />
<rect x="74.40" y="1.20" width="2.40" height="12.00" /> <rect x="74.40" y="1.20" width="2.40" height="11.40" />
<rect x="78.00" y="1.20" width="1.20" height="36.00" /> <rect x="78.00" y="1.20" width="1.20" height="11.40" />
<rect x="80.40" y="1.20" width="2.40" height="12.00" /> <rect x="80.40" y="1.20" width="2.40" height="11.40" />
<rect x="86.40" y="1.20" width="1.20" height="12.00" /> <rect x="86.40" y="1.20" width="1.20" height="11.40" />
<rect x="91.20" y="1.20" width="1.20" height="12.00" /> <rect x="91.20" y="1.20" width="1.20" height="11.40" />
<rect x="93.60" y="1.20" width="1.20" height="12.00" /> <rect x="93.60" y="1.20" width="1.20" height="11.40" />
<rect x="98.40" y="1.20" width="2.40" height="12.00" /> <rect x="98.40" y="1.20" width="2.40" height="11.40" />
<rect x="104.40" y="1.20" width="1.20" height="12.00" /> <rect x="104.40" y="1.20" width="1.20" height="11.40" />
<rect x="109.20" y="1.20" width="1.20" height="12.00" /> <rect x="109.20" y="1.20" width="1.20" height="11.40" />
<rect x="111.60" y="1.20" width="2.40" height="12.00" /> <rect x="111.60" y="1.20" width="2.40" height="11.40" />
<rect x="117.60" y="1.20" width="1.20" height="12.00" /> <rect x="117.60" y="1.20" width="1.20" height="11.40" />
<rect x="122.40" y="1.20" width="2.40" height="12.00" /> <rect x="122.40" y="1.20" width="2.40" height="11.40" />
<rect x="126.00" y="1.20" width="3.60" height="12.00" /> <rect x="126.00" y="1.20" width="3.60" height="11.40" />
<rect x="130.80" y="1.20" width="1.20" height="12.00" /> <rect x="130.80" y="1.20" width="1.20" height="11.40" />
<rect x="135.60" y="1.20" width="3.60" height="12.00" /> <rect x="135.60" y="1.20" width="3.60" height="11.40" />
<rect x="140.40" y="1.20" width="2.40" height="12.00" /> <rect x="140.40" y="1.20" width="2.40" height="11.40" />
<rect x="144.00" y="1.20" width="1.20" height="24.00" /> <rect x="144.00" y="1.20" width="1.20" height="11.40" />
<rect x="148.80" y="1.20" width="1.20" height="12.00" /> <rect x="148.80" y="1.20" width="1.20" height="11.40" />
<rect x="153.60" y="1.20" width="2.40" height="24.00" /> <rect x="153.60" y="1.20" width="2.40" height="11.40" />
<rect x="157.20" y="1.20" width="3.60" height="12.00" /> <rect x="157.20" y="1.20" width="3.60" height="11.40" />
<rect x="162.00" y="1.20" width="1.20" height="12.00" /> <rect x="162.00" y="1.20" width="1.20" height="11.40" />
<rect x="164.40" y="1.20" width="4.80" height="24.00" /> <rect x="164.40" y="1.20" width="4.80" height="11.40" />
<rect x="170.40" y="1.20" width="2.40" height="36.00" /> <rect x="170.40" y="1.20" width="2.40" height="36.00" />
<rect x="176.40" y="1.20" width="3.60" height="36.00" /> <rect x="176.40" y="1.20" width="3.60" height="36.00" />
<rect x="181.20" y="1.20" width="1.20" height="36.00" /> <rect x="181.20" y="1.20" width="1.20" height="36.00" />
<rect x="183.60" y="1.20" width="2.40" height="36.00" /> <rect x="183.60" y="1.20" width="2.40" height="36.00" />
<rect x="38.40" y="13.20" width="2.40" height="12.00" /> <rect x="25.20" y="13.80" width="1.20" height="10.80" />
<rect x="44.40" y="13.20" width="1.20" height="12.00" /> <rect x="27.60" y="13.80" width="4.80" height="10.80" />
<rect x="48.00" y="13.20" width="1.20" height="12.00" /> <rect x="33.60" y="13.80" width="3.60" height="10.80" />
<rect x="54.00" y="13.20" width="2.40" height="12.00" /> <rect x="38.40" y="13.80" width="2.40" height="10.80" />
<rect x="60.00" y="13.20" width="3.60" height="12.00" /> <rect x="44.40" y="13.80" width="1.20" height="10.80" />
<rect x="64.80" y="13.20" width="2.40" height="24.00" /> <rect x="48.00" y="13.80" width="1.20" height="10.80" />
<rect x="68.40" y="13.20" width="2.40" height="12.00" /> <rect x="51.60" y="13.80" width="1.20" height="10.80" />
<rect x="73.20" y="13.20" width="2.40" height="12.00" /> <rect x="54.00" y="13.80" width="2.40" height="10.80" />
<rect x="82.80" y="13.20" width="2.40" height="12.00" /> <rect x="60.00" y="13.80" width="3.60" height="10.80" />
<rect x="88.80" y="13.20" width="1.20" height="24.00" /> <rect x="64.80" y="13.80" width="2.40" height="10.80" />
<rect x="91.20" y="13.20" width="2.40" height="12.00" /> <rect x="68.40" y="13.80" width="2.40" height="10.80" />
<rect x="94.80" y="13.20" width="2.40" height="24.00" /> <rect x="73.20" y="13.80" width="2.40" height="10.80" />
<rect x="99.60" y="13.20" width="2.40" height="12.00" /> <rect x="78.00" y="13.80" width="1.20" height="10.80" />
<rect x="104.40" y="13.20" width="2.40" height="24.00" /> <rect x="82.80" y="13.80" width="2.40" height="10.80" />
<rect x="108.00" y="13.20" width="3.60" height="12.00" /> <rect x="88.80" y="13.80" width="1.20" height="10.80" />
<rect x="112.80" y="13.20" width="1.20" height="12.00" /> <rect x="91.20" y="13.80" width="2.40" height="10.80" />
<rect x="117.60" y="13.20" width="2.40" height="12.00" /> <rect x="94.80" y="13.80" width="2.40" height="10.80" />
<rect x="121.20" y="13.20" width="2.40" height="12.00" /> <rect x="99.60" y="13.80" width="2.40" height="10.80" />
<rect x="124.80" y="13.20" width="4.80" height="24.00" /> <rect x="104.40" y="13.80" width="2.40" height="10.80" />
<rect x="130.80" y="13.20" width="4.80" height="12.00" /> <rect x="108.00" y="13.80" width="3.60" height="10.80" />
<rect x="136.80" y="13.20" width="3.60" height="12.00" /> <rect x="112.80" y="13.80" width="1.20" height="10.80" />
<rect x="141.60" y="13.20" width="1.20" height="24.00" /> <rect x="117.60" y="13.80" width="2.40" height="10.80" />
<rect x="147.60" y="13.20" width="1.20" height="12.00" /> <rect x="121.20" y="13.80" width="2.40" height="10.80" />
<rect x="157.20" y="13.20" width="1.20" height="24.00" /> <rect x="124.80" y="13.80" width="4.80" height="10.80" />
<rect x="160.80" y="13.20" width="1.20" height="12.00" /> <rect x="130.80" y="13.80" width="4.80" height="10.80" />
<rect x="38.40" y="25.20" width="1.20" height="12.00" /> <rect x="136.80" y="13.80" width="3.60" height="10.80" />
<rect x="40.80" y="25.20" width="2.40" height="12.00" /> <rect x="141.60" y="13.80" width="1.20" height="10.80" />
<rect x="45.60" y="25.20" width="3.60" height="12.00" /> <rect x="144.00" y="13.80" width="1.20" height="10.80" />
<rect x="56.40" y="25.20" width="4.80" height="12.00" /> <rect x="147.60" y="13.80" width="1.20" height="10.80" />
<rect x="62.40" y="25.20" width="1.20" height="12.00" /> <rect x="153.60" y="13.80" width="2.40" height="10.80" />
<rect x="69.60" y="25.20" width="1.20" height="12.00" /> <rect x="157.20" y="13.80" width="1.20" height="10.80" />
<rect x="72.00" y="25.20" width="1.20" height="12.00" /> <rect x="160.80" y="13.80" width="1.20" height="10.80" />
<rect x="82.80" y="25.20" width="4.80" height="12.00" /> <rect x="164.40" y="13.80" width="4.80" height="10.80" />
<rect x="91.20" y="25.20" width="1.20" height="12.00" /> <rect x="25.20" y="25.80" width="1.20" height="11.40" />
<rect x="98.40" y="25.20" width="1.20" height="12.00" /> <rect x="27.60" y="25.80" width="4.80" height="11.40" />
<rect x="108.00" y="25.20" width="2.40" height="12.00" /> <rect x="33.60" y="25.80" width="3.60" height="11.40" />
<rect x="111.60" y="25.20" width="4.80" height="12.00" /> <rect x="38.40" y="25.80" width="1.20" height="11.40" />
<rect x="117.60" y="25.20" width="1.20" height="12.00" /> <rect x="40.80" y="25.80" width="2.40" height="11.40" />
<rect x="120.00" y="25.20" width="3.60" height="12.00" /> <rect x="45.60" y="25.80" width="3.60" height="11.40" />
<rect x="130.80" y="25.20" width="1.20" height="12.00" /> <rect x="51.60" y="25.80" width="1.20" height="11.40" />
<rect x="136.80" y="25.20" width="2.40" height="12.00" /> <rect x="56.40" y="25.80" width="4.80" height="11.40" />
<rect x="144.00" y="25.20" width="2.40" height="12.00" /> <rect x="62.40" y="25.80" width="1.20" height="11.40" />
<rect x="147.60" y="25.20" width="3.60" height="12.00" /> <rect x="64.80" y="25.80" width="2.40" height="11.40" />
<rect x="152.40" y="25.20" width="3.60" height="12.00" /> <rect x="69.60" y="25.80" width="1.20" height="11.40" />
<rect x="159.60" y="25.20" width="1.20" height="12.00" /> <rect x="72.00" y="25.80" width="1.20" height="11.40" />
<rect x="163.20" y="25.20" width="4.80" height="12.00" /> <rect x="78.00" y="25.80" width="1.20" height="11.40" />
<rect x="82.80" y="25.80" width="4.80" height="11.40" />
<rect x="88.80" y="25.80" width="1.20" height="11.40" />
<rect x="91.20" y="25.80" width="1.20" height="11.40" />
<rect x="94.80" y="25.80" width="2.40" height="11.40" />
<rect x="98.40" y="25.80" width="1.20" height="11.40" />
<rect x="104.40" y="25.80" width="2.40" height="11.40" />
<rect x="108.00" y="25.80" width="2.40" height="11.40" />
<rect x="111.60" y="25.80" width="4.80" height="11.40" />
<rect x="117.60" y="25.80" width="1.20" height="11.40" />
<rect x="120.00" y="25.80" width="3.60" height="11.40" />
<rect x="124.80" y="25.80" width="4.80" height="11.40" />
<rect x="130.80" y="25.80" width="1.20" height="11.40" />
<rect x="136.80" y="25.80" width="2.40" height="11.40" />
<rect x="141.60" y="25.80" width="1.20" height="11.40" />
<rect x="144.00" y="25.80" width="2.40" height="11.40" />
<rect x="147.60" y="25.80" width="3.60" height="11.40" />
<rect x="152.40" y="25.80" width="3.60" height="11.40" />
<rect x="157.20" y="25.80" width="1.20" height="11.40" />
<rect x="159.60" y="25.80" width="1.20" height="11.40" />
<rect x="163.20" y="25.80" width="4.80" height="11.40" />
<rect x="25.20" y="12.60" width="145.20" height="1.20" /> <rect x="25.20" y="12.60" width="145.20" height="1.20" />
<rect x="25.20" y="24.60" width="145.20" height="1.20" /> <rect x="25.20" y="24.60" width="145.20" height="1.20" />
<rect x="12.00" y="0.00" width="174.00" height="1.20" /> <rect x="12.00" y="0.00" width="174.00" height="1.20" />

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -8,40 +8,46 @@
<g id="barcode" fill="#000000"> <g id="barcode" fill="#000000">
<rect x="0" y="0" width="98" height="28" fill="#FFFFFF" /> <rect x="0" y="0" width="98" height="28" fill="#FFFFFF" />
<rect x="12.00" y="1.20" width="3.60" height="12.60" /> <rect x="12.00" y="1.20" width="3.60" height="12.00" />
<rect x="18.00" y="1.20" width="1.20" height="12.60" /> <rect x="18.00" y="1.20" width="1.20" height="12.00" />
<rect x="20.40" y="1.20" width="1.20" height="25.20" /> <rect x="20.40" y="1.20" width="1.20" height="12.00" />
<rect x="22.80" y="1.20" width="2.40" height="12.60" /> <rect x="22.80" y="1.20" width="2.40" height="12.00" />
<rect x="27.60" y="1.20" width="2.40" height="12.60" /> <rect x="27.60" y="1.20" width="2.40" height="12.00" />
<rect x="31.20" y="1.20" width="3.60" height="25.20" /> <rect x="31.20" y="1.20" width="3.60" height="12.00" />
<rect x="36.00" y="1.20" width="2.40" height="12.60" /> <rect x="36.00" y="1.20" width="2.40" height="12.00" />
<rect x="39.60" y="1.20" width="1.20" height="12.60" /> <rect x="39.60" y="1.20" width="1.20" height="12.00" />
<rect x="43.20" y="1.20" width="4.80" height="12.60" /> <rect x="43.20" y="1.20" width="4.80" height="12.00" />
<rect x="49.20" y="1.20" width="2.40" height="12.60" /> <rect x="49.20" y="1.20" width="2.40" height="12.00" />
<rect x="52.80" y="1.20" width="4.80" height="12.60" /> <rect x="52.80" y="1.20" width="4.80" height="12.00" />
<rect x="60.00" y="1.20" width="1.20" height="25.20" /> <rect x="60.00" y="1.20" width="1.20" height="12.00" />
<rect x="63.60" y="1.20" width="2.40" height="25.20" /> <rect x="63.60" y="1.20" width="2.40" height="12.00" />
<rect x="68.40" y="1.20" width="1.20" height="12.60" /> <rect x="68.40" y="1.20" width="1.20" height="12.00" />
<rect x="72.00" y="1.20" width="2.40" height="25.20" /> <rect x="72.00" y="1.20" width="2.40" height="12.00" />
<rect x="78.00" y="1.20" width="1.20" height="12.60" /> <rect x="78.00" y="1.20" width="1.20" height="12.00" />
<rect x="81.60" y="1.20" width="1.20" height="12.60" /> <rect x="81.60" y="1.20" width="1.20" height="12.00" />
<rect x="86.40" y="1.20" width="1.20" height="12.60" /> <rect x="86.40" y="1.20" width="1.20" height="12.00" />
<rect x="91.20" y="1.20" width="2.40" height="12.60" /> <rect x="91.20" y="1.20" width="2.40" height="12.00" />
<rect x="94.80" y="1.20" width="1.20" height="25.20" /> <rect x="94.80" y="1.20" width="1.20" height="12.00" />
<rect x="12.00" y="13.80" width="2.40" height="12.60" /> <rect x="12.00" y="14.40" width="2.40" height="12.00" />
<rect x="16.80" y="13.80" width="2.40" height="12.60" /> <rect x="16.80" y="14.40" width="2.40" height="12.00" />
<rect x="22.80" y="13.80" width="1.20" height="12.60" /> <rect x="20.40" y="14.40" width="1.20" height="12.00" />
<rect x="27.60" y="13.80" width="1.20" height="12.60" /> <rect x="22.80" y="14.40" width="1.20" height="12.00" />
<rect x="36.00" y="13.80" width="4.80" height="12.60" /> <rect x="27.60" y="14.40" width="1.20" height="12.00" />
<rect x="42.00" y="13.80" width="1.20" height="12.60" /> <rect x="31.20" y="14.40" width="3.60" height="12.00" />
<rect x="45.60" y="13.80" width="2.40" height="12.60" /> <rect x="36.00" y="14.40" width="4.80" height="12.00" />
<rect x="50.40" y="13.80" width="1.20" height="12.60" /> <rect x="42.00" y="14.40" width="1.20" height="12.00" />
<rect x="54.00" y="13.80" width="1.20" height="12.60" /> <rect x="45.60" y="14.40" width="2.40" height="12.00" />
<rect x="67.20" y="13.80" width="1.20" height="12.60" /> <rect x="50.40" y="14.40" width="1.20" height="12.00" />
<rect x="75.60" y="13.80" width="1.20" height="12.60" /> <rect x="54.00" y="14.40" width="1.20" height="12.00" />
<rect x="79.20" y="13.80" width="1.20" height="12.60" /> <rect x="60.00" y="14.40" width="1.20" height="12.00" />
<rect x="84.00" y="13.80" width="3.60" height="12.60" /> <rect x="63.60" y="14.40" width="2.40" height="12.00" />
<rect x="90.00" y="13.80" width="2.40" height="12.60" /> <rect x="67.20" y="14.40" width="1.20" height="12.00" />
<rect x="72.00" y="14.40" width="2.40" height="12.00" />
<rect x="75.60" y="14.40" width="1.20" height="12.00" />
<rect x="79.20" y="14.40" width="1.20" height="12.00" />
<rect x="84.00" y="14.40" width="3.60" height="12.00" />
<rect x="90.00" y="14.40" width="2.40" height="12.00" />
<rect x="94.80" y="14.40" width="1.20" height="12.00" />
<rect x="12.00" y="13.20" width="84.00" height="1.20" /> <rect x="12.00" y="13.20" width="84.00" height="1.20" />
<rect x="0.00" y="0.00" width="97.20" height="1.20" /> <rect x="0.00" y="0.00" width="97.20" height="1.20" />
<rect x="0.00" y="26.40" width="97.20" height="1.20" /> <rect x="0.00" y="26.40" width="97.20" height="1.20" />

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -8,81 +8,96 @@
<g id="barcode" fill="#000000"> <g id="barcode" fill="#000000">
<rect x="0" y="0" width="98" height="68" fill="#FFFFFF" /> <rect x="0" y="0" width="98" height="68" fill="#FFFFFF" />
<rect x="12.00" y="1.20" width="1.20" height="64.80" /> <rect x="12.00" y="1.20" width="1.20" height="12.36" />
<rect x="14.40" y="1.20" width="6.00" height="12.96" /> <rect x="14.40" y="1.20" width="6.00" height="12.36" />
<rect x="21.60" y="1.20" width="2.40" height="12.96" /> <rect x="21.60" y="1.20" width="2.40" height="12.36" />
<rect x="26.40" y="1.20" width="1.20" height="12.96" /> <rect x="26.40" y="1.20" width="1.20" height="12.36" />
<rect x="28.80" y="1.20" width="3.60" height="12.96" /> <rect x="28.80" y="1.20" width="3.60" height="12.36" />
<rect x="33.60" y="1.20" width="1.20" height="25.92" /> <rect x="33.60" y="1.20" width="1.20" height="12.36" />
<rect x="36.00" y="1.20" width="3.60" height="12.96" /> <rect x="36.00" y="1.20" width="3.60" height="12.36" />
<rect x="42.00" y="1.20" width="2.40" height="12.96" /> <rect x="42.00" y="1.20" width="2.40" height="12.36" />
<rect x="49.20" y="1.20" width="2.40" height="12.96" /> <rect x="49.20" y="1.20" width="2.40" height="12.36" />
<rect x="52.80" y="1.20" width="4.80" height="12.96" /> <rect x="52.80" y="1.20" width="4.80" height="12.36" />
<rect x="58.80" y="1.20" width="1.20" height="12.96" /> <rect x="58.80" y="1.20" width="1.20" height="12.36" />
<rect x="61.20" y="1.20" width="2.40" height="12.96" /> <rect x="61.20" y="1.20" width="2.40" height="12.36" />
<rect x="64.80" y="1.20" width="6.00" height="12.96" /> <rect x="64.80" y="1.20" width="6.00" height="12.36" />
<rect x="72.00" y="1.20" width="1.20" height="25.92" /> <rect x="72.00" y="1.20" width="1.20" height="12.36" />
<rect x="74.40" y="1.20" width="4.80" height="12.96" /> <rect x="74.40" y="1.20" width="4.80" height="12.36" />
<rect x="80.40" y="1.20" width="1.20" height="12.96" /> <rect x="80.40" y="1.20" width="1.20" height="12.36" />
<rect x="85.20" y="1.20" width="1.20" height="12.96" /> <rect x="85.20" y="1.20" width="1.20" height="12.36" />
<rect x="91.20" y="1.20" width="4.80" height="64.80" /> <rect x="91.20" y="1.20" width="4.80" height="12.36" />
<rect x="14.40" y="14.16" width="1.20" height="12.96" /> <rect x="12.00" y="14.76" width="1.20" height="11.76" />
<rect x="16.80" y="14.16" width="1.20" height="12.96" /> <rect x="14.40" y="14.76" width="1.20" height="11.76" />
<rect x="22.80" y="14.16" width="1.20" height="12.96" /> <rect x="16.80" y="14.76" width="1.20" height="11.76" />
<rect x="28.80" y="14.16" width="1.20" height="12.96" /> <rect x="22.80" y="14.76" width="1.20" height="11.76" />
<rect x="37.20" y="14.16" width="4.80" height="12.96" /> <rect x="28.80" y="14.76" width="1.20" height="11.76" />
<rect x="45.60" y="14.16" width="1.20" height="12.96" /> <rect x="33.60" y="14.76" width="1.20" height="11.76" />
<rect x="48.00" y="14.16" width="3.60" height="12.96" /> <rect x="37.20" y="14.76" width="4.80" height="11.76" />
<rect x="52.80" y="14.16" width="1.20" height="12.96" /> <rect x="45.60" y="14.76" width="1.20" height="11.76" />
<rect x="56.40" y="14.16" width="2.40" height="12.96" /> <rect x="48.00" y="14.76" width="3.60" height="11.76" />
<rect x="62.40" y="14.16" width="4.80" height="12.96" /> <rect x="52.80" y="14.76" width="1.20" height="11.76" />
<rect x="68.40" y="14.16" width="1.20" height="12.96" /> <rect x="56.40" y="14.76" width="2.40" height="11.76" />
<rect x="76.80" y="14.16" width="1.20" height="25.92" /> <rect x="62.40" y="14.76" width="4.80" height="11.76" />
<rect x="79.20" y="14.16" width="3.60" height="12.96" /> <rect x="68.40" y="14.76" width="1.20" height="11.76" />
<rect x="86.40" y="14.16" width="2.40" height="12.96" /> <rect x="72.00" y="14.76" width="1.20" height="11.76" />
<rect x="14.40" y="27.12" width="2.40" height="12.96" /> <rect x="76.80" y="14.76" width="1.20" height="11.76" />
<rect x="19.20" y="27.12" width="2.40" height="12.96" /> <rect x="79.20" y="14.76" width="3.60" height="11.76" />
<rect x="27.60" y="27.12" width="1.20" height="25.92" /> <rect x="86.40" y="14.76" width="2.40" height="11.76" />
<rect x="30.00" y="27.12" width="2.40" height="12.96" /> <rect x="91.20" y="14.76" width="4.80" height="11.76" />
<rect x="33.60" y="27.12" width="2.40" height="12.96" /> <rect x="12.00" y="27.72" width="1.20" height="11.76" />
<rect x="37.20" y="27.12" width="3.60" height="12.96" /> <rect x="14.40" y="27.72" width="2.40" height="11.76" />
<rect x="42.00" y="27.12" width="3.60" height="12.96" /> <rect x="19.20" y="27.72" width="2.40" height="11.76" />
<rect x="50.40" y="27.12" width="1.20" height="12.96" /> <rect x="27.60" y="27.72" width="1.20" height="11.76" />
<rect x="52.80" y="27.12" width="2.40" height="12.96" /> <rect x="30.00" y="27.72" width="2.40" height="11.76" />
<rect x="57.60" y="27.12" width="1.20" height="12.96" /> <rect x="33.60" y="27.72" width="2.40" height="11.76" />
<rect x="60.00" y="27.12" width="2.40" height="12.96" /> <rect x="37.20" y="27.72" width="3.60" height="11.76" />
<rect x="67.20" y="27.12" width="3.60" height="12.96" /> <rect x="42.00" y="27.72" width="3.60" height="11.76" />
<rect x="72.00" y="27.12" width="3.60" height="12.96" /> <rect x="50.40" y="27.72" width="1.20" height="11.76" />
<rect x="79.20" y="27.12" width="4.80" height="12.96" /> <rect x="52.80" y="27.72" width="2.40" height="11.76" />
<rect x="87.60" y="27.12" width="2.40" height="12.96" /> <rect x="57.60" y="27.72" width="1.20" height="11.76" />
<rect x="14.40" y="40.08" width="1.20" height="12.96" /> <rect x="60.00" y="27.72" width="2.40" height="11.76" />
<rect x="18.00" y="40.08" width="2.40" height="12.96" /> <rect x="67.20" y="27.72" width="3.60" height="11.76" />
<rect x="22.80" y="40.08" width="2.40" height="12.96" /> <rect x="72.00" y="27.72" width="3.60" height="11.76" />
<rect x="33.60" y="40.08" width="4.80" height="12.96" /> <rect x="76.80" y="27.72" width="1.20" height="11.76" />
<rect x="39.60" y="40.08" width="1.20" height="12.96" /> <rect x="79.20" y="27.72" width="4.80" height="11.76" />
<rect x="43.20" y="40.08" width="1.20" height="12.96" /> <rect x="87.60" y="27.72" width="2.40" height="11.76" />
<rect x="48.00" y="40.08" width="2.40" height="12.96" /> <rect x="91.20" y="27.72" width="4.80" height="11.76" />
<rect x="52.80" y="40.08" width="1.20" height="12.96" /> <rect x="12.00" y="40.68" width="1.20" height="11.76" />
<rect x="55.20" y="40.08" width="1.20" height="12.96" /> <rect x="14.40" y="40.68" width="1.20" height="11.76" />
<rect x="57.60" y="40.08" width="3.60" height="12.96" /> <rect x="18.00" y="40.68" width="2.40" height="11.76" />
<rect x="62.40" y="40.08" width="7.20" height="12.96" /> <rect x="22.80" y="40.68" width="2.40" height="11.76" />
<rect x="72.00" y="40.08" width="2.40" height="25.92" /> <rect x="27.60" y="40.68" width="1.20" height="11.76" />
<rect x="75.60" y="40.08" width="1.20" height="25.92" /> <rect x="33.60" y="40.68" width="4.80" height="11.76" />
<rect x="80.40" y="40.08" width="1.20" height="12.96" /> <rect x="39.60" y="40.68" width="1.20" height="11.76" />
<rect x="84.00" y="40.08" width="6.00" height="25.92" /> <rect x="43.20" y="40.68" width="1.20" height="11.76" />
<rect x="14.40" y="53.04" width="2.40" height="12.96" /> <rect x="48.00" y="40.68" width="2.40" height="11.76" />
<rect x="19.20" y="53.04" width="4.80" height="12.96" /> <rect x="52.80" y="40.68" width="1.20" height="11.76" />
<rect x="26.40" y="53.04" width="1.20" height="12.96" /> <rect x="55.20" y="40.68" width="1.20" height="11.76" />
<rect x="28.80" y="53.04" width="3.60" height="12.96" /> <rect x="57.60" y="40.68" width="3.60" height="11.76" />
<rect x="33.60" y="53.04" width="1.20" height="12.96" /> <rect x="62.40" y="40.68" width="7.20" height="11.76" />
<rect x="42.00" y="53.04" width="1.20" height="12.96" /> <rect x="72.00" y="40.68" width="2.40" height="11.76" />
<rect x="44.40" y="53.04" width="1.20" height="12.96" /> <rect x="75.60" y="40.68" width="1.20" height="11.76" />
<rect x="48.00" y="53.04" width="3.60" height="12.96" /> <rect x="80.40" y="40.68" width="1.20" height="11.76" />
<rect x="52.80" y="53.04" width="6.00" height="12.96" /> <rect x="84.00" y="40.68" width="6.00" height="11.76" />
<rect x="60.00" y="53.04" width="3.60" height="12.96" /> <rect x="91.20" y="40.68" width="4.80" height="11.76" />
<rect x="64.80" y="53.04" width="1.20" height="12.96" /> <rect x="12.00" y="53.64" width="1.20" height="12.36" />
<rect x="69.60" y="53.04" width="1.20" height="12.96" /> <rect x="14.40" y="53.64" width="2.40" height="12.36" />
<rect x="80.40" y="53.04" width="2.40" height="12.96" /> <rect x="19.20" y="53.64" width="4.80" height="12.36" />
<rect x="26.40" y="53.64" width="1.20" height="12.36" />
<rect x="28.80" y="53.64" width="3.60" height="12.36" />
<rect x="33.60" y="53.64" width="1.20" height="12.36" />
<rect x="42.00" y="53.64" width="1.20" height="12.36" />
<rect x="44.40" y="53.64" width="1.20" height="12.36" />
<rect x="48.00" y="53.64" width="3.60" height="12.36" />
<rect x="52.80" y="53.64" width="6.00" height="12.36" />
<rect x="60.00" y="53.64" width="3.60" height="12.36" />
<rect x="64.80" y="53.64" width="1.20" height="12.36" />
<rect x="69.60" y="53.64" width="1.20" height="12.36" />
<rect x="72.00" y="53.64" width="2.40" height="12.36" />
<rect x="75.60" y="53.64" width="1.20" height="12.36" />
<rect x="80.40" y="53.64" width="2.40" height="12.36" />
<rect x="84.00" y="53.64" width="6.00" height="12.36" />
<rect x="91.20" y="53.64" width="4.80" height="12.36" />
<rect x="12.00" y="13.56" width="84.00" height="1.20" /> <rect x="12.00" y="13.56" width="84.00" height="1.20" />
<rect x="12.00" y="26.52" width="84.00" height="1.20" /> <rect x="12.00" y="26.52" width="84.00" height="1.20" />
<rect x="12.00" y="39.48" width="84.00" height="1.20" /> <rect x="12.00" y="39.48" width="84.00" height="1.20" />

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -4241,7 +4241,7 @@ OPTIONS
Set the ECI code for the input data to INTEGER. See -e | --ecinos for a list Set the ECI code for the input data to INTEGER. See -e | --ecinos for a list
of the ECIs available. ECIs are supported by Aztec Code, Code One, Data of the ECIs available. ECIs are supported by Aztec Code, Code One, Data
Matrix, DotCode, Grid Matrix, Han Xin Code, MaxiCode, MicroPDF417, PDF417, Matrix, DotCode, Grid Matrix, Han Xin Code, MaxiCode, MicroPDF417, PDF417,
QR Code, rMQR and Ultracode QR Code, rMQR and Ultracode.
--esc --esc

View File

@ -158,7 +158,7 @@ Set the ECI code for the input data to \f[I]INTEGER\f[R].
See \f[V]-e\f[R] | \f[V]--ecinos\f[R] for a list of the ECIs available. See \f[V]-e\f[R] | \f[V]--ecinos\f[R] for a list of the ECIs available.
ECIs are supported by Aztec Code, Code One, Data Matrix, DotCode, Grid ECIs are supported by Aztec Code, Code One, Data Matrix, DotCode, Grid
Matrix, Han Xin Code, MaxiCode, MicroPDF417, PDF417, QR Code, rMQR and Matrix, Han Xin Code, MaxiCode, MicroPDF417, PDF417, QR Code, rMQR and
Ultracode Ultracode.
.TP .TP
\f[V]--esc\f[R] \f[V]--esc\f[R]
Process escape characters in the input data. Process escape characters in the input data.

View File

@ -114,7 +114,7 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S
: Set the ECI code for the input data to *INTEGER*. See `-e` | `--ecinos` for a list of the ECIs available. ECIs are : Set the ECI code for the input data to *INTEGER*. See `-e` | `--ecinos` for a list of the ECIs available. ECIs are
supported by Aztec Code, Code One, Data Matrix, DotCode, Grid Matrix, Han Xin Code, MaxiCode, MicroPDF417, PDF417, supported by Aztec Code, Code One, Data Matrix, DotCode, Grid Matrix, Han Xin Code, MaxiCode, MicroPDF417, PDF417,
QR Code, rMQR and Ultracode QR Code, rMQR and Ultracode.
`--esc` `--esc`

View File

@ -313,7 +313,7 @@ static void test_dump_args(int index, int debug) {
/* 14*/ { BARCODE_CODE11, NULL, NULL, "123", NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, 1, "B2 D6 96 CA B5 64" }, /* 14*/ { BARCODE_CODE11, NULL, NULL, "123", NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, 1, "B2 D6 96 CA B5 64" },
/* 15*/ { BARCODE_CODE11, "123", NULL, "456", NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, 2, "B2 D6 96 CA B2\nB2 B6 DA 9A B2" }, /* 15*/ { BARCODE_CODE11, "123", NULL, "456", NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, 2, "B2 D6 96 CA B2\nB2 B6 DA 9A B2" },
/* 16*/ { BARCODE_CODE11, "123", "456", "789", "012", -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, 2, "B2 D6 96 CA B2\nB2 B6 DA 9A B2\nB2 A6 D2 D5 64\nB2 AD AD 2D 64" }, /* 16*/ { BARCODE_CODE11, "123", "456", "789", "012", -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, 2, "B2 D6 96 CA B2\nB2 B6 DA 9A B2\nB2 A6 D2 D5 64\nB2 AD AD 2D 64" },
/* 17*/ { BARCODE_PDF417, "123", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, 0, 0, -1, "FF 54 7A BC 3D 4F 1D 5C 0F E8 A4\nFF 54 7A 90 2F D3 1F AB 8F E8 A4\nFF 54 6A F8 3A BF 15 3C 0F E8 A4\nFF 54 57 9E 24 E7 1A F7 CF E8 A4\nFF 54 7A E7 3D 0D 9D 73 0F E8 A4\nFF 54 7D 70 B9 CB DF 5E CF E8 A4" }, /* 17*/ { BARCODE_PDF417, "123", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, 0, 0, -1, "FF 54 7A BC 3A 9C 1D 5C 0F E8 A4\nFF 54 7E AE 3C 11 5F AB 8F E8 A4\nFF 54 6A F8 29 9F 1D 5F 8F E8 A4\nFF 54 57 9E 37 BA 1A F7 CF E8 A4\nFF 54 75 CC 36 F0 5D 73 0F E8 A4" },
/* 18*/ { BARCODE_DATAMATRIX, "ABC", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA 8\nB3 4\n8F 0\nB2 C\nA6 0\nBA C\nD6 0\nEB 4\nE2 8\nFF C" }, /* 18*/ { BARCODE_DATAMATRIX, "ABC", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA 8\nB3 4\n8F 0\nB2 C\nA6 0\nBA C\nD6 0\nEB 4\nE2 8\nFF C" },
/* 19*/ { BARCODE_DATAMATRIX, "ABC", NULL, NULL, NULL, -1, READER_INIT, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A\nAC 7\n8A 4\nA0 3\nC2 2\nB5 1\n82 2\nBA 7\n8C C\nA0 5\n86 A\nFF F" }, /* 19*/ { BARCODE_DATAMATRIX, "ABC", NULL, NULL, NULL, -1, READER_INIT, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A\nAC 7\n8A 4\nA0 3\nC2 2\nB5 1\n82 2\nBA 7\n8C C\nA0 5\n86 A\nFF F" },
/* 20*/ { BARCODE_DATAMATRIX, "ABCDEFGH", NULL, NULL, NULL, FAST_MODE, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nA6 8C\nB2 F0\n98 B4\nB9 A8\nB8 CC\nF0 78\nA0 3C\n99 70\n85 1C\nDA B0\nE5 94\nA7 50\nFF FC" }, /* 20*/ { BARCODE_DATAMATRIX, "ABCDEFGH", NULL, NULL, NULL, FAST_MODE, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nA6 8C\nB2 F0\n98 B4\nB9 A8\nB8 CC\nF0 78\nA0 3C\n99 70\n85 1C\nDA B0\nE5 94\nA7 50\nFF FC" },