Вы находитесь на странице: 1из 61

Zint Barcode Generator and Zint Barcode Studio User Manual

This document is a backup of the user manual information $hich $as formerly held at the $ebsite http455$$$.2int.org.uk. 3ou are free to distribute this document" copy it or any part of it and reproduce it by any means or in any medium as you see fit as long as you also ackno$ledge the fact that it is covered by the follo$ing copyright4 A Bobin /tuart 2((@ C 2(99 (In other words I'm happy for you to treat it as a public domain document as long as you don't take credit for it!)

This version of the manual relates to Zint version 2.4.2.

1. Introduction
The Zint project aims to provide a complete cross-platform open source barcode generating solution. The package currently consists of a Qt based G !" a command line e#ecutable and a library $ith an %&! to allo$ developers access to the capabilities of Zint. !t is hoped that Zint provides a solution $hich is fle#ible enough for professional users $hile at the same time takes care of as much of the processing as possible to allo$ easy translation from input data to barcode image. The library $hich forms the main component of the Zint project is currently able to encode data in over '( barcode symbologies )types of barcode*" for each of $hich it is possible to translate that data from either nicode ) T+-,* or a ra$ ,-bit data stream. The image can be rendered as either a &ortable -et$ork Graphic )&-G* image" as .ncapsulated &ost /cript ).&/* or as a /calable 0ector Graphic )/0G*. 1any options are available for setting the characteristics of the output image including the si2e and colour of the image" the amount of error correction used in the symbol and" in the case of &-G images" the orientation of the image. !f you find this project useful then please consider making a donation. 3our support $ill ensure that $e are able to continue to purchase and implement ne$ barcode standards as they become available from various standards organisations. To make a donation go to4 http455sourceforge.net5project5project6donations.php7group6id89::;'(

Getting Help
The pages on this site should help you to get the most out of Zint. !f" ho$ever" you have specific re<uirements or <uestions or $ish to report a bug then either join the mailing list at https455lists.sourceforge.net5lists5listinfo52int-barcode or send an e-mail to 2int-barcode=lists.sourceforge.net >efore posting to this list please note the follo$ing points... 3ou do not need to join the list to post messages" although joining the list $ill usually mean your re<uest is ans$ered more promptly. Zint is primarily developed for ?inu#. !f you are using another platform then $e $ill be less 95@9

able to help you" although $e $ill do so if $e can. De cannot provide support for commercial packages such as 1/ Effice or Frystal Beports. %l$ays ensure you are using the latest version of Zint before posting bug reports - the bug you are reporting may have been fi#ed already. &lease remember to state $hat operating system you are using and include enough information to allo$ us to reproduce the error - including input data if appropriate. &lease GE -ET post messages asking for us to change the license arrangements. 3ou $ill be ignored. !f you $ant a barcode encoder $ith a different license then please look else$here )see belo$*. &lease remember that Zint is developed by volunteers - donHt be surprised if $e are unable to help you or if it takes a long time to ans$er your <uestions.

What's In a Name?
!n best G- fashion the name IZintI is a recursive acronym for IZint is not Tec-!tI. Tec-!t is an %ustrian !/0 $ho specialise in %!GF technologies and in particular their commercial products I>arcode /tudioI and IT>arcode5JI perform very similar functions to Zint. !n fact the design of Zint is heavily influenced by these products $ith the hope that it can provide a close to Hdrop-in replacementH capability. &lease note" ho$ever" that Zint is released under the G- General &ublic ?icense. This means that" for developers" it is only suitable for use $ith other open source packages. Zint cannot be released under any other license. !f you see a copy of Zint released under any other license then please report it. !f you re<uire commercially licensed soft$are to create barcodes then please contact Tec-!t.

. Installing Zint
.1 !inu"
The easiest $ay to configure compilation is to take advantage of the F1ake utilities. 3ou $ill need to install F1ake and libpng first. -ote that you $ill need both libpng and libpng-devel packages. !f you $ant to take advantage of Zint >arcode /tudio you $ill also need the Qt libraries pre-installed. Ence you have fulfilled these re<uirements un2ip the source code tarball and follo$ these steps in the top directory4
mkdir build cd build cmake .. make make install

The command line program can be accessed by typing


zint {options} -d {data}

-otice that the data needs to be entered after all other options. %ny options given after the data $ill be ignored. The G ! can be accessed by typing
zint-qt

25@9

To test that the installation has been sucessful a shell script is included in the 5frontend folder. To run the test type
./test.sh

This should create numerous files sho$ing the many modes of operation $hich are available from Zint.

. Microso#t Windo$s
To run Zint >arcode /tudio on Dindo$s simply do$nload and run the installation e#ecutable and follo$ the instructions on-screen.

.% &pple Mac 'S(


Zint can be compiled on E/J from the command line using the same steps as sho$n for ?inu# above. Furrently the Zint >arcode /tudio G ! is not kno$n to $ork on E/J.

%. Using Zint Barcode Studio


>elo$ is a brief guide to Zint >arcode /tudio $hich is the graphical user interface for the Zint package.

This is the main $indo$ of Zint >arcode /tudio. The top of the $indo$ sho$s a previe$ of the barcode $hich the current settings $ould create. These settings can be changed using the controls belo$. The top most te#t bo# on this first tab allo$s you to enter the data to be encoded. Dhen you are happy $ith your settings you can use the /ave button to save the resulting image to file as a &-G" .&/ or /0G image. The t$o sliders ne#t to the previe$ allo$ you to change the orientation and scale of the previe$ image but do not affect the saved image.

;5@9

The /ymbology drop-do$n bo# gives access to all of the symbologies supported by Zint sho$n in alphabetical order.

%t the bottom of the screen is an area for creating composite symbologies $hich appears $hen the currently selected symbology is supported by the composite symbology standard. G/9 data can then be entered $ith s<uare brackets used to separate %! information from data as sho$n here.

45@9

Dith some symbologies e#tra options area available to fine-tune the appearance or the content of the symbol generated. These are given in a second tab. Kere the method is sho$n for adjusting the si2e of an %2tec Fode symbol.

The appearance tab can be used to adjust the dimensions and other properties of the symbol. The height value affects the height of 9dimensional symbologies. >oundary bars can be added and adjusted and the si2e of the saved image can be determined.

'5@9

% colour dialog is used to adjust the colour of the foreground and background of the generated image. Flick on L+oreground FolourM or L>ackground FolourM respectively.

Flicking on the ellipsis ne#t to the IGata to .ncodeI te#t bo# opens a larger $indo$ $hich can be used to enter longer strings of te#t. 3ou can also use this $indo$ to get data from file.

@5@9

Flicking on the se<uence button )labelled I92;..I* opens the /e<uence Gialog. This allo$s you to create multiple barcode images by entering a se<uence of data inputs in the right hand panel. /e<uences can also be automatically generated by entering parameters on the left hand side or by importing the data from file. Zint $ill generate a separate barcode image for each line of te#t in the right hand panel. The format field determines the format of the automatically generated se<uence $here characters have the meanings as given belo$4 Fharacter N O P %ny other character .ffect !nsert leading spaces !nsert leading 2eroes !nsert leading asterisks !nterpreted literally.

The .#port Gialog sets the parameters for e#porting a se<uence of barcode images. Kere you can set the file name and the output image format. -ote that the symbology" colour and other formatting information is taken from the main $indo$.

Q5@9

). Using the *ommand !ine


This page describes ho$ to encode data using the command line front end program.

).1 Inputting data


The data to encode can be entered at the command line using the -d option" for e#ample
zint -d 'This Text'

This $ill encode the te#t This Text. Zint $ill use the default symbology" Fode 92," and output to the default file out.png in the current directory. The -d s$itch and the input data should al$ays be the last entry on the command line input. %ny options given after -d $ill be ignored. The data input to Zint is assumed to be encoded in nicode ) T+-,* format. !f you are encoding characters beyond the Q-bit %/F!! set on a platform $hich does not use nicode by default then some corruption of the data may occur. -on-printing characters can be entered on the command line using the backslash )R* as an escape character. &ermissable characters are sho$n in the table belo$. -ote that only applies on the command line. +scape *haracter R( R. Ra Rb Rt Rn Rv Rf Rr Re RG RB &S*II +,ui-alent (#(( (#(4 (#(Q (#(, (#(: (#(a (#(b (#(c (#(d (#9b (#9d (#9e Interpretation -ull .nd of Transmission >ell >ackspace Kori2ontal Tab ?ine +eed 0ertical Tab +orm +eed Farriage Beturn .scape Group /elector Becord /elector

!nput data can be read directly from file using the -i s$itch as sho$n belo$. The input file is assumed to be nicode ) T+-,* formatted unless an alternative mode is selected.
zint -i ./somefile.txt

,5@9

). .irecting 'utput
Eutput can be directed to a file other than the default using the -o s$itch. +or e#ample4
zint -o here.png -d 'This Text'

dra$s a Fode 92, barcode in the file here.png. !f an encapsulated &ost /cript file is needed simply append the file name $ith .eps4
zint -o there.eps -d 'This Text'

/calable 0ector Graphics representations of symbols can be generated $ith the suffi# I.svgI. Eutput can also be directed to stdout using the --directeps" --directpng and --directsvg s$itches for .&/" &-G and /0G output respectively.

).% Selecting /arcode t0pe


/electing $hich type of barcode you $ish to produce )i.e. $hich symbology to use* can be done at the command line using the -b or --barcode8 s$itch follo$ed by the appropriate integer value in the follo$ing table. Numeri c 1alue 9 2 ; 4 @ Q , : 9; 9@ 9, 2( 29 22 2; 24 2' Fode 99 /tandard Fode 2 of ' !nterleaved 2 of ' Fode 2 of ' !%T% Fode 2 of ' Gata ?ogic Fode 2 of ' !ndustrial Fode ; of : )Fode ;:* .#tended Fode ; of : )Fode ;:S* .%G/9-92, ) FF..%--92,* Fodabar Fode 92, )automatic subset s$itching* Geutshe &ost ?eitcode Geutshe &ost !dentcode Fode 9@T Fode 4: Fode :; :5@9 Barcode Name

2, 2: ;( ;9 ;2 ;4 ;Q 4( 4Q 4: '( '9 '2 '; '' '@ 'Q ', @( @; @@ @Q @, @: Q( Q9 Q2 Q' Q@

+lattermarken G/9 Gata>ar-94 G/9 Gata>ar ?imited G/9 Gata>ar .#tended Telepen %lpha &F % &F . &ost-et 1/! &lessey +!1 ?EG1%B/ &harmacode Ene-Track &Z&harmacode T$o-Track &G+49Q &G+49Q Truncated 1a#icode QB Fode Fode 92, )/ubset >* %ustralia &ost /tandard Fustomer %ustralia &ost Beply &aid %ustralia &ost Bouting %ustralia &ost Bedirection !/>- ).%--9; $ith verification stage* Boyal 1ail 4 /tate )B14/FF* Gata 1atri# .%--94 -0.-9, Uapanese &ostal Fode 9(5@9

QQ Q: ,( ,9 ,2 ,4 ,' ,@ ,Q ,: :( :2 :; :Q :, :: 9(2 9(4 9(@ 9(, 992 92, 92: 9;( 9;9 9;2

Torea &ost G/9 Gata>ar-94 /tacked G/9 Gata>ar-94 /tacked Emnidirectional G/9 Gata>ar .#panded /tacked &?%-.T 1icro&G+49Q /&/ EneFode &lessey Fode Telepen -umeric !T+-94 Gutch &ost T!J Fode %2tec Fode G%+T Fode 1icro QB Fode K!>F Fode 92, K!>F Fode ;: K!>F Gata 1atri# K!>F QB Fode K!>F &G+49Q K!>F 1icro&G+49Q K!>F %2tec Fode %2tec Bunes Fode ;2 Fomposite /ymbol $ith .%- linear component Fomposite /ymbol $ith G/9-92, linear component Fomposite /ymbol $ith G/9 Gata>ar-94 linear component 995@9

9;; 9;4 9;' 9;@ 9;Q 9;, 9;: 94( 949 942

Fomposite /ymbol $ith G/9 Gata>ar ?imited component Fomposite /ymbol $ith G/9 Gata>ar .#tended component Fomposite /ymbol $ith &F % linear component Fomposite /ymbol $ith &F . linear component Fomposite /ymbol $ith G/9 Gata>ar-94 /tacked component Fomposite /ymbol $ith G/9 Gata>ar-94 /tacked Emnidirectional component Fomposite /ymbol $ith G/9 Gata>ar .#panded /tacked component Fhannel Fode Fode Ene Grid 1atri#

This table is also accessible from the command line by issuing 2int -t

).) &d2usting height


The height of a 9d symbol can be adjusted using the --height s$itch. +or e#ample4
zint --height= !! -d 'This Text'

specifies a symbol height of 9(( times the x-resolution of the symbol.

).3 &d2usting $hitespace


The amount of $hitespace to the left and right of the generated barcode can be altered using the -$ s$itch. +or e#ample4
zint -" ! -d 'This Text'

specifies a $hitespace $idth of 9( times the x-resolution of the symbol.

).4 &dding /oundar0 /ars and /o"es


Zint allo$s the symbol to be bound $ith Hboundary barsH 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 $hitespace $ith the --bo# option. This option is automatically selected for !T+-94 symbols. The $idth of the boundary or bo# can be specified using the --border s$itch. +or e#ample4
zint --box --border= ! -d 'This'

925@9

gives a bo# $ith a $idth 9( times the x-resolution of the symbol.

).5 Using colour


The default colours of a symbol are a black symbol on a $hite background. Zint allo$s you to change this. The -r s$itch allo$s the default colours to be inverted so that a $hite symbol is sho$n on a black background. +or e#ample the command
zint -r -d 'This'

gives an inverted Fode 92, symbol. This is not practical for most symbologies but $hite-on-black is allo$ed by the Gata 1atri# and %2tec Fode symbology specifications. +or more specific needs the foreground and background colours can be specified using the --fg= and --bg= options follo$ed by a number in BG> he#adecimal notation )the same system used in KT1?*. +or e#ample the command
zint --fg=!!#$!! -d 'This'

alters the symbol to a dark green as sho$n belo$.

).6 7otating the S0m/ol


