diff --git a/docs/3dprinciple.png b/docs/3dprinciple.png deleted file mode 100755 index ad8a2c64..00000000 Binary files a/docs/3dprinciple.png and /dev/null differ diff --git a/docs/3dsample.png b/docs/3dsample.png deleted file mode 100755 index 169c5e6f..00000000 Binary files a/docs/3dsample.png and /dev/null differ diff --git a/docs/README b/docs/README new file mode 100644 index 00000000..2c3d1769 --- /dev/null +++ b/docs/README @@ -0,0 +1,3 @@ +Documentation has now been removed from the Zint package in +preference of the online documentation at: +http://www.zint.org.uk \ No newline at end of file diff --git a/docs/appxa.html b/docs/appxa.html deleted file mode 100644 index 9618e67d..00000000 --- a/docs/appxa.html +++ /dev/null @@ -1,1135 +0,0 @@ - - -
- -
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
This section is intended as a quick reference to the character -sets used by Zint. All symbologies use standard ASCII input as shown -in section A.1, but some support extended character support as shown -in the subsequent section.
- -The ubiquitous ASCII standard is well known to most computer -users. It's reproduced here for reference.
-
- Hex - |
-
- 0 - |
-
- 1 - |
-
- 2 - |
-
- 3 - |
-
- 4 - |
-
- 5 - |
-
- 6 - |
-
- 7 - |
-
---|---|---|---|---|---|---|---|---|
- 0 - |
-
- NULL - |
-
- DLE - |
-
- SPACE - |
-
- 0 - |
-
- @ - |
-
- P - |
-
- ` - |
-
- p - |
-
- 1 - |
-
- SOH - |
-
- DC1 - |
-
- ! - |
-
- 1 - |
-
- A - |
-
- Q - |
-
- a - |
-
- q - |
-
- 2 - |
-
- STX - |
-
- DC2 - |
-
- " - |
-
- 2 - |
-
- B - |
-
- R - |
-
- b - |
-
- r - |
-
- 3 - |
-
- ETX - |
-
- DC3 - |
-
- # - |
-
- 3 - |
-
- C - |
-
- S - |
-
- c - |
-
- s - |
-
- 4 - |
-
- EOT - |
-
- DC4 - |
-
- $ - |
-
- 4 - |
-
- D - |
-
- Y - |
-
- d - |
-
- t - |
-
- 5 - |
-
- ENQ - |
-
- NAK - |
-
- % - |
-
- 5 - |
-
- E - |
-
- U - |
-
- e - |
-
- u - |
-
- 6 - |
-
- ACK - |
-
- SYN - |
-
- & - |
-
- 6 - |
-
- F - |
-
- V - |
-
- f - |
-
- v - |
-
- 7 - |
-
- BEL - |
-
- ETB - |
-
- ' - |
-
- 7 - |
-
- G - |
-
- W - |
-
- g - |
-
- w - |
-
- 8 - |
-
- BS - |
-
- CAN - |
-
- ( - |
-
- 8 - |
-
- H - |
-
- X - |
-
- h - |
-
- x - |
-
- 9 - |
-
- TAB - |
-
- EM - |
-
- ) - |
-
- 9 - |
-
- I - |
-
- Y - |
-
- i - |
-
- y - |
-
- A - |
-
- LF - |
-
- SUB - |
-
- * - |
-
- : - |
-
- J - |
-
- Z - |
-
- j - |
-
- z - |
-
- B - |
-
- VT - |
-
- ESC - |
-
- + - |
-
- ; - |
-
- K - |
-
- [ - |
-
- k - |
-
- { - |
-
- C - |
-
- FF - |
-
- FS - |
-
- , - |
-
- < - |
-
- L - |
-
- \ - |
-
- l - |
-
- | - |
-
- D - |
-
- CR - |
-
- GS - |
-
- - - |
-
- = - |
-
- M - |
-
- ] - |
-
- m - |
-
- } - |
-
- E - |
-
- SO - |
-
- RS - |
-
- . - |
-
- > - |
-
- N - |
-
- ^ - |
-
- n - |
-
- ~ - |
-
- F - |
-
- SI - |
-
- US - |
-
- / - |
-
- ? - |
-
- O - |
-
- _ - |
-
- o - |
-
- DEL - |
-
-
A.2 Latin Alphabet No 1 (ISO -8859-1)
-A common extension to the ASCII -standard, Latin-1 is used to expand the range of Code 128, PDF417 and -other symbols. Input strings should be in Unicode format.
-
-
- Hex - |
-
- 8 - |
-
- 9 - |
-
- A - |
-
- B - |
-
- C - |
-
- D - |
-
- E - |
-
- F - |
-
---|---|---|---|---|---|---|---|---|
- 0 - |
-
-
|
-
-
|
-
- NBSP - |
-
- ° - |
-
- À - |
-
- Ð - |
-
- à - |
-
- ð - |
-
- 1 - |
-
-
|
-
-
|
-
- ¡ - |
-
- ± - |
-
- Á - |
-
- Ñ - |
-
- á - |
-
- ñ - |
-
- 2 - |
-
-
|
-
-
|
-
- ¢ - |
-
- ² - |
-
- Â - |
-
- Ò - |
-
- â - |
-
- ò - |
-
- 3 - |
-
-
|
-
-
|
-
- £ - |
-
- ³ - |
-
- Ã - |
-
- Ó - |
-
- ã - |
-
- ó - |
-
- 4 - |
-
-
|
-
-
|
-
- ¤ - |
-
- ´ - |
-
- Ä - |
-
- Ô - |
-
- ä - |
-
- ô - |
-
- 5 - |
-
-
|
-
-
|
-
- ¥ - |
-
- µ - |
-
- Å - |
-
- Õ - |
-
- å - |
-
- õ - |
-
- 6 - |
-
-
|
-
-
|
-
- ¦ - |
-
- ¶ - |
-
- Æ - |
-
- Ö - |
-
- æ - |
-
- ö - |
-
- 7 - |
-
-
|
-
-
|
-
- § - |
-
- · - |
-
- Ç - |
-
- × - |
-
- ç - |
-
- ÷ - |
-
- 8 - |
-
-
|
-
-
|
-
- ¨ - |
-
- ¸ - |
-
- È - |
-
- Ø - |
-
- è - |
-
- ø - |
-
- 9 - |
-
-
|
-
-
|
-
- © - |
-
- ¹ - |
-
- É - |
-
- Ù - |
-
- é - |
-
- ù - |
-
- A - |
-
-
|
-
-
|
-
- ª - |
-
- º - |
-
- Ê - |
-
- Ú - |
-
- ê - |
-
- ú - |
-
- B - |
-
-
|
-
-
|
-
- « - |
-
- » - |
-
- Ë - |
-
- Û - |
-
- ë - |
-
- û - |
-
- C - |
-
-
|
-
-
|
-
- ¬ - |
-
- ¼ - |
-
- Ì - |
-
- Ü - |
-
- ì - |
-
- ü - |
-
- D - |
-
-
|
-
-
|
-
- SHY - |
-
- ½ - |
-
- Í - |
-
- Ý - |
-
- í - |
-
- ý - |
-
- E - |
-
-
|
-
-
|
-
- ® - |
-
- ¾ - |
-
- Î - |
-
- Þ - |
-
- î - |
-
- þ - |
-
- F - |
-
-
|
-
-
|
-
- ¯ - |
-
- ¿ - |
-
- Ï - |
-
- ß - |
-
- ï - |
-
- ÿ - |
-
- - | -- - | -- - | -
- Legal Information - |
-
- - |
-
- Appendix B - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
Below are some of the three digit country codes as determined by -ISO 3166 for use with Maxicode symbols.
--AFGHANISTAN 004 -ALAND ISLANDS 248 -ALBANIA 008 -ALGERIA 012 -AMERICAN SAMOA 016 -ANDORRA 020 -ANGOLA 024 -ANGUILLA 660 -ANTARCTICA 010 -ANTIGUA AND BARBUDA 028 -ARGENTINA 032 -ARMENIA 051 -ARUBA 533 -AUSTRALIA 036 -AUSTRIA 040 -AZERBAIJAN 031 -BAHAMAS 044 -BAHRAIN 048 -BANGLADESH 050 -BARBADOS 052 -BELARUS 112 -BELGIUM 056 -BELIZE 084 -BENIN 204 -BERMUDA 060 -BHUTAN 064 -BOLIVIA 068 -BOSNIA AND HERZEGOVINA 070 -BOTSWANA 072 -BOUVET ISLAND 074 -BRAZIL 076 -BRITISH INDIAN OCEAN TERRITORY 086 -BRUNEI DARUSSALAM 096 -BULGARIA 100 -BURKINA FASO 854 -BURUNDI 108 -CAMBODIA 116 -CAMEROON 120 -CANADA 124 -CAPE VERDE 132 -CAYMAN ISLANDS 136 -CENTRAL AFRICAN REPUBLIC 140 -CHAD 148 -CHILE 152 -CHINA 156 -CHRISTMAS ISLAND 162 -COCOS (KEELING) ISLANDS 166 -COLOMBIA 170 -COMOROS 174 -CONGO 178 -CONGO, THE DEMOCRATIC REPUBLIC OF THE 180 -COOK ISLANDS 184 -COSTA RICA 188 -COTE D'IVOIRE 384 -CROATIA 191 -CUBA 192 -CYPRUS 196 -CZECH REPUBLIC 203 -DENMARK 208 -DJIBOUTI 262 -DOMINICA 212 -DOMINICAN REPUBLIC 214 -ECUADOR 218 -EGYPT 818 -EL SALVADOR 222 -EQUATORIAL GUINEA 226 -ERITREA 232 -ESTONIA 233 -ETHIOPIA 231 -FALKLAND ISLANDS (MALVINAS) 238 -FAROE ISLANDS 234 -FIJI 242 -FINLAND 246 -FRANCE 250 -FRENCH GUIANA 254 -FRENCH POLYNESIA 258 -FRENCH SOUTHERN TERRITORIES 260 -GABON 266 -GAMBIA 270 -GEORGIA 268 -GERMANY 276 -GHANA 288 -GIBRALTAR 292 -GREECE 300 -GREENLAND 304 -GRENADA 308 -GUADELOUPE 312 -GUAM 316 -GUATEMALA 320 -GUERNSEY 831 -GUINEA 324 -GUINEA-BISSAU 624 -GUYANA 328 -HAITI 332 -HEARD ISLAND AND MCDONALD ISLANDS 334 -HOLY SEE (VATICAN CITY STATE) 336 -HONDURAS 340 -HONG KONG 344 -HUNGARY 348 -ICELAND 352 -INDIA 356 -INDONESIA 360 -IRAN (ISLAMIC REPUBLIC OF) 364 -IRAQ 368 -IRELAND 372 -ISLE OF MAN 833 -ISRAEL 376 -ITALY 380 -JAMAICA 388 -JAPAN 392 -JERSEY 832 -JORDAN 400 -KAZAKHSTAN 398 -KENYA 404 -KIRIBATI 296 -KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF 408 -KOREA, REPUBLIC OF 410 -KUWAIT 414 -KYRGYZSTAN 417 -LAO PEOPLE'S DEMOCRATIC REPUBLIC 418 -LATVIA 428 -LEBANON 422 -LESOTHO 426 -LIBERIA 430 -LIBYAN ARAB JAMAHIRIYA 434 -LIECHTENSTEIN 438 -LITHUANIA 440 -LUXEMBOURG 442 -MACAO 446 -MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF 807 -MADAGASCAR 450 -MALAWI 454 -MALAYSIA 458 -MALDIVES 462 -MALI 466 -MALTA 470 -MARSHALL ISLANDS 584 -MARTINIQUE 474 -MAURITANIA 478 -MAURITIUS 480 -MAYOTTE 175 -MEXICO 484 -MICRONESIA, FEDERATED STATES OF 583 -MOLDOVA, REPUBLIC OF 498 -MONACO 492 -MONGOLIA 496 -MONTENEGRO 499 -MONTSERRAT 500 -MOROCCO 504 -MOZAMBIQUE 508 -MYANMAR 104 -NAMIBIA 516 -NAURU 520 -NEPAL 524 -NETHERLANDS 528 -NETHERLANDS ANTILLES 530 -NEW CALEDONIA 540 -NEW ZEALAND 554 -NICARAGUA 558 -NIGER 562 -NIGERIA 566 -NIUE 570 -NORFOLK ISLAND 574 -NORTHERN MARIANA ISLANDS 580 -NORWAY 578 -OMAN 512 -PAKISTAN 586 -PALAU 585 -PALESTINIAN TERRITORY, OCCUPIED 275 -PANAMA 591 -PAPUA NEW GUINEA 598 -PARAGUAY 600 -PERU 604 -PHILIPPINES 608 -PITCAIRN 612 -POLAND 616 -PORTUGAL 620 -PUERTO RICO 630 -QATAR 634 -REUNION 638 -ROMANIA 642 -RUSSIAN FEDERATION 643 -RWANDA 646 -SAINT HELENA 654 -SAINT KITTS AND NEVIS 659 -SAINT LUCIA 662 -SAINT PIERRE AND MIQUELON 666 -SAINT VINCENT AND THE GRENADINES 670 -SAMOA 882 -SAN MARINO 674 -SAO TOME AND PRINCIPE 678 -SAUDI ARABIA 682 -SENEGAL 686 -SERBIA 688 -SEYCHELLES 690 -SIERRA LEONE 694 -SINGAPORE 702 -SLOVAKIA 703 -SLOVENIA 705 -SOLOMON ISLANDS 090 -SOMALIA 706 -SOUTH AFRICA 710 -SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS 239 -SPAIN 724 -SRI LANKA 144 -SUDAN 736 -SURINAME 740 -SVALBARD AND JAN MAYEN 744 -ST. HELENA 654 -ST. PIERRE AND MIQUELON 666 -SWAZILAND 748 -SWEDEN 752 -SWITZERLAND 756 -SYRIAN ARAB REPUBLIC 760 -TAIWAN, PROVINCE OF CHINA 158 -TAJIKISTAN 762 -TANZANIA, UNITED REPUBLIC OF 834 -THAILAND 764 -TIMOR-LESTE 626 -TOGO 768 -TOKELAU 772 -TONGA 776 -TRINIDAD AND TOBAGO 780 -TUNISIA 788 -TURKEY 792 -TURKMENISTAN 795 -TURKS AND CAICOS ISLANDS 796 -TUVALU 798 -UGANDA 800 -UKRAINE 804 -UNITED ARAB EMIRATES 784 -UNITED KINGDOM 826 -UNITED STATES 840 -UNITED STATES MINOR OUTLYING ISLANDS 581 -URUGUAY 858 -UZBEKISTAN 860 -VANUATU 548 -VATICAN CITY STATE (HOLY SEE) 336 -VENEZUELA 862 -VIET NAM 704 -VIRGIN ISLANDS (BRITISH) 092 -VIRGIN ISLANDS (U.S.) 850 -WALLIS AND FUTUNA 876 -WESTERN SAHARA 732 -YEMEN 887 -YUGOSLAVIA 891 -ZAMBIA 894 -ZIMBABWE 716-
- - | -- - | -- - | -
- Appendix A - |
-
- - |
-
- Appendix C - |
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- - | - |
The GS1 General Specification defines a global standard for -encoding data about products. The full specification is available -here. -Data is encoded as a series of number pairs where the first number, -usually shown in (brackets) is an application identifier (AI), and -the second is a formatted representation of the data. For example -(401)6773 can be read as "Consignment Number 6773" where -the AI (401) signifies that the data is a consignment number. Note -that when using Zint AI data is entered using [square] brackets. This -allows rounded brackets to be included in the data which is allowed -by the specification. When the barcode symbol is generated these -square brackets are replaced by rounded brackets in the text. A list -of valid AI numbers is given below.
-C.1 Application Identifiers [1]
-00 Serial Shipping Container Code (SSCC) -01 Global Trade Item Number (GTIN) -02 # of containers -10 Batch Number -11 Production Date -13 Packaging Date -15 Sell by Date (Quality Control) -17 Expiration Date -20 Product Variant -21 Serial Number -22 HIBCC Quantity, Date, Batch and Link -23x Lot Number -240 Additional Product Identification -250 Second Serial Number -30 Quantity Each -310y Product Net Weight in kg -311y Product Length/1st Dimension, in meters -312y Product Width/Diameter/2nd Dimension, in meters -313y Product Depth/Thickness/3rd Dimension, in meters -314y Product Area, in square meters -315y Product Volume, in liters -316y product Volume, in cubic meters -320y Product Net Weight, in pounds -321y Product Length/1st Dimension, in inches -322y Product Length/1st Dimension, in feet -323y Product Length/1st Dimension, in yards -324y Product Width/Diameter/2nd Dimension, in inches -325y Product Width/Diameter/2nd Dimension, in feet -326y Product Width/Diameter/2nd Dimension, in yards -327y Product Depth/Thickness/3rd Dimension, in inches -328y Product Depth/Thickness/3rd Dimension, in feet -329y Product Depth/Thickness/3rd Dimension, in yards -330y Container Gross Weight (kg) -331y Container Length/1st Dimension (Meters) -332y Container Width/Diameter/2nd Dimension (Meters) -333y Container Depth/Thickness/3rd Dimension (Meters) -334y Container Area (Square Meters) -335y Container Gross Volume (Liters) -336y Container Gross Volume (Cubic Meters) -340y Container Gross Weight (Pounds) -341y Container Length/1st Dimension, in inches -342y Container Length/1st Dimension, in feet -343y Container Length/1st Dimension in, in yards -344y Container Width/Diameter/2nd Dimension, in inches -345y Container Width/Diameter/2nd Dimension, in feet -346y Container Width/Diameter/2nd Dimension, in yards -347y Container Depth/Thickness/Height/3rd Dimension, in inches -348y Container Depth/Thickness/Height/3rd Dimension, in feet -349y Container Depth/Thickness/Height/3rd Dimension, in yards -350y Product Area (Square Inches) -351y Product Area (Square Feet) -352y Product Area (Square Yards) -353y Container Area (Square Inches) -354y Container Area (Square Feet) -355y Container Area (Suqare Yards) -356y Net Weight (Troy Ounces) -360y Product Volume (Quarts) -361y Product Volume (Gallons) -362y Container Gross Volume (Quarts) -363y Container Gross Volume (Gallons) -364y Product Volume (Cubic Inches) -365y Product Volume (Cubic Feet) -366y Product Volume (Cubic Yards) -367y Container Gross Volume (Cubic Inches) -368y Container Gross Volume (Cubic Feet) -369y Container Gross Volume (Cubic Yards) -37 Number of Units Contained -400 Customer Purchase Order Number -410 Ship To/Deliver To Location Code (Global Location Number) -411 Bill To/Invoice Location Code (Global Location Number) -412 Purchase From Location Code (Global Location Number) -420 Ship To/Deliver To Postal Code (Single Postal Authority) -421 Ship To/Deliver To Postal Code (Multiple Postal Authority) -8001 Roll Products - Width/Length/Core Diameter -8002 Electronic Serial Number (ESN) for Cellular Phone -8003 Global Returnable Asset Identifier -8004 Global Individual Asset Identifier -8005 Price per Unit of Measure -8100 Coupon Extended Code: Number System and Offer -8101 8101 Coupon Extended Code: Number System, Offer, End of Offer -8102 Coupon Extended Code: Number System preceded by 0 -90 Mutually Agreed Between Trading Partners -91 Internal Company Codes -92 Internal Company Codes -93 Internal Company Codes -94 Internal Company Codes -95 Internal Company Codes -96 Internal Company Codes -97 Internal Company Codes -98 Internal Company Codes -99 Internal Company Codes-
The GS1 Specification requires that -some of the data to be encoded fits a standard length field. Zint -requires this to be true of input data in order for data to be -encoded correctly but does not check that the input data adheres to -these rules. If this system is not followed then the resulting -barcode symbol may not be readable. The following table details which -AIs have fixed length data fields and how long the data should be for -each:
-
-
- Application Identifier - |
-
- Number of characters |
-
---|---|
- 00 - |
-
- 20 - |
-
- 01 - |
-
- 16 - |
-
- 02 - |
-
- 16 - |
-
- 03 - |
-
- 16 - |
-
- 04 - |
-
- 18 - |
-
- 11 - |
-
- 8 - |
-
- 12 - |
-
- 8 - |
-
- 13 - |
-
- 8 - |
-
- 14 - |
-
- 8 - |
-
- 15 - |
-
- 8 - |
-
- 16 - |
-
- 8 - |
-
- 17 - |
-
- 8 - |
-
- 18 - |
-
- 8 - |
-
- 19 - |
-
- 8 - |
-
- 20 - |
-
- 4 - |
-
- 31 - |
-
- 10 - |
-
- 32 - |
-
- 10 - |
-
- 33 - |
-
- 10 - |
-
- 34 - |
-
- 10 - |
-
- 35 - |
-
- 10 - |
-
- 36 - |
-
- 10 - |
-
- 41 - |
-
- 16 - |
-
-
[1] This information taken from -Wikipedia and used -under the terms of the GNU -Free Documentation License.
-
-
-
- - | -- - | -- - | -
- Appendix B - |
-
- - |
-
- Appendix D - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - | -
An obvious next step in the development of barcodes is to use -colour instead of boring old black and white to encode data. This -technique is not currently used by any barcode encoding standards in -the wild but an indication of how it might be achieved can be gained -with a little data processing and the Zint library.
-This example takes an input string and splits it into -three roughly equal length strings each of which is encoded and then -combined to make a colour version of the symbol. This can then be -decoded by applying red, green and blue filters to the resulting -image and then decoding them using the same algorithm used to decode -normal black and white symbols as shown below.
- -One advantage of this system is that finder patterns in the symbol -show up clearly as black-on-white and so can be found using the -methods already established for standard 2D barcodes. This can be -clearly seen in the examples below.
- -Another advantage of this system is that it fits three times as -much data into a symbol of a given size. Disadvantages are likely to -become apparent when trying to decode these symbols in real-world -applications: decoding will require larger processor overheads and -more sophisticated algorithms. Telling white from yellow may be a -particular problem.
-The code below performs the encoding as done on the images above -and outputs an array of elements as characters representing colours. -Putting this together as an image requires additional code.
-#include <stdio.h> -#include <zint.h> -#include <string.h> - -int main(int argc, char **argv) -{ - struct zint_symbol *red_symbol; - struct zint_symbol *green_symbol; - struct zint_symbol *blue_symbol; - struct zint_symbol *colour_symbol; - - int error = 0; - int i, j; - int input_len = strlen(argv[1]); - int snippet = input_len / 3; - char full_string[input_len + 5]; - char red_string[(input_len / 3) + 2]; - char green_string[(input_len / 3) + 2]; - char blue_string[(input_len / 3) + 2]; - int symbol_type = BARCODE_QRCODE; - - if(input_len % 3 != 0) { snippet++; } - strcpy(full_string, argv[1]); - - for(i = 0; i < snippet; i++) { - red_string[i] = full_string[i]; - green_string[i] = full_string[i + snippet]; - blue_string[i] = full_string[i + snippet + snippet]; - } - red_string[i] = '\0'; - green_string[i] = '\0'; - blue_string[i] = '\0'; - - red_symbol = ZBarcode_Create(); - green_symbol = ZBarcode_Create(); - blue_symbol = ZBarcode_Create(); - colour_symbol = ZBarcode_Create(); - - red_symbol->symbology = symbol_type; - green_symbol->symbology = symbol_type; - blue_symbol->symbology = symbol_type; - colour_symbol->symbology = symbol_type; - - error = ZBarcode_Encode(red_symbol, (unsigned char *)red_string); - error += ZBarcode_Encode(green_symbol, (unsigned char *)green_string); - error += ZBarcode_Encode(blue_symbol, (unsigned char *)blue_string); - - if(error != 0) { - printf("Some error occurred!\n"); - ZBarcode_Delete(red_symbol); - ZBarcode_Delete(green_symbol); - ZBarcode_Delete(blue_symbol); - ZBarcode_Delete(colour_symbol); - return 1; - } - - colour_symbol->width = red_symbol->width; - if(green_symbol->width > colour_symbol->width) { colour_symbol->width = green_symbol->width; } - if(blue_symbol->width > colour_symbol->width) { colour_symbol->width = blue_symbol->width; } - - colour_symbol->rows = red_symbol->rows; - if(green_symbol->rows > colour_symbol->rows) { colour_symbol->rows = green_symbol->rows; } - if(blue_symbol->rows > colour_symbol->rows) { colour_symbol->rows = blue_symbol->rows; } - - for(i = 0; i < colour_symbol->rows; i++) { - colour_symbol->row_height[i] = 1; - for(j = 0; j < colour_symbol->width; j++) { - int colourval; - - colourval = 0; - - if(red_symbol->encoded_data[i][j] == '1') { colourval += 4; } - if(green_symbol->encoded_data[i][j] == '1') { colourval += 2; } - if(blue_symbol->encoded_data[i][j] == '1') { colourval += 1; } - - switch(colourval) { - case 0: colour_symbol->encoded_data[i][j] = '0'; break; /* white */ - case 1: colour_symbol->encoded_data[i][j] = 'Y'; break; /* yellow */ - case 2: colour_symbol->encoded_data[i][j] = 'M'; break; /* magenta */ - case 3: colour_symbol->encoded_data[i][j] = 'R'; break; /* red */ - case 4: colour_symbol->encoded_data[i][j] = 'C'; break; /* cyan */ - case 5: colour_symbol->encoded_data[i][j] = 'G'; break; /* green */ - case 6: colour_symbol->encoded_data[i][j] = 'B'; break; /* blue */ - case 7: colour_symbol->encoded_data[i][j] = '1'; break; /* black */ - } - printf("%c",colour_symbol->encoded_data[i][j]); - } - printf("\n"); - } - - ZBarcode_Delete(red_symbol); - ZBarcode_Delete(green_symbol); - ZBarcode_Delete(blue_symbol); - ZBarcode_Delete(colour_symbol); - return 0; -}
-
- - | -- - | -- | -
- Appendix C - |
-
- - |
- - | -
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
The libzint API has been designed to be very similar to -that used by the GNU -Barcode package. This allows easy migration from GNU Barcode to -Zint. Zint, however, uses none of the same function -names or option names as GNU Barcode. This allows you to use -both packages in your application without conflict if you wish.
-4.1 -Creating and Deleting Symbols
-The symbols manipulated by Zint are -held in a zint_symbol -structure defined in zint.h. -These symbols are created with the ZBarcode_Create() -function and deleted using the ZBarcode_Delete() -function. For example the following code creates and then deletes a -symbol:
-#include
-<stdio.h>
#include <zint.h>
int
-main()
{
struct zint_symbol
-*my_symbol;
my_symbol =
-ZBarcode_Create();
if(my_symbol != NULL)
-{
printf("Symbol
-successfully
-created!\n");
}
ZBarcode_Delete(my_symbol);
return
-0;
}
When compiling this code it will need to be linked with the -libzint library using the -lzint option:
-gcc -o simple -simple.c -lzint
-4.2 Encoding and Saving to -File
-To encode data in a barcode use the ZBarcode_Encode() -function. To write the symbol to a file use the ZBarcode_Print() -function. For example the following code takes a string from the -command line and outputs a Code 128 symbol in a PNG file named -out.png in the current working directory:
-#include
-<stdio.h>
#include <zint.h>
int main(int argc,
-char **argv)
{
struct zint_symbol
-*my_symbol;
my_symbol =
-ZBarcode_Create();
ZBarcode_Encode(my_symbol,
-argv[1]);
ZBarcode_Print(my_symbol);
ZBarcode_Delete(my_symbol);
return
-0;
}
This can also be done in one stage using the -ZBarcode_Encode_and_Print() -function as shown in the next example:
-#include
-<stdio.h>
#include <zint.h>
int main(int argc,
-char **argv)
{
struct zint_symbol
-*my_symbol;
my_symbol =
-ZBarcode_Create();
ZBarcode_Encode_and_Print(my_symbol,
-argv[1]);
ZBarcode_Delete(my_symbol);
return
-0;
}
Input strings should be Unicode formatted.
- -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 -out.png. As with the front end program, of course, these options can -be altered. The way this is done is by altering the contents of the -zint_symbol structure between -the creation and encoding stages. The zint_symbol -structure consists of the following variables:
-
- Variable Name - |
-
- Type - |
-
- Meaning - |
-
- Default Value - |
-
---|---|---|---|
- symbology - |
-
- integer - |
-
- Symbology to use (see section 4.5). - |
-
- BARCODE_CODE128 - |
-
- height - |
-
- integer - |
-
- Symbol height. [1] - |
-
- 50 - |
-
- whitespace_width - |
-
- integer - |
-
- Whitespace width. - |
-
- 0 - |
-
- boder_width - |
-
- integer - |
-
- Border width. - |
-
- 0 - |
-
- output_options - |
-
- integer - |
-
- Binding or box parameters (see section 4.6). [2] - |
-
- (none) - |
-
- fgcolour - |
-
- character string - |
-
- Foreground (ink) colour as RGB hexadecimal - string. Must be 6 characters followed by terminating \0 - character. - |
-
- "000000" - |
-
- bgcolour - |
-
- character string - |
-
- Background (paper) colour as RGB hexadecimal - string. Must be 6 characters followed by terminating \0 - character. - |
-
- "ffffff" - |
-
- outfile - |
-
- character string - |
-
- Contains the name of the file to output a - resulting barcode symbol to. Must end in .png, .eps or .svg - |
-
- "out.png" - |
-
- option_1 - |
-
- integer - |
-
- Symbology specific options. - |
-
- (automatic) - |
-
- option_2 - |
-
- integer - |
-
- Symbology specific options. - |
-
- (automatic) - |
-
- scale - |
-
- float - |
-
- Scale factor for adjusting size of image. - |
-
- 1.0 - |
-
- nullchar - |
-
- char - |
-
- Character to substitute for NULL - |
-
- NULL - |
-
- input_mode - |
-
- integer - |
-
- Set encoding of input data (see 4.8) - |
-
- BINARY_MODE - |
-
- primary - |
-
- character string - |
-
- Primary message data for more complex symbols. - |
-
- NULL - |
-
- text - |
-
- unsigned character string - |
-
- Human readable text, which usually consists of - the input data plus one or more check digits. Uses UTF-8 formatting. - |
-
- NULL - |
-
- rows - |
-
- integer - |
-
- Number of rows used by the symbol or, if using - barcode stacking, the row to be used by the next symbol. - |
-
- (output only) - |
-
- width - |
-
- integer - |
-
- Width of the generated symbol. - |
-
- (output only) - |
-
- encoding_data - |
-
- array of character strings - |
-
- Representation of the encoded data. - |
-
- (output only) - |
-
- row_height - |
-
- array of integers - |
-
- Representation of the height of a row. - |
-
- (output only) - |
-
- errtxt - |
-
- character string - |
-
- Error message in the event that an error - occurred. - |
-
- (output only) - |
-
To alter these values use the syntax shown in the example below. -This code has the same result as the previous example except the -output is now taller and plotted in green.
-#include
-<stdio.h>
#include <zint.h>
#include
-<string.h>
int main(int argc, char **argv)
{
struct
-zint_symbol *my_symbol;
my_symbol =
-ZBarcode_Create();
strcpy(my_symbol->fgcolour,
-"00ff00");
my_symbol->height
-= 400;
ZBarcode_Encode_and_Print(my_symbol,
-argv[1]);
ZBarcode_Delete(my_symbol);
return
-0;
}
If errors occur during encoding an integer value is passed back to -the calling application. In addition the errtxt -value is used to give a message detailing the nature of the error. -The errors generated by Zint are given in the table below:
-
- Return Value - |
-
- Meaning - |
-
---|---|
- WARN_INVALID_OPTION - |
-
- One of the values in zint_struct - was set incorrectly but Zint has made a guess at what it should - have been and generated a barcode accordingly. - |
-
- ERROR_TOO_LONG - |
-
- The input data is too long or too short for the - selected symbology. No symbol has been generated. - |
-
- ERROR_INVALID_DATA - |
-
- The data to be encoded includes characters which - are not permitted by the selected symbology (e.g. alphabetic - characters in an EAN symbol). No symbol has been generated. - |
-
- ERROR_INVALID_CHECK - |
-
- An ISBN with an incorrect check digit has been - entered. No symbol has been generated. - |
-
- ERROR_INVALID_OPTION - |
-
- One of the values in zint_struct - was set incorrectly and Zint was unable to guess what it should - have been. No symbol has been generated. - |
-
- ERROR_ENCODING_PROBLEM - |
-
- A problem has occurred during encoding of the - data. This should never happen. Please contact the developer if - you encounter this error. - |
-
- ERROR_FILE_ACCESS - |
-
- Zint was unable to open the requested output - file. This is usually a file permissions problem. - |
-
- ERROR_MEMORY - |
-
- Zint ran out of memory. This should only be a - problem with legacy systems. - |
-
To catch errors use an integer variable as shown in the code -below:
-#include
-<stdio.h>
#include <zint.h>
#include
-<string.h>
int main(int argc, char **argv)
{
struct
-zint_symbol *my_symbol;
int error =
-0;
my_symbol =
-ZBarcode_Create();
strcpy(my_symbol->fgcolour,
-"nonsense");
error =
-ZBarcode_Encode_and_Print(my_symbol, argv[1]);
if(error
-!= 0) {
/* some
-error occurred */
printf("%s\n",
-my_symbol->errtxt);
}
if(error
-> WARN_INVALID_OPTION) {
/*
-stop now */
ZBarcode_Delete(my_symbol);
return
-1;
}
/*
-otherwise carry on with the rest of the application
-*/
ZBarcode_Delete(my_symbol);
return
-0;
}
This code will exit with the appropriate message:
-error: malformed -foreground colour target
- -Symbologies can be specified by number or by name as shown in the -following table. For example
-symbol->symbology -= BARCODE_LOGMARS;
-means the same as
-symbol->symbology -= 50;
-
- Numeric Value - |
-
- Name - |
-
- Symbology - |
-
---|---|---|
- 1 - |
-
- BARCODE_CODE11 - |
-
- Code 11 - |
-
- 2 - |
-
- BARCODE_C25MATRIX - |
-
- Standard Code 2 of 5 - |
-
- 3 - |
-
- BARCODE_C25INTER - |
-
- Interleaved 2 of 5 - |
-
- 4 - |
-
- BARCODE_C25IATA - |
-
- Code 2 of 5 IATA - |
-
- 6 - |
-
- BARCODE_C25LOGIC - |
-
- Code 2 of 5 Data Logic - |
-
- 7 - |
-
- BARCODE_C25IND - |
-
- Code 2 of 5 Industrial - |
-
- 8 - |
-
- BARCODE_CODE39 - |
-
- Code 3 of 9 (Code 39) - |
-
- 9 - |
-
- BARCODE_EXCODE39 - |
-
- Extended Code 3 of 9 (Code 39+) - |
-
- 13 - |
-
- BARCODE_EANX - |
-
- EAN - |
-
- 16 - |
-
- BARCODE_EAN128 - |
-
- GS1-128 - |
-
- 18 - |
-
- BARCODE_CODABAR - |
-
- Codabar - |
-
- 20 - |
-
- BARCODE_CODE128 - |
-
- Code 128 (automatic subset switching) - |
-
- 21 - |
-
- BARCODE_DPLEIT - |
-
- Deutshe Post Leitcode - |
-
- 22 - |
-
- BARCODE_DPIDENT - |
-
- Deutshe Post Identcode - |
-
- 23 - |
-
- BARCODE_CODE16K - |
-
- Code 16K - |
-
- 25 - |
-
- BARCODE_CODE93 - |
-
- Code 93 - |
-
- 28 - |
-
- BARCODE_FLAT - |
-
- Flattermarken - |
-
- 29 - |
-
- BARCODE_RSS14 - |
-
- GS1 DataBar-14 - |
-
- 30 - |
-
- BARCODE_RSS_LTD - |
-
- GS1 DataBar Limited - |
-
- 31 - |
-
- BARCODE_RSS_EXP - |
-
- GS1 DataBar Expanded - |
-
- 32 - |
-
- BARCODE_TELEPEN - |
-
- Telepen Alpha - |
-
- 34 - |
-
- BARCODE_UPCA - |
-
- UPC A - |
-
- 37 - |
-
- BARCODE_UPCE - |
-
- UPC E - |
-
- 40 - |
-
- BARCODE_POSTNET - |
-
- PostNet - |
-
- 47 - |
-
- BARCODE_MSI_PLESSEY - |
-
- MSI Plessey - |
-
- 49 - |
-
- BARCODE_FIM - |
-
- FIM - |
-
- 50 - |
-
- BARCODE_LOGMARS - |
-
- LOGMARS - |
-
- 51 - |
-
- BARCODE_PHARMA - |
-
- Pharmacode One-Track - |
-
- 52 - |
-
- BARCODE_PZN - |
-
- PZN - |
-
- 53 - |
-
- BARCODE_PHARMA_TWO - |
-
- Pharmacode Two-Track - |
-
- 55 - |
-
- BARCODE_PDF417 - |
-
- PDF417 - |
-
- 56 - |
-
- BARCODE_PDF417TRUNC - |
-
- PDF417 Truncated - |
-
- 57 - |
-
- BARCODE_MAXICODE - |
-
- Maxicode - |
-
- 58 - |
-
- BARCODE_QRCODE - |
-
- QR Code - |
-
- 60 - |
-
- BARCODE_CODE128B - |
-
- Code 128 (Subset B) - |
-
- 63 - |
-
- BARCODE_AUSPOST - |
-
- Australia Post Standard Customer - |
-
- 66 - |
-
- BARCODE_AUSREPLY - |
-
- Australia Post Reply Paid - |
-
- 67 - |
-
- BARCODE_AUSROUTE - |
-
- Australia Post Routing - |
-
- 68 - |
-
- BARCODE_AUSREDIRECT - |
-
- Australia Post Redirection - |
-
- 69 - |
-
- BARCODE_ISBNX - |
-
- ISBN (EAN-13 with verification stage) - |
-
- 70 - |
-
- BARCODE_RM4SCC - |
-
- Royal Mail 4 State (RM4SCC) - |
-
- 71 - |
-
- BARCODE_DATAMATRIX - |
-
- Data Matrix - |
-
- 72 - |
-
- BARCODE_EAN14 - |
-
- EAN-14 - |
-
- 75 - |
-
- BARCODE_NVE18 - |
-
- NVE-18 - |
-
- 76 - |
-
- BARCODE_JAPANPOST - |
-
- Japanese Postal Code - |
-
- 77 - |
-
- BARCODE_KOREAPOST - |
-
- Korea Post - |
-
- 79 - |
-
- BARCODE_RSS14STACK - |
-
- GS1 DataBar-14 Stacked - |
-
- 80 - |
-
- BARCODE_RSS14STACK_OMNI - |
-
- GS1 DataBar-14 Stacked Omnidirectional - |
-
- 81 - |
-
- BARCODE_RSS_EXPSTACK - |
-
- GS1 DataBar Expanded Stacked - |
-
- 82 - |
-
- BARCODE_PLANET - |
-
- PLANET - |
-
- 84 - |
-
- BARCODE_MICROPDF417 - |
-
- MicroPDF417 - |
-
- 85 - |
-
- BARCODE_ONECODE - |
-
- USPS OneCode - |
-
- 86 - |
-
- BARCODE_PLESSEY - |
-
- Plessey Code - |
-
- 87 - |
-
- BARCODE_TELEPEN_NUM - |
-
- Telepen Numeric - |
-
- 89 - |
-
- BARCODE_ITF14 - |
-
- ITF-14 - |
-
- 90 - |
-
- BARCODE_KIX - |
-
- Dutch Post KIX Code - |
-
- 92 - |
-
- BARCODE_AZTEC - |
-
- Aztec Code - |
-
- 93 - |
-
- BARCODE_DAFT - |
-
- DAFT Code - |
-
- 97 - |
-
- BARCODE_MICROQR - |
-
- Micro QR Code - |
-
- 98 - |
-
- BARCODE_HIBC_128 - |
-
- HIBC Code 128 - |
-
- 99 - |
-
- BARCODE_HIBC_39 - |
-
- HIBC Code 39 - |
-
- 102 - |
-
- BARCODE_HIBC_DM - |
-
- HIBC Data Matrix - |
-
- 104 - |
-
- BARCODE_HIBC_QR - |
-
- HIBC QR Code - |
-
- 106 - |
-
- BARCODE_HIBC_PDF - |
-
- HIBC PDF417 - |
-
- 108 - |
-
- BARCODE_HIBC_MICPDF - |
-
- HIBC MicroPDF417 - |
-
- 110 - |
-
- BARCODE_HIBC_BLOCKF - |
-
- HIBC Codablock-F - |
-
- 128 - |
-
- BARCODE_AZRUNE - |
-
- Aztec Runes - |
-
- 129 - |
-
- BARCODE_CODE32 - |
-
- Code 32 - |
-
- 130 - |
-
- BARCODE_EANX_CC - |
-
- Composite Symbol with EAN linear component - |
-
- 131 - |
-
- BARCODE_EAN128_CC - |
-
- Composite Symbol with GS1-128 linear component - |
-
- 132 - |
-
- BARCODE_RSS14_CC - |
-
- Composite Symbol with GS1 DataBar-14 linear - component - |
-
- 133 - |
-
- BARCODE_RSS_LTD_CC - |
-
- Composite Symbol with GS1 DataBar Limited - component - |
-
- 134 - |
-
- BARCODE_RSS_EXP_CC - |
-
- Composite Symbol with GS1 DataBar Extended - component - |
-
- 135 - |
-
- BARCODE_UPCA_CC - |
-
- Composite Symbol with UPC A linear component - |
-
- 136 - |
-
- BARCODE_UPCE_CC - |
-
- Composite Symbol with UPC E linear component - |
-
- 137 - |
-
- BARCODE_RSS14STACK_CC - |
-
- Composite Symbol with GS1 DataBar-14 Stacked - component - |
-
- 138 - |
-
- BARCODE_RSS14_OMNI_CC - |
-
- Composite Symbol with GS1 DataBar-14 Stacked - Omnidirectional component - |
-
- 139 - |
-
- BARCODE_RSS_EXPSTACK_CC - |
-
- Composite Symbol with GS1 DataBar Expanded - Stacked component - |
-
4.6 Adding Boxes and Boundary -Bars
-Boxes and boundary bars are handled using the output_options -variable in the zint_symbol structure. To -use this option simply assign a value to the output_options -variable from the following table [2].
-
- Value - |
-
- Effect - |
-
---|---|
- 0 - |
-
- No box or boundary bars. - |
-
- BARCODE_BIND - |
-
- Boundary bars above and below the symbol and - between rows if stacking multiple symbols. - |
-
- BARCODE_BOX - |
-
- Add a box surrounding the symbol and whitespace. - |
-
Rotating the output is done using the -ZBarcode_Encode_and_Print_Rotated() -and ZBarcode_Print_Rotated() -functions. These take an extra integer argument giving the angle of -rotation. Valid values are 0, 90, 180 and 270 degrees measured -clockwise. For example the following code generates a symbol rotated -by 90 degrees. Only PNG output can be rotated in this way.
-error -= ZBarcode_Encode_and_Print_Rotated(my_symbol, argv[1], 90);
- -The way in which the input data is encoded can be set using the -input_mode property. Valid values -are shown in the table below.
-
- Value - |
-
- Effect - |
-
---|---|
- BINARY_MODE - |
-
- Uses full ASCII range interpreted as Latin-1 or binary data. - |
-
- UNICODE_MODE - |
-
- Uses pre-formatted UTF-8 input. - |
-
- GS1_MODE - |
-
- Encodes GS1 data using FNC1 characters. - |
-
- KANJI_MODE - |
-
- Encodes Kanji characters in QR Code. (Converts UTF-8 to Shift-JIS) - |
-
- SJIS_MODE - |
-
- Encodes Kanji characters in QR Code. (Assumes Shift-JIS input) - |
-
-
[1] This value is ignored for Australia Post 4-State Barcodes, -PostNet, PLANET, USPS OneCode, RM4SCC, PDF417, Data Matrix, Maxicode, -QR Code, GS1 DataBar-14 Stacked, PDF417 and MicroPDF417 - all of which have a fixed -height.
-[2] This value is ignored for Code 16k and ITF-14 symbols.
-- - | -- - | -- - | -
- Using the Front End - |
-
- - |
-
- Types of Symbol - |
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
Composite symbols employ a mixture of components to give more -comprehensive information about a product. The permissible contents -of a composite symbol is determined by the terms of the GS1 -General Specification. Composite symbols consist of a linear -component which can be an EAN, UPC, GS1-128 or GS1 DataBar symbol, a -2D component which is based on PDF417 or MicroPDF417, and a separator -pattern. The type of linear component to be used is determined using -the -b or --barcode= -switch or by adjusting symbol->symbology -as with other encoding methods. Valid values are shown below.
-
- Numeric Value - |
-
- Name - |
-
- Symbology - |
-
- 130 - |
-
- BARCODE_EANX_CC - |
-
- Composite Symbol with EAN linear component - |
-
- 131 - |
-
- BARCODE_EAN128_CC - |
-
- Composite Symbol with GS1-128 linear component - |
-
- 132 - |
-
- BARCODE_RSS14_CC - |
-
- Composite Symbol with GS1 DataBar-14 linear - component - |
-
- 133 - |
-
- BARCODE_RSS_LTD_CC - |
-
- Composite Symbol with GS1 DataBar Limited - component - |
-
- 134 - |
-
- BARCODE_RSS_EXP_CC - |
-
- Composite Symbol with GS1 DataBar Extended - component - |
-
- 135 - |
-
- BARCODE_UPCA_CC - |
-
- Composite Symbol with UPC A linear component - |
-
- 136 - |
-
- BARCODE_UPCE_CC - |
-
- Composite Symbol with UPC E linear component - |
-
- 137 - |
-
- BARCODE_RSS14STACK_CC - |
-
- Composite Symbol with GS1 DataBar-14 Stacked - component - |
-
- 138 - |
-
- BARCODE_RSS14_OMNI_CC - |
-
- Composite Symbol with GS1 DataBar-14 Stacked - Omnidirectional component - |
-
- 139 - |
-
- BARCODE_RSS_EXPSTACK_CC - |
-
- Composite Symbol with GS1 DataBar Expanded - Stacked component - |
-
The data to be encoded in the linear component of a -composite symbol should be entered into a primary string with the -data for the 2D component being entered in the normal way. To do this -at the command prompt use the --primary= -command. For example:
-zint -b 130 --mode=1 ---primary=331234567890 -d "[99]1234-abcd"
-This creates an EAN-13 linear component with the data -"331234567890" and a 2D CC-A (see below) component with the -data "(99)1234-abcd". The same results can be achieved -using the API as shown below:
- my_symbol->symbology
-= 130;
my_symbol->option_1 =
-1;
strcpy(my_symbol->primary,
-"331234567890");
ZBarcode_Encode_and_Print(my_symbol,
-"[99]1234-abcd");
EAN-2 and EAN-5 add-on data can be used with EAN and -UPC symbols using the + symbol as described in section 5.1.3 and -5.1.4.
-The 2D component of a composite symbol can use one of -three systems: CC-A, CC-B and CC-C as described below. The 2D -component type can be selected automatically by Zint dependant on the -length of the input string. Alternatively the three methods can be -accessed using the --mode= prompt -followed by 1, 2 or 3 for CC-A, CC-B or CC-C respectively, or by -using the option_1 variable as shown -above.
- -This system uses a variation of MicroPDF417 which -optimised to fit into a small space. The size of the 2D component and -the amount of error correction is determined by the amount of data to -be encoded and the type of linear component which is being used. CC-A -can encode up to 56 numeric digits or an alphanumeric string of -shorter length. To select CC-A use --mode=1.
-
-
This system uses MicroPDF417 to encode the 2D -component. The size of the 2D component and the amount of error -correction is determined by the amount of data to be encoded and the -type of linear component which is being used. CC-B can encode up to -338 numeric digits or an alphanumeric string of shorter length. To -select CC-B use --mode=2.
-
-
This system uses PDF417 and can only be used in -conjunction with a GS1-128 linear component. CC-C can encode up to -2361 numeric digits or an alphanumeric string of shorter length. To -select CC-C use --mode=3.
-
-
- - | -- - | -- - | -
- Stacked Symbologies - |
-
- - |
-
- Two-Track Symbols - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
5.5.1 Australia Post 4-State -Symbols
- -Australia Post Standard Customer Barcode, Customer Barcode 2 and -Customer Barcode 3 are 37-bar, 52-bar and 67-bar specifications -respectively, developed by Australia Post for printing Delivery Point -ID (DPID) and customer information on mail items. Valid data -characters are 0-9, A-Z, a-z, space and hash (#). A Format Control -Code (FCC) is added by Zint and should not be included in the input -data. Reed-Solomon error correction data is generated by Zint. -Encoding behaviour is determined by the length of the input data -according to the formula shown in the following table:
-
- Input Length - |
-
- Required Input Format - |
-
- Symbol Length - |
-
- FCC - |
-
- Encoding Table - |
-
---|---|---|---|---|
- 8 - |
-
- 99999999 - |
-
- 37-bar - |
-
- 11 - |
-
- None - |
-
- 13 - |
-
- 99999999AAAAA - |
-
- 52-bar - |
-
- 59 - |
-
- C - |
-
- 16 - |
-
- 9999999999999999 - |
-
- 52-bar - |
-
- 59 - |
-
- N - |
-
- 18 - |
-
- 99999999AAAAAAAAAA - |
-
- 67-bar - |
-
- 62 - |
-
- C - |
-
- 23 - |
-
- 99999999999999999999999 - |
-
- 67-bar - |
-
- 62 - |
-
- N - |
-
-
A Reply Paid version of the Australia Post 4-State Barcode (FCC -45) which requires an 8-digit DPID input.
- -A Routing version of the Australia Post 4-State Barcode (FCC 87) -which requires an 8-digit DPID input.
- -A Redirection version of the Australia Post 4-State Barcode (FCC -92) which requires an 8-digit DPID input.
-
-
This Symbology is used by Royal Dutch TPG Post (Netherlands) for -Postal code and automatic mail sorting. Data input can consist of -numbers 0-9 and letters A-Z and needs to be 11 characters in length. -No check digit is included.
-
-
5.5.3 Royal Mail 4-State -Country Code (RM4SCC)
-The RM4SCC standard is used by the Royal Mail in the UK to encode -postcode and customer data on mail items. Data input can consist of -numbers 0-9 and letters A-Z and usually includes delivery postcode -followed by house number. For example "W1J0TR01" for 1 -Picadilly Circus in London. Check digit data is generated by Zint.
-
-
Also known as the Intelligent Mail Barcode and used in the US by -the United States Postal Service (USPS), the OneCode system is due to -replace the PostNet and PLANET symbologies by 2009. OneCode is a -fixed length (65-bar) symbol which combines routing and customer -information in a single symbol. Input data consists of a 20 digit -tracking code, followed by a dash (-), followed by a delivery point -zip-code which can be 0, 5, 9 or 11 digits in length. For example all -of the following inputs are valid data entries:
-"01234567094987654321"
"01234567094987654321-01234"
"01234567094987654321-012345678"
"01234567094987654321-01234567891"
-
Used to sort mail items in Japan. Data consists of a postal code followed -by a representation of the address data. Valid characters are 0-9, A-Z and -dash (-). Zint supports "Direct Encoding Mode" only where the address has -been converted to an "Address B" string and concatenated to the postal code. -Check digit is added by Zint.
-
-
- - | -- - | -- - | -
- Two-Track Symbols - |
-
- - |
-
- Two-Dimensional Symbols - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
Zint can be used to generate barcodes -as PNG images, encapsulated Post Script (EPS) or Scalable Vector -Graphics (SVG) files. This page -describes how to encode data using the command line front end -program.
- -The data to encode can be entered at -the command line using the -d option, for example:
-zint --d 'This Text'
-This will encode the text This Text. -Zint will use the default symbology, Code 128, and output to the -default file out.png in the current directory. -
- -Output can be directed to a file other -than the default using the -o switch. For example:
-zint --o here.png -d 'This Text'
-draws a Code 128 barcode in the file -here.png. If an encapsulated Post Script file is needed simply append -the file name with .eps:
-zint --o there.eps -d 'This Text'
-Scalable Vector Graphics representations of symbols can be generated -with the suffix ".svg". Output can also be directed to stdout using the ---directeps, ---directpng and ---directsvg switches for -EPS, PNG and SVG output respectively.
- -Selecting which type of barcode you -wish to produce (i.e. which symbology to use) can be done at the -command line using the -b or --barcode= switch followed by the -appropriate integer value in the following table.
-
- Numeric Value - |
-
- Barcode Name - |
-
---|---|
- 1 - |
-
- Code 11 - |
-
- 2 - |
-
- Standard Code 2 of 5 - |
-
- 3 - |
-
- Interleaved 2 of 5 - |
-
- 4 - |
-
- Code 2 of 5 IATA - |
-
- 6 - |
-
- Code 2 of 5 Data Logic - |
-
- 7 - |
-
- Code 2 of 5 Industrial - |
-
- 8 - |
-
- Code 3 of 9 (Code 39) - |
-
- 9 - |
-
- Extended Code 3 of 9 (Code 39+) - |
-
- 13 - |
-
- EAN - |
-
- 16 - |
-
- GS1-128 (UCC.EAN-128) - |
-
- 18 - |
-
- Codabar - |
-
- 20 - |
-
- Code 128 (automatic subset switching) - |
-
- 21 - |
-
- Deutshe Post Leitcode - |
-
- 22 - |
-
- Deutshe Post Identcode - |
-
- 23 - |
-
- Code 16K - |
-
- 25 - |
-
- Code 93 - |
-
- 28 - |
-
- Flattermarken - |
-
- 29 - |
-
- GS1 DataBar-14 - |
-
- 30 - |
-
- GS1 DataBar Limited - |
-
- 31 - |
-
- GS1 DataBar Extended - |
-
- 32 - |
-
- Telepen Alpha - |
-
- 34 - |
-
- UPC A - |
-
- 37 - |
-
- UPC E - |
-
- 40 - |
-
- PostNet - |
-
- 47 - |
-
- MSI Plessey - |
-
- 49 - |
-
- FIM - |
-
- 50 - |
-
- LOGMARS - |
-
- 51 - |
-
- Pharmacode One-Track - |
-
- 52 - |
-
- PZN - |
-
- 53 - |
-
- Pharmacode Two-Track - |
-
- 55 - |
-
- PDF417 - |
-
- 56 - |
-
- PDF417 Truncated - |
-
- 57 - |
-
- Maxicode - |
-
- 58 - |
-
- QR Code - |
-
- 60 - |
-
- Code 128 (Subset B) - |
-
- 63 - |
-
- Australia Post Standard Customer - |
-
- 66 - |
-
- Australia Post Reply Paid - |
-
- 67 - |
-
- Australia Post Routing - |
-
- 68 - |
-
- Australia Post Redirection - |
-
- 69 - |
-
- ISBN (EAN-13 with verification stage) - |
-
- 70 - |
-
- Royal Mail 4 State (RM4SCC) - |
-
- 71 - |
-
- Data Matrix - |
-
- 72 - |
-
- EAN-14 - |
-
- 74 - |
-
- Codablock-F - |
-
- 75 - |
-
- NVE-18 - |
-
- 76 - |
-
- Japanese Postal Code - |
-
- 77 - |
-
- Korea Post - |
-
- 79 - |
-
- GS1 DataBar-14 Stacked - |
-
- 80 - |
-
- GS1 DataBar-14 Stacked Omnidirectional - |
-
- 81 - |
-
- GS1 DataBar Expanded Stacked - |
-
- 82 - |
-
- PLANET - |
-
- 84 - |
-
- MicroPDF417 - |
-
- 85 - |
-
- USPS OneCode - |
-
- 86 - |
-
- Plessey Code - |
-
- 87 - |
-
- Telepen Numeric - |
-
- 89 - |
-
- ITF-14 - |
-
- 90 - |
-
- Dutch Post KIX Code - |
-
- 92 - |
-
- Aztec Code - |
-
- 93 - |
-
- DAFT Code - |
-
- 97 - |
-
- Micro QR Code - |
-
- 98 - |
-
- HIBC Code 128 - |
-
- 99 - |
-
- HIBC Code 39 - |
-
- 102 - |
-
- HIBC Data Matrix - |
-
- 104 - |
-
- HIBC QR Code - |
-
- 106 - |
-
- HIBC PDF417 - |
-
- 108 - |
-
- HIBC MicroPDF417 - |
-
- 110 - |
-
- HIBC Codablock-F - |
-
- 128 - |
-
- Aztec Runes - |
-
- 129 - |
-
- Code 32 - |
-
- 130 - |
-
- Composite Symbol with EAN linear component - |
-
- 131 - |
-
- Composite Symbol with GS1-128 linear component - |
-
- 132 - |
-
- Composite Symbol with GS1 DataBar-14 linear - component - |
-
- 133 - |
-
- Composite Symbol with GS1 DataBar Limited - component - |
-
- 134 - |
-
- Composite Symbol with GS1 DataBar Extended - component - |
-
- 135 - |
-
- Composite Symbol with UPC A linear component - |
-
- 136 - |
-
- Composite Symbol with UPC E linear component - |
-
- 137 - |
-
- Composite Symbol with GS1 DataBar-14 Stacked - component - |
-
- 138 - |
-
- Composite Symbol with GS1 DataBar-14 Stacked - Omnidirectional component - |
-
- 139 - |
-
- Composite Symbol with GS1 DataBar Expanded - Stacked component - |
-
The height of the symbol can be adjusted using the --height -switch. For example:
-zint --height=100 -d -'This Text'
-specifies a symbol height of 100 times the x-resolution of -the symbol.
- -The amount of whitespace to the left -and right of the generated barcode can be altered using the -w -switch. For example:
-zint --w 10 -d 'This Text'
-specifies a whitespace width of 10 -times the x-resolution of the symbol.
-3.6 -Adding boundary bars and boxes
-Zint allows the symbol to be bound with -'boundary bars' using the option --bind. These bars help to prevent -misreading of the symbol by corrupting a scan if the scanning beam -strays off the top or bottom of the symbol. Zint can also put a -border right around the symbol and its whitespace with the --box -option. This option is automatically chosen for ITF-14 symbols.
-The width of the boundary or box can be -specified using the --border switch. For example:
-zint ---box --border=10 -d 'This'
-gives a box with a width 10 times the -x-resolution of the symbol.
-- - | -- - | -
The default colours of a symbol are a -black symbol on a white background. Zint allows you to change this. -The -r switch allows the default colours to be inverted so that a -white symbol is shown on a black background. For example the command
-zint --r -d 'This'
-gives an inverted Code 128 symbol. This -is not practical for most symbologies but white-on-black is allowed -by the Data Matrix and Aztec Code symbology specifications.
-For more specific needs the foreground -and background colours can be specified using the --fg= -and --bg= options followed by -a number in RGB hexadecimal notation (the same system used in HTML). -For example the command -
-zint ---fg=004700 -d 'This'
-alters the symbol to a dark green as -shown below.
-- - | -- - | -
The -symbol can be rotated through four orientations using the --rotate= -option followed by the angle of rotation as shown below. This option -is only available with PNG output.
- -
-
- |
-
-
- |
-
-
- |
-
-
- |
-
The scale of the image can be altered -using the --scale= 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. -
-3.10 -Handling NULL Characters
-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 --null= -option allows you to substitute another character for NULL. Enter the -decimal number for the character you wish to substitute. For example ---null=21 instructs Zint to -treat the NAK control character as a NULL character. Values between 1 -and 128 are valid. This applies to Codablock-F, Code 128, -Code 16k, Extended Code 39, Code 93, Maxicode, PDF417, MicroPDF417, -Data Matrix (ECC 200 only) and Telepen.
- -GS1 data can be encoded in a number of symbologies. Application -identifiers are enclosed in [square brackets] followed by the data to -be encoded (see 5.1.12.3). To encode GS1 data use ---gs1. GS1 mode is assumed -(and doesn't need to be set) for EAN-128, DataBar and Composite symbologies -but is also available for Code 16k, Codablock-F, Data Matrix (ECC 200 only), -and Aztec Code.
-The QR Code and MicroQR Code standards have a "Kanji mode" for encoding -Japanese chacters. The standards assume that the input is encoded using the -Shift-JIS system. To access this functionality directly use the ---sjis option. Note that only -double-byte characters are supported. The presence of single byte characters -will cause the data to become corrupted. This functionality can also be -accessed from environments which use Unicode encoding by using the ---kanji option. When this option is -invoked Zint attempts to convert Unicode data to Shift-JIS before encoding -in a barcode symbol. If a Unicode character is not supported then the error -message is output.[1]
- -Additional options are available which -are specific to certain symbologies. These may, for example, control -the quantity of error correction data or the size of the symbol. -These options are discussed in section 5 of this guide.
-[1] Only Unicode and Shift-JIS inputs can be encoded by Zint directly. -Apple Macintosh Japanese, EUC-JP, ISO-2022-JP and Windows-932 standards -are not supported.
-- - | -- - | -- - | -
- Installation - |
-
- - |
-
- Using the API - |
-
by Robin Stuart <robin@zint.org.uk>
-Version 2.1.2, 1st March 2009
-This document is a guide to Zint, the libzint library and -the barcode symbologies supported by them.
-
- - |
-
- - |
- - - | -
- - |
-
- - |
-
- Introduction - |
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
These instructions relate to installing Zint on a GNU/Linux -machine but should be the same or similar for other POSIX compliant -systems (including UNIX and BSD based systems). Installation on -Windows or MacOS based system should be possible but is not covered -here.
-Zint is currently only available as source code. First download -the source code .tar.gz file from SourceForge -and unpack it. The package consists of two distinct parts: a front -end which provides a command line interface, and a back end -which provides an API which allows developers to integrate encoding -into their own project. You will notice that the sorce code is -suitably arranged into frontend and backend folders. The front end -requires the back end to be installed, so the back end should be -installed first.
- -The Zint back end, libzint, requires the libpng and libz -libraries. The latest version of these libraries is available from -http://www.libpng.org/pub/png/libpng.html. -Install these first before trying to install Zint. In addition, if -you require QR Code support, Zint uses libqrencode which is -available from -http://megaui.net/fukuchi/works/qrencode/index.en.html. -If you don't need QR Code support this can be disabled during -compilation.
-To install Zint with QR Code support follow these steps
-make
make
-install
If you do not want QR Code support use -the following steps
-make
-libzint_noqr
make install
To test that the installation has been -sucessful a shell script is included in the frontend folder. To run -the test type
-./test.sh
-This should create numerous files showing the many modes of -operation which are available from Zint. -
-- - | -- - | -- - | -
- Introduction - |
-
- - |
-
- Using the Front End - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
Zint is an open source barcode generator which allows you to -encode data in over 30 types of barcode symbol. In this documentation -a barcode encoding method is termed a symbology and the -resulting barcode image is termed a symbol. The symbologies -currently supported by Zint are: [1]
-Code 11, Standard Code 2 of 5, IATA Code 2 of 5, Industrial Code 2 -of 5, Interleaved Code 2 of 5, Code 2 of 5 Data Logic, ITF-14, -Deutche Post Leitcode, Deutche Post Identcode, UPC-A, UPC-E, EAN-2, -EAN-5, EAN-8, EAN-13, UK Plessey, MSI Plessey, Telepen Alpha, Telepen -Numeric, Code 39, Extended Code 39, Code 93, PZN, LOGMARS, Codabar, -Pharmacode, Code 128, GS1-128, NVE-18, GS1 DataBar, DataBar-14, -DataBar Limited, DataBar Extended, Code 16k, PDF417, MicroPDF417, -Two-Track Pharmacode, PostNet, PLANET, Australia Post 4-State -Symbols, Dutch Post KIX Code, RM4SCC, USPS OneCode, Data Matrix, QR -Code, Maxicode, Composite Symbols, FIM and Flattermarken.
-In addition Zint also provides barcode stacking, colour options -and a verification stage for SBN, ISBN and ISBN-13 data. The aim of -the Zint project is to provide an open source API for encoding all -public domain barcode symbologies.
-This document is a guide to the Zint API and front end program as -well as a guide to the barcode technologies which they make -available. Please remember that, although a great deal of care has -been taken to de-bug Zint, many of the symbologies have not been -tested with commercial barcode scanners so you are recommended to -test that symbols decode properly before you use them.
-The Zint project is committed to providing the open source -community with encoding software for all public domain barcode -standards. For this we need access to the standard documentation and, -unfortunately, this is not free. Your donation will contribute -towards the purchase of standard documents from the ISO and ANSI. -Standards which we hope to add to Zint in this way include Aztec -Code, Codablock-F, Code 49, Supercode, Code One and (when it becomes -available) Ultracode. If you have a preference regarding which -standard you would like your donation to go towards then please let -us know and we will reserve your donation for that standard. Thank -you.
-To make a donation please go to: -http://sourceforge.net/project/project_donations.php?group_id=199350
-[1] Note that some of these symbologies have more than one name, -and that some of the names given in this list are not the official -names for the symbologies referred to.
-- - | -- - | -- - | -
- Zint Barcode Generator - |
-
- - |
-
- Installing Zint - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
Zint -and libzint are Copyright © 2009 Robin Stuart & BogDan -Vatra and are distributed under the terms of the GNU -General Public License version 3. See the file COPYING -for more information. The following terms form part of the GPL:
-This program is free software; you can -redistribute it and/or modify it under the terms of the GNU General -Public License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version.
-This program is distributed in the hope that -it will be useful, but WITHOUT ANY WARRANTY; without even the implied -warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See -the GNU General Public License for more details.
-Some Data Matrix code is Copyright © 2004 Adrian Kennard, Andrews & -Arnold Ltd and © 2006 Stefan Schmidt, used under the terms of the -GNU General Public Licence.
-Reed-Solomon code is Copyright © 2004 Cliff Hones, used under the -terms of the GNU General Public Licence.
-Portions of GS1 DataBar and Composite Symbology code are Copyright -© 2006 ISO/BSI Global and used with permission.
-Portions of OneCode code is © 2006 United States Postal Service. -This is indicated where appropriate in the source code and is used on -the understanding that this code has been released to the public -domain and that such use is intended by the copyright holder.
-libqrencode is Copyright © 2006, 2007, 2008 Kentaro -Fukuchi and is released under the terms of the GNU General Public -Licence.
-QR Code is a registered trademark of Denso Corp. of Kariya, Japan.
-Zint.org.uk -website design and hosting provided by RSE -Web Solutions.
- -All of the code in Zint is developed using information in the -public domain, usually freely available on the Internet. Some of the -techniques used may be subject to patents and other intellectual -property legislation. It is my belief that any patents involved in -the technology underlying symbologies utilised by Zint are -'unadopted', that is the holder does not object to their methods -being used. If, however, you are a patent holder or hold any other -intellectual property rights on the methods used by Zint or the -symbologies which Zint generates, and do not want Zint to continue to -support your symbology then please contact me and I will update the -code to accommodate your wishes at the soonest opportunity.
-Any methods patented or owned by third parties or trademarks or -registered trademarks used within Zint or in this document are and -remain the property of their respective owners and do not indicate -endorsement or affiliation with those owners, companies or -organisations.
- -v0.1 - (as Zebar) Draws UPC-A. UPC-E, EAN-8, EAN-13, -Interlaced 2 of 5, Codabar, Code 39, Extended Code 39 and Code 93 -barcodes and Add-on codes EAN-2 and EAN-5 without parity. 13/11/2006
-v0.2 - Added Code 128 (which is now the default), Code 11, Code 2 -of 5, Add-on codes EAN-2 and EAN-5 parity and MSI/Plessey without -check digit. 12/12/2006
-v0.3 - Added MSI/Plessey Mod 10 check and 2 x Mod 10 check -options, Telepen ASCII and Telepen numeric, Postnet, RM4SCC. Code has -been tidied up quite a bit. Bind option added. 30/12/2006
-v0.4 - Added barcode stacking (now stacks up to 16 barcodes) and -Code16k (stub). 15/1/2007
-v0.5 - Added Australia Post 4-State Barcodes and Pharmacode (1 and -2 track). 4-state codes now draw with correct height/width ratio. -28/2/2007
-v0.6 - Added Plessey and some derivative codes (EAN-128, Code 128 -subset B, Auspost Reply, Auspost Routing, Auspost Redirect, ITF-14). -Tidied up code again: separated symbologies into more files and put -all lookup tables into arrays (much reducing the amount of code, -especially for Code 39e and Code 93). Errors now output to stderr. -Added proper input verification. Distribution now packs with HTML -pages instead of separate README. Outputs to PNG. Outputs colour. -User variable whitespace and border width. Box option. Fixed EAN -add-on bug. Added whitespace and height options. Project name changed -to Zint to avoid conflict with extant trade name. Added escape -character input. 1/4/2007
-v1.0 - Corrected problem with escape character codes. Supports -PDF417. This completes the list of features I originally wanted (plus -a few more), hence skip to version 1.0. 20/4/2007
-v1.1 - Added more derivatives (Code 2 of 5 Matrix, IATA and Data -Logic, Truncated PDF417, Deutsche Post Leitcode and Identcode, -Pharmazentralnummer, Planet) and Flattermarken. Tidied up 2 of 5 -code. 26/4/2007
-v1.2 - Supports Data Matrix (by absorption of IEC16022 code by -Stefan Schmidt et al). Added reverse colours, FIM, MSI/Plessey Modulo -11 and Modulo 11/10. Corrected Code 16k check digit calculation. -28/5/2007
-v1.3 - Supports USPS OneCode and LOGMARS. Brought all usage -information into one User Manual document. 13/6/2007
-v1.4 - Added NVE-18 support. Corrected some problems with -compilation and input verification. Command line option handling now -uses getopt(), and all the switches have changed. Added --font -option. 20/6/2007
-v1.5 - Pulled everything together to make an API. Corrected errors -with EAN-13, PDF417 and LOGMARS. Added EPS output. Added QR Code -support using libqrencode. Corrected ISBN verification error. -Re-compiled documentation in HTML form. Put in place proper error -handling routines. --font option removed. Encoding is now done with a -restructured zint_symbol structure. Added make install option and -optional QR Code support to Makefile. Corrected minor problem with -4-State Codes. Restructured code into fewer source code files. Added -MicroPDF417 support. 12/8/2007
-v1.5.1 - Added formatting code to EPS output of EAN and UPC -symbols according to EN 797:1996. Checked against and, where -appropriate, altered or corrected to comply with ISO 16388 and ISO -15417 including Latin-1 support. Altered default image settings, -added automatic ITF border. Corrected error with USPS OneCode. Tidied -up Code 39 quite a bit, added Mod 43 options. 3/9/2007
-v1.5.2 - Added extended ASCII support to Code 16k. Corrected Code -128 error. Added Maxicode support by integrating code by John Lien. -26/9/2007
-v1.5.3 - Made huge corrections to Maxicode support by removing and -re-writing much of John's code. Maxicode now supports extended ASCII -and modes 4, 5 and 6. 10/10/2007
-v1.5.4 - Added GS1 DataBar (Reduced Space Symbology) support. -26/11/2007
-v1.5.5 - Added composite symbology support. Corrected errors with -GS1-128 and PDF417/MicroPDF417 byte processing. Transferred licence -to GPL version 3. 9/3/2008
-v1.6 – Data Matrix, Maxicode and Australia Post now use common -Reed-Solomon functions – this also fixes a bug in Maxicode error -correction and replaces the last of the Lien code. Added PNG output -for Maxicode symbols. Removed some useless code. Updated QR support -for libqrencode v2.0.0. 22/4/2008
-v1.6.1 – Major restructuring of PNG generating code: Now draws -UPCA and EAN symbols properly and puts human readable text into the -image. Also corrected some nasty 'never ending loop' bugs in Code 128 -and check digit bugs in PostNet and Planet. 8/7/2008
-v1.6.2 – Added KIX Code support and PNG image rotation. -Corrected a bug affecting extended ASCII support in Code 128 and Code -16k. 28/7/2008.
-v2.0 beta - Added support for Aztec Code, Codablock-F, Code 32, -EAN-14 and DAFT Code. Re-arranged symbology numbers to match Tbarcode -v8. Corrected a never ending loop bug in EAN-128. 29/9/2008
-v2.0 beta r2 – Many corrections and bugfixes. (Code 11, Code -128, EAN-128, Aztec Code, Codablock-F, Code 16k, Postnet, PLANET, -NVE-18, PZN, Data Matrix, Maxicode and QR Code)
-v2.0 - Made corrections to Aztec Code and tested output with -bcTester. Added Aztec Runes, Micro QR Code and Data Matrix ECC -000-140. Updated e-mail information. 18/11/2008
-v2.1 – Reinstated Korea Post barcodes, harmonised bind and box -options, moved Unicode handling into backend and added input_mode -option, added size options to -Data Matrix, added NULL character handling for Codablock-F, Code 128, -Code 16k, Extended Code 39, Code 93, Telepen, Maxicode, Data Matrix ECC 200, -PDF417 and MicroPDF417. Added GS1 support for -Code 16k, Codablock-F and Aztec Code. Added scale and direct to -stdout options. Rebult -Data Matrix ECC 200 encoding algorithms to support NULL encoding and -GS1 data encoding. 31/1/2009
-v2.1.1 - Minor Data Matrix bugfix and added HIBC options. 10/2/2009
-v2.1.2 - Added SVG output option. Improved Japanese character support -including Unicode > Shift-JIS capability. Bugfixes for Data Matrix -(missing characters at end of string) and Codablock-F (K1/K2 check digit -and row indicators above row 6). 1/3/2009
-v2.1.3 - Added Japanese Postal Code
- -Below is a list of some of the sources used in rough chronological -order:
-Nick -Johnson's Barcode Specifications
-Bar Code -1 Specification Source Page
-SB Electronic Systems -Telepen website
-Pharmacode specifications from Laetus
- -Austalia Post's 'A Guide -to Printing the 4-State Barcode' and bcsample source code
-Plessey algorithm from GNU-Barcode -v0.98 by Leonid A. Broukhis
-GS1 -General Specifications v 8.0 Issue 2
-PNG: The Definitive -Guide and wpng source code by Greg Reolofs
-PDF417 specification and pdf417 source code by Grand -Zebu
-Barcode Reference, TBarCode/X User Documentation and TBarCode/X -demonstration program from Tec-It
-IEC16022 -source code by Stefan Schmidt et al
-United States -Postal Service Specification USPS-B-3200
-Adobe Systems Incorporated Encapsulated PostScript File Format -Specification
-BSI Online Library
-Libdmtx Data Matrix -decoding library
- -Zint was developed to provide compliance with the following -British and international standards: -
-BS EN 797:1996 Bar coding – Symbology specifications - 'EAN/UPC'
-BS EN 798:1996 Bar coding – Symbology specifications - “Codabar”
-BS ISO/IEC 12323:2005 AIDC technologies – Symbology -specifications – Code 16K
-BS ISO/IEC 15417:2007 Information technology – Automatic -identification and data capture techniques – Code 128 bar code -symbology specification
-BS ISO/IEC 15438:2006 Information technology – Automatic -identification and data capture techniques – PDF417 bar code -symbology specification
-BS ISO/IEC 16022:2006 Information technology – Automatic -identification and data capture techniques – Data Matrix bar code -symbology specification
-BS ISO/IEC 16023:2000 Information technology – International -symbology specification - Maxicode
-BS ISO/IEC 16388:2007 Information technology – Automatic -identification and data capture techniques – Code 39 bar code -symbology specification
-BS ISO/IEC 18004:2006 Information technology – Automatic -identification and data capture techniques – QR Code 2005 bar code -symbology specification
-BS ISO/IEC 24723:2006 Information technology – Automatic -identification and data capture techniques – EAN.UCC Composite bar -code symbology specification
-BS ISO/IEC 24724:2006 Information technology – Automatic -identification and data capture techniques – Reduced Space -Symbology (RSS) bar code symbology specification
-BS ISO/IEC 24728:2006 Information technology – Automatic -identification and data capture techniques – MicroPDF417 bar code -symbology specification
-ISO/IEC 24778:2008 Information technology – Automatic -identification and data capture techniques – Aztec Code bar code -symbology specification
-Uniform Symbology Specification – Codablock F (AIM Europe, 1995)
-GS1 General Specifications Version 8.0
-ANSI/HIBC 2.2-2006 - The Health Industry Bar Code (HIBC) -Supplier Labeling Standard
-
-
- - | -- - | -- - | -
- Other Markings - |
-
- - |
-
- Appendix A - |
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
5.7.1. Facing Identification -Mark (FIM)
-Used by the United States Postal Service (USPS), the -FIM symbology is used to assist automated mail processing. There are -only 4 valid symbols which can be generated using the characters A-D -as shown in the table below.
-
- Code Letter - |
-
- Usage - |
-
---|---|
- A - |
-
- Used for courtesy reply mail and metered reply - mail with a pre-printed PostNet symbol. - |
-
- B - |
-
- Used for business reply mail without a - pre-printed zip code. - |
-
- C - |
-
- Used for business reply mail with a pre-printed - zip code. - |
-
- D - |
-
- Used for Information Based Indicia (IBI) - postage. - |
-
-
Used for the recognition of page sequences in -print-shops, the Flattermarken is not a true barcode symbol and -requires precise knowledge of the position of the mark on the page. -The Flattermarken system can encode any length numeric data and does -not include a check digit.
- -This is a method for creating 4-state codes where the -data encoding is provided by an external program. Input data should -consist of the letters 'D', 'A', 'F' and 'T' where these refer to -descender, ascender, full (ascender and descender) and tracker -(neither ascender nor descender) respectively. All other characters -are ignored.
-- - | -- - | -- - | -
- 4-State Codes - |
-
- - |
-
- Legal - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
One-Dimensional Symbols are what most people associate with the -term barcode. They consist of a number of bars and a number of -spaces of differing widths.
- -Developed by Intermec in 1977, Code 11 is similar to Code 2 of 5 -Matrix and is primarily used in telecommunications. The symbol can -encode any length string consisting of the digits 0-9 and the dash -character (-). One modulo-11 check digit is calculated.
-
-
Code 2 of 5 is a family of one-dimensional symbols, 8 of which are -supported by Zint.
- -Also known as Code 2 of 5 Matrix is a self-checking code used in -industrial applications and photo development. Standard Code 2 of 5 -will encode any length numeric input (digits 0-9).
- -Used for baggage handling in the air-transport industry by the -International Air Transport Agency, this self-checking code will -encode any length numeric input (digits 0-9) and does not include a -check digit.
-5.1.2.3 Industrial Code 2 of 5
-Industrial Code 2 of 5 can encode any length numeric input (digits -0-9) and does not include a check digit.
-5.1.2.4 Interleaved Code 2 -of 5
-This self-checking symbology encodes pairs of numbers, and so can -only encode an even number of digits (0-9). If an odd number of -digits is entered a leading zero is added by Zint. No check digit is -added.
-5.1.2.5 Code 2 of 5 Data -Logic
-Data Logic is a proprietary variation of Standard Code 2 of 5. -Data Logic does not include a check digit and can encode any length -numeric input (digits 0-9).
- -ITF-14, also known as UPC Shipping Container Symbol, Case Code and -EAN-14, is based on Interleaved Code 2 of 5 and requires a 13 digit -numeric input (digits 0-9). One modulo-10 check digit is calculated.
-5.1.2.7 Deutsche Post -Leitcode
-Leitcode is based on Interleaved Code 2 of 5 and is used by -Deutsche Post for mailing purposes. Leitcode requires a 13-digit -numerical input and includes a check digit.
-5.1.2.8 Deutsche Post -Identcode
-Identcode is based on Interleaved Code 2 of 5 and is used by -Deutsche Post for mailing purposes. Identcode requires an 11-digit -numerical input and includes a check digit.
-
-
5.1.3 Universal Product Code (EN -797)
- -UPC-A is used in the United States for retail applications. The -symbol requires an 11 digit article number. The check digit is -calculated by Zint. In addition EAN-2 and EAN-5 add-on symbols can be -added using the + character. For example, to draw a UPC-A symbol with -the data 72527270270 with an EAN-5 add-on showing the data 12345 use -the command:
-zint --barcode=34 -d -72527270270+12345
-or encode a data string with the + character included: -
-my_symbol->symbology
-= BARCODE_UPCA;
error = ZBarcode_Encode_and_Print(my_symbol,
-"72527270270+12345");
UPC-E is a zero-compressed version of UPC-A developed for smaller -packages. The code requires a 6 digit article number (digits 0-9). -The check digit is calculated by Zint. EAN-2 and EAN-5 add-on symbols -can be added using the + character as with UPC-A. In addition Zint -also supports Number System 1 encoding by entering a 7-digit article -number stating with the digit 1. For example:
-zint --barcode=37 -d -1123456
-or
-my_symbol->symbology
-= BARCODE_UPCE;
error = ZBarcode_Encode_and_Print(my_symbol,
-"1123456");
-
5.1.4 European Article Number -(EN 797)
-5.1.5.1 EAN-2, EAN-5, EAN-8 and -EAN-13
-The EAN system is used in retail across Europe and includes -standards for EAN-2 and EAN-5 add-on codes, EAN-8 and EAN-13 which -encode 2, 5, 7 or 12 digit numbers respectively. Zint will decide -which symbology to use depending on the length of the input data. In -addition EAN-2 and EAN-5 add-on symbols can be added using the + -symbol as with UPC symbols. For example
-zint --barcode=13 -d -54321
-will encode a stand-alone EAN-5, whereas
-zint --barcode=13 -d -7432365+54321
-will encode an EAN-8 symbol with an EAN-5 add-on. As before these -results can be achieved using the API:
-my_symbol->symbology
-= BARCODE_EANX
error = ZBarcode_Encode_and_Print(my_symbol,
-"54321");
error = ZBarcode_Encode_and_Print(my_symbol,
-"7432365+54321");
All of the EAN symbols include check data which is added by Zint.
- -EAN-13 symbols (also known as Bookland EAN-13) can also be -produced from 9-digit SBN, 10-digit ISBN or 13-digit ISBN-13 data. -The relevant check digit needs to be present in the input data and -will be verified before the symbol is generated. In addition EAN-2 -and EAN-5 add-on symbols can be added using the + symbol as with UPC -symbols.
-
-
Also known as Plessey Code, this symbology was developed by the -Plessey Company Ltd. in the UK. The symbol can encode any length data -consisting of digits (0-9) or letters A-F and includes a CRC check -digit.
-
-
Based on Plessey and developed by MSE Data Corporation, MSI -Plessey is available with a range of check digit options available by -setting option_2 or by using -the –ver= switch. Any length -numeric (digits 0-9) input can be encoded. The table below shows the -options available:
-
- Value of option_2 - |
-
- Check Digits - |
-
---|---|
- 0 - |
-
- None - |
-
- 1 - |
-
- Modulo-10 - |
-
- 2 - |
-
- Modulo-10 & Modulo-10 - |
-
- 3 - |
-
- Modulo-11 - |
-
- 4 - |
-
- Modulo-11 & Modulo-10 - |
-
-
Telepen Alpha was developed by SB Electronic Systems Limited and -can encode any length of ASCII text input. Telepen includes a -modulo-127 check digit.
- -Telepen Numeric allows compression of numeric data into a Telepen -symbol. Data can consist of pairs of numbers or pairs consisting of a -numerical digit followed an X character. For example: 466333 and -466X33 are valid codes whereas 46X333 is not (the digit pair “X3” -is not valid). Includes a modulo-127 check digit.
-
-
5.1.8.1 Standard Code 39 -(ISO 16388)
-Standard Code 39 was developed in 1974 by Intermec. Input data can -be of any length and supports the characters 0-9, A-Z, dash (-), full -stop (.), space, asterisk (*), dollar ($), slash (/), plus (+) and -percent (%). The original standard (symbology 8) does not require a -check digit but a modulo-43 check digit can be added if required by -setting option_2 = 1 or using ---ver=1.
- -Also known as Code 39e and Code39+, this symbology expands on -Standard Code 39 to provide support to the full ASCII character set. -The original standard (symbology 9) does not require a check digit -but a modulo-43 check digit can be added if required by setting -option_2 = 1 or using --ver=1.
- -A variation of Extended Code 39, Code 93 also supports full ASCII -text. Two check digits are added.
- -PZN is a Code 39 based symbology used by the pharmaceutical -industry in Germany. PZN encodes a 6 digit number and includes a -modulo-10 check digit.
- -LOGMARS (Logistics Applications of Automated Marking and Reading -Symbols) is a variation of the Code 39 symbology used by the US -Department of Defence. LOGMARS encodes the same character set as -Standard Code 39 and adds a modulo-43 check digit.
- -A variation of Code 39 used by the Italian Ministry of Health -(Ministero della Sanità) for encoding pharmacode data on -pharmaceutical products. Requires a numeric input up to 8 digits in -length. Check digit is added by Zint.
- -This option adds a leading '+' character and a trailing modulo-49 -check digit to a standard Code 39 symbol as required by the Health -Industry Barcode standards.
-
-
Also known as NW-7, Monarch, ABC Codabar, USD-4, Ames Code and -Code 27, this symbology was developed in 1972 by Monarch Marketing -Systems for retail purposes. The American Blood Commission adopted -Codabar in 1977 as the standard symbology for blood identification. -Codabar can encode any length string starting and ending with the -letters A-D and containing between these letters the numbers 0-9, -dash (-), dollar ($), colon (:), slash (/), full stop (.) or plus -(+). No check digit is generated.
-
-
Developed by Laetus, Pharmacode One-Track is used for the -identification of pharmaceuticals. The symbology is able to encode -whole numbers between 3 and 131070.
-
-
5.1.11.1 Standard Code -128 (ISO 15417)
-One of the most widely used one-dimensional barcode symbologies, -Code 128 was developed in 1981 by Computer Identics. This symbology -supports full ASCII text and uses a three-mode system to compress the -data into a smaller symbol. Zint automatically switches between modes -and adds a modulo-103 check digit. Code 128 is the default barcode -symbology used by Zint. In addition Zint supports the encoding of -Latin-1 (non-English) characters in Code 128 symbols [1]. The Latin-1 -character set is shown in Appendix A.
- -It is sometimes advantageous to stop Code 128 from using subset -mode C which compresses numerical data. The BARCODE_CODE128B -option suppresses mode C in favour of mode B.
- -A variation of Code 128 also known as UCC/EAN-128, this symbology -is defined by the GS1 General Specification. -Application Identifiers (AIs) should be entered using [square -brackets] notation. These will be converted to (round brackets) for -the human readable text. This will allow (round brackets) to be used -in the data strings to be encoded. Fixed length data should be -entered at the appropriate length for correct encoding - this is not -checked by Zint and incorrect length data will result in a symbol -which does not read correctly (see Appendix C). -GS1-128 does not support extended ASCII characters. Check digits for -GTIN data (AI 01) are not generated and need to be included in input -data. The following is an example of a valid GS1-128 input:
-zint ---barcode=16 -d "[01]98898765432106[3202]012345[15]991231"
- -A shorter version of -GS1-128 which encodes GTIN data only. A 13 digit number is required. -GTIN check digit and AI (01) are added by Zint.
- -A variation of Code 128 the Nummber der Versandeinheit standard -includes both modulo-10 and modulo-103 check digits. NVE-18 requires -a 17 digit numerical input.
- -This option adds a leading '+' character and a trailing modulo-49 -check digit to a standard Code 128 symbol as required by the Health -Industry Barcode standards.
-
-
5.1.12 GS1 -DataBar (ISO 24724)
-Also known as RSS (Reduced Spaced Symbology) these -symbols are due to replace GS1-128 symbols starting in 2010 in -accordance with the GS1 -General Specification. If a GS1 DataBar symbol is to be printed -with a 2D component as specified in ISO 24723 set option_1 -= 2 or use the option --mode=2 -at the command prompt. See the section Composite -Symbols to generate DataBar symbols with 2D components.
-5.1.12.1 DataBar-14 -and DataBar-14 Truncated
-Also known as -RSS-14 the DataBar-14 encodes a 13 digit item code. A check digit and -application identifier of (01) are added by Zint. Note that for full -standard compliance symbol height should be greater than or equal to -33 modules. For DataBar-14 Truncated set the symbol height to a -minimum of 13.
- -Also known as -RSS Limited the DataBar Limited symbol also encodes 13 digit item -codes and can be used in the same way as DataBar-14 above. DataBar -Limited, however, is limited to data starting with digits 0 and 1 -(i.e. numbers in the range 0 to 1999999999999). As with DataBar-14 a -check digit and application identifier of (01) are added by Zint.
- -Also -known as RSS Expanded this is a variable length symbology capable of -encoding data from a number of AIs in a single symbol. AIs should be -encased in [square brackets] in the input data. This will be -converted to (rounded brackets) before it is included in the human -readable text attached to the symbol. This method allows the -inclusion of rounded brackets in the data to be encoded. GTIN data -(AI 01) should also include the check digit data as this is not -calculated by Zint when this symbology is encoded. Fixed -length data should be entered at the appropriate length for correct -encoding - this is not checked by Zint and incorrect length data will -result in a symbol which does not read correctly (see Appendix -C). The -following is an example of a valid DataBar Expanded input
-zint ---barcode=31 -d "[01]98898765432106[3202]012345[15]991231"
-
-
The Korean Postal Barcode is used to encode a six-digit -number and includes one check digit.
-
-
- - | -- - | -- - | -
- Types of Symbol - |
-
- - |
-
- Stacked Symbols - |
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
An early innovation to get more information into a -symbol, used primarily in the vehicle industry, is to simply stack -one-dimensional codes on top of each other. This can be achieved at -the command prompt by giving more than one set of input data. For -example
-zint -d -'This' -d 'That'
-will draw two Code 128 symbols, one on top of the -other. The same result can be achieved using the API by executing the -ZBarcode_Encode() function -more than once on a symbol. For example:
-my_symbol->symbology
-= BARCODE_CODE128;
error = ZBarcode_Encode(my_symbol,
-"This");
error = ZBarcode_Encode(my_symbol,
-"That");
error = ZBarcode_Print(my_symbol);
The example below shows 5 EAN-13 symbols stacked in -this way.
-
-
A more sophisticated method is to use some type of line -indexing which indicates to the barcode reader which order the -symbols should be read. This is demonstrated by Code 16k which uses a -Code128 based system which can stack up to 16 rows in a block. This -gives a maximum data capacity of 77 characters or 154 numerical -digits and includes two modulo-107 check digits. Code 16k also -supports extended ASCII character encoding in the same manner as Code -128.
-
-
Heavily used in the parcel industry, the PDF417 -symbology can encode a vast amount of data into a small space. Zint -supports encoding up to the ISO standard maximum symbol size of 925 -codewords which (at error correction level 0) allows a maximum data -size of 1850 text characters, or 2710 digits. The width of the -generated PDF417 symbol can be specified at the command line using -the --cols switch followed by a number between 1 and 30, and the -amount of check digit information can be specified by using the ---security switch followed by a number between 0 and 8 where the -number of codewords used for check information is determined by -2(value + 1). If using the API these values are assigned -to option_2 and option_1 -respectively. The default level of check information is determined by -the amount of data being encoded. International text support is -provided using the Latin-1 character set as described in Appendix -A. A separate symbology ID can be used to encode Health Industry -Barcode (HIBC) data which adds a leading '+' character and a modulo-49 -check digit to the encoded data.
-
-
Also known as truncated PDF417. Options are as for -PDF417 above.
-
-
5.2.5 -MicroPDF417 (ISO 24728)
-A variation of the PDF417 standard, MicroPDF417 is -intended for applications where symbol size needs to be kept to a -minimum. 34 pre-defined symbol sizes are available with 1 - 4 columns -and 4 - 44 rows. The maximum size MicroPDF417 symbol can hold 250 -alphanumeric characters or 366 digits. The amount of error correction -used is dependant on symbol size. The number of columns used can be -determined using the --cols -switch or option_2 as with -PDF417. A separate symbology ID can be used to encode Health Industry -Barcode (HIBC) data which adds a leading '+' character and a modulo-49 -check digit to the encoded data.
-
-
5.2.6 GS1 -DataBar-14 Stacked (ISO 24724)
-A stacked variation of the GS1 DataBar-14 symbol -requiring the same input (see section 5.1.12.1). -The height of this symbol is fixed. The data is encoded in two rows -of bars with a central finder pattern. This symbol can be generated -with a two-dimensional component to make a composite -symbol.
-
-
5.2.7 GS1 -DataBar-14 Stacked Omnidirectional (ISO 24724)
-Another variation of the GS1 DataBar-14 symbol -requiring the same input (see section 5.1.12.1). -The data is encoded in two rows of bars with a central finder -pattern. This symbol can be generated with a two-dimensional -component to make a composite symbol.
-
-
5.2.8 GS1 -DataBar Expanded Stacked (ISO 24724)
-A stacked variation of the GS1 DataBar Expanded symbol -for smaller packages. Input is the same as for GS1 DataBar Expanded -(see section 5.1.12.3). In addition -the width of the symbol can be altered using the --cols -switch or option_2. In this -case the number of columns relates to the number of character pairs -on each row of the symbol. For symbols with a 2D component the number -of columns must be at least 2. This symbol can be generated with a -two-dimensional component to make a composite -symbol.
-
-
Based on Code 128 the Codablock-F symbol supports -extended ASCII characters in the Latin-1 codeset and features the -ability to scan and reconstruct the stacked symbol using a standard -1D barcode reader. A separate symbology ID can be used to encode Health Industry -Barcode (HIBC) data which adds a leading '+' character and a modulo-49 -check digit to the encoded data.
-
-
- - | -- - | -- - | -
- One-Dimensional Symbols - |
-
- - |
-
- Composite Symbols - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
This section is intended to be a brief -guide to the barcode symbologies supported by Zint. The symbologies -break down easily into groups as shown in the table below. Each group -has a page dedicated to it.
-
-
- Symbol Type - |
-
- Example Symbol - |
-
- Example Symbologies - |
-
---|---|---|
- - | -- - | -
- Code - 11, Code 2 of 5, UPC, EAN, Plessey, MSI, Telepen, Code 39, - Codabar, Pharmacode - |
-
- - | -- - | -
- Code - 16k, PDF417, Codablock-F - |
-
- - | -- - | -
- CC-A, CC-B, CC-C - |
-
- - | -- - | -
- Two-Track - Pharmacode, PostNet, PLANET - |
-
- - | -- - | -
- USPS - OneCode, RM4SCC, Australia Post 4-State Codes - |
-
- - | -- - | -
- Data - Matrix, QR Code, Maxicode, Aztec Code - |
-
- - | -- - | -
- FIM, - Flattermarken - |
-
-
-
- - | -- - | -- - | -
- Using the API - |
-
- - |
-
- One-Dimensional Symbols - |
-
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
5.6.1 Data Matrix (ISO -16022)
-Also known as Semacode this symbology was developed in 1989 by -Acuity CiMatrix in partnership with the US DoD and NASA. The symbol -can encode a large amount of data in a small area. Zint supports all -versions of the standard from ISO 16022 as shown in the following -table. Note that ECC 000 to ECC 140 are legacy standards and that -their use is depreciated. Symbols encoded using ECC 000 to ECC -140 will probably not be readable by most barcode readers -manufactured since the early 1990s – use ECC 200 instead. The -different modes are accessed using the mode= -option or by setting option_1.
-Input | Mode | Error Correction Capacity | Recovery Capacity | -
---|---|---|---|
1 (default) | ECC 200 | 28 - 62% | 30 - 40% | -
2 | ECC 000 | 0% | 0% | -
3 | ECC 050 | 25% | 2.8% | -
4 | ECC 080 | 33% | 5.5% | -
5 | ECC 100 | 50% | 12.6% | -
6 | ECC 140 | 75% | 25% | -
The size of the generated symbol can also be adjusted using the ---ver= option or by setting -option_2 as shown in the table -below. A separate symbology ID can be used to encode Health Industry -Barcode (HIBC) data which adds a leading '+' character and a modulo-49 -check digit to the encoded data.
-ECC 200 | ECC 000 - 140 | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
-
Also known as Quick Response Code this symbology was developed by -Denso. QR Code support in Zint relies on libqrencode (version -2.0.0 or later) which is available from -http://megaui.net/fukuchi/works/qrencode/index.en.html. -Support for QR Code through libzint means that developers only -need to write handlers for one API which covers QR Code as well as -all of the other code symbologies provided by libzint. Four -levels of error correction are available using the security= -option or setting option_1 as -shown in the following table.
-Input | ECC Level | Error Correction Capacity | Recovery Capacity | -
---|---|---|---|
1 | L (default) | Approx 20% of symbol | Approx 7% | -
2 | M | Approx 37% of symbol | Approx 15% | -
3 | Q | Approx 55% of symbol | Approx 25% | -
4 | H | Approx 65% of symbol | Approx 30% | -
The size of the symbol can be set by using the vers= -option or setting option_2 to -the QR Code version required (1-40). The maximum capacity of a -(version 40) QR Code symbol is 7089 numeric digits, 4296 alphanumeric -characters or 2953 bytes of data. A separate symbology ID can be used to encode Health Industry -Barcode (HIBC) data which adds a leading '+' character and a modulo-49 -check digit to the encoded data.
-5.6.3 Micro QR Code (ISO -18004)
-A miniature version of the QR Code symbol for short -messages. ECC levels can be selected as for QR Code (above). Micro QR -Code support does not require libqrencode.
-Developed by UPS the Maxicode symbology employs a grid -of hexagons surrounding a 'bulls-eye' finder pattern. This symbology -is designed for the identification of parcels. Zint encodes Maxicode -symbols in Mode 2 or Mode 3 depending on the postcode data entered. -In these modes Maxicode symbols are composed of two parts named the -primary and secondary messages. The primary message consists of a -structured data field which includes various data about the package -being sent, the secondary message usually consists of address data in -a data structure. The format of the primary message is given in the -following table: -
-Characters | Meaning | -
---|---|
1-9 |
- Postcode data which can consist of up to 9 - digits (for mode 2) or up to 6 alphanumeric characters (for mode - 3). Remaining unused characters should be filled with the SPACE - character (ASCII 32). |
-
10-12 |
- Three digit country code according to ISO 3166 - (see Appendix B). |
-
13-15 |
- Three digit service code. This depends on your - parcel courier. |
-
The primary message can be designated at the command -prompt using the --primary= -switch. The secondary message uses the normal data entry method. For -example:
-zint -o test.eps -b 57 ---primary='999999999840012' -d 'Secondary Message Here'
-When using the API the primary message must be placed -in the symbol->primary -string. The secondary is entered in the same way as described in -section 4.2.
-Modes 4 to 6 can be encoded using the --mode= -switch or by setting option_1. -Modes 4 to 6 do not require a primary message. For example:
-zint -o test.eps -b 57 ---mode=4 -d 'A MaxiCode Message in Mode 4'
-Mode 6 is reserved for the maintenance of scanner -hardware and should not be used to encode user data. All modes -support extended ASCII characters and number compression. The maximum -length of text which can be placed in a Maxicode symbol depends on -the type of characters used in the text. Example maximum data lengths -are given in the table below:
-Mode | Maximum Data Length for Capital Letters | Maximum Data Length for Numeric Digits | Number of Error Correction Codewords | -
---|---|---|---|
2 (secondary only) | 84 | 126 | 50 | -
3 (secondary only) | 84 | 126 | 50 | -
4 | 93 | 135 | 50 | -
5 | 77 | 110 | 66 | -
6 | 93 | 135 | 50 | -
PLEASE NOTE that due to the unique style of the -Maxicode symbol not all of the options available for other -symbologies are available. Settings for height and scale will be -ignored. Colour options are available as with other symbologies. PNG -output is set at a resolution of 12 pixels per millimetre (approx 300 -dpi) and uses the methods set out in Annex J of the ISO/IEC standard.
-Invented by Andrew Longacre at Welch Allyn Inc in 1995 -the Aztec Code symbol is a matrix symbol with a distinctive bulls-eye -finder pattern. Zint can generate Compact Aztec Code (sometimes -called Small Aztec Code) as well as “full-range” Aztec Code -symbols and by default will automatically select symbol type and size -dependent on the length of the data to be encoded. Error correction -codewords will normally be generated to fill at least 23% of the -symbol. Two options are available to change this behaviour:
-The size of the symbol can be specified using the ---ver= switch followed by (or -setting option_2 to) a value -between 1 and 36 according to the following table:
-Value Entered | Symbol Generated | -
---|---|
1-4 | Compact Aztec Code with [value] layers | -
5-36 | “Full-Range” Aztec Code with [value – 4] layers | -
Note that in symbols which have a specified size the -amount of error correction is dependent on the length of the data -input and Zint will allow error correction capacities as low as 3 -codewords.
-Alternatively the amount of error correction data can -be specified by use of the --mode= -switch followed by (or setting option_1 -to) a value from the following table:
-Mode | Error Correction Capacity | -
---|---|
1 | >10% + 3 codewords | -
2 | >23% + 3 codewords | -
3 | >36% + 3 codewords | -
4 | >50% + 3 codewords | -
It is not possible to select both symbol size and error -correction capacity for the same symbol. If both options are selected -then the error correction capacity selection will be ignored.
-Aztec Code is able to encode any extended ASCII -character data up to a maximum length of approximately 3823 numeric -or 3067 alphabetic characters or 1914 bytes of data.
-A truncated version of compact Aztec Code for encoding -whole integers between 0 and 255. Includes Reed-Solomon error -correction. As defined in ISO/IEC 24778 Annex A.
-- - | -- - | -- - | -
- 4-State Codes - |
-
- - |
-
- Markings - |
-
- Zint Barcode Generator - |
- ||
---|---|---|
- - | -- | - - | -
Developed by Laetus, Pharmacode Two-Track is an -alternative system to Pharmacode One-Track used for the -identification of pharmaceuticals. The symbology is able to encode -whole numbers between 4 and 64570080.
-
-
Used by the United States Postal Service and due to be -superseded by the OneCode system by 2009, the PostNet barcode is used -for encoding zip-codes on mail items. PostNet uses numerical input -data and includes a modulo-10 check digit. While Zint will encode -PostNet symbols of any length, standard lengths used by USPS are -PostNet6 (5 digits ZIP input), PostNet10 (5 digit ZIP + 4 digit user -data) and PostNet12 (5 digit ZIP + 6 digit user data).
-
-
Used by the United States Postal Service and due to be -superseded by the OneCode system by 2009, the PLANET (Postal Alpha -Numeric Encoding Technique) barcode is used for encoding routing data -on mail items. Planet uses numerical input data and includes a -modulo-10 check digit. While Zint will encode PLANET symbols of any -length, standard lengths used by USPS are Planet12 (11 digit input) -and Planet14 (13 digit input).
-
-
- - | -- - | -- - | -
- Composite Symbols - |
-
- - |
-
- 4-State Codes - |
-
-