mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
NULL character support
This commit is contained in:
parent
1015a11b5a
commit
d6df698918
@ -57,12 +57,13 @@ static char *C128Table[107] = {"212222", "222122", "222221", "121223", "121322",
|
|||||||
"411113", "411311", "113141", "114131", "311141", "411131", "211412", "211214", "211232",
|
"411113", "411311", "113141", "114131", "311141", "411131", "211412", "211214", "211232",
|
||||||
"2331112"};
|
"2331112"};
|
||||||
|
|
||||||
int parunmodd(unsigned char llyth);
|
int parunmodd(unsigned char llyth, char nullchar);
|
||||||
void grwp(int *indexliste);
|
void grwp(int *indexliste);
|
||||||
void dxsmooth(int *indexliste);
|
void dxsmooth(int *indexliste);
|
||||||
|
|
||||||
int a3_convert(unsigned char source) {
|
int a3_convert(unsigned char source, char nullchar) {
|
||||||
/* Annex A section 3 */
|
/* Annex A section 3 */
|
||||||
|
if(source == nullchar) { return 64; }
|
||||||
if(source < 32) { return source + 64; }
|
if(source < 32) { return source + 64; }
|
||||||
if((source >= 32) && (source <= 127)) { return source - 32; }
|
if((source >= 32) && (source <= 127)) { return source - 32; }
|
||||||
if((source >= 128) && (source <= 159)) { return (source - 128) + 64; }
|
if((source >= 128) && (source <= 159)) { return (source - 128) + 64; }
|
||||||
@ -70,8 +71,13 @@ int a3_convert(unsigned char source) {
|
|||||||
return (source - 128) - 32;
|
return (source - 128) - 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
int character_subset_select(unsigned char source[], int input_position) {
|
int character_subset_select(unsigned char source[], int input_position, char nullchar) {
|
||||||
/* Section 4.5.2 - Determining the Character Subset Selector in a Row */
|
/* Section 4.5.2 - Determining the Character Subset Selector in a Row */
|
||||||
|
if(source[input_position] == nullchar) {
|
||||||
|
/* NULL character */
|
||||||
|
return MODEA;
|
||||||
|
}
|
||||||
|
|
||||||
if((source[input_position] >= '0') && (source[input_position + 1] <= '9')) {
|
if((source[input_position] >= '0') && (source[input_position + 1] <= '9')) {
|
||||||
/* Rule 1 */
|
/* Rule 1 */
|
||||||
return MODEC;
|
return MODEC;
|
||||||
@ -91,7 +97,7 @@ int character_subset_select(unsigned char source[], int input_position) {
|
|||||||
return MODEB;
|
return MODEB;
|
||||||
}
|
}
|
||||||
|
|
||||||
int data_encode_blockf(unsigned char source[], int subset_selector[], int blockmatrix[][62], int *columns_needed, int *rows_needed, int *final_mode)
|
int data_encode_blockf(unsigned char source[], int subset_selector[], int blockmatrix[][62], int *columns_needed, int *rows_needed, int *final_mode, char nullchar)
|
||||||
{
|
{
|
||||||
int i, input_position, input_length, current_mode, current_row, error_number;
|
int i, input_position, input_length, current_mode, current_row, error_number;
|
||||||
int column_position, c, done, exit_status;
|
int column_position, c, done, exit_status;
|
||||||
@ -112,7 +118,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
if(column_position == 0) {
|
if(column_position == 0) {
|
||||||
/* The Beginning of a row */
|
/* The Beginning of a row */
|
||||||
c = (*columns_needed);
|
c = (*columns_needed);
|
||||||
current_mode = character_subset_select(source, input_position);
|
current_mode = character_subset_select(source, input_position, nullchar);
|
||||||
subset_selector[current_row] = current_mode;
|
subset_selector[current_row] = current_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,15 +127,15 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
/* Ensure that there is sufficient encodation capacity to continue (using the rules of Annex B.2). */
|
/* Ensure that there is sufficient encodation capacity to continue (using the rules of Annex B.2). */
|
||||||
switch(current_mode) {
|
switch(current_mode) {
|
||||||
case MODEA: /* Table B1 applies */
|
case MODEA: /* Table B1 applies */
|
||||||
if(parunmodd(source[input_position]) == ABORC) {
|
if(parunmodd(source[input_position], nullchar) == ABORC) {
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((parunmodd(source[input_position]) == SHIFTB) && (c == 1)) {
|
if((parunmodd(source[input_position], nullchar) == SHIFTB) && (c == 1)) {
|
||||||
/* Needs two symbols */
|
/* Needs two symbols */
|
||||||
blockmatrix[current_row][column_position] = 100; /* Code B */
|
blockmatrix[current_row][column_position] = 100; /* Code B */
|
||||||
column_position++;
|
column_position++;
|
||||||
@ -161,15 +167,15 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MODEB: /* Table B2 applies */
|
case MODEB: /* Table B2 applies */
|
||||||
if(parunmodd(source[input_position]) == ABORC) {
|
if(parunmodd(source[input_position], nullchar) == ABORC) {
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((parunmodd(source[input_position]) == SHIFTA) && (c == 1)) {
|
if((parunmodd(source[input_position], nullchar) == SHIFTA) && (c == 1)) {
|
||||||
/* Needs two symbols */
|
/* Needs two symbols */
|
||||||
blockmatrix[current_row][column_position] = 101; /* Code A */
|
blockmatrix[current_row][column_position] = 101; /* Code A */
|
||||||
column_position++;
|
column_position++;
|
||||||
@ -201,7 +207,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MODEC: /* Table B3 applies */
|
case MODEC: /* Table B3 applies */
|
||||||
if((parunmodd(source[input_position]) != ABORC) && (c == 1)) {
|
if((parunmodd(source[input_position], nullchar) != ABORC) && (c == 1)) {
|
||||||
/* Needs two symbols */
|
/* Needs two symbols */
|
||||||
blockmatrix[current_row][column_position] = 101; /* Code A */
|
blockmatrix[current_row][column_position] = 101; /* Code A */
|
||||||
column_position++;
|
column_position++;
|
||||||
@ -209,7 +215,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(((parunmodd(source[input_position]) == ABORC) && (parunmodd(source[input_position + 1]) != ABORC))
|
if(((parunmodd(source[input_position], nullchar) == ABORC) && (parunmodd(source[input_position + 1], nullchar) != ABORC))
|
||||||
&& (c == 1)) {
|
&& (c == 1)) {
|
||||||
/* Needs two symbols */
|
/* Needs two symbols */
|
||||||
blockmatrix[current_row][column_position] = 101; /* Code A */
|
blockmatrix[current_row][column_position] = 101; /* Code A */
|
||||||
@ -234,7 +240,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(done == 0) {
|
if(done == 0) {
|
||||||
if(((parunmodd(source[input_position]) == AORB) || (parunmodd(source[input_position]) == SHIFTA)) && (current_mode == MODEA)) {
|
if(((parunmodd(source[input_position], nullchar) == AORB) || (parunmodd(source[input_position], nullchar) == SHIFTA)) && (current_mode == MODEA)) {
|
||||||
/* Annex B section 1 rule 2 */
|
/* Annex B section 1 rule 2 */
|
||||||
/* If in Code Subset A and the next data character can be encoded in Subset A encode the next
|
/* If in Code Subset A and the next data character can be encoded in Subset A encode the next
|
||||||
character. */
|
character. */
|
||||||
@ -244,7 +250,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -253,7 +259,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(done == 0) {
|
if(done == 0) {
|
||||||
if(((parunmodd(source[input_position]) == AORB) || (parunmodd(source[input_position]) == SHIFTB)) && (current_mode == MODEB)) {
|
if(((parunmodd(source[input_position], nullchar) == AORB) || (parunmodd(source[input_position], nullchar) == SHIFTB)) && (current_mode == MODEB)) {
|
||||||
/* Annex B section 1 rule 3 */
|
/* Annex B section 1 rule 3 */
|
||||||
/* If in Code Subset B and the next data character can be encoded in subset B, encode the next
|
/* If in Code Subset B and the next data character can be encoded in subset B, encode the next
|
||||||
character. */
|
character. */
|
||||||
@ -263,7 +269,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -272,7 +278,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(done == 0) {
|
if(done == 0) {
|
||||||
if(((parunmodd(source[input_position]) == ABORC) && (parunmodd(source[input_position + 1]) == ABORC)) && (current_mode == MODEC)) {
|
if(((parunmodd(source[input_position], nullchar) == ABORC) && (parunmodd(source[input_position + 1], nullchar) == ABORC)) && (current_mode == MODEC)) {
|
||||||
/* Annex B section 1 rule 4 */
|
/* Annex B section 1 rule 4 */
|
||||||
/* If in Code Subset C and the next data are 2 digits, encode them. */
|
/* If in Code Subset C and the next data are 2 digits, encode them. */
|
||||||
blockmatrix[current_row][column_position] = (ctoi(source[input_position]) * 10) + ctoi(source[input_position + 1]);
|
blockmatrix[current_row][column_position] = (ctoi(source[input_position]) * 10) + ctoi(source[input_position + 1]);
|
||||||
@ -284,7 +290,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(done == 0) {
|
if(done == 0) {
|
||||||
if(((current_mode == MODEA) || (current_mode == MODEB)) && (parunmodd(source[input_position]) == ABORC)) {
|
if(((current_mode == MODEA) || (current_mode == MODEB)) && (parunmodd(source[input_position], nullchar) == ABORC)) {
|
||||||
/* Count the number of numeric digits */
|
/* Count the number of numeric digits */
|
||||||
/* If 4 or more numeric data characters occur together when in subsets A or B:
|
/* If 4 or more numeric data characters occur together when in subsets A or B:
|
||||||
a. If there is an even number of numeric data characters, insert a Code C character before the
|
a. If there is an even number of numeric data characters, insert a Code C character before the
|
||||||
@ -292,7 +298,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
b. If there is an odd number of numeric data characters, insert a Code Set C character immedi-
|
b. If there is an odd number of numeric data characters, insert a Code Set C character immedi-
|
||||||
ately after the first numeric digit to change to subset C. */
|
ately after the first numeric digit to change to subset C. */
|
||||||
i = 0;
|
i = 0;
|
||||||
do { i++; } while(parunmodd(source[input_position + i]) == ABORC);
|
do { i++; } while(parunmodd(source[input_position + i], nullchar) == ABORC);
|
||||||
i--;
|
i--;
|
||||||
|
|
||||||
if(i >= 4) {
|
if(i >= 4) {
|
||||||
@ -309,14 +315,14 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
current_mode = MODEC;
|
current_mode = MODEC;
|
||||||
} else {
|
} else {
|
||||||
/* Annex B section 1 rule 5b */
|
/* Annex B section 1 rule 5b */
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
}
|
}
|
||||||
done = 1;
|
done = 1;
|
||||||
} else {
|
} else {
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -326,7 +332,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(done == 0) {
|
if(done == 0) {
|
||||||
if((current_mode == MODEB) && (parunmodd(source[input_position]) == SHIFTA)) {
|
if((current_mode == MODEB) && (parunmodd(source[input_position], nullchar) == SHIFTA)) {
|
||||||
/* Annex B section 1 rule 6 */
|
/* Annex B section 1 rule 6 */
|
||||||
/* When in subset B and an ASCII control character occurs in the data:
|
/* When in subset B and an ASCII control character occurs in the data:
|
||||||
a. If there is a lower case character immediately following the control character, insert a Shift
|
a. If there is a lower case character immediately following the control character, insert a Shift
|
||||||
@ -343,7 +349,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -358,7 +364,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -369,14 +375,14 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(done == 0) {
|
if(done == 0) {
|
||||||
if((current_mode == MODEA) && (parunmodd(source[input_position]) == SHIFTB)) {
|
if((current_mode == MODEA) && (parunmodd(source[input_position], nullchar) == SHIFTB)) {
|
||||||
/* Annex B section 1 rule 7 */
|
/* Annex B section 1 rule 7 */
|
||||||
/* When in subset A and a lower case character occurs in the data:
|
/* When in subset A and a lower case character occurs in the data:
|
||||||
a. If following that character, a control character occurs in the data before the occurrence of
|
a. If following that character, a control character occurs in the data before the occurrence of
|
||||||
another lower case character, insert a Shift character before the lower case character.
|
another lower case character, insert a Shift character before the lower case character.
|
||||||
b. Otherwise, insert a Code B character before the lower case character to change to subset B. */
|
b. Otherwise, insert a Code B character before the lower case character to change to subset B. */
|
||||||
if((parunmodd(source[input_position + 1]) == SHIFTA) &&
|
if((parunmodd(source[input_position + 1], nullchar) == SHIFTA) &&
|
||||||
(parunmodd(source[input_position + 2]) == SHIFTB)) {
|
(parunmodd(source[input_position + 2], nullchar) == SHIFTB)) {
|
||||||
/* Annex B section 1 rule 7a */
|
/* Annex B section 1 rule 7a */
|
||||||
blockmatrix[current_row][column_position] = 98; /* Shift */
|
blockmatrix[current_row][column_position] = 98; /* Shift */
|
||||||
column_position++;
|
column_position++;
|
||||||
@ -387,7 +393,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -402,7 +408,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -413,8 +419,8 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(done == 0) {
|
if(done == 0) {
|
||||||
if((current_mode == MODEC) && ((parunmodd(source[input_position]) != ABORC) ||
|
if((current_mode == MODEC) && ((parunmodd(source[input_position], nullchar) != ABORC) ||
|
||||||
(parunmodd(source[input_position + 1]) != ABORC))) {
|
(parunmodd(source[input_position + 1], nullchar) != ABORC))) {
|
||||||
/* Annex B section 1 rule 8 */
|
/* Annex B section 1 rule 8 */
|
||||||
/* When in subset C and a non-numeric character (or a single digit) occurs in the data, insert a Code
|
/* When in subset C and a non-numeric character (or a single digit) occurs in the data, insert a Code
|
||||||
A or Code B character before that character, following rules 8a and 8b to determine between code
|
A or Code B character before that character, following rules 8a and 8b to determine between code
|
||||||
@ -422,7 +428,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
a. If an ASCII control character (eg NUL) occurs in the data before any lower case character, use
|
a. If an ASCII control character (eg NUL) occurs in the data before any lower case character, use
|
||||||
Code A.
|
Code A.
|
||||||
b. Otherwise use Code B. */
|
b. Otherwise use Code B. */
|
||||||
if(parunmodd(source[input_position]) == SHIFTA) {
|
if(parunmodd(source[input_position], nullchar) == SHIFTA) {
|
||||||
/* Annex B section 1 rule 8a */
|
/* Annex B section 1 rule 8a */
|
||||||
blockmatrix[current_row][column_position] = 101; /* Code A */
|
blockmatrix[current_row][column_position] = 101; /* Code A */
|
||||||
column_position++;
|
column_position++;
|
||||||
@ -433,7 +439,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -449,7 +455,7 @@ int data_encode_blockf(unsigned char source[], int subset_selector[], int blockm
|
|||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
}
|
}
|
||||||
blockmatrix[current_row][column_position] = a3_convert(source[input_position]);
|
blockmatrix[current_row][column_position] = a3_convert(source[input_position], nullchar);
|
||||||
column_position++;
|
column_position++;
|
||||||
c--;
|
c--;
|
||||||
input_position++;
|
input_position++;
|
||||||
@ -570,7 +576,7 @@ int codablock(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
estimate_codelength = 0.0;
|
estimate_codelength = 0.0;
|
||||||
last_mode = AORB; /* Codablock always starts with Code A */
|
last_mode = AORB; /* Codablock always starts with Code A */
|
||||||
for(i = 0; i < input_length; i++) {
|
for(i = 0; i < input_length; i++) {
|
||||||
this_mode = parunmodd(source[i]);
|
this_mode = parunmodd(source[i], symbol->nullchar);
|
||||||
if(this_mode != last_mode) {
|
if(this_mode != last_mode) {
|
||||||
estimate_codelength += 1.0;
|
estimate_codelength += 1.0;
|
||||||
}
|
}
|
||||||
@ -597,7 +603,7 @@ int codablock(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Encode the data */
|
/* Encode the data */
|
||||||
error_number = data_encode_blockf(source, subset_selector, blockmatrix, &columns_needed, &rows_needed, &final_mode);
|
error_number = data_encode_blockf(source, subset_selector, blockmatrix, &columns_needed, &rows_needed, &final_mode, symbol->nullchar);
|
||||||
if(error_number > 0) {
|
if(error_number > 0) {
|
||||||
if(error_number == ERROR_TOO_LONG) {
|
if(error_number == ERROR_TOO_LONG) {
|
||||||
strcpy(symbol->errtxt, "Input data too long [743]");
|
strcpy(symbol->errtxt, "Input data too long [743]");
|
||||||
|
@ -326,13 +326,22 @@ int ec39(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
/* Creates a buffer string and places control characters into it */
|
/* Creates a buffer string and places control characters into it */
|
||||||
for(i = 0; i < ustrlen(source); i++) {
|
for(i = 0; i < ustrlen(source); i++) {
|
||||||
ascii_value = source[i];
|
ascii_value = source[i];
|
||||||
|
if(ascii_value == symbol->nullchar) {
|
||||||
|
concat((char*)buffer, EC39Ctrl[0]);
|
||||||
|
} else {
|
||||||
concat((char*)buffer, EC39Ctrl[ascii_value]);
|
concat((char*)buffer, EC39Ctrl[ascii_value]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Then sends the buffer to the C39 function */
|
/* Then sends the buffer to the C39 function */
|
||||||
error_number = c39(symbol, buffer);
|
error_number = c39(symbol, buffer);
|
||||||
|
|
||||||
strcpy(symbol->text, (char*)source);
|
strcpy(symbol->text, (char*)source);
|
||||||
|
for(i = 0; i < strlen(symbol->text); i++) {
|
||||||
|
if(symbol->text[i] == symbol->nullchar) {
|
||||||
|
symbol->text[i] = ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,8 +386,12 @@ int c93(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
/* Message Content */
|
/* Message Content */
|
||||||
for(i = 0; i < ustrlen(source); i++) {
|
for(i = 0; i < ustrlen(source); i++) {
|
||||||
ascii_value = source[i];
|
ascii_value = source[i];
|
||||||
|
if(ascii_value == symbol->nullchar) {
|
||||||
|
concat(buffer, C93Ctrl[0]);
|
||||||
|
} else {
|
||||||
concat(buffer, C93Ctrl[ascii_value]);
|
concat(buffer, C93Ctrl[ascii_value]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Now we can check the true length of the barcode */
|
/* Now we can check the true length of the barcode */
|
||||||
if(strlen(buffer) > 45) {
|
if(strlen(buffer) > 45) {
|
||||||
@ -446,5 +459,10 @@ int c93(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
source[h + 2] = '\0';
|
source[h + 2] = '\0';
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, (char*)source);
|
strcpy(symbol->text, (char*)source);
|
||||||
|
for(i = 0; i < strlen(symbol->text); i++) {
|
||||||
|
if(symbol->text[i] == symbol->nullchar) {
|
||||||
|
symbol->text[i] = ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
@ -57,11 +57,12 @@ static char *C128Table[107] = {"212222", "222122", "222221", "121223", "121322",
|
|||||||
"2331112"};
|
"2331112"};
|
||||||
/* Code 128 character encodation - Table 1 */
|
/* Code 128 character encodation - Table 1 */
|
||||||
|
|
||||||
int parunmodd(unsigned char llyth)
|
int parunmodd(unsigned char llyth, char nullchar)
|
||||||
{
|
{
|
||||||
int modd;
|
int modd;
|
||||||
modd = 0;
|
modd = 0;
|
||||||
|
|
||||||
|
if(llyth == nullchar) { return SHIFTA; }
|
||||||
if(llyth <= 31) { modd = SHIFTA; }
|
if(llyth <= 31) { modd = SHIFTA; }
|
||||||
if((llyth >= 32) && (llyth <= 95)) { modd = AORB; }
|
if((llyth >= 32) && (llyth <= 95)) { modd = AORB; }
|
||||||
if((llyth >= 48) && (llyth <= 57)) { modd = ABORC; }
|
if((llyth >= 48) && (llyth <= 57)) { modd = ABORC; }
|
||||||
@ -136,10 +137,17 @@ void dxsmooth(int *indexliste)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void c128_set_a(unsigned char source, char dest[], int values[], int *bar_chars)
|
void c128_set_a(unsigned char source, char dest[], int values[], int *bar_chars, char nullchr)
|
||||||
{ /* Translate Code 128 Set A characters into barcodes */
|
{ /* Translate Code 128 Set A characters into barcodes */
|
||||||
/* This set handles all control characters NULL to US */
|
/* This set handles all control characters NULL to US */
|
||||||
|
|
||||||
|
if(source == nullchr) { /* Handle NULL character substitution */
|
||||||
|
concat(dest, C128Table[64]);
|
||||||
|
values[(*bar_chars)] = 64;
|
||||||
|
(*bar_chars)++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(source > 127) {
|
if(source > 127) {
|
||||||
if(source < 160) {
|
if(source < 160) {
|
||||||
concat(dest, C128Table[(source - 128) + 64]);
|
concat(dest, C128Table[(source - 128) + 64]);
|
||||||
@ -252,7 +260,7 @@ int code_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
indexliste = 0;
|
indexliste = 0;
|
||||||
indexchaine = 0;
|
indexchaine = 0;
|
||||||
|
|
||||||
mode = parunmodd(source[indexchaine]);
|
mode = parunmodd(source[indexchaine], symbol->nullchar);
|
||||||
if((symbol->symbology == BARCODE_CODE128B) && (mode == ABORC)) {
|
if((symbol->symbology == BARCODE_CODE128B) && (mode == ABORC)) {
|
||||||
mode = AORB;
|
mode = AORB;
|
||||||
}
|
}
|
||||||
@ -266,7 +274,7 @@ int code_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
while ((list[1][indexliste] == mode) && (indexchaine < sourcelen)) {
|
while ((list[1][indexliste] == mode) && (indexchaine < sourcelen)) {
|
||||||
list[0][indexliste]++;
|
list[0][indexliste]++;
|
||||||
indexchaine++;
|
indexchaine++;
|
||||||
mode = parunmodd(source[indexchaine]);
|
mode = parunmodd(source[indexchaine], symbol->nullchar);
|
||||||
if((symbol->symbology == BARCODE_CODE128B) && (mode == ABORC)) {
|
if((symbol->symbology == BARCODE_CODE128B) && (mode == ABORC)) {
|
||||||
mode = AORB;
|
mode = AORB;
|
||||||
}
|
}
|
||||||
@ -507,7 +515,7 @@ int code_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
switch(set[read])
|
switch(set[read])
|
||||||
{ /* Encode data characters */
|
{ /* Encode data characters */
|
||||||
case 'a':
|
case 'a':
|
||||||
case 'A': c128_set_a(source[read], dest, values, &bar_characters);
|
case 'A': c128_set_a(source[read], dest, values, &bar_characters, symbol->nullchar);
|
||||||
read++;
|
read++;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
@ -523,12 +531,15 @@ int code_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
|
|
||||||
/* check digit calculation */
|
/* check digit calculation */
|
||||||
total_sum = 0;
|
total_sum = 0;
|
||||||
|
/*for(i = 0; i < bar_characters; i++) {
|
||||||
|
printf("%d\n", values[i]);
|
||||||
|
}*/
|
||||||
|
|
||||||
for(i = 0; i < bar_characters; i++)
|
for(i = 0; i < bar_characters; i++)
|
||||||
{
|
{
|
||||||
if(i > 0)
|
if(i > 0)
|
||||||
{
|
{
|
||||||
values[i] *= i;
|
values[i] *= i;
|
||||||
|
|
||||||
}
|
}
|
||||||
total_sum += values[i];
|
total_sum += values[i];
|
||||||
}
|
}
|
||||||
@ -538,6 +549,11 @@ int code_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
concat(dest, C128Table[106]);
|
concat(dest, C128Table[106]);
|
||||||
expand(symbol, dest);
|
expand(symbol, dest);
|
||||||
strcpy(symbol->text, (char*)source);
|
strcpy(symbol->text, (char*)source);
|
||||||
|
for(i = 0; i < strlen(symbol->text); i++) {
|
||||||
|
if(symbol->text[i] == symbol->nullchar) {
|
||||||
|
symbol->text[i] = ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
return errornum;
|
return errornum;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,7 +650,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
indexliste = 0;
|
indexliste = 0;
|
||||||
indexchaine = 0;
|
indexchaine = 0;
|
||||||
|
|
||||||
mode = parunmodd(reduced[indexchaine]);
|
mode = parunmodd(reduced[indexchaine], 0x00);
|
||||||
if(reduced[indexchaine] == '[') {
|
if(reduced[indexchaine] == '[') {
|
||||||
mode = ABORC;
|
mode = ABORC;
|
||||||
}
|
}
|
||||||
@ -648,7 +664,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
while ((list[1][indexliste] == mode) && (indexchaine < strlen(reduced))) {
|
while ((list[1][indexliste] == mode) && (indexchaine < strlen(reduced))) {
|
||||||
list[0][indexliste]++;
|
list[0][indexliste]++;
|
||||||
indexchaine++;
|
indexchaine++;
|
||||||
mode = parunmodd(reduced[indexchaine]);
|
mode = parunmodd(reduced[indexchaine], 0x00);
|
||||||
if(reduced[indexchaine] == '[') {
|
if(reduced[indexchaine] == '[') {
|
||||||
if(indexchaine % 2 == 0) {
|
if(indexchaine % 2 == 0) {
|
||||||
mode = ABORC;
|
mode = ABORC;
|
||||||
@ -780,7 +796,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
if(reduced[read] != '[') {
|
if(reduced[read] != '[') {
|
||||||
switch(set[read])
|
switch(set[read])
|
||||||
{ /* Encode data characters */
|
{ /* Encode data characters */
|
||||||
case 'A': c128_set_a(reduced[read], dest, values, &bar_characters);
|
case 'A': c128_set_a(reduced[read], dest, values, &bar_characters, 0x00);
|
||||||
read++;
|
read++;
|
||||||
break;
|
break;
|
||||||
case 'B': c128_set_b(reduced[read], dest, values, &bar_characters);
|
case 'B': c128_set_b(reduced[read], dest, values, &bar_characters);
|
||||||
|
@ -65,12 +65,18 @@ static char *C16KStartStop[8] = {"3211", "2221", "2122", "1411", "1132", "1231",
|
|||||||
static int C16KStartValues[16] = {0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7};
|
static int C16KStartValues[16] = {0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7};
|
||||||
static int C16KStopValues[16] = {0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 0, 1, 2, 3};
|
static int C16KStopValues[16] = {0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 0, 1, 2, 3};
|
||||||
|
|
||||||
int parunmodd(unsigned char llyth);
|
int parunmodd(unsigned char llyth, char nullchar);
|
||||||
void grwp(int *indexliste);
|
void grwp(int *indexliste);
|
||||||
void dxsmooth(int *indexliste);
|
void dxsmooth(int *indexliste);
|
||||||
|
|
||||||
void c16k_set_a(unsigned char source, unsigned int values[], unsigned int *bar_chars)
|
void c16k_set_a(unsigned char source, unsigned int values[], unsigned int *bar_chars, char nullchar)
|
||||||
{
|
{
|
||||||
|
if(source == nullchar) {
|
||||||
|
values[(*bar_chars)] = 64;
|
||||||
|
(*bar_chars)++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(source > 127) {
|
if(source > 127) {
|
||||||
if(source < 160) {
|
if(source < 160) {
|
||||||
values[(*bar_chars)] = source + 64 - 128;
|
values[(*bar_chars)] = source + 64 - 128;
|
||||||
@ -164,7 +170,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
indexliste = 0;
|
indexliste = 0;
|
||||||
indexchaine = 0;
|
indexchaine = 0;
|
||||||
|
|
||||||
mode = parunmodd(source[indexchaine]);
|
mode = parunmodd(source[indexchaine], symbol->nullchar);
|
||||||
|
|
||||||
for(i = 0; i < 160; i++) {
|
for(i = 0; i < 160; i++) {
|
||||||
list[0][i] = 0;
|
list[0][i] = 0;
|
||||||
@ -175,7 +181,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
while ((list[1][indexliste] == mode) && (indexchaine < input_length)) {
|
while ((list[1][indexliste] == mode) && (indexchaine < input_length)) {
|
||||||
list[0][indexliste]++;
|
list[0][indexliste]++;
|
||||||
indexchaine++;
|
indexchaine++;
|
||||||
mode = parunmodd(source[indexchaine]);
|
mode = parunmodd(source[indexchaine], symbol->nullchar);
|
||||||
}
|
}
|
||||||
indexliste++;
|
indexliste++;
|
||||||
} while (indexchaine < input_length);
|
} while (indexchaine < input_length);
|
||||||
@ -385,7 +391,7 @@ int code16k(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
|
|
||||||
switch(set[read])
|
switch(set[read])
|
||||||
{ /* Encode data characters */
|
{ /* Encode data characters */
|
||||||
case 'A': c16k_set_a(source[read], values, &bar_characters);
|
case 'A': c16k_set_a(source[read], values, &bar_characters, symbol->nullchar);
|
||||||
read++;
|
read++;
|
||||||
break;
|
break;
|
||||||
case 'B': c16k_set_b(source[read], values, &bar_characters);
|
case 'B': c16k_set_b(source[read], values, &bar_characters);
|
||||||
|
@ -360,7 +360,7 @@ int cc_b(struct zint_symbol *symbol, unsigned char source[], int cc_width)
|
|||||||
chainemc[mclength] = 920;
|
chainemc[mclength] = 920;
|
||||||
mclength++;
|
mclength++;
|
||||||
|
|
||||||
byteprocess(chainemc, &mclength, data_string, 0, length, 0);
|
byteprocess(chainemc, &mclength, data_string, 0, length, 0, 0x00);
|
||||||
|
|
||||||
/* Now figure out which variant of the symbol to use and load values accordingly */
|
/* Now figure out which variant of the symbol to use and load values accordingly */
|
||||||
|
|
||||||
@ -585,7 +585,7 @@ int cc_c(struct zint_symbol *symbol, unsigned char source[], int cc_width, int e
|
|||||||
chainemc[mclength] = 920; /* CC-C identifier */
|
chainemc[mclength] = 920; /* CC-C identifier */
|
||||||
mclength++;
|
mclength++;
|
||||||
|
|
||||||
byteprocess(chainemc, &mclength, data_string, 0, length, 0);
|
byteprocess(chainemc, &mclength, data_string, 0, length, 0, 0x00);
|
||||||
|
|
||||||
chainemc[0] = mclength;
|
chainemc[0] = mclength;
|
||||||
|
|
||||||
|
@ -326,8 +326,8 @@ char ecc200encode(unsigned char *t, int tl, unsigned char *s, int sl, char *enco
|
|||||||
t[tp++] = 238;
|
t[tp++] = 238;
|
||||||
enc = newenc;
|
enc = newenc;
|
||||||
}
|
}
|
||||||
t[tp++] = (v >> 8);
|
t[tp++] = (int)(v / 256);
|
||||||
t[tp++] = (v & 0xFF);
|
t[tp++] = v % 256;
|
||||||
p -= 3;
|
p -= 3;
|
||||||
out[0] = out[3];
|
out[0] = out[3];
|
||||||
out[1] = out[4];
|
out[1] = out[4];
|
||||||
@ -700,9 +700,9 @@ static char *encmake(int l, unsigned char *s, int *lenp, char exact)
|
|||||||
if (bl && b == E_BINARY)
|
if (bl && b == E_BINARY)
|
||||||
enc[p][(int)b].s += enc[p + 1][(int)b].s;
|
enc[p][(int)b].s += enc[p + 1][(int)b].s;
|
||||||
/*
|
/*
|
||||||
* fprintf (stderr, "%d:", p); for (e = 0; e < E_MAX; e++) fprintf \
|
fprintf (stderr, "%d:", p); for (e = 0; e < E_MAX; e++) fprintf \
|
||||||
* (stderr, " %c*%d/%d", encchr[e], enc[p][e].s, enc[p][e].t); \
|
(stderr, " %c*%d/%d", encchr[e], enc[p][e].s, enc[p][e].t); \
|
||||||
* fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
encoding = safemalloc(l + 1);
|
encoding = safemalloc(l + 1);
|
||||||
@ -752,6 +752,8 @@ int iec16022ecc200(unsigned char *barcode, int barcodelen, struct zint_symbol *s
|
|||||||
int lend, *lenp;
|
int lend, *lenp;
|
||||||
struct ecc200matrix_s *matrix;
|
struct ecc200matrix_s *matrix;
|
||||||
memset(binary, 0, sizeof(binary));
|
memset(binary, 0, sizeof(binary));
|
||||||
|
unsigned char adjusted[barcodelen];
|
||||||
|
int i;
|
||||||
|
|
||||||
lend = 0;
|
lend = 0;
|
||||||
lenp = &lend;
|
lenp = &lend;
|
||||||
@ -790,6 +792,15 @@ int iec16022ecc200(unsigned char *barcode, int barcodelen, struct zint_symbol *s
|
|||||||
default: W = 0; H = 0; break;
|
default: W = 0; H = 0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Adjust for NULL characters */
|
||||||
|
for(i = 0; i < barcodelen; i++) {
|
||||||
|
if(barcode[i] == symbol->nullchar) {
|
||||||
|
adjusted[i] = 0x00;
|
||||||
|
} else {
|
||||||
|
adjusted[i] = barcode[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// encoding
|
// encoding
|
||||||
if (W) { // known size
|
if (W) { // known size
|
||||||
for (matrix = ecc200matrix; matrix->W && (matrix->W != W || matrix->H != H); matrix++) ;
|
for (matrix = ecc200matrix; matrix->W && (matrix->W != W || matrix->H != H); matrix++) ;
|
||||||
@ -799,10 +810,10 @@ int iec16022ecc200(unsigned char *barcode, int barcodelen, struct zint_symbol *s
|
|||||||
}
|
}
|
||||||
if (!encoding) {
|
if (!encoding) {
|
||||||
int len;
|
int len;
|
||||||
char *e = encmake(barcodelen, barcode, &len, 1);
|
char *e = encmake(barcodelen, adjusted, &len, 1);
|
||||||
if (e && len != matrix->bytes) { // try not an exact fit
|
if (e && len != matrix->bytes) { // try not an exact fit
|
||||||
free(e);
|
free(e);
|
||||||
e = encmake(barcodelen, barcode, &len, 0);
|
e = encmake(barcodelen, adjusted, &len, 0);
|
||||||
if (len > matrix->bytes) {
|
if (len > matrix->bytes) {
|
||||||
strcpy(symbol->errtxt, "Cannot make barcode fit");
|
strcpy(symbol->errtxt, "Cannot make barcode fit");
|
||||||
if (e) free (e);
|
if (e) free (e);
|
||||||
@ -814,21 +825,22 @@ int iec16022ecc200(unsigned char *barcode, int barcodelen, struct zint_symbol *s
|
|||||||
} else {
|
} else {
|
||||||
// find a suitable encoding
|
// find a suitable encoding
|
||||||
if (encoding == NULL)
|
if (encoding == NULL)
|
||||||
encoding = encmake(barcodelen, barcode, NULL, 1);
|
encoding = encmake(barcodelen, adjusted, NULL, 1);
|
||||||
|
|
||||||
if (encoding) { // find one that fits chosen encoding
|
if (encoding) { // find one that fits chosen encoding
|
||||||
for (matrix = ecc200matrix; matrix->W; matrix++)
|
for (matrix = ecc200matrix; matrix->W; matrix++)
|
||||||
if (ecc200encode(binary, matrix->bytes, barcode, barcodelen, encoding, 0))
|
if (ecc200encode(binary, matrix->bytes, adjusted, barcodelen, encoding, 0)) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
int len;
|
int len;
|
||||||
char *e;
|
char *e;
|
||||||
e = encmake(barcodelen, barcode, &len, 1);
|
e = encmake(barcodelen, adjusted, &len, 1);
|
||||||
for (matrix = ecc200matrix;
|
for (matrix = ecc200matrix;
|
||||||
matrix->W && matrix->bytes != len; matrix++) ;
|
matrix->W && matrix->bytes != len; matrix++) ;
|
||||||
if (e && !matrix->W) { // try for non exact fit
|
if (e && !matrix->W) { // try for non exact fit
|
||||||
free(e);
|
free(e);
|
||||||
e = encmake(barcodelen, barcode, &len, 0);
|
e = encmake(barcodelen, adjusted, &len, 0);
|
||||||
for (matrix = ecc200matrix; matrix->W && matrix->bytes < len; matrix++) ;
|
for (matrix = ecc200matrix; matrix->W && matrix->bytes < len; matrix++) ;
|
||||||
}
|
}
|
||||||
encoding = e;
|
encoding = e;
|
||||||
@ -840,11 +852,12 @@ int iec16022ecc200(unsigned char *barcode, int barcodelen, struct zint_symbol *s
|
|||||||
W = matrix->W;
|
W = matrix->W;
|
||||||
H = matrix->H;
|
H = matrix->H;
|
||||||
}
|
}
|
||||||
if (!ecc200encode(binary, matrix->bytes, barcode, barcodelen, encoding, lenp)) {
|
if (!ecc200encode(binary, matrix->bytes, adjusted, barcodelen, encoding, lenp)) {
|
||||||
strcpy(symbol->errtxt, "Barcode too long");
|
strcpy(symbol->errtxt, "Barcode too long");
|
||||||
free(encoding);
|
free(encoding);
|
||||||
return ERROR_INVALID_OPTION;
|
return ERROR_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ecc code
|
// ecc code
|
||||||
ecc200(binary, matrix->bytes, matrix->datablock, matrix->rsblock);
|
ecc200(binary, matrix->bytes, matrix->datablock, matrix->rsblock);
|
||||||
{ // placement
|
{ // placement
|
||||||
|
@ -54,6 +54,7 @@ struct zint_symbol *ZBarcode_Create()
|
|||||||
symbol->row_height[i] = 0;
|
symbol->row_height[i] = 0;
|
||||||
}
|
}
|
||||||
return symbol;
|
return symbol;
|
||||||
|
symbol->nullchar = 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ void maxi_bump(int set[], int character[], int bump_posn)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int maxi_text_process(int mode, unsigned char source[])
|
int maxi_text_process(int mode, unsigned char source[], char nullchar)
|
||||||
{
|
{
|
||||||
/* Format text according to Appendix A */
|
/* Format text according to Appendix A */
|
||||||
|
|
||||||
@ -136,9 +136,14 @@ int maxi_text_process(int mode, unsigned char source[])
|
|||||||
for (i = 0; i < length; i++) {
|
for (i = 0; i < length; i++) {
|
||||||
/* Look up characters in table from Appendix A - this gives
|
/* Look up characters in table from Appendix A - this gives
|
||||||
value and code set for most characters */
|
value and code set for most characters */
|
||||||
|
if(source[i] == nullchar) {
|
||||||
|
set[i] = maxiCodeSet[0];
|
||||||
|
character[i] = maxiSymbolChar[0];
|
||||||
|
} else {
|
||||||
set[i] = maxiCodeSet[source[i]];
|
set[i] = maxiCodeSet[source[i]];
|
||||||
character[i] = maxiSymbolChar[source[i]];
|
character[i] = maxiSymbolChar[source[i]];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* If a character can be represented in more than one code set,
|
/* If a character can be represented in more than one code set,
|
||||||
pick which version to use */
|
pick which version to use */
|
||||||
@ -623,7 +628,7 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
maxi_codeword[0] = mode;
|
maxi_codeword[0] = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = maxi_text_process(mode, source);
|
i = maxi_text_process(mode, source, symbol->nullchar);
|
||||||
if(i == ERROR_TOO_LONG ) {
|
if(i == ERROR_TOO_LONG ) {
|
||||||
strcpy(symbol->errtxt, "Input data too long [574]");
|
strcpy(symbol->errtxt, "Input data too long [574]");
|
||||||
return i;
|
return i;
|
||||||
|
@ -63,11 +63,15 @@ static int MicroAutosize[56] =
|
|||||||
int liste[2][1000]; /* global - okay, so I got _almost_ everything local! */
|
int liste[2][1000]; /* global - okay, so I got _almost_ everything local! */
|
||||||
|
|
||||||
/* 866 */
|
/* 866 */
|
||||||
int quelmode(char codeascii)
|
int quelmode(char codeascii, char nullchar)
|
||||||
{
|
{
|
||||||
int mode;
|
int mode;
|
||||||
mode = BYT;
|
mode = BYT;
|
||||||
|
|
||||||
|
if(codeascii == nullchar) {
|
||||||
|
return BYT;
|
||||||
|
}
|
||||||
|
|
||||||
if((codeascii >= ' ') && (codeascii <= '~')) { mode = TEX; }
|
if((codeascii >= ' ') && (codeascii <= '~')) { mode = TEX; }
|
||||||
if(codeascii == '\t') { mode = TEX; }
|
if(codeascii == '\t') { mode = TEX; }
|
||||||
if(codeascii == '\n') { mode = TEX; }
|
if(codeascii == '\n') { mode = TEX; }
|
||||||
@ -304,7 +308,7 @@ void textprocess(int *chainemc, int *mclength, char chaine[], int start, int len
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 671 */
|
/* 671 */
|
||||||
void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start, int length, int block)
|
void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start, int length, int block, char nullchar)
|
||||||
{
|
{
|
||||||
|
|
||||||
int i, j, k, l, longueur;
|
int i, j, k, l, longueur;
|
||||||
@ -344,6 +348,16 @@ void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start
|
|||||||
shiftup(y_reg);
|
shiftup(y_reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(chaine[start + j + k] == nullchar) {
|
||||||
|
y_reg[7] = 0;
|
||||||
|
y_reg[6] = 0;
|
||||||
|
y_reg[5] = 0;
|
||||||
|
y_reg[4] = 0;
|
||||||
|
y_reg[3] = 0;
|
||||||
|
y_reg[2] = 0;
|
||||||
|
y_reg[1] = 0;
|
||||||
|
y_reg[0] = 0;
|
||||||
|
} else {
|
||||||
if((chaine[start + j + k] & 0x80) != 0) { y_reg[7] = 1; }
|
if((chaine[start + j + k] & 0x80) != 0) { y_reg[7] = 1; }
|
||||||
if((chaine[start + j + k] & 0x40) != 0) { y_reg[6] = 1; }
|
if((chaine[start + j + k] & 0x40) != 0) { y_reg[6] = 1; }
|
||||||
if((chaine[start + j + k] & 0x20) != 0) { y_reg[5] = 1; }
|
if((chaine[start + j + k] & 0x20) != 0) { y_reg[5] = 1; }
|
||||||
@ -352,7 +366,7 @@ void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start
|
|||||||
if((chaine[start + j + k] & 0x04) != 0) { y_reg[2] = 1; }
|
if((chaine[start + j + k] & 0x04) != 0) { y_reg[2] = 1; }
|
||||||
if((chaine[start + j + k] & 0x02) != 0) { y_reg[1] = 1; }
|
if((chaine[start + j + k] & 0x02) != 0) { y_reg[1] = 1; }
|
||||||
if((chaine[start + j + k] & 0x01) != 0) { y_reg[0] = 1; }
|
if((chaine[start + j + k] & 0x01) != 0) { y_reg[0] = 1; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(l = 0; l < 4; l++) {
|
for(l = 0; l < 4; l++) {
|
||||||
@ -481,7 +495,7 @@ int pdf417(struct zint_symbol *symbol, unsigned char chaine[])
|
|||||||
indexliste = 0;
|
indexliste = 0;
|
||||||
indexchaine = 0;
|
indexchaine = 0;
|
||||||
|
|
||||||
mode = quelmode(chaine[indexchaine]);
|
mode = quelmode(chaine[indexchaine], symbol->nullchar);
|
||||||
|
|
||||||
for(i = 0; i < 1000; i++) {
|
for(i = 0; i < 1000; i++) {
|
||||||
liste[0][i] = 0;
|
liste[0][i] = 0;
|
||||||
@ -493,7 +507,7 @@ int pdf417(struct zint_symbol *symbol, unsigned char chaine[])
|
|||||||
while ((liste[1][indexliste] == mode) && (indexchaine < ustrlen(chaine))) {
|
while ((liste[1][indexliste] == mode) && (indexchaine < ustrlen(chaine))) {
|
||||||
liste[0][indexliste]++;
|
liste[0][indexliste]++;
|
||||||
indexchaine++;
|
indexchaine++;
|
||||||
mode = quelmode(chaine[indexchaine]);
|
mode = quelmode(chaine[indexchaine], symbol->nullchar);
|
||||||
}
|
}
|
||||||
indexliste++;
|
indexliste++;
|
||||||
} while (indexchaine < ustrlen(chaine));
|
} while (indexchaine < ustrlen(chaine));
|
||||||
@ -510,7 +524,7 @@ int pdf417(struct zint_symbol *symbol, unsigned char chaine[])
|
|||||||
textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
|
textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
|
||||||
break;
|
break;
|
||||||
case BYT: /* 670 - octet stream mode */
|
case BYT: /* 670 - octet stream mode */
|
||||||
byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i);
|
byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i, symbol->nullchar);
|
||||||
break;
|
break;
|
||||||
case NUM: /* 712 - numeric mode */
|
case NUM: /* 712 - numeric mode */
|
||||||
numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
|
numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
|
||||||
@ -766,7 +780,7 @@ int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[])
|
|||||||
indexliste = 0;
|
indexliste = 0;
|
||||||
indexchaine = 0;
|
indexchaine = 0;
|
||||||
|
|
||||||
mode = quelmode(chaine[indexchaine]);
|
mode = quelmode(chaine[indexchaine], symbol->nullchar);
|
||||||
|
|
||||||
for(i = 0; i < 1000; i++) {
|
for(i = 0; i < 1000; i++) {
|
||||||
liste[0][i] = 0;
|
liste[0][i] = 0;
|
||||||
@ -778,7 +792,7 @@ int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[])
|
|||||||
while ((liste[1][indexliste] == mode) && (indexchaine < ustrlen(chaine))) {
|
while ((liste[1][indexliste] == mode) && (indexchaine < ustrlen(chaine))) {
|
||||||
liste[0][indexliste]++;
|
liste[0][indexliste]++;
|
||||||
indexchaine++;
|
indexchaine++;
|
||||||
mode = quelmode(chaine[indexchaine]);
|
mode = quelmode(chaine[indexchaine], symbol->nullchar);
|
||||||
}
|
}
|
||||||
indexliste++;
|
indexliste++;
|
||||||
} while (indexchaine < ustrlen(chaine));
|
} while (indexchaine < ustrlen(chaine));
|
||||||
@ -795,7 +809,7 @@ int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[])
|
|||||||
textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
|
textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
|
||||||
break;
|
break;
|
||||||
case BYT: /* 670 - octet stream mode */
|
case BYT: /* 670 - octet stream mode */
|
||||||
byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i);
|
byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i, symbol->nullchar);
|
||||||
break;
|
break;
|
||||||
case NUM: /* 712 - numeric mode */
|
case NUM: /* 712 - numeric mode */
|
||||||
numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
|
numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
|
||||||
|
@ -435,4 +435,4 @@ static char *RAPC[53] = {"", "112231", "121231", "122131", "131131", "131221", "
|
|||||||
"112213", "112222", "112312", "112321", "111421", "111331", "111322", "111232", "111223",
|
"112213", "112222", "112312", "112321", "111421", "111331", "111322", "111232", "111223",
|
||||||
"111133", "111124", "111214", "112114", "121114", "121123", "121132", "112132", "112141" };
|
"111133", "111124", "111214", "112114", "121114", "121123", "121132", "112132", "112141" };
|
||||||
|
|
||||||
void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start, int length, int block);
|
void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start, int length, int block, char nullchar);
|
@ -80,7 +80,11 @@ int telepen(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
for (i=0; i < ustrlen(source); i++)
|
for (i=0; i < ustrlen(source); i++)
|
||||||
{
|
{
|
||||||
ascii_value = source[i];
|
ascii_value = source[i];
|
||||||
|
if(ascii_value == symbol->nullchar) {
|
||||||
|
concat(dest, TeleTable[0]);
|
||||||
|
} else {
|
||||||
concat(dest, TeleTable[ascii_value]);
|
concat(dest, TeleTable[ascii_value]);
|
||||||
|
}
|
||||||
count += source[i];
|
count += source[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ struct zint_symbol {
|
|||||||
char encoded_data[178][1000];
|
char encoded_data[178][1000];
|
||||||
int row_height[155];
|
int row_height[155];
|
||||||
char errtxt[100];
|
char errtxt[100];
|
||||||
|
char nullchar;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Tbarcode 7 codes */
|
/* Tbarcode 7 codes */
|
||||||
|
214
docs/appxa.html
214
docs/appxa.html
@ -3,9 +3,9 @@
|
|||||||
<HEAD>
|
<HEAD>
|
||||||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
|
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
|
||||||
<TITLE>Character Encoding</TITLE>
|
<TITLE>Character Encoding</TITLE>
|
||||||
<META NAME="GENERATOR" CONTENT="Microsoft FrontPage 5.0">
|
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
||||||
<META NAME="CREATED" CONTENT="20070730;21081900">
|
<META NAME="CREATED" CONTENT="20070730;21081900">
|
||||||
<META NAME="CHANGED" CONTENT="20070829;23503500">
|
<META NAME="CHANGED" CONTENT="20090101;16105000">
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
<!--
|
<!--
|
||||||
TD P { color: #000000 }
|
TD P { color: #000000 }
|
||||||
@ -44,7 +44,7 @@ in the subsequent section.</P>
|
|||||||
<P>The ubiquitous ASCII standard is well known to most computer
|
<P>The ubiquitous ASCII standard is well known to most computer
|
||||||
users. It's reproduced here for reference.</P>
|
users. It's reproduced here for reference.</P>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE WIDTH=681 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=3>
|
<TABLE WIDTH=681 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=3>
|
||||||
<COL WIDTH=64>
|
<COL WIDTH=64>
|
||||||
<COL WIDTH=65>
|
<COL WIDTH=65>
|
||||||
<COL WIDTH=65>
|
<COL WIDTH=65>
|
||||||
@ -551,15 +551,19 @@ users. It's reproduced here for reference.</P>
|
|||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TBODY>
|
</TBODY>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</CENTER>
|
</CENTER>
|
||||||
<BR><BR>
|
<P><BR><BR>
|
||||||
<P><FONT SIZE=5><A NAME="LATIN1"></A><B>A.2 Latin Alphabet No 1 (ISO 8859-1)</B></FONT></P>
|
</P>
|
||||||
|
<P><A NAME="LATIN1"></A><FONT SIZE=5><B>A.2 Latin Alphabet No 1 (ISO
|
||||||
|
8859-1)</B></FONT></P>
|
||||||
<P STYLE="margin-bottom: 0cm">A common extension to the ASCII
|
<P STYLE="margin-bottom: 0cm">A common extension to the ASCII
|
||||||
standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P>
|
standard, Latin-1 is used to expand the range of Code 128, PDF417 and
|
||||||
<BR>
|
other symbols. Input strings should be in Unicode format.</P>
|
||||||
|
<P STYLE="margin-bottom: 0cm"><BR>
|
||||||
|
</P>
|
||||||
<CENTER>
|
<CENTER>
|
||||||
<TABLE WIDTH=681 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=3>
|
<TABLE WIDTH=681 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=3>
|
||||||
<COL WIDTH=64>
|
<COL WIDTH=64>
|
||||||
<COL WIDTH=65>
|
<COL WIDTH=65>
|
||||||
<COL WIDTH=65>
|
<COL WIDTH=65>
|
||||||
@ -617,19 +621,19 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
<P ALIGN=CENTER>NBSP</P>
|
<P ALIGN=CENTER>NBSP</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>°</P>
|
<P ALIGN=CENTER>°</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>À</P>
|
<P ALIGN=CENTER>À</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ð</P>
|
<P ALIGN=CENTER>Ð</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>à</P>
|
<P ALIGN=CENTER>à</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ð</P>
|
<P ALIGN=CENTER>ð</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -645,22 +649,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¡</P>
|
<P ALIGN=CENTER>¡</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>±</P>
|
<P ALIGN=CENTER>±</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Á</P>
|
<P ALIGN=CENTER>Á</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ñ</P>
|
<P ALIGN=CENTER>Ñ</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>á</P>
|
<P ALIGN=CENTER>á</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ñ</P>
|
<P ALIGN=CENTER>ñ</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -676,22 +680,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¢</P>
|
<P ALIGN=CENTER>¢</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>²</P>
|
<P ALIGN=CENTER>²</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Â</P>
|
<P ALIGN=CENTER>Â</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ò</P>
|
<P ALIGN=CENTER>Ò</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>â</P>
|
<P ALIGN=CENTER>â</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ò</P>
|
<P ALIGN=CENTER>ò</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -707,22 +711,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>£</P>
|
<P ALIGN=CENTER>£</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>³</P>
|
<P ALIGN=CENTER>³</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ã</P>
|
<P ALIGN=CENTER>Ã</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ó</P>
|
<P ALIGN=CENTER>Ó</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ã</P>
|
<P ALIGN=CENTER>ã</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ó</P>
|
<P ALIGN=CENTER>ó</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -738,22 +742,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¤</P>
|
<P ALIGN=CENTER>¤</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>´</P>
|
<P ALIGN=CENTER>´</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ä</P>
|
<P ALIGN=CENTER>Ä</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ô</P>
|
<P ALIGN=CENTER>Ô</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ä</P>
|
<P ALIGN=CENTER>ä</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ô</P>
|
<P ALIGN=CENTER>ô</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -769,22 +773,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¥</P>
|
<P ALIGN=CENTER>¥</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>µ</P>
|
<P ALIGN=CENTER>µ</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Å</P>
|
<P ALIGN=CENTER>Å</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Õ</P>
|
<P ALIGN=CENTER>Õ</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>å</P>
|
<P ALIGN=CENTER>å</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>õ</P>
|
<P ALIGN=CENTER>õ</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -800,22 +804,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¦</P>
|
<P ALIGN=CENTER>¦</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¶</P>
|
<P ALIGN=CENTER>¶</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Æ</P>
|
<P ALIGN=CENTER>Æ</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ö</P>
|
<P ALIGN=CENTER>Ö</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>æ</P>
|
<P ALIGN=CENTER>æ</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ö</P>
|
<P ALIGN=CENTER>ö</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -831,22 +835,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>§</P>
|
<P ALIGN=CENTER>§</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>·</P>
|
<P ALIGN=CENTER>·</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ç</P>
|
<P ALIGN=CENTER>Ç</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>×</P>
|
<P ALIGN=CENTER>×</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ç</P>
|
<P ALIGN=CENTER>ç</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>÷</P>
|
<P ALIGN=CENTER>÷</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -862,22 +866,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¨</P>
|
<P ALIGN=CENTER>¨</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¸</P>
|
<P ALIGN=CENTER>¸</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>È</P>
|
<P ALIGN=CENTER>È</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ø</P>
|
<P ALIGN=CENTER>Ø</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>è</P>
|
<P ALIGN=CENTER>è</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ø</P>
|
<P ALIGN=CENTER>ø</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -893,22 +897,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>©</P>
|
<P ALIGN=CENTER>©</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¹</P>
|
<P ALIGN=CENTER>¹</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>É</P>
|
<P ALIGN=CENTER>É</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ù</P>
|
<P ALIGN=CENTER>Ù</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>é</P>
|
<P ALIGN=CENTER>é</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ù</P>
|
<P ALIGN=CENTER>ù</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -924,22 +928,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ª</P>
|
<P ALIGN=CENTER>ª</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>º</P>
|
<P ALIGN=CENTER>º</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ê</P>
|
<P ALIGN=CENTER>Ê</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ú</P>
|
<P ALIGN=CENTER>Ú</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ê</P>
|
<P ALIGN=CENTER>ê</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ú</P>
|
<P ALIGN=CENTER>ú</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -955,22 +959,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>«</P>
|
<P ALIGN=CENTER>«</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>»</P>
|
<P ALIGN=CENTER>»</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ë</P>
|
<P ALIGN=CENTER>Ë</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Û</P>
|
<P ALIGN=CENTER>Û</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ë</P>
|
<P ALIGN=CENTER>ë</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>û</P>
|
<P ALIGN=CENTER>û</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -986,22 +990,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¬</P>
|
<P ALIGN=CENTER>¬</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¼</P>
|
<P ALIGN=CENTER>¼</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ì</P>
|
<P ALIGN=CENTER>Ì</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ü</P>
|
<P ALIGN=CENTER>Ü</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ì</P>
|
<P ALIGN=CENTER>ì</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ü</P>
|
<P ALIGN=CENTER>ü</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -1020,19 +1024,19 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
<P ALIGN=CENTER>SHY</P>
|
<P ALIGN=CENTER>SHY</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>½</P>
|
<P ALIGN=CENTER>½</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Í</P>
|
<P ALIGN=CENTER>Í</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ý</P>
|
<P ALIGN=CENTER>Ý</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>í</P>
|
<P ALIGN=CENTER>í</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ý</P>
|
<P ALIGN=CENTER>ý</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -1048,22 +1052,22 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>®</P>
|
<P ALIGN=CENTER>®</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¾</P>
|
<P ALIGN=CENTER>¾</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Î</P>
|
<P ALIGN=CENTER>Î</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Þ</P>
|
<P ALIGN=CENTER>Þ</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>î</P>
|
<P ALIGN=CENTER>î</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>þ</P>
|
<P ALIGN=CENTER>þ</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
@ -1079,26 +1083,26 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</P>
|
</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¯</P>
|
<P ALIGN=CENTER>¯</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>¿</P>
|
<P ALIGN=CENTER>¿</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>Ï</P>
|
<P ALIGN=CENTER>Ï</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ß</P>
|
<P ALIGN=CENTER>ß</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=65>
|
<TD WIDTH=65>
|
||||||
<P ALIGN=CENTER>ï</P>
|
<P ALIGN=CENTER>ï</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=61>
|
<TD WIDTH=61>
|
||||||
<P ALIGN=CENTER>ÿ</P>
|
<P ALIGN=CENTER>ÿ</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TBODY>
|
</TBODY>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</CENTER>
|
</CENTER>
|
||||||
<HR>
|
<HR>
|
||||||
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
|
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
|
||||||
@ -1125,5 +1129,7 @@ standard, Latin-1 is used to expand the range of Code 128 and PDF417 symbols.</P
|
|||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
<P><BR><BR>
|
||||||
|
</P>
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
@ -5,7 +5,7 @@
|
|||||||
<TITLE>Using the API</TITLE>
|
<TITLE>Using the API</TITLE>
|
||||||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
||||||
<META NAME="CREATED" CONTENT="20070730;21081900">
|
<META NAME="CREATED" CONTENT="20070730;21081900">
|
||||||
<META NAME="CHANGED" CONTENT="20081109;9211000">
|
<META NAME="CHANGED" CONTENT="20090101;16002700">
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
<!--
|
<!--
|
||||||
TD P { color: #000000 }
|
TD P { color: #000000 }
|
||||||
@ -92,8 +92,7 @@ char **argv)<BR>{<BR> struct zint_symbol
|
|||||||
ZBarcode_Create();<BR> ZBarcode_Encode_and_Print(my_symbol,
|
ZBarcode_Create();<BR> ZBarcode_Encode_and_Print(my_symbol,
|
||||||
argv[1]);<BR> ZBarcode_Delete(my_symbol);<BR> return
|
argv[1]);<BR> ZBarcode_Delete(my_symbol);<BR> return
|
||||||
0;<BR>}</FONT></FONT></P>
|
0;<BR>}</FONT></FONT></P>
|
||||||
<P><BR><BR>
|
<P>Input strings should be Unicode formatted.</P>
|
||||||
</P>
|
|
||||||
<P><A NAME="OPTIONS"></A><FONT SIZE=5><B>4.3 Setting Options</B></FONT></P>
|
<P><A NAME="OPTIONS"></A><FONT SIZE=5><B>4.3 Setting Options</B></FONT></P>
|
||||||
<P>So far our application is not very useful unless we plan to only
|
<P>So far our application is not very useful unless we plan to only
|
||||||
make Code 128 barcodes and we don't mind that they only save to
|
make Code 128 barcodes and we don't mind that they only save to
|
||||||
@ -270,6 +269,34 @@ structure consists of the following variables:</P>
|
|||||||
<P ALIGN=CENTER>(automatic)</P>
|
<P ALIGN=CENTER>(automatic)</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=151>
|
||||||
|
<P ALIGN=CENTER><FONT FACE="Courier">scale</FONT></P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=162>
|
||||||
|
<P ALIGN=CENTER>float</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=334>
|
||||||
|
<P ALIGN=CENTER>Scale factor for adjusting size of image.</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=175>
|
||||||
|
<P ALIGN=CENTER>1.0</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=151>
|
||||||
|
<P ALIGN=CENTER><FONT FACE="Courier">nullchar</FONT></P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=162>
|
||||||
|
<P ALIGN=CENTER>char</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=334>
|
||||||
|
<P ALIGN=CENTER>Character to substitute for NULL</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=175>
|
||||||
|
<P ALIGN=CENTER>NULL</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD WIDTH=151>
|
<TD WIDTH=151>
|
||||||
<P ALIGN=CENTER><FONT FACE="Courier">primary</FONT></P>
|
<P ALIGN=CENTER><FONT FACE="Courier">primary</FONT></P>
|
||||||
@ -1026,6 +1053,17 @@ following table. For example</P>
|
|||||||
<P ALIGN=CENTER>NVE-18</P>
|
<P ALIGN=CENTER>NVE-18</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=150>
|
||||||
|
<P ALIGN=CENTER>77</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=382>
|
||||||
|
<P ALIGN=CENTER><FONT FACE="Courier, monospace">BARCODE_KOREAPOST</FONT></P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=366>
|
||||||
|
<P ALIGN=CENTER>Korea Post</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD WIDTH=150>
|
<TD WIDTH=150>
|
||||||
<P ALIGN=CENTER>79</P>
|
<P ALIGN=CENTER>79</P>
|
||||||
|
@ -42,7 +42,8 @@ describes how to encode data using the command line front end
|
|||||||
program.</P>
|
program.</P>
|
||||||
<P><BR><BR>
|
<P><BR><BR>
|
||||||
</P>
|
</P>
|
||||||
<H1><A NAME="INPUT"></A><FONT SIZE=5><B>3.1 Inputting data</B></FONT></H1>
|
<P><A NAME="INPUT"></A><FONT SIZE=5><B>3.1 Inputting data</B></FONT>
|
||||||
|
</P>
|
||||||
<P STYLE="font-style: normal">The data to encode can be entered at
|
<P STYLE="font-style: normal">The data to encode can be entered at
|
||||||
the command line using the -d option, for example:</P>
|
the command line using the -d option, for example:</P>
|
||||||
<P STYLE="font-style: normal"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
|
<P STYLE="font-style: normal"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
|
||||||
@ -64,6 +65,9 @@ here.png. If an encapsulated Post Script file is needed simply append
|
|||||||
the file name with .eps:</P>
|
the file name with .eps:</P>
|
||||||
<P STYLE="font-style: normal"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
|
<P STYLE="font-style: normal"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
|
||||||
-o there.eps -d 'This Text'</FONT></FONT></P>
|
-o there.eps -d 'This Text'</FONT></FONT></P>
|
||||||
|
<P>Output can also be directed to stdout using the --<FONT FACE="Courier, monospace">directeps</FONT>
|
||||||
|
and --<FONT FACE="Courier, monospace">directpng</FONT> switches for
|
||||||
|
EPS and PNG output respectively.</P>
|
||||||
<P><BR><BR>
|
<P><BR><BR>
|
||||||
</P>
|
</P>
|
||||||
<P STYLE="font-style: normal"><A NAME="BARTYPE"></A><FONT SIZE=5><B>3.3
|
<P STYLE="font-style: normal"><A NAME="BARTYPE"></A><FONT SIZE=5><B>3.3
|
||||||
@ -449,6 +453,14 @@ appropriate integer value in the following table.</P>
|
|||||||
<P ALIGN=CENTER>NVE-18</P>
|
<P ALIGN=CENTER>NVE-18</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>77</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=643>
|
||||||
|
<P ALIGN=CENTER>Korea Post</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD WIDTH=139>
|
<TD WIDTH=139>
|
||||||
<P ALIGN=CENTER>79</P>
|
<P ALIGN=CENTER>79</P>
|
||||||
@ -758,27 +770,23 @@ is only available with PNG output.</FONT></P>
|
|||||||
<COL WIDTH=480>
|
<COL WIDTH=480>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD WIDTH=501>
|
<TD WIDTH=501>
|
||||||
<P ALIGN=CENTER><IMG SRC="bar38n.png" NAME="graphics5" ALIGN=BOTTOM WIDTH=200 HEIGHT=118 BORDER=0><BR><BR><BR>
|
<P ALIGN=CENTER><IMG SRC="bar38n.png" NAME="graphics5" ALIGN=BOTTOM WIDTH=200 HEIGHT=118 BORDER=0>
|
||||||
</P>
|
<BR><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=0</FONT></FONT><FONT SIZE=3>
|
||||||
<P ALIGN=CENTER><FONT SIZE=3><FONT FACE="Courier, monospace">--rotate=0</FONT>
|
|
||||||
(default)</FONT></P>
|
(default)</FONT></P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=480>
|
<TD WIDTH=480>
|
||||||
<P ALIGN=CENTER><IMG SRC="bar38u.png" NAME="graphics6" ALIGN=BOTTOM WIDTH=200 HEIGHT=118 BORDER=0><BR><BR><BR>
|
<P ALIGN=CENTER><IMG SRC="bar38u.png" NAME="graphics6" ALIGN=BOTTOM WIDTH=200 HEIGHT=118 BORDER=0>
|
||||||
</P>
|
<BR><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=180</FONT></FONT></P>
|
||||||
<P ALIGN=CENTER><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=180</FONT></FONT></P>
|
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD WIDTH=501>
|
<TD WIDTH=501>
|
||||||
<P ALIGN=CENTER><IMG SRC="bar38l.png" NAME="graphics7" ALIGN=BOTTOM WIDTH=118 HEIGHT=200 BORDER=0><BR><BR><BR>
|
<P ALIGN=CENTER><IMG SRC="bar38l.png" NAME="graphics7" ALIGN=BOTTOM WIDTH=118 HEIGHT=200 BORDER=0>
|
||||||
</P>
|
<BR><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=270</FONT></FONT></P>
|
||||||
<P ALIGN=CENTER><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=270</FONT></FONT></P>
|
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=480>
|
<TD WIDTH=480>
|
||||||
<P ALIGN=CENTER><IMG SRC="bar38r.png" NAME="graphics8" ALIGN=BOTTOM WIDTH=118 HEIGHT=200 BORDER=0><BR><BR><BR>
|
<P ALIGN=CENTER><IMG SRC="bar38r.png" NAME="graphics8" ALIGN=BOTTOM WIDTH=118 HEIGHT=200 BORDER=0>
|
||||||
</P>
|
<BR><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=90</FONT></FONT></P>
|
||||||
<P ALIGN=CENTER><FONT FACE="Courier, monospace"><FONT SIZE=3>--rotate=90</FONT></FONT></P>
|
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
@ -787,9 +795,29 @@ is only available with PNG output.</FONT></P>
|
|||||||
</DL>
|
</DL>
|
||||||
<P><BR><BR>
|
<P><BR><BR>
|
||||||
</P>
|
</P>
|
||||||
<P><BR><BR>
|
<P STYLE="font-style: normal"><A NAME="SCALE"></A><FONT SIZE=5><B>3.9
|
||||||
|
Adjusting image size</B></FONT></P>
|
||||||
|
<P STYLE="font-style: normal">The scale of the image can be altered
|
||||||
|
using the <FONT FACE="Courier, monospace">--scale=</FONT> option
|
||||||
|
followed by a multiple of the default x-dimension. For example for
|
||||||
|
PNG images a scale of 5 will increase the x-dimension to 10 pixels.
|
||||||
|
Note that Maxicode symbols output as PNG images cannot be scaled in
|
||||||
|
this way and that text added to a barcode in PNG images does not
|
||||||
|
change size.
|
||||||
</P>
|
</P>
|
||||||
<P STYLE="font-style: normal"><A NAME="OTHER"></A><FONT SIZE=5><B>3.9
|
<P STYLE="font-style: normal"><A NAME="NULL"></A><FONT SIZE=5><B>3.10
|
||||||
|
Handling NULL Characters</B></FONT></P>
|
||||||
|
<P STYLE="font-style: normal">Some symbologies support encoding of
|
||||||
|
the NULL character (ASCII 0) normally used to indicate the end of a
|
||||||
|
character string. To support this functionality the <FONT FACE="Courier, monospace">--null=</FONT>
|
||||||
|
option allows you to substitute another character for NULL. Enter the
|
||||||
|
decimal number for the character you wish to substitute. For example
|
||||||
|
<FONT FACE="Courier, monospace">--null=21</FONT> instructs Zint to
|
||||||
|
treat the NAK control character as a NULL character. Values between 1
|
||||||
|
and 128 are valid. This currently applies to Codablock-F, Code 128,
|
||||||
|
Code 16k, Extended Code 39, Code 93, Maxicode, PDF417, MicroPDF417
|
||||||
|
and Telepen.</P>
|
||||||
|
<P STYLE="font-style: normal"><A NAME="OTHER"></A><FONT SIZE=5><B>3.11
|
||||||
Other options</B></FONT></P>
|
Other options</B></FONT></P>
|
||||||
<P STYLE="font-style: normal">Additional options are available which
|
<P STYLE="font-style: normal">Additional options are available which
|
||||||
are specific to certain symbologies. These may, for example, control
|
are specific to certain symbologies. These may, for example, control
|
||||||
|
@ -59,7 +59,11 @@ the barcode symbologies supported by them.</P>
|
|||||||
</DT><DT>
|
</DT><DT>
|
||||||
3.8 <A HREF="frontend.html#ROTATE">Rotating the Symbol</A>
|
3.8 <A HREF="frontend.html#ROTATE">Rotating the Symbol</A>
|
||||||
</DT><DT>
|
</DT><DT>
|
||||||
3.9 <A HREF="frontend.html#OTHER">Other Options</A>
|
3.9 <A HREF="frontend.html#SCALE">Adjusting Image Size</A>
|
||||||
|
</DT><DT>
|
||||||
|
3.10 <A HREF="frontend.html#NULL">Handling NULL Characters</A>
|
||||||
|
</DT><DT>
|
||||||
|
3.11 <A HREF="frontend.html#OTHER">Other Options</A>
|
||||||
</DT></DL>
|
</DT></DL>
|
||||||
<DT>
|
<DT>
|
||||||
4. <A HREF="backend.html">Using the API</A>
|
4. <A HREF="backend.html">Using the API</A>
|
||||||
@ -179,6 +183,8 @@ the barcode symbologies supported by them.</P>
|
|||||||
Truncated</A></DT><DT>
|
Truncated</A></DT><DT>
|
||||||
5.1.12.2 <A HREF="onedim.html#RSSLTD">DataBar Limited</A></DT><DT>
|
5.1.12.2 <A HREF="onedim.html#RSSLTD">DataBar Limited</A></DT><DT>
|
||||||
5.1.12.3 <A HREF="onedim.html#RSSEXP">DataBar Expanded</A></DT></DL>
|
5.1.12.3 <A HREF="onedim.html#RSSEXP">DataBar Expanded</A></DT></DL>
|
||||||
|
<DT>
|
||||||
|
5.1.13 <A HREF="onedim.html#KOREA">Korea Post</A></DT>
|
||||||
</DL>
|
</DL>
|
||||||
<DT>
|
<DT>
|
||||||
5.2 <A HREF="stacked.html">Stacked Symbologies</A>
|
5.2 <A HREF="stacked.html">Stacked Symbologies</A>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<TITLE>Legal and Version Information</TITLE>
|
<TITLE>Legal and Version Information</TITLE>
|
||||||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
||||||
<META NAME="CREATED" CONTENT="20070730;21081900">
|
<META NAME="CREATED" CONTENT="20070730;21081900">
|
||||||
<META NAME="CHANGED" CONTENT="20081118;8481000">
|
<META NAME="CHANGED" CONTENT="20090101;17540500">
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
<!--
|
<!--
|
||||||
TD P { color: #000000 }
|
TD P { color: #000000 }
|
||||||
@ -175,6 +175,12 @@ NVE-18, PZN, Data Matrix, Maxicode and QR Code)</P>
|
|||||||
<P>v2.0 - Made corrections to Aztec Code and tested output with
|
<P>v2.0 - Made corrections to Aztec Code and tested output with
|
||||||
bcTester. Added Aztec Runes, Micro QR Code and Data Matrix ECC
|
bcTester. Added Aztec Runes, Micro QR Code and Data Matrix ECC
|
||||||
000-140. Updated e-mail information. 18/11/2008</P>
|
000-140. Updated e-mail information. 18/11/2008</P>
|
||||||
|
<P>v2.1 – Reinstated Korea Post barcodes, harmonised bind and box
|
||||||
|
options, moved Unicode handling into backend, added size options to
|
||||||
|
Data Matrix, added NULL character handling for Codablock-F, Code 128,
|
||||||
|
Code 16k, Extended Code 39, Code 93, Telepen, Maxicode, PDF417 and
|
||||||
|
MicroPDF417. Added scale and direct to <FONT FACE="Courier, monospace">stdout</FONT>
|
||||||
|
options.</P>
|
||||||
<P><A NAME="CREDITS"></A><FONT SIZE=5><B>6.4 Sources of Information</B></FONT></P>
|
<P><A NAME="CREDITS"></A><FONT SIZE=5><B>6.4 Sources of Information</B></FONT></P>
|
||||||
<P>Below is a list of some of the sources used in rough chronological
|
<P>Below is a list of some of the sources used in rough chronological
|
||||||
order:</P>
|
order:</P>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<TITLE>One-Dimensional Symbols</TITLE>
|
<TITLE>One-Dimensional Symbols</TITLE>
|
||||||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
||||||
<META NAME="CREATED" CONTENT="20070730;21081900">
|
<META NAME="CREATED" CONTENT="20070730;21081900">
|
||||||
<META NAME="CHANGED" CONTENT="20081019;9043400">
|
<META NAME="CHANGED" CONTENT="20090101;17585200">
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
<!--
|
<!--
|
||||||
TD P { color: #000000 }
|
TD P { color: #000000 }
|
||||||
@ -378,20 +378,22 @@ C</A>). </SPAN><FONT SIZE=3><SPAN STYLE="font-weight: medium">The
|
|||||||
following is an example of a valid DataBar Expanded input</SPAN></FONT></P>
|
following is an example of a valid DataBar Expanded input</SPAN></FONT></P>
|
||||||
<P ALIGN=LEFT STYLE="font-weight: medium"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
|
<P ALIGN=LEFT STYLE="font-weight: medium"><FONT FACE="Courier, monospace"><FONT SIZE=2>zint
|
||||||
--barcode=31 -d "[01]98898765432106[3202]012345[15]991231"</FONT></FONT></P>
|
--barcode=31 -d "[01]98898765432106[3202]012345[15]991231"</FONT></FONT></P>
|
||||||
<P ALIGN=CENTER><IMG SRC="databar.png" NAME="graphics12" ALIGN=LEFT WIDTH=302 HEIGHT=118 BORDER=0><BR CLEAR=LEFT><BR><BR>
|
<P ALIGN=LEFT><IMG SRC="databar.png" NAME="graphics12" ALIGN=LEFT WIDTH=302 HEIGHT=118 BORDER=0><BR CLEAR=LEFT><BR><BR>
|
||||||
</P>
|
</P>
|
||||||
<P ALIGN=LEFT>[1] The zint command line program requires Latin-1
|
<P ALIGN=LEFT><A NAME="KOREA"></A><FONT SIZE=5><B>5.1.13 Korea Post
|
||||||
characters to be encoded using the UTF-8 system. These are converted
|
Barcode</B></FONT></P>
|
||||||
by the front-end into an extended ASCII string. When using the API
|
<P ALIGN=LEFT>The Korean Postal Barcode is used to encode a six-digit
|
||||||
this type conversion will need to be done before invoking the library
|
number and includes one check digit.</P>
|
||||||
otherwise the data will become corrupted. An example program
|
<P><IMG SRC="korea.png" NAME="korea post" ALIGN=LEFT WIDTH=334 HEIGHT=118 BORDER=0><BR><BR>
|
||||||
<FONT FACE="Courier, monospace">exttest.c</FONT> is included in the
|
|
||||||
/<FONT FACE="Courier, monospace">frontend</FONT> folder to show how
|
|
||||||
extended ASCII can be used to produce the following symbol. Extended
|
|
||||||
ASCII characters may not display properly in EPS due to the
|
|
||||||
restrictions of the EPS format.</P>
|
|
||||||
<P ALIGN=LEFT><IMG SRC="barext.png" NAME="graphics13" ALIGN=LEFT WIDTH=246 HEIGHT=118 BORDER=0><BR CLEAR=LEFT><BR><BR>
|
|
||||||
</P>
|
</P>
|
||||||
|
<P ALIGN=LEFT><BR><BR>
|
||||||
|
</P>
|
||||||
|
<P ALIGN=LEFT><BR><BR>
|
||||||
|
</P>
|
||||||
|
<P ALIGN=LEFT>[1] Zint requires input data to be encoded in UTF-8
|
||||||
|
format. <B>Note this now applies to both frontend and backend input
|
||||||
|
text</B>. Extended ASCII characters may not display properly in EPS
|
||||||
|
due to the restrictions of the EPS format.</P>
|
||||||
<HR>
|
<HR>
|
||||||
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
|
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<TITLE>Two-Dimensional Symbols</TITLE>
|
<TITLE>Two-Dimensional Symbols</TITLE>
|
||||||
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.4 (Unix)">
|
||||||
<META NAME="CREATED" CONTENT="20070730;21081900">
|
<META NAME="CREATED" CONTENT="20070730;21081900">
|
||||||
<META NAME="CHANGED" CONTENT="20081109;9283500">
|
<META NAME="CHANGED" CONTENT="20090101;15323500">
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
<!--
|
<!--
|
||||||
TD P { color: #000000 }
|
TD P { color: #000000 }
|
||||||
@ -154,6 +154,259 @@ for new applications. The different modes are accessed using the
|
|||||||
</CENTER>
|
</CENTER>
|
||||||
<P><BR><BR>
|
<P><BR><BR>
|
||||||
</P>
|
</P>
|
||||||
|
<P>The size of the generated symbol can also be adjusted using the
|
||||||
|
<FONT FACE="Courier, monospace">--ver=</FONT> option or by setting
|
||||||
|
<FONT FACE="Courier, monospace">option_1</FONT> as shown in the table
|
||||||
|
below.</P>
|
||||||
|
<DL>
|
||||||
|
<DL>
|
||||||
|
<DL>
|
||||||
|
<DL>
|
||||||
|
<DL>
|
||||||
|
<DL>
|
||||||
|
<DL>
|
||||||
|
<DL>
|
||||||
|
<DD>
|
||||||
|
<TABLE WIDTH=557 BORDER=1 CELLPADDING=4 CELLSPACING=3>
|
||||||
|
<COL WIDTH=128>
|
||||||
|
<COL WIDTH=124>
|
||||||
|
<COL WIDTH=117>
|
||||||
|
<COL WIDTH=139>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TH WIDTH=128>
|
||||||
|
<P>Input</P>
|
||||||
|
</TH>
|
||||||
|
<TH WIDTH=124>
|
||||||
|
<P>Symbol Size</P>
|
||||||
|
</TH>
|
||||||
|
<TH WIDTH=117>
|
||||||
|
<P>Input</P>
|
||||||
|
</TH>
|
||||||
|
<TH WIDTH=139>
|
||||||
|
<P>Symbol Size</P>
|
||||||
|
</TH>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>1</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>10 x 10</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>16</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>64 x 64</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>2</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>12 x 12</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>17</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>72 x 72</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>3</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>14 x 14</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>18</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>80 x 80</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>4</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>16 x 16</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>19</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>88 x 88</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>5</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>18 x 18</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>20</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>96 x 96</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>6</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>20 x 20</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>21</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>104 x 104</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>7</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>22 x 22</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>22</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>120 x 120</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>8</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>24 x 24</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>23</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>132 x 132</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>9</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>26 x 26</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>24</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>144 x 144</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>10</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>32 x 32</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>25</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>8 x 18</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>11</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>36 x 36</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>26</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>8 x 32</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>12</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>40 x 40</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>27</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>12 x 26</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>13</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>44 x 44</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>28</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>12 x 36</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>14</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>48 x 48</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>29</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>16 x 36</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD WIDTH=128>
|
||||||
|
<P ALIGN=CENTER>15</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=124>
|
||||||
|
<P ALIGN=CENTER>52 x 52</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=117>
|
||||||
|
<P ALIGN=CENTER>30</P>
|
||||||
|
</TD>
|
||||||
|
<TD WIDTH=139>
|
||||||
|
<P ALIGN=CENTER>16 x 48</P>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TABLE>
|
||||||
|
</DL>
|
||||||
|
</DL>
|
||||||
|
</DL>
|
||||||
|
</DL>
|
||||||
|
</DL>
|
||||||
|
</DL>
|
||||||
|
</DL>
|
||||||
|
</DL>
|
||||||
|
<P><BR><BR>
|
||||||
|
</P>
|
||||||
<P ALIGN=CENTER><IMG SRC="matrix.png" NAME="graphics1" ALIGN=LEFT WIDTH=44 HEIGHT=44 BORDER=0><BR CLEAR=LEFT><BR><BR>
|
<P ALIGN=CENTER><IMG SRC="matrix.png" NAME="graphics1" ALIGN=LEFT WIDTH=44 HEIGHT=44 BORDER=0><BR CLEAR=LEFT><BR><BR>
|
||||||
</P>
|
</P>
|
||||||
<P><A NAME="QRCODE"></A><FONT SIZE=5><B>5.6.2 QR Code (ISO 18004)</B></FONT></P>
|
<P><A NAME="QRCODE"></A><FONT SIZE=5><B>5.6.2 QR Code (ISO 18004)</B></FONT></P>
|
||||||
@ -488,8 +741,8 @@ between 1 and 36 according to the following table:</P>
|
|||||||
<P ALIGN=CENTER>5-36</P>
|
<P ALIGN=CENTER>5-36</P>
|
||||||
</TD>
|
</TD>
|
||||||
<TD WIDTH=473>
|
<TD WIDTH=473>
|
||||||
<P ALIGN=CENTER>“Full-Range” Aztec Code with [value –
|
<P ALIGN=CENTER>“Full-Range” Aztec Code with [value – 4]
|
||||||
4] layers</P>
|
layers</P>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
@ -82,6 +82,7 @@ void usage(void)
|
|||||||
" --secure=NUMBER (PDF417 and QR Code) Error correction level.\n"
|
" --secure=NUMBER (PDF417 and QR Code) Error correction level.\n"
|
||||||
" --primary=STRING (Maxicode and Composite) Structured primary message.\n"
|
" --primary=STRING (Maxicode and Composite) Structured primary message.\n"
|
||||||
" --mode=NUMBER (Maxicode and Composite) Set encoding mode.\n"
|
" --mode=NUMBER (Maxicode and Composite) Set encoding mode.\n"
|
||||||
|
" --null=NUMBER Character to represent NULL.\n"
|
||||||
, ZINT_VERSION);
|
, ZINT_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +154,7 @@ int main(int argc, char **argv)
|
|||||||
{"mode=", 1, 0, 0},
|
{"mode=", 1, 0, 0},
|
||||||
{"primary=", 1, 0, 0},
|
{"primary=", 1, 0, 0},
|
||||||
{"scale=", 1, 0, 0},
|
{"scale=", 1, 0, 0},
|
||||||
|
{"null=", 1, 0, 0},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
c = getopt_long(argc, argv, "htb:w:d:o:i:rcmp", long_options, &option_index);
|
c = getopt_long(argc, argv, "htb:w:d:o:i:rcmp", long_options, &option_index);
|
||||||
@ -200,6 +202,18 @@ int main(int argc, char **argv)
|
|||||||
fprintf(stderr, "Border width out of range\n");
|
fprintf(stderr, "Border width out of range\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!strcmp(long_options[option_index].name, "null=")) {
|
||||||
|
error_number = validator(NESET, optarg);
|
||||||
|
if(error_number == ERROR_INVALID_DATA) {
|
||||||
|
fprintf(stderr, "Invalid NULL replacement\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if((atoi(optarg) >= 1) && (atoi(optarg) <= 128)) {
|
||||||
|
my_symbol->nullchar = atoi(optarg);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "Invalid NULL replacement\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
if(!strcmp(long_options[option_index].name, "height=")) {
|
if(!strcmp(long_options[option_index].name, "height=")) {
|
||||||
error_number = validator(NESET, optarg);
|
error_number = validator(NESET, optarg);
|
||||||
if(error_number == ERROR_INVALID_DATA) {
|
if(error_number == ERROR_INVALID_DATA) {
|
||||||
|
Loading…
Reference in New Issue
Block a user