The symbol can be rotated through four orientations using the --rotate= option follo$ed by the angle of rotation as sho$n belo$. This option is only available $ith &-G output. --rotate=0 )default* --rotate=270 --rotate=180 --rotate=90

).8 &d2usting image si9e


The scale of the image can be altered using the --scale= option follo$ed by a multiple of the default #-dimension. +or e#ample for &-G images a scale of ' $ill increase the #-dimension to 9( pi#els.

9;5@9

).1: Input modes


G/9 data can be encoded in a number of symbologies. %pplication identifiers are enclosed in Vs<uare bracketsW follo$ed by the data to be encoded )see '.9.92.;*. To encode G/9 data use --gs1. G/9 mode is assumed )and doesnHt need to be set* for .%--92," Gata>ar and Fomposite symbologies but is also available for Fode 9@k" Gata 1atri# ).FF 2(( only*" %2tec Fode and QB Fode. QB Fode" 1icro QB Fode and Grid 1atri# standards can encode Tanji characters. These can be given in nicode ) T+-,* format as part of the input data string. Fonversion from nicode to /hiftU!/ or G> 2;92 as appropriate is handled by Zint. !f the input data is not nicode encoded or should be interpreted as an ,-bit data stream then the --binary option can be used to achieve this.

).11 Batch processing


Gata can be batch processed by reading from a te#t file and producing a separate barcode image for each line of te#t in that file. To do this use the --batch s$itch. To select the input file from $hich to read data use the -i option. Zint $ill automatically detect the end of a line of te#t )in either ni# or Dindo$s formatted te#t files* and produce a symbol each time it finds this. !nput files should end $ith a return character C if this is not present then Zint $ill not encode the last line of te#t" and $ill $arn you that there is a problem. >y default Zint $ill output numbered filenames starting $ith 00001.png" 00002.png etc. To change this behaviour use the -o option in combination $ith --batch using special characters in the output file name as sho$n in the table belo$4 Input *haracter X N = %ny other Interpretation !nsert a number or H(H !nsert a number or space !nsert a number or HPH !nsert literally

The follo$ing table sho$s some e#amples to clarify this method4 Input -o file~~~.svg -o @@@@bar.png -o my~~~bar.eps -o t@es~t~.png ;ilenames Generated file((9.svg" file((2.svg" file((;.svg PPP9.png" PPP2.png" PPP;.png my((9.bar.eps" my((2.bar.eps" my((;bar.eps tPes(t9.png" tPes(t2.png" tPes(t;.png

945@9

).1 'ther options


+or linear barcodes the te#t present in the output image can be removed by using the --note#t option. %dditional options are available $hich are specific to certain symbologies. These may" for e#ample" control the <uantity of error correction data or the si2e of the symbol. These options are discussed in section ' of this guide.

9'5@9

3. Using the &<I


Zint has been $ritten using the F language and currently only has an %&! for use $ith F language programs. % $rapper is available for &ascal5Gelphi developers thanks to theunkno$nones. The libzint %&! has been designed to be very similar to that used by the G- >arcode package. This allo$s easy migration from G- >arcode to int. int" ho$ever" uses none of the same function names or option names as !"# $arcode. This allo$s you to use both packages in your application $ithout conflict if you $ish.

3.1 *reating and .eleting S0m/ols


The symbols manipulated by Zint are held in a zint_symbol structure defined in zint.h. These symbols are created $ith the ZBarcode_Create() function and deleted using the ZBarcode_Delete() function. +or e#ample the follo$ing code creates and then deletes a symbol4
%include &stdio.h' %include &zint.h' int main() { struct zint*s+mbol ,m+*s+mbol-m+*s+mbol = ./arcode*0reate()if(m+*s+mbol 1= 2344) { printf(56+mbol successfull+ created17n5)} ./arcode*8elete(m+*s+mbol)return !}

Dhen compiling this code it $ill need to be linked $ith the libzint library using the -l2int option4
gcc -o simple simple.c -lzint

3. +ncoding and Sa-ing to ;ile


To encode data in a barcode use the ZBarcode_Encode() function. To $rite the symbol to a file use the ZBarcode_Print() function. +or e#ample the follo$ing code takes a string from the command line and outputs a Fode 92, symbol in a &-G file named out.png in the current $orking directory4
%include &stdio.h' %include &zint.h' int main(int argc9 char ,,arg:) { struct zint*s+mbol ,m+*s+mbolm+*s+mbol = ./arcode*0reate()./arcode*;ncode(m+*s+mbol9 arg:< =9 !)./arcode*>rint(m+*s+mbol9 !)./arcode*8elete(m+*s+mbol)return !}

This can also be done in one stage using the ZBarcode_Encode_and_Print() function as sho$n in the ne#t e#ample4
%include &stdio.h'

9@5@9

%include &zint.h' int main(int argc9 char ,,arg:) { struct zint*s+mbol ,m+*s+mbolm+*s+mbol = ./arcode*0reate()./arcode*;ncode*and*>rint(m+*s+mbol9 arg:< =9 !9 !)./arcode*8elete(m+*s+mbol)return !}

!nput strings should be nicode formatted.

3.% +ncoding and <rinting ;unctions in .epth


The functions for encoding and printing barcodes are defined as4
int ./arcode*;ncode(struct zint*s+mbol ,s+mbol9 unsigned char ,input9 int length)int ./arcode*;ncode*?ile(struct zint*s+mbol ,s+mbol9 char ,filename)int ./arcode*>rint(struct zint*s+mbol ,s+mbol9 int rotate*angle)int ./arcode*;ncode*and*>rint(struct zint*s+mbol ,s+mbol9 unsigned char ,input9 int length9 int rotate*angle)int ./arcode*;ncode*?ile*and*>rint(struct zint*s+mbol ,s+mbol9 char ,filename9 int rotate*angle)-

!n these definitions IlengthI can be used to set the length of the input string. This allo$s the encoding of - ?? )%/F!! (* characters in those symbologies $hich allo$ this. % value of ( $ill disable this function and Zint $ill encode data up to the first - ?? character in the input string. The Irotate6angleI value can be used to rotate the image $hen outputting as a &-G image. 0alid values are (" :(" 9,( and 2Q(. The Z>arcode6.ncode6+ile)* and Z>arcode6.ncode6+ile6and6&rint)* functions can be used to encode data read directly from a file $here the filename is given in the IfilenameI string.

3.) Bu##ering S0m/ols in Memor0


!n addition to saving barcode images to file Zint allo$s you to access a representation of the resulting bitmap image in memory. The follo$ing functions allo$ you to do this4
int int int int int ./arcode*/uffer(struct zint*s+mbol ,s+mbol9 int rotate*angle)./arcide*;ncode*and*/uffer(struct zint*s+mbol ,s+mbol9 unsigned char ,input9 length9 int rotate*angle)./arcode*;ncode*?ile*and*/uffer(struct zint*s+mbol ,s+mbol9 char ,filename9 rotate*angle)-

The arguments here are the same as above. The difference is that instead of saving the image to file it is placed in a character array. The IbitmapI pointer )see belo$* is set to the first memory location in the array and the values Ibarcode6$idthI and Ibarcode6heightI indicate the si2e of the resulting image in pi#els. Botation and colour options can be used at the same time as using the buffer functions in the same $ay as $hen saving to a &-G image. The bitmap data can be e#tracted from the character array by the method sho$n in the e#ample belo$ $here render6pi#el)* is assumed to be a function for dra$ing a pi#el on the screen implimented by the e#ternal application4
int ro"9 col9 i = !int red9 blue9 greenfor(ro" = !- ro" & m+*s+mbol-'bitmap*height- ro"@@) { for(column = !- column & m+*s+mbol-'bitmap*"idth- column@@) { red = m+*s+mbol-'bitmap<i=-

9Q5@9

green = m+*s+mbol-'bitmap<i @ =blue = m+*s+mbol-'bitmap<i @ A=render*pixel(ro"9 column9 red9 green9 blue)i @= B} }

3.3 Setting 'ptions


/o far our application is not very useful unless $e plan to only make Fode 92, barcodes and $e donHt mind that they only save to out.png. %s $ith the front end program" of course" these options can be altered. The $ay this is done is by altering the contents of the zint_symbol structure bet$een the creation and encoding stages. The zint_symbol structure consists of the follo$ing variables4 1aria/le Name symbology height =0pe integer integer Meaning /ymbology to use )see section '.Q*. /ymbol height. V9W Dhitespace $idth. >order $idth. >inding or bo# parameters )see section '.,*. V2W .e#ault 1alue BARCODE_CODE128 '( ( ( )none*

whitespace_width integer boder_width output_options integer integer

fgcolour

+oreground )ink* colour as BG> character he#adecimal string. 1ust be @ "000000" string characters follo$ed by terminating R ( character. >ackground )paper* colour as BG> character he#adecimal string. 1ust be @ "ffffff" string characters follo$ed by terminating R ( character. Fontains the name of the file to character output a resulting barcode symbol string to. 1ust end in .png" .eps or .svg integer integer integer float integer /ymbology specific options. /ymbology specific options. /ymbology specific options. /cale factor for adjusting si2e of image. /et encoding of input data )see section '.:* 9,5@9 "out.png" )automatic* )automatic* )automatic* 9.( BINARY_MODE

bgcolour

outfile option_1 option_2 option_3 scale input_mode

primary

character &rimary message data for more string comple# symbols.

- ??

text

Kuman readable te#t" $hich usually unsigned consists of the input data plus one or character - ?? more check digits. ses T+-, string formatting. integer integer -umber of ro$s used by the symbol or" if using barcode stacking" the ro$ )output only* to be used by the ne#t symbol. Didth of the generated symbol. )output only* )output only*

rows width encoding_data

array of character Bepresentation of the encoded data. strings array of integers Bepresentation of the height of a ro$.

row_height errtxt

)output only* )output only*

character .rror message in the event that an string error occurred. pointer to character &ointer to stored bitmap image. array integer integer Didth of stored bitmap image )in pi#els*. Keight of stored bitmap image )in pi#els*.

bitmap

)output only*

bitmap_width bitmap_height

)output only* )output only*

To alter these values use the synta# sho$n in the e#ample belo$. This code has the same result as the previous e#ample e#cept the output is no$ taller and plotted in green.
%include &stdio.h' %include &zint.h' %include &string.h' int main(int argc9 char ,,arg:) { struct zint*s+mbol ,m+*s+mbol-m+*s+mbol = ./arcode*0reate()strcp+(m+*s+mbol-'fgcolour9 5!!ff!!5)m+*s+mbol-'height = #!!./arcode*;ncode*and*>rint(m+*s+mbol9 arg:< =9 !9 !)./arcode*8elete(m+*s+mbol)return !}

3.4 Handling +rrors


!f errors occur during encoding an integer value is passed back to the calling application. !n 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 belo$4 9:5@9

7eturn 1alue WARN_INVALID_OPTION

Meaning Ene of the values in zint_struct $as set incorrectly but Zint has made a guess at $hat it should have been and generated a barcode accordingly. The input data is too long or too short for the selected symbology. -o symbol has been generated. The data to be encoded includes characters $hich are not permitted by the selected symbology )e.g. alphabetic characters in an .%- symbol*. -o symbol has been generated. %n !/>- $ith an incorrect check digit has been entered. -o symbol has been generated. Ene of the values in zint_struct $as set incorrectly and Zint $as unable to guess $hat it should have been. -o symbol has been generated. % problem has occurred during encoding of the data. This should never happen. &lease contact the developer if you encounter this error. Zint $as unable to open the re<uested output file. This is usually a file permissions problem. Zint ran out of memory. This should only be a problem $ith legacy systems.

ERROR_TOO_LONG

ERROR_INVALID_DATA

ERROR_INVALID_CHECK

ERROR_INVALID_OPTION

ERROR_ENCODING_PROBLEM

ERROR_FILE_ACCESS ERROR_MEMORY

To catch errors use an integer variable as sho$n in the code belo$4


%include &stdio.h' %include &zint.h' %include &string.h' int main(int argc9 char ,,arg:) { struct zint*s+mbol ,m+*s+mbolint error = !m+*s+mbol = ./arcode*0reate()strcp+(m+*s+mbol-'fgcolour9 5nonsense5)error = ./arcode*;ncode*and*>rint(m+*s+mbol9 arg:< =9 !9 !)if(error 1= !) { /, some error occurred ,/ printf(5Cs7n59 m+*s+mbol-'errtxt)} if(error ' DEF2*G2HE4G8*I>TGI2) { /, stop no" ,/ ./arcode*8elete(m+*s+mbol)return } /, other"ise carr+ on "ith the rest of the application ,/ ./arcode*8elete(m+*s+mbol)return !}

2(5@9

This code $ill e#it $ith the appropriate message4


errorJ malformed foreground colour target

3.5 Speci#0ing a S0m/olog0


/ymbologies can be specified by number or by name as sho$n in the follo$ing table. +or e#ample
s+mbol-'s+mbolog+= /EF0I8;*4IKLEF6-

means the same as


s+mbol-'s+mbolog+ = M!-

Numeric 1alue 9 2 ; 4 @ Q , : 9; 9@ 9, 2( 29 22 2; 24 2' 2, 2: ;( ;9

Name BARCODE_CODE11 BARCODE_C25MATRIX BARCODE_C25INTER BARCODE_C25IATA BARCODE_C25LOGIC BARCODE_C25IND BARCODE_CODE39 BARCODE_EXCODE39 BARCODE_EANX BARCODE_EAN128 BARCODE_CODABAR BARCODE_CODE128 BARCODE_DPLEIT BARCODE_DPIDENT BARCODE_CODE16K BARCODE_CODE49 BARCODE_CODE93 BARCODE_FLAT BARCODE_RSS14 BARCODE_RSS_LTD BARCODE_RSS_EXP Fode 99

S0m/olog0

/tandard Fode 2 of ' !nterleaved 2 of ' Fode 2 of ' !%T% Fode 2 of ' Gata ?ogic Fode 2 of ' !ndustrial Fode ; of : )Fode ;:* .#tended Fode ; of : )Fode ;:S* .%G/9-92, Fodabar Fode 92, )automatic subset s$itching* Geutshe &ost ?eitcode Geutshe &ost !dentcode Fode 9@T Fode 4: Fode :; +lattermarken G/9 Gata>ar-94 G/9 Gata>ar ?imited G/9 Gata>ar .#panded 295@9

;2 ;4 ;Q 4( 4Q 4: '( '9 '2 '; '' '@ 'Q ', @( @; @@ @Q @, @: Q( Q9 Q2 Q' Q@ QQ Q: ,( ,9

BARCODE_TELEPEN BARCODE_UPCA BARCODE_UPCE BARCODE_POSTNET BARCODE_MSI_PLESSEY BARCODE_FIM BARCODE_LOGMARS BARCODE_PHARMA BARCODE_PZN BARCODE_PHARMA_TWO BARCODE_PDF417 BARCODE_PDF417TRUNC BARCODE_MAXICODE BARCODE_QRCODE BARCODE_CODE128B BARCODE_AUSPOST BARCODE_AUSREPLY BARCODE_AUSROUTE BARCODE_AUSREDIRECT BARCODE_ISBNX BARCODE_RM4SCC BARCODE_DATAMATRIX BARCODE_EAN14 BARCODE_NVE18 BARCODE_JAPANPOST BARCODE_KOREAPOST BARCODE_RSS14STACK BARCODE_RSS14STACK_OMNI BARCODE_RSS_EXPSTACK 225@9

Telepen %lpha &F % &F . &ost-et 1/! &lessey +!1 ?EG1%B/ &harmacode Ene-Track &Z&harmacode T$o-Track &G+49Q &G+49Q Truncated 1a#icode QB Fode Fode 92, )/ubset >* %ustralia &ost /tandard Fustomer %ustralia &ost Beply &aid %ustralia &ost Bouting %ustralia &ost Bedirection !/>- ).%--9; $ith verification stage* Boyal 1ail 4 /tate )B14/FF* Gata 1atri# .%--94 -0.-9, Uapanese &ost Torea &ost G/9 Gata>ar-94 /tacked G/9 Gata>ar-94 /tacked Emnidirectional G/9 Gata>ar .#panded /tacked

,2 ,4 ,' ,@ ,Q ,: :( :2 :; :Q :, :: 9(2 9(4 9(@ 9(, 992 92, 92: 9;( 9;9 9;2 9;; 9;4 9;'

BARCODE_PLANET BARCODE_MICROPDF417 BARCODE_ONECODE BARCODE_PLESSEY BARCODE_TELEPEN_NUM BARCODE_ITF14 BARCODE_KIX BARCODE_AZTEC BARCODE_DAFT BARCODE_MICROQR BARCODE_HIBC_128 BARCODE_HIBC_39 BARCODE_HIBC_DM BARCODE_HIBC_QR BARCODE_HIBC_PDF BARCODE_HIBC_MICPDF BARCODE_HIBC_AZTEC BARCODE_AZRUNE BARCODE_CODE32 BARCODE_EANX_CC BARCODE_EAN128_CC BARCODE_RSS14_CC BARCODE_RSS_LTD_CC BARCODE_RSS_EXP_CC BARCODE_UPCA_CC

&?%-.T 1icro&G+49Q /&/ EneFode &lessey Fode Telepen -umeric !T+-94 Gutch &ost T!J Fode %2tec Fode G%+T Fode 1icro QB Fode K!>F Fode 92, K!>F Fode ;: K!>F Gata 1atri# K!>F QB Fode K!>F &G+49Q K!>F 1icro&G+49Q K!>F %2tec Fode %2tec Bunes Fode ;2 Fomposite /ymbol $ith .%- linear component Fomposite /ymbol $ith G/9-92, linear component Fomposite /ymbol $ith G/9 Gata>ar-94 linear component Fomposite /ymbol $ith G/9 Gata>ar ?imited component Fomposite /ymbol $ith G/9 Gata>ar .#tended component Fomposite /ymbol $ith &F % linear component 2;5@9

9;@ 9;Q 9;, 9;: 94( 949 942

BARCODE_UPCE_CC BARCODE_RSS14STACK_CC BARCODE_RSS14_OMNI_CC BARCODE_RSS_EXPSTACK_CC BARCODE_CHANNEL BARCODE_CODEONE BARCODE_GRIDMATRIX

Fomposite /ymbol $ith &F . linear component Fomposite /ymbol $ith G/9 Gata>ar-94 /tacked component Fomposite /ymbol $ith G/9 Gata>ar-94 /tacked Emnidirectional component Fomposite /ymbol $ith G/9 Gata>ar .#panded /tacked component Fhannel Fode Fode Ene Grid 1atri#

3.6 &dding Bo"es and Boundar0 Bars


>o#es 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 follo$ing table V2W. 1alue 0 BARCODE_BIND BARCODE_BOX -o bo# or boundary bars. >oundary bars above and belo$ the symbol and bet$een ro$s if stacking multiple symbols. %dd a bo# surrounding the symbol and $hitespace. +##ect

3.8 Setting the Input Mode


The $ay in $hich the input data is encoded can be set using the input_mode property. 0alid values are sho$n in the table belo$. 1alue DATA_MODE UNICODE_MODE GS1_MODE +##ect ses full %/F!! range interpreted as ?atin-9 or binary data. ses pre-formatted T+-, input. .ncodes G/9 data using +-F9 characters.

245@9

3.1: 1eri#0ing S0m/olog0 &-aila/ilit0


%n additional function available in the %&! is defined as4
int ./arcode*HalidG8(int s+mbol*id)-

This function allo$s you to check $hether a given symbology is available. % non-2ero return value indicates that the given symbology is available. +or e#ample4
if(./arcode*HalidG8(/EF0I8;*>8?# $) 1= !) { printf(5>8?# $ a:ailable5)- } else { printf(5>8?# $ not a:ailable5)- }

V9W This value is ignored for %ustralia &ost 4-/tate >arcodes" &ost-et" &?%-.T" /&/ EneFode" B14/FF" &G+49Q" Gata 1atri#" 1a#icode" QB Fode" G/9 Gata>ar-94 /tacked" &G+49Q and 1icro&G+49Q - all of $hich have a fi#ed height. V2W This value is ignored for Fode 9@k and !T+-94 symbols.

2'5@9

4 =0pes o# S0m/olog0 4.1 'ne>.imensional S0m/ols


Ene-Gimensional /ymbols are $hat most people associate $ith the term barcode. They consist of a number of bars and a number of spaces of differing $idths.

4.1.1 *ode 11
Geveloped by !ntermec in 9:QQ" Fode 99 is similar to Fode 2 of ' 1atri# and is primarily used in telecommunications. The symbol can encode any length string consisting of the digits (-: and the dash character )-*. Ene modulo-99 check digit is calculated.

4.1. *ode

o# 3

Fode 2 of ' is a family of onedimensional symbols" , of $hich are supported by Zint. -ote that the names given to these standards alters from one source to another so you should take care to ensure that you have the right barcode type before using these standards.

4.1. .1 Standard *ode

o# 3

%lso kno$n as Fode 2 of ' 1atri# is a self-checking code used in industrial applications and photo development. /tandard Fode 2 of ' $ill encode any length numeric input )digits (-:*.

4.1. . I&=& *ode

o# 3

sed for baggage handling in the air-transport industry by the !nternational %ir Transport %gency" this self-checking code $ill encode any length numeric input )digits (-:* and does not include a check digit.

4.1. .% Industrial *ode

o# 3

!ndustrial Fode 2 of ' can encode any length numeric input )digits (-:* and does not include a check digit.

4.1. .) Interlea-ed *ode

o# 3

This self-checking symbology encodes pairs of numbers" and so can only encode an even number of digits )(-:*. !f an odd number of digits is entered a leading 2ero is added by Zint. -o check digit is added.

2@5@9

4.1. .3 *ode 4.1. .4 I=;>1)

o# 3 .ata !ogic

Gata ?ogic does not include a check digit and can encode any length numeric input )digits (-:*.

!T+-94" also kno$n as &F /hipping Fontainer /ymbol or Fase Fode is based on !nterleaved Fode 2 of ' and re<uires a 9; digit numeric input )digits (-:*. Ene modulo-9( check digit is calculated.

4.1. .5 .eutsche <ost !eitcode


?eitcode is based on !nterleaved Fode 2 of ' and is used by Geutsche &ost for mailing purposes. ?eitcode re<uires a 9;-digit numerical input and includes a check digit.

4.1. .6 .eutsche <ost Identcode


!dentcode is based on !nterleaved Fode 2 of ' and is used by Geutsche &ost for mailing purposes. !dentcode re<uires an 99-digit numerical input and includes a check digit.

4.1.% Uni-ersal <roduct *ode ?+N 585@


4.1.%.1 U<* 1ersion &
&F-% is used in the nited /tates for retail applications. The symbol re<uires an 99 digit article number. The check digit is calculated by Zint. !n addition .%--2 and .%--' add-on symbols can be added using the S character. +or e#ample" to dra$ a &F-% symbol $ith the data Q2'2Q2Q(2Q( $ith an .%--' add-on sho$ing the data 92;4' use the command4
zint --barcode=B# -d $AMA$A$!A$!@ AB#M

or encode a data string $ith the S character included4


m+*s+mbol-'s+mbolog+ = /EF0I8;*3>0Eerror = ./arcode*;ncode*and*>rint(m+*s+mbol9 5$AMA$A$!A$!@ AB#M5)-

4.1.%. U<* 1ersion +


&F-. is a 2ero-compressed version of &F-% developed for smaller packages. The code re<uires a @ digit article number )digits (-:*. The check digit is calculated by Zint. .%--2 and .%--' addon symbols can be added using the S character as $ith &F-%. !n addition Zint also supports -umber /ystem 9 encoding by entering a Q-digit article number stating $ith the digit 9. +or e#ample4
zint --barcode=B$ -d AB#MN

or
m+*s+mbol-'s+mbolog+ = /EF0I8;*3>0;error = ./arcode*;ncode*and*>rint(m+*s+mbol9 5 AB#MN5)-

2Q5@9

4.1.) +uropean &rticle Num/er ?+N 585@


4.1.).1 +&N> A +&N>3A +&N>6 and +&N>1%
The .%- system is used in retail across .urope and includes standards for .%--2 and .%--' add-on codes" .%--, and .%--9; $hich encode 2" '" Q or 92 digit numbers respectively. Zint $ill decide $hich symbology to use depending on the length of the input data. !n addition .%--2 and .%--' add-on symbols can be added using the S symbol as $ith &F symbols. +or e#ample
zint --barcode= B -d M#BA

$ill encode a stand-alone .%--'" $hereas


zint --barcode= B -d $#BABNM@M#BA

$ill encode an .%--, symbol $ith an .%--' add-on. %s before these results can be achieved using the %&!4
m+*s+mbol-'s+mbolog+ = /EF0I8;*;E2Oerror = ./arcode*;ncode*and*>rint(m+*s+mbol9 5M#BA 5)error = ./arcode*;ncode*and*>rint(m+*s+mbol9 5$#BABNM@M#BA 5)-

%ll of the .%- symbols include check data $hich is added by Zint.

4.1.). SBNA ISBN and ISBN>1%


.%--9; symbols )also kno$n as >ookland .%--9;* can also be produced from :-digit />-" 9(digit !/>- or 9;-digit !/>--9; data. The relevant check digit needs to be present in the input data and $ill be verified before the symbol is generated. !n addition .%--2 and .%--' add-on symbols can be added using the S symbol as $ith &F symbols.

4.1.3 <lesse0
%lso kno$n as &lessey Fode" this symbology $as developed by the &lessey Fompany ?td. in the T. The symbol can encode any length data consisting of digits )(-:* or letters %+ and includes a FBF check digit.

4.1.4 MSI <lesse0


>ased on &lessey and developed by 1/. Gata Forporation" 1/! &lessey is available $ith a range of check digit options available by setting option_2 or by using the --ver= s$itch. %ny length numeric )digits (-:* input can be encoded. The table belo$ sho$s the options available4

2,5@9

1alue o# option_2 ( 9 2 ; 4 -one

*hecB .igits

1odulo-9( 1odulo-9( Y 1odulo-9( 1odulo-99 1odulo-99 Y 1odulo-9(

4.1.5 =elepen
4.1.5.1 =elepen &lpha
Telepen %lpha $as developed by /> .lectronic /ystems ?imited and can encode any length of %/F!! te#t input. Telepen includes a modulo-92Q check digit.

4.1.5. =elepen Numeric


Telepen -umeric allo$s compression of numeric data into a Telepen symbol. Gata can consist of pairs of numbers or pairs consisting of a numerical digit follo$ed an J character. +or e#ample4 4@@;;; and 4@@J;; are valid codes $hereas 4@J;;; is not )the digit pair IJ;I is not valid*. !ncludes a modulo-92Q check digit.

4.1.6 *ode %8
4.1.6.1 Standard *ode %8 ?IS' 14%66@
/tandard Fode ;: $as developed in 9:Q4 by !ntermec. !nput data can be of any length and supports the characters (-:" %Z" dash )-*" full stop ).*" space" asterisk )P*" dollar )O*" slash )5*" plus )S* and percent )Z*. The standard does not re<uire a check digit but a modulo-4; check digit can be added if re<uired by setting option_2 = 1 or using --ver=1.

4.1.6. +"tended *ode %8


%lso kno$n as Fode ;:e and Fode;:S" this symbology e#pands on /tandard Fode ;: to provide support to the full %/F!! character set. The standard does not re<uire a check digit but a modulo-4; check digit can be added if re<uired by setting option_2 = 1 or using --ver=1.

4.1.6.% *ode 8%
% variation of .#tended Fode ;:" Fode :; also supports full %/F!! te#t. T$o check digits are added by Zint.

2:5@9

4.1.6.) <ZN
&Z- is a Fode ;: based symbology used by the pharmaceutical industry in Germany. &Z- encodes a @ digit number and includes a modulo-9( check digit.

4.1.6.3 !'GM&7S
?EG1%B/ )?ogistics %pplications of %utomated 1arking and Beading /ymbols* is a variation of the Fode ;: symbology used by the / Gepartment of Gefence. ?EG1%B/ encodes the same character set as /tandard Fode ;: and adds a modulo-4; check digit.

4.1.6.4 *ode %
% variation of Fode ;: used by the !talian 1inistry of Kealth )I1inistero della /anit[I* for encoding identifiers on pharmaceutical products. Be<uires a numeric input up to , digits in length. Fheck digit is added by Zint.

4.1.6.5 HIB* *ode %8


This option adds a leading HSH character and a trailing modulo-4: check digit to a standard Fode ;: symbol as re<uired by the Kealth !ndustry >arcode standards.

4.1.8 *oda/ar ?+N 586@


%lso kno$n as -D-Q" 1onarch" %>F Fodabar" /G-4" %mes Fode and Fode 2Q" this symbology $as developed in 9:Q2 by 1onarch 1arketing /ystems for retail purposes. The %merican >lood Fommission adopted Fodabar in 9:QQ as the standard symbology for blood identification. Fodabar can encode any length string starting and ending $ith the letters %-G and containing bet$een these letters the numbers (-:" dash )-*" dollar )O*" colon )4*" slash )5*" full stop ).* or plus )S*. -o check digit is generated.

4.1.1: <harmacode
Geveloped by ?aetus" &harmacode is used for the identification of pharmaceuticals. The symbology is able to encode $hole numbers bet$een ; and 9;9(Q(.

4.1.11 *ode 1 6
4.1.11.1 Standard *ode 1 6 ?IS' 13)15@
Ene of the most ubi<uitous one-dimensional barcode symbologies" Fode 92, $as developed in 9:,9 by Fomputer !dentics. This symbology supports full %/F!! te#t and uses a three-mode system to compress the data into a smaller symbol. Zint automatically s$itches bet$een modes and adds a modulo-9(; check digit. Fode 92, is the default barcode symbology used by Zint. !n addition Zint supports the encoding of ?atin-9 )non-.nglish* characters in Fode 92, symbols V9W. The ?atin-9 character set is sho$n in %ppendi# %. ;(5@9

4.1.11. *ode 1 6 Su/set B


!t is sometimes advantageous to stop Fode 92, from using subset mode F $hich compresses numerical data. The BARCODE_CODE128B option )%T% symbology @(* suppresses mode F in favour of mode >.

4.1.11.% GS1>1 6
% variation of Fode 92, also kno$n as FF5.%--92," this symbology is defined by the G/9 General /pecification. %pplication !dentifiers )%!s* should be entered using Vs<uare bracketsW notation. These $ill be converted to )round brackets* for the human readable te#t. This $ill allo$ round brackets to be used in the data strings to be encoded. +i#ed length data should be entered at the appropriate length for correct encoding )see %ppendi# F*. G/9-92, does not support e#tended %/F!! characters. Fheck digits for GT!- data )%! (9* are not generated and need to be included in input data. The follo$ing is an e#ample of a valid G/9-92, input4
zint --barcode= N -d 5<! =PQQPQ$NM#BA !N<BA!A=! AB#M< M=PP AB 5

4.1.11.) +&N>1)
% shorter version of G/9-92, $hich encodes GT!- data only. % 9; digit number is re<uired. GT!check digit and %! )(9* are added by Zint.

4.1.11.3 N1+>16
% variation of Fode 92, the -ummber der 0ersandeinheit standard includes both modulo-9( and modulo-9(; check digits. -0.-9, re<uires a 9Q digit numerical input.

4.1.11.4 HIB* *ode 1 6


This option adds a leading HSH character and a trailing modulo-4: check digit to a standard Fode 92, symbol as re<uired by the Kealth !ndustry >arcode standards.

4.1.1 GS1 .ataBar ?IS' )5 )@


%lso kno$n as B// )Beduced /paced /ymbology* these symbols are due to replace G/9-92, symbols starting in 2(9( in accordance $ith the G/9 General /pecification. !f a G/9 Gata>ar symbol is to be printed $ith a 2G component as specified in !/E 24Q2; set option_1 = 2 or use the option --mode=2 at the command prompt. /ee section @.; of this manual to find out ho$ to generate Gata>ar symbols $ith 2G components.

4.1.1 .1 .ataBar>1) and .ataBar>1) =runcated


%lso kno$n as B//-94 this standard encodes a 9; digit item code. % check digit and application identifier of )(9* are added by Zint. -ote that for full standard compliance symbol height should be greater than or e<ual to ;; modules. +or Gata>ar-94 Truncated set the symbol height to a minimum of 9;.

4.1.1 . .ataBar !imited


%lso kno$n as B// ?imited this standard encodes a 9; digit item code and can be used in the same $ay as Gata>ar-94 above. Gata>ar ?imited" ho$ever" is limited to data starting $ith digits ( and 9 ;95@9

)i.e. numbers in the range ( to 9::::::::::::*. %s $ith Gata>ar-94 a check digit and application identifier of )(9* are added by Zint.

4.1.1 .% .ataBar +"panded


%lso kno$n as B// .#panded this is a variable length symbology capable of encoding data from a number of %!s in a single symbol. %!s should be encased in Vs<uare bracketsW in the input data. This $ill be converted to )rounded brackets* before it is included in the human readable te#t attached to the symbol. This method allo$s the inclusion of rounded brackets in the data to be encoded. GT!data )%! (9* should also include the check digit data as this is not calculated by Zint $hen this symbology is encoded. +i#ed length data should be entered at the appropriate length for correct encoding )see %ppendi# F*. The follo$ing is an e#ample of a valid Gata>ar .#panded input
zint --barcode=B -d 5<! =PQQPQ$NM#BA !N<BA!A=! AB#M< M=PP AB 5

4.1.1% Corea <ost Barcode


The Torean &ostal >arcode is used to encode a si#-digit number and includes one check digit.

4.1.1) *hannel *ode


% highly compressed symbol for numeric data. The number of channels in the symbol can be bet$een ; and , and this can be specified by setting the value of option_2. !t can also be determined by the length of the input data e.g. a three character input string generates a 4 channel code by default. The ma#imum values permitted depend on the number of channels used as sho$n in the table belo$4 *hannels ; 4 ' @ Q , 1inimum 0alue (( ((( (((( ((((( (((((( ((((((( 1a#imum 0alue 2@ 2:2 ;4:; 44(Q2 'Q@@,, QQ42,@2

-ote that Q and , channel codes re<uire a processor intensive algorithm to generate and so response times $hen generating these codes $ill be relatively slo$.

;25@9

4. StacBed S0m/ologies
4. .1 Basic S0m/ol StacBing
%n 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. +or e#ample
zint -d 'This' -d 'That'

$ill dra$ t$o Fode 92, symbols" one on top of the other. The same result can be achieved using the %&! by e#ecuting the ZBarcode_Encode() function more than once on a symbol. +or e#ample4
m+*s+mbol-'s+mbolog+ = /EF0I8;*0I8; AQerror = ./arcode*;ncode(m+*s+mbol9 5This5)error = ./arcode*;ncode(m+*s+mbol9 5That5)error = ./arcode*>rint(m+*s+mbol)-

The e#ample belo$ sho$s ' .%--9; symbols stacked in this $ay.

4. . *ode 14B ?+N 1 % %@


% more sophisticated method is to use some type of line inde#ing $hich indicates to the barcode reader $hich order the symbols should be read. This is demonstrated by Fode 9@k $hich uses a Fode92, based system $hich can stack up to 9@ ro$s in a block. This gives a ma#imum data capacity of QQ characters or 9'4 numerical digits and includes t$o modulo-9(Q check digits. Fode 9@k also supports e#tended %/F!! character encoding in the same manner as Fode 92,.

4. .% <.;)15 ?IS' 13)%6@


Keavily used in the parcel industry" the &G+49Q symbology can encode a vast amount of data into a small space. Zint supports encoding up to the !/E standard ma#imum symbol si2e of :2' code$ords $hich )at error correction level (* allo$s a ma#imum data si2e of 9,'( te#t characters" or 2Q9( digits. The $idth of the generated &G+49Q symbol can be specified at the command line using the --cols s$itch follo$ed by a number bet$een 9 and ;(" and the amount of check digit information can be specified by using the --security s$itch follo$ed by a number bet$een ( and , $here the number of code$ords used for check information is determined by 2)value S 9*. !f using the %&! 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. !nternational te#t support is provided using the ?atin-9 character set as described in %ppendi# %. % separate symbology !G can be used to encode Kealth !ndustry >arcode )K!>F* data $hich adds a leading HSH character and a modulo-4: check digit to the encoded data.

;;5@9

4. .) *ompact <.;)15
%lso kno$n as truncated &G+49Q. Eptions are as for &G+49Q above.

4. .3 Micro<.;)15 ?IS' )5 6@
% variation of the &G+49Q standard" 1icro&G+49Q is intended for applications $here symbol si2e needs to be kept to a minimum. ;4 predefined symbol si2es are available $ith 9 - 4 columns and 4 - 44 ro$s. The ma#imum si2e 1icro&G+49Q symbol can hold 2'( alphanumeric characters or ;@@ digits. The amount of error correction used is dependant on symbol si2e. The number of columns used can be determined using the --cols s$itch or option_2 as $ith &G+49Q. % separate symbology !G can be used to encode Kealth !ndustry >arcode )K!>F* data $hich adds a leading HSH character and a modulo-4: check digit to the encoded data.

4. .4 GS1 .ataBar>1) StacBed ?IS' )5 )@


% stacked variation of the G/9 Gata>ar-94 symbol re<uiring the same input )see section @.9.92.9*. The height of this symbol is fi#ed. The data is encoded in t$o ro$s of bars $ith a central finder pattern. This symbol can be generated $ith a t$odimensional component to make a composite symbol.

4. .5 GS1 .ataBar>1) StacBed 'mnidirectional ?IS' )5 )@


%nother variation of the G/9 Gata>ar-94 symbol re<uiring the same input )see section @.9.92.9*. The data is encoded in t$o ro$s of bars $ith a central finder pattern. This symbol can be generated $ith a t$o-dimensional component to make a composite symbol.

4. .6 GS1 .ataBar +"panded StacBed ?IS' )5 )@


% stacked variation of the G/9 Gata>ar .#panded symbol for smaller packages. !nput is the same as for G/9 Gata>ar .#panded )see section @.9.92.;*. !n addition the $idth of the symbol can be altered using the --cols s$itch or option_2. !n this case the number of columns relates to the number of character pairs on each ro$ of the symbol. +or symbols $ith a 2G component the number of columns must be at least 2. This symbol can be generated $ith a t$odimensional component to make a composite symbol.

4. .8 *ode )8
Geveloped in 9:,Q at !ntermec" Fode 4: is a cross bet$een &F and Fode ;:. !t it one of the earliest stacked symbologies and influenced the design of Fode 9@T a fe$ years later. !t supports full Q-bit %/F!! input up to a ma#imum of 4: characters or ,9 numeric digits. G/9 data encoding is also supported. ;45@9

4.% *omposite S0m/ols ?IS' )5 %@


Fomposite symbols employ a mi#ture of components to give more comprehensive information about a product. The permissible contents of a composite symbol is determined by the terms of the G/9 General /pecification. Fomposite symbols consist of a linear component $hich can be an .%-" &F" G/9-92, or G/9 Gata>ar symbol" a 2G component $hich is based on &G+49Q or 1icro&G+49Q" and a separator pattern. The type of linear component to be used is determined using the -b or --barcode= s$itch or by adjusting symbol->symbology as $ith other encoding methods. 0alid values are sho$n belo$. Numeric 1alue 9;( 9;9 9;2 9;; 9;4 9;' 9;@ 9;Q Name BARCODE_EANX_CC BARCODE_EAN128_CC BARCODE_RSS14_CC BARCODE_RSS_LTD_CC BARCODE_RSS_EXP_CC BARCODE_UPCA_CC BARCODE_UPCE_CC BARCODE_RSS14STACK_CC S0m/olog0 Fomposite /ymbol $ith .%- linear component Fomposite /ymbol $ith G/9-92, linear component Fomposite /ymbol $ith G/9 Gata>ar-94 linear component Fomposite /ymbol $ith G/9 Gata>ar ?imited component Fomposite /ymbol $ith G/9 Gata>ar .#tended component Fomposite /ymbol $ith &F % linear component Fomposite /ymbol $ith &F . linear component Fomposite /ymbol $ith G/9 Gata>ar-94 /tacked component Fomposite /ymbol $ith G/9 Gata>ar-94 /tacked Emnidirectional component

9;,

BARCODE_RSS14_OMNI_CC

9;:

BARCODE_RSS_EXPSTACK_CC Fomposite /ymbol $ith G/9 Gata>ar .#panded /tacked component

The data to be encoded in the linear component of a composite symbol should be entered into a primary string $ith the data for the 2G component being entered in the normal $ay. To do this at the command prompt use the --primary= command. +or e#ample4
zint -b B! --mode= --primar+=BB AB#MN$QP! -d 5<PP= AB#-abcd5

This creates an .%--9; linear component $ith the data I;;92;4'@Q,:(I and a 2G FF-% )see belo$* component $ith the data I)::*92;4-abcdI. The same results can be achieved using the %&! as sho$n belo$4
m+*s+mbol-'s+mbolog+ = B!-m+*s+mbol-'option* = -

;'5@9

strcp+(m+*s+mbol-'primar+9 5BB AB#MN$QP!5)./arcode*;ncode*and*>rint(m+*s+mbol9 5<PP= AB#-abcd5)-

.%--2 and .%--' add-on data can be used $ith .%- and &F symbols using the S symbol as described in section @.9.; and '.9.4. The 2G component of a composite symbol can use one of three systems4 FF-%" FF-> and FF-F as described belo$. The 2G component type can be selected automatically by Zint dependant on the length of the input string. %lternatively the three methods can be accessed using the --mode= prompt follo$ed by 9" 2 or ; for FF-%" FF-> or FF-F respectively" or by using the option_1 variable as sho$n above.

4.%.1 **>&
This system uses a variation of 1icro&G+49Q $hich optimised to fit into a small space. The si2e of the 2G component and the amount of error correction is determined by the amount of data to be encoded and the type of linear component $hich is being used. FF% can encode up to '@ numeric digits or an alphanumeric string of shorter length. To select FF-% use --mode=1.

4.%. **>B
This system uses 1icro&G+49Q to encode the 2G component. The si2e of the 2G component and the amount of error correction is determined by the amount of data to be encoded and the type of linear component $hich is being used. FF-> can encode up to ;;, numeric digits or an alphanumeric string of shorter length. To select FF> use --mode=2.

4.%.% **>*
This system uses &G+49Q and can only be used in conjunction $ith a G/9-92, linear component. FF-F can encode up to 2;@9 numeric digits or an alphanumeric string of shorter length. To select FF-F use --mode=3.

4.) =$o>=racB S0m/ols


4.).1 =$o>=racB <harmacode
Geveloped by ?aetus" &harmacode T$o-Track is an alternative system to &harmacode Ene-Track used for the identification of pharmaceuticals. The symbology is able to encode $hole numbers bet$een 4 and @4'Q((,(.

;@5@9

4.). <ostNet
sed by the nited /tates &ostal /ervice until 2((:" the &ost-et barcode $as used for encoding 2ip-codes on mail items. &ost-et uses numerical input data and includes a modulo-9( check digit. Dhile Zint $ill encode &ost-et symbols of any length" standard lengths as used by /&/ $ere &ost-et@ )' digits Z!& input*" &ost-et9( )' digit Z!& S 4 digit user data* and &ost-et92 )' digit Z!& S @ digit user data*.

4.).% <!&N+=
sed by the nited /tates &ostal /ervice until 2((:" the &?%-.T )&ostal %lpha -umeric .ncoding Techni<ue* barcode $as used for encoding routing data on mail items. &lanet uses numerical input data and includes a modulo-9( check digit. Dhile Zint $ill encode &?%-.T symbols of any length" standard lengths used by /&/ $ere &lanet92 )99 digit input* and &lanet94 )9; digit input*.

4.3 )>State <ostal *odes


4.3.1 &ustralia <ost )>State S0m/ols
4.3.1.1 *ustomer Barcodes
%ustralia &ost /tandard Fustomer >arcode" Fustomer >arcode 2 and Fustomer >arcode ; are ;Qbar" '2-bar and @Q-bar specifications respectively" developed by %ustralia &ost for printing Gelivery &oint !G )G&!G* and customer information on mail items. 0alid data characters are (-:" %-Z" a-2" space and hash )N*. % +ormat Fontrol Fode )+FF* is added by Zint and should not be included in the input data. Beed-/olomon error correction data is generated by Zint. .ncoding behaviour is determined by the length of the input data according to the formula sho$n in the follo$ing table4 Input !ength , 9; 9@ 9, 2; 7e,uired Input ;ormat :::::::: ::::::::%%%%% :::::::::::::::: S0m/ol !ength ;Q-bar '2-bar '2-bar ;** 99 ': ': @2 @2 +ncoding =a/le -one F F -

::::::::%%%%%%%%%% @Q-bar ::::::::::::::::::::::: @Q-bar

4.3.1. 7epl0 <aid Barcode


% Beply &aid version of the %ustralia &ost 4-/tate >arcode )+FF 4'* $hich re<uires an ,-digit G&!G input.

;Q5@9

4.3.1.% 7outing Barcode


% Bouting version of the %ustralia &ost 4-/tate >arcode )+FF ,Q* $hich re<uires an ,-digit G&!G input.

4.3.1.) 7edirect Barcode


% Bedirection version of the %ustralia &ost 4-/tate >arcode )+FF :2* $hich re<uires an ,-digit G&!G input.

4.3. .utch <ost CI( *ode


This /ymbology is used by Boyal Gutch T&G &ost )-etherlands* for &ostal code and automatic mail sorting. Gata input can consist of numbers (-: and letters %-Z and needs to be 99 characters in length. -o check digit is included.

4.3.% 7o0al Mail )>State *ountr0 *ode ?7M)S**@


The B14/FF standard is used by the Boyal 1ail in the T to encode postcode and customer data on mail items. Gata input can consist of numbers (-: and letters %-Z and usually includes delivery postcode follo$ed by house number. +or e#ample ID9U(TB(9I for 9 &icadilly Fircus in ?ondon. Fheck digit data is generated by Zint.

4.3.) US<S 'ne*ode


%lso kno$n as the !ntelligent 1ail >arcode and used in the / by the nited /tates &ostal /ervice ) /&/*" the EneFode system replaced the &ost-et and &?%-.T symbologies in 2((:. EneFode is a fi#ed length )@'-bar* symbol $hich combines routing and customer information in a single symbol. !nput data consists of a 2( digit tracking code" follo$ed by a dash )-*" follo$ed by a delivery point 2ip-code $hich can be (" '" : or 99 digits in length. +or e#ample all of the follo$ing inputs are valid data entries4
5! 5! 5! 5! AB#MN$!P#PQ$NM#BA AB#MN$!P#PQ$NM#BA AB#MN$!P#PQ$NM#BA AB#MN$!P#PQ$NM#BA 5 -! AB#5 -! AB#MN$Q5 -! AB#MN$QP 5

4.3.3 Dapanese <ostal *ode


sed for address data on mail items for Uapan &ost. %ccepted values are (-:" %-Z and Gash )-*. % modulo 9: check digit is added.

;,5@9

4.4 =$o>.imensional S0m/ols


4.4.1 .ata Matri" ?IS' 14: @
%lso kno$n as /emacode this symbology $as developed in 9:,: by %cuity Fi1atri# in partnership $ith the / GoG and -%/%. The symbol can encode a large amount of data in a small area. Gata 1atri# can encode any characters in the ?atin-9 set and can also encode G/9 data. The si2e of the generated symbol can also be adjusted using the --vers= option or by setting option_2 as sho$n in the table belo$. % separate symbology !G can be used to encode Kealth !ndustry >arcode )K!>F* data $hich adds a leading HSH character and a modulo-4: check digit to the encoded data. -ote that only .FF2(( encoding is supported" the older standards have no$ been removed from Zint. Input 9 2 ; 4 ' @ Q , : 9( 99 92 9; 94 9' S0m/ol Si9e 9( # 9( 92 # 92 94 # 94 9@ # 9@ 9, # 9, 2( # 2( 22 # 22 24 # 24 2@ # 2@ ;2 # ;2 ;@ # ;@ 4( # 4( 44 # 44 4, # 4, '2 # '2 Input 9@ 9Q 9, 9: 2( 29 22 2; 24 2' 2@ 2Q 2, 2: ;( S0m/ol Si9e @4 # @4 Q2 # Q2 ,( # ,( ,, # ,, :@ # :@ 9(4 # 9(4 92( # 92( 9;2 # 9;2 944 # 944 , # 9, , # ;2 92 # 2@ 92 # ;@ 9@ # ;@ 9@ # 4,

%n e#tra feature is available for Gata 1atri# symbols $hich allo$s Zint to automatically resi2e the symbol as re<uired but also prevents Zint from using rectangular symbols. To set this mode at the command line use the option --square and $hen using the %&! set the value option_3 = DM_SQUARE.

;:5@9

4.4. E7 *ode ?IS' 16::)@


%lso kno$n as Quick Besponse Fode this symbology $as developed by Genso. +our levels of error correction are available using the security= option or setting option_1 as sho$n in the follo$ing table. Input 9 2 ; 4 +** !e-el ? )default* 1 Q K +rror *orrection *apacit0 %ppro# 2(Z of symbol %ppro# ;QZ of symbol %ppro# ''Z of symbol %ppro# @'Z of symbol 7eco-er0 *apacit0 %ppro# QZ %ppro# 9'Z %ppro# 2'Z %ppro# ;(Z

The si2e of the symbol can be set by using the vers= option or setting option_2 to the QB Fode version re<uired )9-4(*. The si2e of symbol generated is sho$n in the table belo$. Input 9 2 ; 4 ' @ Q , : 9( 99 92 9; 94 9' 9@ 9Q 9, S0m/ol Si9e 29 # 29 2' # 2' 2: # 2: ;; # ;; ;Q # ;Q 49 # 49 4' # 4' 4: # 4: '; # '; 'Q # 'Q @9 # @9 @' # @' @: # @: Q; # Q; QQ # QQ ,9 # ,9 ,' # ,' ,: # ,: Input 29 22 2; 24 2' 2@ 2Q 2, 2: ;( ;9 ;2 ;; ;4 ;' ;@ ;Q ;, 4(5@9 S0m/ol Si9e 9(9 # 9(9 9(' # 9(' 9(: # 9(: 99; # 99; 99Q # 99Q 929 # 929 92' # 92' 92: # 92: 9;; # 9;; 9;Q # 9;Q 949 # 949 94' # 94' 94: # 94: 9'; # 9'; 9'Q # 9'Q 9@9 # 9@9 9@' # 9@' 9@: # 9@:

9: 2(

:; # :; :Q # :Q

;: 4(

9Q; # 9Q; 9QQ # 9QQ

The ma#imum capacity of a )version 4(* QB Fode symbol is Q(,: numeric digits" 42:@ alphanumeric characters or 2:'; bytes of data. QB Fode symbols can also be used to encode G/9 data. QB Fode symbols can encode characters in the ?atin-9 set and Tanji characters $hich are members of the /hift-U!/ encoding scheme. !nput should be entered as a T+-, stream $ith conversion to /hift-U!/ being carried out automatically by Zint. % separate symbology !G can be used to encode Kealth !ndustry >arcode )K!>F* data $hich adds a leading HSH character and a modulo-4: check digit to the encoded data.

4.4.% Micro E7 *ode ?IS' 16::)@


% miniature version of the QB Fode symbol for short messages. .FF levels can be selected as for QB Fode )above*. QB Fode symbols can encode characters in the ?atin9 set and Tanji characters $hich are members of the /hift-U!/ encoding scheme. !nput should be entered as a T+-, stream $ith conversion to /hift-U!/ beingcarried out automatically by Zint. % preferred symbol si2e can be selected by using the vers= option or by setting option_2 although the actual version used by Zint may be different if re<uired by the input data. The table belo$ sho$s the possible si2es4 Input 9 2 ; 4 19 12 1; 14 1ersion S0m/ol Si9e 99 # 99 9; # 9; 9' # 9' 9Q # 9Q

4.4.) Ma"icode ?IS' 14: %@


Geveloped by &/ the 1a#icode symbology employs a grid of he#agons surrounding a Hbulls-eyeH finder pattern. This symbology is designed for the identification of parcels. 1a#icode symbols can be encoded in one of five modes. !n modes 2 and ; 1a#icode symbols are composed of t$o parts named the primary and secondary messages. The primary message consists of a structured data field $hich includes various data about the package being sent and the secondary message usually consists of address data in a data structure. The format of the primary message re<uired by Zint is given in the follo$ing table4

495@9

*haracters

Meaning &ostcode data $hich can consist of up to : digits )for mode 2* or up to @ alphanumeric characters )for mode ;*. Bemaining unused characters should be filled $ith the /&%F. character )%/F!! ;2*. Three digit country code according to !/E ;9@@ )see %ppendi# >*. Three digit service code. This depends on your parcel courier.

9-:

9(-92 9;-9'

The primary message can be designated at the command prompt using the --primary= s$itch. The secondary message uses the normal data entry method. +or e#ample4
zint -o test.eps -b M$ --primar+='PPPPPPPPPQ#!! A' -d '6econdar+ Lessage Rere'

Dhen using the %&! the primary message must be placed in the symbol->primary string. The secondary is entered in the same $ay as described in section '.2. Dhen either of these modes is selected Zint $ill analyse the primary message and select either mode 2 or mode ; as appropriate. 1odes 4 to @ can be accessed using the --mode= s$itch or by setting option_1. 1odes 4 to @ do not re<uire a primary message. +or e#ample4
zint -o test.eps -b M$ --mode=# -d 'E Laxi0ode Lessage in Lode #'

1ode @ is reserved for the maintenance of scanner hard$are and should not be used to encode user data. %ll modes support e#tended %/F!! characters and number compression. The ma#imum length of te#t $hich can be placed in a 1a#icode symbol depends on the type of characters used in the te#t. .#ample ma#imum data lengths are given in the table belo$4 Ma"imum .ata Ma"imum .ata !ength #or !ength #or *apital !etters Numeric .igits ,4 ,4 :; QQ :; 92@ 92@ 9;' 99( 9;' '( '( '( @@ '( Num/er o# +rror *orrection *ode$ords

Mode

2 )secondary only* ; )secondary only* 4 ' @

425@9

4.4.3 &9tec *ode ?IS' )556@


!nvented by %ndre$ ?ongacre at Delch %llyn !nc in 9::' the %2tec Fode symbol is a matri# symbol $ith a distinctive bulls-eye finder pattern. Zint can generate Fompact %2tec Fode )sometimes called /mall %2tec Fode* as $ell as Ifull-rangeI %2tec Fode symbols and by default $ill automatically select symbol type and si2e dependent on the length of the data to be encoded. .rror correction code$ords $ill normally be generated to fill at least 2;Z of the symbol. T$o options are available to change this behaviour4 The si2e of the symbol can be specified using the --ver= option or setting option_2 to a value bet$een 9 and ;@ according to the follo$ing table. The symbols marked $ith an asterisk )P* in the table belo$ are IcompactI symbols" meaning they have a smaller bulls-eye pattern at the centre of the symbol. Input 9 2 ; 4 ' @ Q , : 9( 99 92 9; 94 9' 9@ 9Q 9, S0m/ol Si9e 9' # 9'P 9: # 9:P 2; # 2;P 2Q # 2QP 9: # 9: 2; # 2; 2Q # 2Q ;9 # ;9 ;Q # ;Q 49 # 49 4' # 4' 4: # 4: '; # '; 'Q # 'Q @9 # @9 @Q # @Q Q9 # Q9 Q' # Q' Input 9: 2( 29 22 2; 24 2' 2@ 2Q 2, 2: ;( ;9 ;2 ;; ;4 ;' ;@ S0m/ol Si9e Q: # Q: ,; # ,; ,Q # ,Q :9 # :9 :' # :' 9(9 # 9(9 9(' # 9(' 9(: # 9(: 99; # 99; 99Q # 99Q 929 # 929 92' # 92' 9;9 # 9;9 9;' # 9;' 9;: # 9;: 94; # 94; 94Q # 94Q 9'9 # 9'9

-ote that in symbols $hich have a specified si2e the amount of error correction is dependent on the length of the data input and Zint $ill allo$ error correction capacities as lo$ as ; code$ords. %lternatively the amount of error correction data can be specified by use of the --mode= option or 4;5@9

by setting option_1 to a value from the follo$ing table4 Mode 9 2 ; 4 +rror *orrection *apacit0 \9(Z S ; code$ords \2;Z S ; code$ords \;@Z S ; code$ords \'(Z S ; code$ords

!t is not possible to select both symbol si2e and error correction capacity for the same symbol. !f both options are selected then the error correction capacity selection $ill be ignored. %2tec Fode is able to encode any e#tended %/F!! character data up to a ma#imum length of appro#imately ;,2; numeric or ;(@Q alphabetic characters or 9:94 bytes of data. % separate symbology !G can be used to encode Kealth !ndustry >arcode )K!>F* data $hich adds a leading HSH character and a modulo-4: check digit to the encoded data.

4.4.4 &9tec 7unes


% truncated version of compact %2tec Fode for encoding $hole integers bet$een ( and 2''. !ncludes Beed-/olomon error correction. %s defined in !/E5!.F 24QQ, %nne# %.

4.4.5 *ode 'ne


% matri# symbology developed by Ted Dilliams in 9::2 $hich encodes data in a $ay similar to Gata 1atri#. Fode Ene is able to encode the ?atin-9 character set or G/9 data. There are t$o types of Fode Ene symbol - variable height symbols $hich are roughly s<uare )versions % thought to K* and fi#ed-height versions )version / and T*. These can be selected by using --vers= or setting option_2 as sho$n in the table belo$4 Input 9 2 ; 4 ' @ Q , : 1ersion % > F G . + G K / Si9e 9@ # 9, 22 # 22 2, # ;2 4( # 42 '2 # '4 Q( # Q@ 9(4 # :, 94, # 9;4 ,J height Numeric .ata *apacit0 22 44 9(4 29Q 4;' ,,@ 9Q'' ;''( 9, &lphanumeric .ata *apacit0 9; 2Q @4 9;' 2Q9 ''; 9(:@ 229, n5a

445@9

9(

9@J height :(

''

0ersion / symbols can only encode numeric data. The $idth of version / and version T symbols is determined by the length of the input data.

4.4.6 Grid Matri"


The most recently developed encoding standard to be supported by Zint" Grid 1atri# became an %!1 standard in Gecember 2((,. The encoding allo$s ?atin9 and Fhinese characters $ithin the G> 2;92 standard set to be encoded in a checkerboard pattern. !nput should be entered as a T+-, stream $ith conversion to G> 2;92 being carried out automatically by Zint. The si2e of the symbol and the error correction capacity can be specified. !f you specify both of these values then Zint $ill make a Hbest-fitH attempt to satisfy both conditions. The symbol si2e can be specified using the ver8 option or by setting option62" and the error correction capacity can be specified by using the security8 option or by setting option69 according to the follo$ing tables4 Input 9 2 ; 4 ' @ Q , : 9( 99 92 9; 9, # 9, ;( # ;( 42 # 42 '4 # '4 @@ # @@ Q, # Q, :(# :( 9(2 # 9(2 994 # 994 92@ # 92@ 9;, # 9;, 9'( # 9'( 9@2 # 9@2 Si9e

4'5@9

Mode 9 2 ; 4 '

+rror *orrection *apacit0 %ppro#imately 9(Z %ppro#imately 2(Z %ppro#imately ;(Z %ppro#imately 4(Z %ppro#imately '(Z

4.5 'ther Barcode>!iBe MarBings


4.5.1. ;acing Identi#ication MarB ?;IM@
sed by the nited /tates &ostal /ervice ) /&/*" the +!1 symbology is used to assist automated mail processing. There are only 4 valid symbols $hich can be generated using the characters %-G as sho$n in the table belo$. *ode !etter % > F G Usage sed for courtesy reply mail and metered reply mail $ith a preprinted &ost-et symbol. sed for business reply mail $ithout a pre-printed 2ip code. sed for business reply mail $ith a pre-printed 2ip code. sed for !nformation >ased !ndicia )!>!* postage.

4.5. ;lattermarBen
sed for the recognition of page se<uences in print-shops" the +lattermarken is not a true barcode symbol and re<uires precise kno$ledge of the position of the mark on the page. The +lattermarken system can encode any length numeric data and does not include a check digit.

4.5.% .&;= *ode


This is a method for creating 4-state codes $here the data encoding is provided by an e#ternal program. !nput data should consist of the letters HGH" H%H" H+H and HTH $here these refer to descender" ascender" full )ascender and descender* and tracker )neither ascender nor descender* respectively. %ll other characters are ignored.

4@5@9

5. !egal and 1ersion In#ormation


5.1 !icense
Zint" libzint and Zint >arcode /tudio are Fopyright A 2(99 Bobin /tuart and are distributed under the terms of the G- General &ublic ?icense version ; or later. /ee the file COPYING for more information. The follo$ing terms form part of the G&?4 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. Qt4 code is Fopyright A 2((: >ogGan 0atra" used under the terms of the G- General &ublic ?icence. /ome Gata 1atri# code is Fopyright A 2((4 %drian Tennard" %ndre$s Y %rnold ?td and A 2((@ /tefan /chmidt" used under the terms of the G- General &ublic ?icence. Beed-/olomon code is Fopyright A 2((4 Fliff Kones" used under the terms of the G- General &ublic ?icence. &ortions of G/9 Gata>ar and Fomposite /ymbology code are Fopyright A 2((@ !/E5>/! Global and used $ith permission. &ortions of EneFode code is A 2((@ nited /tates &ostal /ervice. This is indicated $here 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. Telepen is a trademark of /> .lectronic /ystems ?td. QB Fode is a registered trademark of Genso Dave !ncorporated. 1icrosoft" Dindo$s and the Dindo$s logo are either registered trademarks or trademarks of 1icrosoft Forporation in the nited /tates and5or other countries. Zint.org.uk $ebsite design and hosting provided by Bobert .lliott.

5. <atent Issues
%ll of the code in Zint is developed using information in the public domain" usually freely available on the !nternet. /ome of the techni<ues used may be subject to patents and other intellectual property legislation. !t is my belief that any patents involved in the technology underlying symbologies utilised by Zint are HunadoptedH" that is the holder does not object to their methods being used. !f" ho$ever" you are a patent holder or hold any other intellectual property rights on the methods used by Zint or the symbologies $hich Zint generates" and do not $ant Zint to continue to support your symbology then please contact me and ! $ill update the code to accommodate your 4Q5@9

$ishes at the soonest opportunity. %ny methods patented or o$ned by third parties or trademarks or registered trademarks used $ithin Zint or in this document are and remain the property of their respective o$ners and do not indicate endorsement or affiliation $ith those o$ners" companies or organisations.

5.% 1ersion In#ormation


v(.9 - )as ebar* Gra$s &F-%. &F-." .%--," .%--9;" !nterlaced 2 of '" Fodabar" Fode ;:" .#tended Fode ;: and Fode :; barcodes and %dd-on codes .%--2 and .%--' $ithout parity. 9;59952((@ v(.2 - %dded Fode 92, )$hich is no$ the default*" Fode 99" Fode 2 of '" %dd-on codes .%--2 and .%--' parity and 1/!5&lessey $ithout check digit. 9259252((@ v(.; - %dded 1/!5&lessey 1od 9( check and 2 # 1od 9( check options" Telepen %/F!! and Telepen numeric" &ostnet" B14/FF. Fode has been tidied up <uite a bit. >ind option added. ;(59252((@ v(.4 - %dded barcode stacking )no$ stacks up to 9@ barcodes* and Fode9@k )stub*. 9'5952((Q v(.' - %dded %ustralia &ost 4-/tate >arcodes and &harmacode )9 and 2 track*. 4-state codes no$ dra$ $ith correct height5$idth ratio. 2,5252((Q v(.@ - %dded &lessey and some derivative codes ).%--92," Fode 92, subset >" %uspost Beply" %uspost Bouting" %uspost Bedirect" !T+-94*. Tidied up code again4 separated symbologies into more files and put all lookup tables into arrays )much reducing the amount of code" especially for Fode ;:e and Fode :;*. .rrors no$ output to stderr. %dded proper input verification. Gistribution no$ packs $ith KT1? pages instead of separate B.%G1.. Eutputs to &-G. Eutputs colour. ser variable $hitespace and border $idth. >o# option. +i#ed .%- add-on bug. %dded $hitespace and height options. &roject name changed to Zint to avoid conflict $ith e#tant trade name. %dded escape character input. 95452((Q v9.( - Forrected problem $ith escape character codes. /upports &G+49Q. This completes the list of features ! originally $anted )plus a fe$ more*" hence skip to version 9.(. 2(5452((Q v9.9 - %dded more derivatives )Fode 2 of ' 1atri#" !%T% and Gata ?ogic" Truncated &G+49Q" Geutsche &ost ?eitcode and !dentcode" &harma2entralnummer" &lanet* and +lattermarken. Tidied up 2 of ' code. 2@5452((Q v9.2 - /upports Gata 1atri# )by absorption of !.F9@(22 code by /tefan /chmidt et al*. %dded reverse colours" +!1" 1/!5&lessey 1odulo 99 and 1odulo 9959(. Forrected Fode 9@k check digit calculation. 2,5'52((Q v9.; - /upports /&/ EneFode and ?EG1%B/. >rought all usage information into one ser 1anual document. 9;5@52((Q v9.4 - %dded -0.-9, support. Forrected some problems $ith compilation and input verification. Fommand line option handling no$ uses getopt)*" and all the s$itches have changed. %dded --font option. 2(5@52((Q v9.' - &ulled everything together to make an %&!. Forrected errors $ith .%--9;" &G+49Q and ?EG1%B/. %dded .&/ output. %dded QB Fode support using lib<rencode. Forrected !/>verification error. Be-compiled documentation in KT1? form. &ut in place proper error handling 4,5@9

routines. --font option removed. .ncoding is no$ done $ith a restructured 2int6symbol structure. %dded make install option and optional QB Fode support to 1akefile. Forrected minor problem $ith 4-/tate Fodes. Bestructured code into fe$er source code files. %dded 1icro&G+49Q support. 925,52((Q v9.'.9 - %dded formatting code to .&/ output of .%- and &F symbols according to .Q:Q49::@. Fhecked against and" $here appropriate" altered or corrected to comply $ith !/E 9@;,, and !/E 9'49Q including ?atin-9 support. %ltered default image settings" added automatic !T+ border. Forrected error $ith /&/ EneFode. Tidied up Fode ;: <uite a bit" added 1od 4; options. ;5:52((Q v9.'.2 - %dded e#tended %/F!! support to Fode 9@k. Forrected Fode 92, error. %dded 1a#icode support by integrating code by Uohn ?ien. 2@5:52((Q v9.'.; - 1ade huge corrections to 1a#icode support by removing and re-$riting much of UohnHs code. 1a#icode no$ supports e#tended %/F!! and modes 4" ' and @. 9(59(52((Q v9.'.4 - %dded G/9 Gata>ar )Beduced /pace /ymbology* support. 2@59952((Q v9.'.' - %dded composite symbology support. Forrected errors $ith G/9-92, and &G+49Q51icro&G+49Q byte processing. Transferred licence to G&? version ;. :5;52((, v9.@ - Gata 1atri#" 1a#icode and %ustralia &ost no$ use common Beed-/olomon functions - this also fi#es a bug in 1a#icode error correction and replaces the last of the ?ien code. %dded &-G output for 1a#icode symbols. Bemoved some useless code. pdated QB support for lib%rencode v2.(.(. 225452((, v9.@.9 - 1ajor restructuring of &-G generating code4 -o$ dra$s &F% and .%- symbols properly and puts human readable te#t into the image. %lso corrected some nasty Hnever ending loopH bugs in Fode 92, and check digit bugs in &ost-et and &lanet. ,5Q52((, v9.@.2 - %dded T!J Fode support and &-G image rotation. Forrected a bug affecting e#tended %/F!! support in Fode 92, and Fode 9@k. 2,5Q52((,. v2.( beta - %dded support for %2tec Fode" Fodablock-+" Fode ;2" .%--94 and G%+T Fode. Bearranged symbology numbers to match Tbarcode v,. Forrected a never ending loop bug in .%-92,. 2:5:52((, v2.( beta r2 - 1any corrections and bugfi#es. )Fode 99" Fode 92," .%--92," %2tec Fode" Fodablock-+" Fode 9@k" &ostnet" &?%-.T" -0.-9," &Z-" Gata 1atri#" 1a#icode and QB Fode* v2.( - 1ade corrections to %2tec Fode and tested output $ith bcTester. %dded %2tec Bunes" 1icro QB Fode and Gata 1atri# .FF (((-94(. pdated e-mail information. 9,59952((, v2.9 - Beinstated Torea &ost barcodes" harmonised bind and bo# options" moved nicode handling into backend and added input6mode option" added si2e options to Gata 1atri#" added - ?? character handling for Fodablock-+" Fode 92," Fode 9@k" .#tended Fode ;:" Fode :;" Telepen" 1a#icode" Gata 1atri# .FF 2((" &G+49Q and 1icro&G+49Q. %dded G/9 support for Fode 9@k" Fodablock-+ and %2tec Fode. %dded scale and direct to stdout options. Bebult Gata 1atri# .FF 2(( encoding algorithms to support - ?? encoding and G/9 data encoding. ;95952((: v2.9.9 - 1inor Gata 1atri# bugfi# and added K!>F options. 9(5252((: v2.9.2 - %dded /0G output option. !mproved Uapanese character support including nicode \ 4:5@9

/hift-U!/ capability. >ugfi#es for Gata 1atri# )missing characters at end of string* and Fodablock-+ )T95T2 check digit and ro$ indicators above ro$ @*. 95;52((: v2.9.; - 1any improvements to the QZint G ! $hich is no$ renamed IZint >arcode /tudio (.2I. %dded Uapanese &ostal >arcode" Fode 4: and Fhannel Fode and made corrections to Gata 1atri# )>inary mode data compression terminates too soon*" %2tec Fode )>ug $hen automatically resi2ing after removing Iall (I and Iall 9I code$ords* and Fode 92, ).#tended %/F!! characters become corrupt*. 9:5'52((: v2.9.4 - 1any stability improvements including removal of buffer overruns in Fode ;:" ?EG1%B/" &Z-" %2tec Fode and Fomposite FF-%. %ddition of files for compiling on 1/ Dindo$s platform - tested successfully on J& and 0ista. 9:5@52((: v2.2 - %dded Fode Ene and G/9 support in Fode 4:. Fhanged G ! binary name to 2int-<t and brought G ! up to version 9.(. 1ade some minor bugfi#es to Fode ;:" !T+-94" %2tec Fode" Fode 92, and Fode 9@T. %dded HrestH button to G !. !ncluded .spec file from Badist. 9,5Q52((: v2.2.9 - Gata encoding bugfi#es for %2tec Fode" Gata 1atri#" /&/ Ene Fode and &G+49Q. /ymbol plotting bugfi#es for 1icro&G+49Q and 2G components of composite symbols. Te#t formatting bugfi# for Qt renderer and a couple of compiler fi#es for 1/0F &-G image output. @5,52((: v2.2.2 - % beta release previe$ing the ne$ %&! structure. >etter - ?? character support $ith InullcharI value removed. %dded loading from file and se<uence dialogs in >arcode /tudio. 2:5:52((: v2.; - +i#ed problems $ith 1icro QB Fode and rebuilt QB Fode support removing dependence on lib<rencode. !mproved Tanji character support for QB Fode and 1icro QB Fode $hich no$ autodetects and automatically converts to /hift-U!/. %dded Grid 1atri# symbology $ith Tanji character support and automatic conversion to G> 2;92. Bemoved no6<r compile option. %dvanced >arcode /tudio version number to match library version number. 2;59952((: v2.;.9 - Bemoved Fodablock-+. Bedesigned scale function so that human readable te#t and 1a#icode symbols can be scaled consistently. Forrected encoding bugs $ith Fode 92,5Fode 9@k and Gata 1atri# .FF ('(. %dded --note#t option to F?!. Q5;52(9( v2.;.2 - Forrected many bugs in G/9 Gata>ar .#tended thanks to the careful study of the code by &ablo Erdu]a at the &!B%m!G. project. /imilarly corrected some bugs in 1a#icode thanks to 1onica /$anson at /ource Technologies. %lso minor bugfi#es for !/>- and %2tec Fode" and added some small features like a --s<uare option in the F?!. 2:5'52(9( v2.4 - >uilt e#tensions to the %&! for integrating $ith glabels $ith thanks to /am ?o$n and Uim .vins. %dded code optimisation and input from stdin thanks to !smael ?uceno. Beinstated escape character input. /implification of >arcode /tudio. 9;5:52(9( v2.4.9 Y 2.4.2 C % $hole host of bugfi#es including correction of .FF routines for Fode-9 and addition of batch processing at the command line.

5.) Sources o# In#ormation


>elo$ is a list of some of the sources used in rough chronological order4 -ick UohnsonHs >arcode /pecifications '(5@9

>ar Fode 9 /pecification /ource &age /> .lectronic /ystems Telepen $ebsite &harmacode specifications from ?aetus 1orovia B14/FF specification %ustalia &ostHs H% Guide to &rinting the 4-/tate >arcodeH and bcsample source code &lessey algorithm from G- ->arcode v(.:, by ?eonid %. >roukhis G/9 General /pecifications v ,.( !ssue 2 &-G4 The Gefinitive Guide and $png source code by Greg Beolofs &G+49Q specification and pdf49Q source code by Grand Zebu >arcode Beference" T>arFode5J ser Gocumentation and T>arFode5J demonstration program from Tec-!t !.F9@(22 source code by /tefan /chmidt et al nited /tates &ostal /ervice /pecification /&/->-;2(( %dobe /ystems !ncorporated .ncapsulated &ost/cript +ile +ormat /pecification >/! Enline ?ibrary ?ibdmt# Gata 1atri# decoding library

5.3 Standard *ompliance


Zint $as developed to provide compliance $ith the follo$ing >ritish and international standards4 >/ .- Q:Q49::@ >ar coding - /ymbology specifications - H.%-5 &FH >/ .- Q:,49::@ >ar coding - /ymbology specifications - HFodabarH >/ !/E5!.F 92;2;42((' %!GF technologies - /ymbology specifications - Fode 9@T >/ !/E5!.F 9'49Q42((Q !nformation technology - %utomatic identification and data capture techni<ues - Fode 92, bar code symbology specification >/ !/E5!.F 9'4;,42((@ !nformation technology - %utomatic identification and data capture techni<ues - &G+49Q bar code symbology specification >/ !/E5!.F 9@(2242((@ !nformation technology - %utomatic identification and data capture techni<ues - Gata 1atri# bar code symbology specification >/ !/E5!.F 9@(2;42((( !nformation technology - !nternational symbology specification 1a#icode >/ !/E5!.F 9@;,,42((Q !nformation technology - %utomatic identification and data capture techni<ues - Fode ;: bar code symbology specification >/ !/E5!.F 9,((442((@ !nformation technology - %utomatic identification and data capture '95@9

techni<ues - QB Fode 2((' bar code symbology specification >/ !/E5!.F 24Q2;42((@ !nformation technology - %utomatic identification and data capture techni<ues - .%-. FF Fomposite bar code symbology specification >/ !/E5!.F 24Q2442((@ !nformation technology - %utomatic identification and data capture techni<ues - Beduced /pace /ymbology )B//* bar code symbology specification >/ !/E5!.F 24Q2,42((@ !nformation technology - %utomatic identification and data capture techni<ues - 1icro&G+49Q bar code symbology specification !/E5!.F 24QQ,42((, !nformation technology - %utomatic identification and data capture techni<ues - %2tec Fode bar code symbology specification niform /ymbology /pecification Fode Ene )%!1 !nc." 9::4* %-/!5%!1 >F92-9::, - niform /ymbology /pecification Fhannel Fode %-/!5%!1 >F@-2((( - niform /ymbology /pecification Fode 4: %-/!5K!>F 2.;-2((: - The Kealth !ndustry >ar Fode )K!>F* /upplier ?abeling /tandard %!1G(94 )v 9.@;* - !nformation technology" %utomatic identification and data capture techni<ues >ar code symbology specification - Grid 1atri# )Beleased :th Gec 2((,* G/9 General /pecifications 0ersion ,.(

&. *haracter +ncoding


This section is intended as a <uick reference to the character sets used by Zint. %ll symbologies use standard %/F!! input as sho$n in section %.9" but some support e#tended character support as sho$n in the subse<uent section.

&.1 &S*II Standard


The ubi<uitous %/F!! standard is $ell kno$n to most computer users. !tHs reproduced here for reference. He" : 1 : - ?? /EK /TJ % ) 3 4 5 .TJ .ET .-Q %FT >.? 1 G?. GF9 GF2 GF; GF4 -%T /3.T> /&%F. _ I N O Z Y H % ( 9 2 ; 4 ' @ Q '25@9 ) = % > F G . + G 0 D 3 & Q B / 3 4 ^ a b c d e f g 5 p < r s t u v $

6 8 & B * . + ;

>/ T%> ?+ 0T ++ FB /E /!

F%.1 / > ./F +/ G/ B/ /

) * P S " . 5

, : 4 ` b 8 \ 7

K ! U T ? 1 E

J 3 Z V R W e 6

h i j k l m n o

# y 2 a c d X G.?

&. !atin &lpha/et No 1 ?IS' 6638>1@


% common e#tension to the %/F!! standard" ?atin-9 is used to e#pand the range of Fode 92," &G+49Q and other symbols. !nput strings should be in nicode format. He" : 1 6 8 & ->/& j o % ) 3 4 5 6 8 & B * . + u { A /K3 B f k p v | * g l q w } . h m r x ~ + [ n s y ; i ] t z

';5@9

B. =hree .igit *ountr0 *odes ?IS' %144@


>elo$ are some of the three digit country codes as determined by !/E ;9@@ for use $ith 1a#icode symbols.
E?KRE2G6TE2 E4E28 G64E286 E4/E2GE E4K;FGE EL;FG0E2 6ELIE E28IFFE E2KI4E E2K3G44E E2TEF0TG0E E2TGK3E E28 /EF/38E EFK;2TG2E EFL;2GE EF3/E E36TFE4GE E36TFGE E.;F/EGSE2 /ERELE6 /ERFEG2 /E2K4E8;6R /EF/E8I6 /;4EF36 /;4KG3L /;4G.; /;2G2 /;FL38E /R3TE2 /I4GHGE /I62GE E28 R;F.;KIHG2E /IT6DE2E /I3H;T G64E28 /FE.G4 /FGTG6R G28GE2 I0;E2 T;FFGTIFT /F32;G 8EF366E4EL /34KEFGE /3FUG2E ?E6I /3F328G 0EL/I8GE 0EL;FII2 0E2E8E 0E>; H;F8; 0ETLE2 G64E286 0;2TFE4 E?FG0E2 F;>3/4G0 0RE8 0RG4; 0RG2E 0RFG6TLE6 G64E28 0I0I6 (U;;4G2K) G64E286 0I4IL/GE 0ILIFI6 0I2KI !!# A#Q !!Q ! A ! N !A! !A# NN! ! ! !AQ !BA !M !MB !BN !#! !B !## !#Q !M! !MA A !MN !Q# A!# !N! !N# !NQ !$! !$A !$# !$N !QN !PN !! QM# !Q N A! A# BA BN #! #Q MA MN NA NN $! $# $Q

'45@9

0I2KI9 TR; 8;LI0FETG0 F;>3/4G0 I? TR; 0IIU G64E286 0I6TE FG0E 0IT; 8'GHIGF; 0FIETGE 03/E 0T>F36 0.;0R F;>3/4G0 8;2LEFU 8SG/I3TG 8ILG2G0E 8ILG2G0E2 F;>3/4G0 ;03E8IF ;KT>T ;4 6E4HE8IF ;V3ETIFGE4 K3G2;E ;FGTF;E ;6TI2GE ;TRGI>GE ?E4U4E28 G64E286 (LE4HG2E6) ?EFI; G64E286 ?GSG ?G24E28 ?FE20; ?F;20R K3GE2E ?F;20R >I4T2;6GE ?F;20R 6I3TR;F2 T;FFGTIFG;6 KE/I2 KEL/GE K;IFKGE K;FLE2T KRE2E KG/FE4TEF KF;;0; KF;;24E28 KF;2E8E K3E8;4I3>; K3EL K3ET;LE4E K3;F26;T K3G2;E K3G2;E-/G66E3 K3TE2E REGTG R;EF8 G64E28 E28 L08I2E48 G64E286 RI4T 6;; (HETG0E2 0GTT 6TET;) RI283FE6 RI2K UI2K R32KEFT G0;4E28 G28GE G28I2;6GE GFE2 (G64ELG0 F;>3/4G0 I?) GFEV GF;4E28 G64; I? LE2 G6FE;4 GTE4T SELEG0E SE>E2 S;F6;T

Q! Q# QQ BQ# P PA PN A!B A!Q ANA A A A # A Q Q Q AAA AAN ABA ABB AB ABQ AB# A#A A#N AM! AM# AMQ AN! ANN A$! ANQ A$N AQQ APA B!! B!# B!Q B A B N BA! QB BA# NA# BAQ BBA BB# BBN B#! B## B#Q BMA BMN BN! BN# BNQ B$A QBB B$N BQ! BQQ BPA QBA

''5@9

SIF8E2 UE.EUR6TE2 U;2TE UGFG/ETG UIF;E9 8;LI0FETG0 >;I>4;'6 F;>3/4G0 I? UIF;E9 F;>3/4G0 I? U3DEGT UTFKT.6TE2 4EI >;I>4;'6 8;LI0FETG0 F;>3/4G0 4ETHGE 4;/E2I2 4;6ITRI 4G/;FGE 4G/TE2 EFE/ SELERGFGTE 4G;0RT;26T;G2 4GTR3E2GE 43O;L/I3FK LE0EI LE0;8I2GE9 TR; ?IFL;F T3KI64EH F;>3/4G0 I? LE8EKE60EF LE4EDG LE4ET6GE LE48GH;6 LE4G LE4TE LEF6RE44 G64E286 LEFTG2GV3; LE3FGTE2GE LE3FGTG36 LETITT; L;OG0I LG0FI2;6GE9 ?;8;FET;8 6TET;6 I? LI48IHE9 F;>3/4G0 I? LI2E0I LI2KI4GE LI2T;2;KFI LI2T6;FFET LIFI00I LI.EL/GV3; LTE2LEF 2ELG/GE 2E3F3 2;>E4 2;TR;F4E286 2;TR;F4E286 E2TG44;6 2;D 0E4;8I2GE 2;D .;E4E28 2G0EFEK3E 2GK;F 2GK;FGE 2G3; 2IF?I4U G64E28 2IFTR;F2 LEFGE2E G64E286 2IFDET ILE2 >EUG6TE2 >E4E3 >E4;6TG2GE2 T;FFGTIFT9 I003>G;8 >E2ELE >E>3E 2;D K3G2;E >EFEK3ET

#!! BPQ #!# APN #!Q # ! # # # $ # Q #AQ #AA #AN #B! #B# #BQ ##! ##A ##N Q!$ #M! #M# #MQ #NA #NN #$! MQ# #$# #$Q #Q! $M #Q# MQB #PQ #PA #PN #PP M!! M!# M!Q !# M N MA! MA# MAQ MB! M#! MM# MMQ MNA MNN M$! M$# MQ! M$Q M A MQN MQM A$M MP MPQ N!!

'@5@9

>;F3 >RG4G>>G2;6 >GT0EGF2 >I4E28 >IFT3KE4 >3;FTI FG0I VETEF F;32GI2 FILE2GE F366GE2 ?;8;FETGI2 FDE28E 6EG2T R;4;2E 6EG2T UGTT6 E28 2;HG6 6EG2T 430GE 6EG2T >G;FF; E28 LGV3;4I2 6EG2T HG20;2T E28 TR; KF;2E8G2;6 6ELIE 6E2 LEFG2I 6EI TIL; E28 >FG20G>; 6E38G EFE/GE 6;2;KE4 6;F/GE 6;T0R;44;6 6G;FFE 4;I2; 6G2KE>IF; 64IHEUGE 64IH;2GE 6I4ILI2 G64E286 6ILE4GE 6I3TR E?FG0E 6I3TR K;IFKGE E28 TR; 6I3TR 6E28DG0R G64E286 6>EG2 6FG 4E2UE 638E2 63FG2EL; 6HE4/EF8 E28 SE2 LET;2 6T. R;4;2E 6T. >G;FF; E28 LGV3;4I2 6DE.G4E28 6D;8;2 6DGT.;F4E28 6TFGE2 EFE/ F;>3/4G0 TEGDE29 >FIHG20; I? 0RG2E TESGUG6TE2 TE2.E2GE9 32GT;8 F;>3/4G0 I? TREG4E28 TGLIF-4;6T; TIKI TIU;4E3 TI2KE TFG2G8E8 E28 TI/EKI T32G6GE T3FU;T T3FUL;2G6TE2 T3FU6 E28 0EG0I6 G64E286 T3HE43 3KE28E 3UFEG2; 32GT;8 EFE/ ;LGFET;6 32GT;8 UG2K8IL 32GT;8 6TET;6

N!# N!Q N A N N NA! NB! NB# NBQ N#A N#B N#N NM# NMP NNA NNN N$! QQA N$# N$Q NQA NQN NQQ NP! NP# $!A $!B $!M !P! $!N $ ! ABP $A# ## $BN $#! $## NM# NNN $#Q $MA $MN $N! MQ $NA QB# $N# NAN $NQ $$A $$N $Q! $QQ $PA $PM $PN $PQ Q!! Q!# $Q# QAN Q#!

'Q5@9

32GT;8 6TET;6 LG2IF I3T4TG2K G64E286 3F3K3ET 3./;UG6TE2 HE23ET3 HETG0E2 0GTT 6TET; (RI4T 6;;) H;2;.3;4E HG;T 2EL HGFKG2 G64E286 (/FGTG6R) HGFKG2 G64E286 (3.6.) DE44G6 E28 ?3T32E D;6T;F2 6EREFE T;L;2 T3KI64EHGE .EL/GE .GL/E/D;

MQ QMQ QN! M#Q BBN QNA $!# !PA QM! Q$N $BA QQ$ QP QP# $ N

*. GS1 General Speci#ication


The G/9 General /pecification defines a global standard for encoding data about products. The full specification is available here. Gata is encoded as a series of number pairs $here the first number" usually sho$n in )brackets* is an application identifier )%!*" and the second is a formatted representation of the data. +or e#ample )4(9*@QQ; can be read as IFonsignment -umber @QQ;I $here the %! )4(9* signifies that the data is a consignment number. -ote that $hen using Zint %! data is entered using Vs<uareW brackets. This allo$s rounded brackets to be included in the data $hich is allo$ed by the specification. Dhen the barcode symbol is generated these s<uare brackets are replaced by rounded brackets in any te#t displayed. % list of valid %! numbers is given belo$.

*.1 &pplication Identi#iers F1G


!! 6erial 6hipping 0ontainer 0ode (6600) ! Klobal Trade Gtem 2umber (KTG2) !A % of containers ! /atch 2umber >roduction 8ate B >ackaging 8ate M 6ell b+ 8ate (Vualit+ 0ontrol) $ ;xpiration 8ateA! >roduct Hariant A 6erial 2umberAA RG/00 Vuantit+9 8ate9 /atch and 4ink ABx 4ot 2umber A#! Edditional >roduct Gdentification AM! 6econd 6erial 2umberB! Vuantit+ ;ach B !+ >roduct 2et Deight in kg B + >roduct 4ength/ st 8imension9 in meters B A+ >roduct Didth/8iameter/And 8imension9 in meters B B+ >roduct 8epth/Thickness/Brd 8imension9 in meters B #+ >roduct Erea9 in square meters B M+ >roduct Holume9 in liters B N+ product Holume9 in cubic meters BA!+ >roduct 2et Deight9 in pounds BA + >roduct 4ength/ st 8imension9 in inches BAA+ >roduct 4ength/ st 8imension9 in feet BAB+ >roduct 4ength/ st 8imension9 in +ards BA#+ >roduct Didth/8iameter/And 8imension9 in inches BAM+ >roduct Didth/8iameter/And 8imension9 in feet BAN+ >roduct Didth/8iameter/And 8imension9 in +ards BA$+ >roduct 8epth/Thickness/Brd 8imension9 in inches BAQ+ >roduct 8epth/Thickness/Brd 8imension9 in feet BAP+ >roduct 8epth/Thickness/Brd 8imension9 in +ards BB!+ 0ontainer Kross Deight (kg) BB + 0ontainer 4ength/ st 8imension (Leters) BBA+ 0ontainer Didth/8iameter/And 8imension (Leters)

',5@9

BBB+ 0ontainer 8epth/Thickness/Brd 8imension (Leters) BB#+ 0ontainer Erea (6quare Leters) BBM+ 0ontainer Kross Holume (4iters) BBN+ 0ontainer Kross Holume (0ubic Leters) B#!+ 0ontainer Kross Deight (>ounds) B# + 0ontainer 4ength/ st 8imension9 in inches B#A+ 0ontainer 4ength/ st 8imension9 in feet B#B+ 0ontainer 4ength/ st 8imension in9 in +ards B##+ 0ontainer Didth/8iameter/And 8imension9 in inches B#M+ 0ontainer Didth/8iameter/And 8imension9 in feet B#N+ 0ontainer Didth/8iameter/And 8imension9 in +ards B#$+ 0ontainer 8epth/Thickness/Reight/Brd 8imension9 in inches B#Q+ 0ontainer 8epth/Thickness/Reight/Brd 8imension9 in feet B#P+ 0ontainer 8epth/Thickness/Reight/Brd 8imension9 in +ards BM!+ >roduct Erea (6quare Gnches) BM + >roduct Erea (6quare ?eet) BMA+ >roduct Erea (6quare Tards) BMB+ 0ontainer Erea (6quare Gnches) BM#+ 0ontainer Erea (6quare ?eet) BMM+ 0ontainer Erea (6uqare Tards) BMN+ 2et Deight (Tro+ Iunces) BN!+ >roduct Holume (Vuarts) BN + >roduct Holume (Kallons) BNA+ 0ontainer Kross Holume (Vuarts) BNB+ 0ontainer Kross Holume (Kallons) BN#+ >roduct Holume (0ubic Gnches) BNM+ >roduct Holume (0ubic ?eet) BNN+ >roduct Holume (0ubic Tards) BN$+ 0ontainer Kross Holume (0ubic Gnches) BNQ+ 0ontainer Kross Holume (0ubic ?eet) BNP+ 0ontainer Kross Holume (0ubic Tards) B$ 2umber of 3nits 0ontained #!! 0ustomer >urchase Irder 2umber # ! 6hip To/8eli:er To 4ocation 0ode (Klobal 4ocation 2umber) # /ill To/Gn:oice 4ocation 0ode (Klobal 4ocation 2umber) # A >urchase ?rom 4ocation 0ode (Klobal 4ocation 2umber) #A! 6hip To/8eli:er To >ostal 0ode (6ingle >ostal Euthorit+) #A 6hip To/8eli:er To >ostal 0ode (Lultiple >ostal Euthorit+) Q!! Foll >roducts - Didth/4ength/0ore 8iameter Q!!A ;lectronic 6erial 2umber (;62) for 0ellular >hone Q!!B Klobal Feturnable Esset Gdentifier Q!!# Klobal Gndi:idual Esset Gdentifier Q!!M >rice per 3nit of Leasure Q !! 0oupon ;xtended 0odeJ 2umber 6+stem and Iffer Q ! 0oupon ;xtended 0odeJ 2umber 6+stem9 Iffer9 ;nd of Iffer Q !A 0oupon ;xtended 0odeJ 2umber 6+stem preceded b+ !P! Lutuall+ Egreed /et"een Trading >artners P Gnternal 0ompan+ 0odes PA Gnternal 0ompan+ 0odes PB Gnternal 0ompan+ 0odes P# Gnternal 0ompan+ 0odes PM Gnternal 0ompan+ 0odes PN Gnternal 0ompan+ 0odes P$ Gnternal 0ompan+ 0odes PQ Gnternal 0ompan+ 0odes PP Gnternal 0ompan+ 0odes

*. ;i"ed !ength ;ields


The G/9 /pecification re<uires that some of the data to be encoded fits a standard length field. Zint $ill generate an error if the correct data lengths are not entered. The follo$ing table details $hich ':5@9

%!s have fi#ed length data fields and ho$ long the data should be for each4

@(5@9

&pplication Identi#ier (( (9 (2 (; (4 99 92 9; 94 9' 9@ 9Q 9, 9: 2( ;9 ;2 ;; ;4 ;' ;@ 49 2( 9@ 9@ 9@ 9, , , , , , , , , , 4 9( 9( 9( 9( 9( 9( 9@

Num/er o# characters ?&I and .ata ;ield@

V9W This information taken from Dikipedia and used under the terms of the G- +ree Gocumentation ?icense.

@95@9

Вам также может понравиться