manual.txt 224 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617
  1. Zint Barcode Generator and Zint Barcode Studio User Manual
  2. Version 2.13.0.9
  3. December 2024
  4. *******************************************************************************
  5. * For reference the following is a text-only version of the Zint manual, *
  6. * generated from "docs/manual.pmd" by pandoc. *
  7. * A HTML version can be accessed at https://zint.org.uk/manual/ *
  8. * however this text file is more likely to be up-to-date. *
  9. *******************************************************************************
  10. - 1. Introduction
  11. - 1.1 Glossary
  12. - 2. Installing Zint
  13. - 2.1 Linux
  14. - 2.2 BSD
  15. - 2.3 Microsoft Windows
  16. - 2.4 Apple macOS
  17. - 2.5 Zint Tcl Backend
  18. - 3. Using Zint Barcode Studio
  19. - 3.1 Main Window and Data Tab
  20. - 3.2 GS1 Composite Groupbox
  21. - 3.3 Additional ECI/Data Segments Groupbox
  22. - 3.4 Symbology-specific Groupbox
  23. - 3.5 Symbology-specific Tab
  24. - 3.6 Appearance Tab
  25. - 3.7 Data Dialog
  26. - 3.8 Sequence Dialog
  27. - 3.9 Export Dialog
  28. - 3.10 CLI Equivalent Dialog
  29. - 4. Using the Command Line
  30. - 4.1 Inputting Data
  31. - 4.2 Directing Output
  32. - 4.3 Selecting Barcode Type
  33. - 4.4 Adjusting Height
  34. - 4.5 Adjusting Whitespace
  35. - 4.6 Adding Boundary Bars and Boxes
  36. - 4.7 Using Colour
  37. - 4.8 Rotating the Symbol
  38. - 4.9 Adjusting Image Size (X-dimension)
  39. - 4.9.1 Scaling by X-dimension and Resolution
  40. - 4.9.2 Scaling Example
  41. - 4.9.3 MaxiCode Raster Scaling
  42. - 4.10 Human Readable Text (HRT) Options
  43. - 4.11 Input Modes
  44. - 4.11.1 Unicode, Data, and GS1 Modes
  45. - 4.11.2 Input Modes and ECI
  46. - 4.11.2.1 Input Modes and ECI Example 1
  47. - 4.11.2.2 Input Modes and ECI Example 2
  48. - 4.11.2.3 Input Modes and ECI Example 3
  49. - 4.12 Batch Processing
  50. - 4.13 Direct Output to stdout
  51. - 4.14 Automatic Filenames
  52. - 4.15 Working with Dots
  53. - 4.16 Multiple Segments
  54. - 4.17 Structured Append
  55. - 4.18 Help Options
  56. - 4.19 Other Options
  57. - 5. Using the API
  58. - 5.1 Creating and Deleting Symbols
  59. - 5.2 Encoding and Saving to File
  60. - 5.3 Encoding and Printing Functions in Depth
  61. - 5.4 Buffering Symbols in Memory (raster)
  62. - 5.5 Buffering Symbols in Memory (vector)
  63. - 5.6 Buffering Symbols in Memory (memfile)
  64. - 5.7 Setting Options
  65. - 5.8 Handling Errors
  66. - 5.9 Specifying a Symbology
  67. - 5.10 Adjusting Output Options
  68. - 5.11 Setting the Input Mode
  69. - 5.12 Multiple Segments
  70. - 5.13 Scaling Helpers
  71. - 5.14 Verifying Symbology Availability
  72. - 5.15 Checking Symbology Capabilities
  73. - 5.16 Zint Version
  74. - 6. Types of Symbology
  75. - 6.1 One-Dimensional Symbols
  76. - 6.1.1 Code 11
  77. - 6.1.2 Code 2 of 5
  78. - 6.1.2.1 Standard Code 2 of 5
  79. - 6.1.2.2 IATA Code 2 of 5
  80. - 6.1.2.3 Industrial Code 2 of 5
  81. - 6.1.2.4 Interleaved Code 2 of 5 (ISO 16390)
  82. - 6.1.2.5 Code 2 of 5 Data Logic
  83. - 6.1.2.6 ITF-14
  84. - 6.1.2.7 Deutsche Post Leitcode
  85. - 6.1.2.8 Deutsche Post Identcode
  86. - 6.1.3 UPC (Universal Product Code) (ISO 15420)
  87. - 6.1.3.1 UPC Version A
  88. - 6.1.3.2 UPC Version E
  89. - 6.1.4 EAN (European Article Number) (ISO 15420)
  90. - 6.1.4.1 EAN-2, EAN-5, EAN-8 and EAN-13
  91. - 6.1.4.2 SBN, ISBN and ISBN-13
  92. - 6.1.5 Plessey
  93. - 6.1.5.1 UK Plessey
  94. - 6.1.5.2 MSI Plessey
  95. - 6.1.6 Telepen
  96. - 6.1.6.1 Telepen Alpha
  97. - 6.1.6.2 Telepen Numeric
  98. - 6.1.7 Code 39
  99. - 6.1.7.1 Standard Code 39 (ISO 16388)
  100. - 6.1.7.2 Extended Code 39
  101. - 6.1.7.3 Code 93
  102. - 6.1.7.4 PZN (Pharmazentralnummer)
  103. - 6.1.7.5 LOGMARS
  104. - 6.1.7.6 Code 32
  105. - 6.1.7.7 HIBC Code 39
  106. - 6.1.7.8 Vehicle Identification Number (VIN)
  107. - 6.1.8 Codabar (EN 798)
  108. - 6.1.9 Pharmacode
  109. - 6.1.10 Code 128
  110. - 6.1.10.1 Standard Code 128 (ISO 15417)
  111. - 6.1.10.2 Code 128 Suppress Code Set C (Code Sets A and B only)
  112. - 6.1.10.3 GS1-128
  113. - 6.1.10.4 EAN-14
  114. - 6.1.10.5 NVE-18 (SSCC-18)
  115. - 6.1.10.6 HIBC Code 128
  116. - 6.1.10.7 DPD Code
  117. - 6.1.10.8 UPU S10
  118. - 6.1.11 GS1 DataBar (ISO 24724)
  119. - 6.1.11.1 GS1 DataBar Omnidirectional and GS1 DataBar Truncated
  120. - 6.1.11.2 GS1 DataBar Limited
  121. - 6.1.11.3 GS1 DataBar Expanded
  122. - 6.1.12 Korea Post Barcode
  123. - 6.1.13 Channel Code
  124. - 6.1.14 BC412 (SEMI T1-95)
  125. - 6.2 Stacked Symbologies
  126. - 6.2.1 Basic Symbol Stacking
  127. - 6.2.2 Codablock-F
  128. - 6.2.3 Code 16K (EN 12323)
  129. - 6.2.4 PDF417 (ISO 15438)
  130. - 6.2.5 Compact PDF417 (ISO 15438)
  131. - 6.2.6 MicroPDF417 (ISO 24728)
  132. - 6.2.7 GS1 DataBar Stacked (ISO 24724)
  133. - 6.2.7.1 GS1 DataBar Stacked
  134. - 6.2.7.2 GS1 DataBar Stacked Omnidirectional
  135. - 6.2.7.3 GS1 DataBar Expanded Stacked
  136. - 6.2.8 Code 49
  137. - 6.3 GS1 Composite Symbols (ISO 24723)
  138. - 6.3.1 CC-A
  139. - 6.3.2 CC-B
  140. - 6.3.3 CC-C
  141. - 6.4 Two-Track Symbols
  142. - 6.4.1 Two-Track Pharmacode
  143. - 6.4.2 POSTNET
  144. - 6.4.3 PLANET
  145. - 6.4.4 Brazilian CEPNet
  146. - 6.4.5 DX Film Edge Barcode
  147. - 6.5 4-State Postal Codes
  148. - 6.5.1 Australia Post 4-State Symbols
  149. - 6.5.1.1 Customer Barcodes
  150. - 6.5.1.2 Reply Paid Barcode
  151. - 6.5.1.3 Routing Barcode
  152. - 6.5.1.4 Redirect Barcode
  153. - 6.5.2 Dutch Post KIX Code
  154. - 6.5.3 Royal Mail 4-State Customer Code (RM4SCC)
  155. - 6.5.4 Royal Mail 4-State Mailmark
  156. - 6.5.5 USPS Intelligent Mail
  157. - 6.5.6 Japanese Postal Code
  158. - 6.5.7 DAFT Code
  159. - 6.6 Matrix Symbols
  160. - 6.6.1 Data Matrix (ISO 16022)
  161. - 6.6.2 Royal Mail 2D Mailmark (CMDM) (Data Matrix)
  162. - 6.6.3 QR Code (ISO 18004)
  163. - 6.6.4 Micro QR Code (ISO 18004)
  164. - 6.6.5 Rectangular Micro QR Code (rMQR) (ISO 23941)
  165. - 6.6.6 UPNQR (Univerzalnega Plačilnega Naloga QR)
  166. - 6.6.7 MaxiCode (ISO 16023)
  167. - 6.6.8 Aztec Code (ISO 24778)
  168. - 6.6.9 Aztec Runes (ISO 24778)
  169. - 6.6.10 Code One
  170. - 6.6.11 Grid Matrix
  171. - 6.6.12 DotCode
  172. - 6.6.13 Han Xin Code (ISO 20830)
  173. - 6.6.14 Ultracode
  174. - 6.7 Other Barcode-Like Markings
  175. - 6.7.1 Facing Identification Mark (FIM)
  176. - 6.7.2 Flattermarken
  177. - 7. Legal and Version Information
  178. - 7.1 License
  179. - 7.2 Patent Issues
  180. - 7.3 Version Information
  181. - 7.4 Sources of Information
  182. - 7.5 Standards Compliance
  183. - 7.5.1 Symbology Standards
  184. - 7.5.2 General Standards
  185. - Annex A. Character Encoding
  186. - A.1 ASCII Standard
  187. - A.2 Latin Alphabet No. 1 (ISO/IEC 8859-1)
  188. - Annex B. Qt Backend QZint
  189. - Annex C. Tcl Backend Binding
  190. - Annex D. Man Page ZINT(1)
  191. - NAME
  192. - SYNOPSIS
  193. - DESCRIPTION
  194. - OPTIONS
  195. - EXIT STATUS
  196. - EXAMPLES
  197. - BUGS
  198. - SEE ALSO
  199. - CONFORMING TO
  200. - COPYRIGHT
  201. - AUTHOR
  202. 1. Introduction
  203. The Zint project aims to provide a complete cross-platform open source barcode
  204. generating solution. The package currently consists of a Qt-based GUI, a CLI
  205. command line executable and a library with an API to allow developers access to
  206. the capabilities of Zint. It is hoped that Zint provides a solution which is
  207. flexible enough for professional users while at the same time takes care of as
  208. much of the processing as possible to allow easy translation from input data to
  209. barcode image.
  210. The library which forms the main component of the Zint project is currently able
  211. to encode data in over 50 barcode symbologies (types of barcode), for each of
  212. which it is possible to translate that data from either UTF-8 (Unicode) or a raw
  213. 8-bit data stream. The image can be rendered as a
  214. - Windows Bitmap (BMP),
  215. - Enhanced Metafile Format (EMF),
  216. - Encapsulated PostScript (EPS),
  217. - Graphics Interchange Format (GIF),
  218. - ZSoft Paintbrush (PCX) image,
  219. - Portable Network Graphic (PNG) image,
  220. - Tagged Image File Format (TIF), or a
  221. - Scalable Vector Graphic (SVG).
  222. Many options are available for setting the characteristics of the output image
  223. including the size and colour of the image, the amount of error correction used
  224. in the symbol and the orientation of the image.
  225. 1.1 Glossary
  226. Some of the words and phrases used in this document are specific to barcoding,
  227. and so a brief explanation is given to help understanding:
  228. symbol
  229. A symbol is an image which encodes data according to one of the standards.
  230. This encompasses barcodes (linear symbols) as well as any of the other
  231. methods of representing data used in this program.
  232. symbology
  233. A method of encoding data to create a certain type of symbol.
  234. linear
  235. A linear or one-dimensional symbol is one which consists of bars and spaces,
  236. and is what most people associate with the term ‘barcode’. Examples include
  237. Code 128.
  238. stacked
  239. A stacked symbol consists of multiple linear symbols placed one above
  240. another and which together hold the message, usually alongside some error
  241. correction data. Examples include PDF417.
  242. matrix
  243. A matrix symbol is one based on a (usually square) grid of elements called
  244. modules. Examples include Data Matrix, but MaxiCode and DotCode are also
  245. considered matrix symbologies.
  246. composite
  247. A composite symbology is one which is made up of elements which are both
  248. linear and stacked. Those currently supported are made up of a linear
  249. ‘primary’ message above which is printed a stacked component based on the
  250. PDF417 symbology. These symbols also have a separator which separates the
  251. linear and the stacked components. The stacked component is most often
  252. referred to as the 2D (two-dimensional) component.
  253. X-dimension
  254. The X-dimension of a symbol is the size (usually the width) of the smallest
  255. element. For a linear symbology this is the width of the smallest bar. For
  256. matrix symbologies it is the width of the smallest module (usually a
  257. square). Barcode widths and heights are expressed in X-dimensions. Most
  258. linear symbologies can have their height varied whereas most matrix
  259. symbologies have a fixed width-to-height ratio where the height is
  260. determined by the width.
  261. GS1 data
  262. This is a structured way of representing information which consists of
  263. ‘chunks’ of data, each of which starts with an Application Identifier (AI).
  264. The AI identifies what type of information is being encoded.
  265. Reader Initialisation (Programming)
  266. Some symbologies allow a special character to be included which can be
  267. detected by the scanning equipment as signifying that the data is used to
  268. program or change settings in that equipment. This data is usually not
  269. passed on to the software which handles normal input data. This feature
  270. should only be used if you are familiar with the programming codes relevant
  271. to your scanner.
  272. ECI
  273. The Extended Channel Interpretations (ECI) mechanism allows for
  274. multi-language data to be encoded in symbols which would usually support
  275. only Latin-1 (ISO/IEC 8859-1 plus ASCII) characters. This can be useful, for
  276. example, if you need to encode Cyrillic characters, but should be used with
  277. caution as not all scanners support this method.
  278. Two other concepts that are important are raster and vector.
  279. raster
  280. A low level bitmap representation of an image. BMP, GIF, PCX, PNG and TIF
  281. are raster file formats.
  282. vector
  283. A high level command- or data-based representation of an image. EMF, EPS and
  284. SVG are vector file formats. They require renderers to turn them into
  285. bitmaps.
  286. 2. Installing Zint
  287. 2.1 Linux
  288. The easiest way to configure compilation is to take advantage of the CMake
  289. utilities. You will need to install CMake and libpng-dev first. For instance on
  290. apt systems:
  291. sudo apt install git cmake build-essential libpng-dev
  292. If you want to take advantage of Zint Barcode Studio you will also need to have
  293. Qt and its component "Desktop gcc 64-bit" installed, as well as mesa. For
  294. details see "README.linux" in the project root directory.
  295. Once you have fulfilled these requirements unzip the source code tarball or
  296. clone the latest source
  297. git clone https://git.code.sf.net/p/zint/code zint
  298. and follow these steps in the top directory:
  299. mkdir build
  300. cd build
  301. cmake ..
  302. make
  303. sudo make install
  304. The CLI command line program can be accessed by typing
  305. zint [options]
  306. The GUI can be accessed by typing
  307. zint-qt
  308. To test that the installation has been successful a shell script is included in
  309. the "frontend" sub-directory. To run the test type
  310. ./test.sh
  311. This should create numerous files in the sub-directory "frontend/test_sh_out"
  312. showing the many modes of operation which are available from Zint.
  313. 2.2 BSD
  314. The latest Zint CLI, libzint library and GUI can be installed from the zint
  315. package on FreeBSD:
  316. su
  317. pkg install zint
  318. exit
  319. and on OpenBSD (where the GUI is in a separate zint-gui package):
  320. su
  321. pkg_add zint zint-gui
  322. exit
  323. To build from source (including for NetBSD) see "README.bsd" in the project root
  324. directory.
  325. 2.3 Microsoft Windows
  326. For Microsoft Windows, Zint is distributed as a binary executable. Simply
  327. download the ZIP file, then right-click on the ZIP file and "Extract All". A new
  328. folder will be created within which are two binary files:
  329. - qtZint.exe - Zint Barcode Studio
  330. - zint.exe - Command Line Interface
  331. For fresh releases you will get a warning message from Microsoft Defender
  332. SmartScreen that this is an ‘unrecognised app’. This happens because Zint is a
  333. free and open-source software project with no advertising and hence no income,
  334. meaning we are not able to afford the $664 per year to have the application
  335. digitally signed by Microsoft.
  336. To build Zint on Windows from source, see "win32/README".
  337. 2.4 Apple macOS
  338. The latest Zint CLI and libzint can be installed using Homebrew.[1] To install
  339. Homebrew input the following line into the macOS terminal
  340. /bin/bash -c "$(curl -fsSL \
  341. https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  342. Once Homebrew is installed use the following command to install the CLI and
  343. library
  344. brew install zint
  345. To build from source (and install the GUI) see "README.macos" in the project
  346. root directory.
  347. 2.5 Zint Tcl Backend
  348. The Tcl backend in the "backend_tcl" sub-directory may be built using the
  349. provided TEA (Tcl Extension Architecture) build on Linux, Windows, macOS and
  350. Android. For Windows, an MSVC6 makefile is also available. See Annex C. Tcl
  351. Backend Binding for further details.
  352. 3. Using Zint Barcode Studio
  353. Zint Barcode Studio is the graphical user interface for Zint. If you are
  354. starting from a command line interface you can start the GUI by typing
  355. zint-qt
  356. or on Windows
  357. qtZint.exe
  358. See the note in section 2.3 Microsoft Windows about Microsoft Defender
  359. SmartScreen.
  360. Below is a brief guide to Zint Barcode Studio.
  361. 3.1 Main Window and Data Tab
  362. [Zint Barcode Studio on startup - main window with Data tab]
  363. This is the main window of Zint Barcode Studio. The top of the window shows a
  364. preview of the barcode that the current settings would create. These settings
  365. can be changed using the controls below. The text box in the "Data to Encode"
  366. groupbox on this first Data tab allows you to enter the data to be encoded. When
  367. you are happy with your settings you can use the "Save..." button to save the
  368. resulting image to a file.
  369. The "Symbology" drop-down box gives access to all of the symbologies supported
  370. by Zint shown in alphabetical order. The text box to its right can filter the
  371. drop-down to only show matching symbologies. For instance typing "mail" will
  372. only show barcodes in the drop-down whose names contain the word "mail". Each
  373. word entered will match. So typing "mail post" will show barcodes whose names
  374. contain "mail" or "post" (or both).
  375. The ellipsis button "..." to the right of the data text box invokes the Data
  376. Dialog - see 3.7 Data Dialog for details. The delete button [delete] next to it
  377. will clear the data text box and the ECI (Extended Channel Interpretations)
  378. drop-down if set.
  379. To set the barcode as a Programming Initialisation symbol click the
  380. "Reader Init" checkbox. The "1234.." button to its right invokes the Sequence
  381. Dialog - see 3.8 Sequence Dialog. The zap button [zap] will clear all data and
  382. reset all settings for the barcode to defaults.
  383. The "BMP" and "SVG" buttons at the bottom will copy the image to the clipboard
  384. in BMP format and SVG format respectively. Further copy-to-clipboard formats are
  385. available by clicking the "Menu" button, along with "CLI Equivalent...",
  386. "Save As...", "Factory Reset...", "Help", "About..." and "Quit" options. Most of
  387. the options are also available in a context menu by right-clicking the preview.
  388. [Zint Barcode Studio main menu (left) and context menu (right)]
  389. 3.2 GS1 Composite Groupbox
  390. [Zint Barcode Studio encoding GS1 Composite data]
  391. In the middle of the Data tab is an area for creating composite symbologies
  392. which appears when the currently selected symbology is supported by the GS1
  393. Composite symbology standard. GS1 data can then be entered with square brackets
  394. used to separate Application Identifier (AI) information from data as shown
  395. here. For details, see 6.3 GS1 Composite Symbols (ISO 24723).
  396. 3.3 Additional ECI/Data Segments Groupbox
  397. [Zint Barcode Studio encoding multiple segments]
  398. For symbologies that support ECIs (Extended Channel Interpretations) the middle
  399. of the Data tab is an area for entering additional data segments with their own
  400. ECIs. Up to 4 segments (including the main "Data to Encode" as segment 0) may be
  401. specified. See 4.16 Multiple Segments for details.
  402. 3.4 Symbology-specific Groupbox
  403. [Zint Barcode Studio showing Code 2 of 5 Interleaved settings]
  404. Many symbologies have extra options to change the content, format and appearance
  405. of the symbol generated. For those with few additional options (and no support
  406. for GS1 data or ECIs), the middle of the Data tab is an area for setting those
  407. options.
  408. Here is shown the check digit options for an Interleaved Code 2 of 5 symbol (see
  409. 6.1.2.4 Interleaved Code 2 of 5 (ISO 16390)).
  410. Symbologies with more than a few options (or support for GS1 data or ECIs) have
  411. a second Symbology-specific tab, shown next.
  412. 3.5 Symbology-specific Tab
  413. [Zint Barcode Studio showing Aztec Code options]
  414. A second tab appears for those symbologies with more than a few extra options.
  415. Here is shown the options available for an Aztec Code symbol.
  416. You can adjust its size or error correction level (see 6.6.8 Aztec Code (ISO
  417. 24778)), select how its data is to be treated (see 4.11 Input Modes), and set it
  418. as part of a Structured Append sequence of symbols (see 4.17 Structured Append).
  419. 3.6 Appearance Tab
  420. [Zint Barcode Studio showing Appearance tab options]
  421. The Appearance tab can be used to adjust the dimensions and other properties of
  422. the symbol.
  423. The "Height" value affects the height of symbologies which do not have a fixed
  424. width-to-height ratio, i.e. those other than matrix symbologies. For such
  425. symbologies the "Automatic Height" checkbox will be enabled - uncheck this to
  426. manually adjust the height. The "Compliant Height" checkbox applies to
  427. symbologies that define a standard height - see 4.4 Adjusting Height.
  428. Boundary bars can be added with the "Border Type" drop-down and their size
  429. adjusted with "Border Width", and whitespace can be adjusted both horizontally
  430. (first spinbox) and vertically (second spinbox), and also through the
  431. "Quiet Zones" checkbox if standard quiet zones are defined for the symbology.
  432. The size of the saved image can be specified with "Printing Scale", and also by
  433. clicking the [scaling] icon to invoke the Set Printing Scale Dialog - see 4.9
  434. Adjusting Image Size (X-dimension) for further details.
  435. [Adjusting the Print Size]
  436. The foreground and background colours can be set either using the text boxes
  437. which accept "RRGGBBAA" hexadecimal values and "C,M,Y,K" decimal percentage
  438. values, or by clicking the foreground eye [eye] and background eye [eye] buttons
  439. which invoke a colour picker.
  440. [The colour picker tool]
  441. (Note that to change the colours visually, the luminence slider, the long narrow
  442. column on the right, must be adjusted.) The color picker only deals in RGB(A),
  443. and will overwrite any CMYK values with RGB(A) values once "OK" is selected.
  444. Back in the Appearance tab, the colours can be reset to black-on-white using the
  445. "Reset" button, and exchanged one for the other using the swap [swap] button
  446. next to it.
  447. 3.7 Data Dialog
  448. [Entering longer text input]
  449. Clicking on the ellipsis "..." button next to the "Data to Encode" text box in
  450. the Data tab opens a larger window which can be used to enter longer strings of
  451. text. You can also use this window to load data from a file.
  452. The dialog is also available for additional ECI/Data segments by clicking the
  453. ellipsis button to the right of their data text boxes.
  454. Note that if your data contains line feeds (LF) then the data will be split into
  455. separate lines in the dialog box. On saving the data back to the main text box
  456. any separate lines in the data will be escaped as '\n' and the "Parse Escapes"
  457. checkbox will be set. This only affects line feeds, not carriage returns (CR) or
  458. CR+LF pairs, and behaves the same on both Windows and Unix. (For details on
  459. escape sequences, see 4.1 Inputting Data.)
  460. 3.8 Sequence Dialog
  461. [Creating a sequence of barcode symbols]
  462. Clicking on the sequence button (labelled "1234..") in the Data tab opens the
  463. Sequence Dialog. This allows you to create multiple barcode images by entering a
  464. sequence of data inputs in the right hand panel. Sequences can also be
  465. automatically generated by entering parameters on the left hand side or by
  466. importing the data from a file. Zint will generate a separate barcode image for
  467. each line of text in the right hand panel. The format field determines the
  468. format of the automatically generated sequence where characters have the
  469. meanings as given below:
  470. Character Effect
  471. --------------------- --------------------------
  472. $ Insert leading zeroes
  473. # Insert leading spaces
  474. * Insert leading asterisks
  475. Any other character Interpreted literally
  476. Table : Sequence Format Characters
  477. Once you’re happy with the Sequence Data, click the "Export..." button to bring
  478. up the Export Dialog, discussed next.
  479. 3.9 Export Dialog
  480. [Setting filenames for an exported sequence of barcode symbols]
  481. The Export Dialog invoked by pressing the "Export..." button in the Sequence
  482. Dialog sets the parameters for exporting the sequence of barcode images. Here
  483. you can set the output directory, the format of the output filenames and what
  484. their image type will be. Note that the symbology, colour and other formatting
  485. information are taken from the main window.
  486. 3.10 CLI Equivalent Dialog
  487. [CLI Equivalent Dialog]
  488. The CLI Equivalent Dialog can be invoked from the main menu or the context menu
  489. and displays the CLI command that will reproduce the barcode as currently
  490. configured in the GUI. Press the "Copy" button to copy the command to the
  491. clipboard, which can then be pasted into the command line.
  492. 4. Using the Command Line
  493. This section describes how to encode data using the command line frontend (CLI)
  494. program. The examples given are for the Unix platform, but the same options are
  495. available for Windows - just remember to include the executable file extension
  496. if ".EXE" is not in your PATHEXT environment variable, i.e.:
  497. zint.exe -d "This Text"
  498. For compatibility with Windows the examples use double quotes to delimit data,
  499. though on Unix single quotes are generally preferable as they stop the shell
  500. from processing any characters such as backslash or dollar. A single quote
  501. itself is dealt with by terminating the single-quoted text, backslashing the
  502. single quote, and then continuing:
  503. zint -d 'Text containing a single quote '\'' in the middle'
  504. Some examples use backslash (\) to continue commands onto the next line. For
  505. Windows, use caret (^) instead.
  506. Certain options that take values have short names as well as long ones, namely
  507. -b (--barcode), -d (--data), -i (--input), -o (--output) and -w (--whitesp). For
  508. these a space should be used to separate the short name from its value, to avoid
  509. ambiguity. For long names a space or an equals sign may be used. For instance:
  510. zint -d "This Text"
  511. zint --data="This Text"
  512. zint --data "This Text"
  513. The examples use a space separator for short option names, and an equals sign
  514. for long option names.
  515. 4.1 Inputting Data
  516. The data to encode can be entered at the command line using the -d or --data
  517. option, for example
  518. zint -d "This Text"
  519. This will encode the text "This Text". Zint will use the default symbology, Code
  520. 128, and output to the default file "out.png" in the current directory.
  521. Alternatively, if libpng was not present when Zint was built, the default output
  522. file will be "out.gif".
  523. The data input to the Zint CLI is assumed to be encoded in UTF-8 (Unicode)
  524. format (Zint will correctly handle UTF-8 data on Windows). If you are encoding
  525. characters beyond the 7-bit ASCII set using a scheme other than UTF-8 then you
  526. will need to set the appropriate input options as shown in 4.11 Input Modes
  527. below.
  528. Non-printing characters can be entered on the command line using backslash (\)
  529. as an escape character in combination with the --esc switch. Permissible
  530. sequences are shown in the table below.
  531. ----------------------------------------------------------------------------
  532. Escape ASCII Name Interpretation
  533. Sequence Equivalent
  534. ----------- ------------ ------- -------------------------------------------
  535. \0 0x00 NUL Null character
  536. \E 0x04 EOT End of Transmission
  537. \a 0x07 BEL Bell
  538. \b 0x08 BS Backspace
  539. \t 0x09 HT Horizontal Tab
  540. \n 0x0A LF Line Feed
  541. \v 0x0B VT Vertical Tab
  542. \f 0x0C FF Form Feed
  543. \r 0x0D CR Carriage Return
  544. \e 0x1B ESC Escape
  545. \G 0x1D GS Group Separator
  546. \R 0x1E RS Record Separator
  547. \\ 0x5C \ Backslash
  548. \dNNN NNN Any 8-bit character where NNN is decimal
  549. (000-255)
  550. \oNNN 0oNNN Any 8-bit character where NNN is octal
  551. (000-377)
  552. \xNN 0xNN Any 8-bit character where NN is hexadecimal
  553. (00-FF)
  554. \uNNNN Any 16-bit Unicode BMP[2] character where
  555. NNNN is hexadecimal (0000-FFFF)
  556. \UNNNNNN Any 21-bit Unicode character where NNNNNN
  557. is hexadecimal (000000-10FFFF)
  558. ----------------------------------------------------------------------------
  559. Table : Escape Sequences
  560. (Special escape sequences are available for Code 128 only to manually switch
  561. Code Sets and insert special FNC1 characters - see 6.1.10.1 Standard Code 128
  562. (ISO 15417) for details.)
  563. Input data can be read directly from file using the -i or --input switch as
  564. shown below. The input file is assumed to be UTF-8 formatted unless an
  565. alternative mode is selected. This option replaces the use of the -d switch.
  566. zint -i somefile.txt
  567. To read from stdin specify a single hyphen "-" as the input file.
  568. Note that except when batch processing (see 4.12 Batch Processing below), the
  569. file (or stdin) should not end with a newline (LF on Unix, CR+LF on Windows)
  570. unless you want the newline to be encoded in the symbol.
  571. 4.2 Directing Output
  572. Output can be directed to a file other than the default using the -o or --output
  573. switch. For example:
  574. zint -o here.png -d "This Text"
  575. This draws a Code 128 barcode in the file "here.png". If an Encapsulated
  576. PostScript file is needed simply append the filename with ".eps", and so on for
  577. the other supported file types:
  578. zint -o there.eps -d "This Text"
  579. The currently supported output file formats are shown in the following table.
  580. Extension File format
  581. ----------- ------------------------------------
  582. bmp Windows Bitmap
  583. emf Enhanced Metafile Format
  584. eps Encapsulated PostScript
  585. gif Graphics Interchange Format
  586. pcx ZSoft Paintbrush image
  587. png Portable Network Graphic
  588. svg Scalable Vector Graphic
  589. tif Tagged Image File Format
  590. txt Text file (see 4.19 Other Options)
  591. Table : Output File Formats
  592. The filename can contain directories and sub-directories also, which will be
  593. created if they don’t already exist:
  594. zint -o "dir/subdir/filename.eps" -d "This Text"
  595. Note that on Windows, filenames are assumed to be UTF-8 encoded.
  596. 4.3 Selecting Barcode Type
  597. Selecting which type of barcode you wish to produce (i.e. which symbology to
  598. use) can be done at the command line using the -b or --barcode switch followed
  599. by the appropriate integer value or name in the following table. For example to
  600. create a Data Matrix symbol you could use:
  601. zint -b 71 -o datamatrix.png -d "Data to encode"
  602. or
  603. zint -b DATAMATRIX -o datamatrix.png -d "Data to encode"
  604. Names are treated case-insensitively by the CLI, and the BARCODE_ prefix and any
  605. underscores are optional.
  606. ------------------------------------------------------------------------------
  607. Numeric Name[3] Barcode Name
  608. Value
  609. --------- ------------------------- ------------------------------------------
  610. 1 BARCODE_CODE11 Code 11
  611. 2* BARCODE_C25STANDARD Standard Code 2 of 5
  612. 3 BARCODE_C25INTER Interleaved 2 of 5
  613. 4 BARCODE_C25IATA Code 2 of 5 IATA
  614. 6 BARCODE_C25LOGIC Code 2 of 5 Data Logic
  615. 7 BARCODE_C25IND Code 2 of 5 Industrial
  616. 8 BARCODE_CODE39 Code 3 of 9 (Code 39)
  617. 9 BARCODE_EXCODE39 Extended Code 3 of 9 (Code 39+)
  618. 13 BARCODE_EANX EAN (EAN-2, EAN-5, EAN-8 and EAN-13)
  619. 14 BARCODE_EANX_CHK EAN + Check Digit
  620. 16* BARCODE_GS1_128 GS1-128 (UCC.EAN-128)
  621. 18 BARCODE_CODABAR Codabar
  622. 20 BARCODE_CODE128 Code 128 (automatic Code Set switching)
  623. 21 BARCODE_DPLEIT Deutsche Post Leitcode
  624. 22 BARCODE_DPIDENT Deutsche Post Identcode
  625. 23 BARCODE_CODE16K Code 16K
  626. 24 BARCODE_CODE49 Code 49
  627. 25 BARCODE_CODE93 Code 93
  628. 28 BARCODE_FLAT Flattermarken
  629. 29* BARCODE_DBAR_OMN GS1 DataBar Omnidirectional (including GS1
  630. DataBar Truncated)
  631. 30* BARCODE_DBAR_LTD GS1 DataBar Limited
  632. 31* BARCODE_DBAR_EXP GS1 DataBar Expanded
  633. 32 BARCODE_TELEPEN Telepen Alpha
  634. 34 BARCODE_UPCA UPC-A
  635. 35 BARCODE_UPCA_CHK UPC-A + Check Digit
  636. 37 BARCODE_UPCE UPC-E
  637. 38 BARCODE_UPCE_CHK UPC-E + Check Digit
  638. 40 BARCODE_POSTNET POSTNET
  639. 47 BARCODE_MSI_PLESSEY MSI Plessey
  640. 49 BARCODE_FIM FIM
  641. 50 BARCODE_LOGMARS LOGMARS
  642. 51 BARCODE_PHARMA Pharmacode One-Track
  643. 52 BARCODE_PZN PZN
  644. 53 BARCODE_PHARMA_TWO Pharmacode Two-Track
  645. 54 BARCODE_CEPNET Brazilian CEPNet
  646. 55 BARCODE_PDF417 PDF417
  647. 56* BARCODE_PDF417COMP Compact PDF417 (Truncated PDF417)
  648. 57 BARCODE_MAXICODE MaxiCode
  649. 58 BARCODE_QRCODE QR Code
  650. 60 BARCODE_CODE128AB Code 128 (Suppress Code Set C)
  651. 63 BARCODE_AUSPOST Australia Post Standard Customer
  652. 66 BARCODE_AUSREPLY Australia Post Reply Paid
  653. 67 BARCODE_AUSROUTE Australia Post Routing
  654. 68 BARCODE_AUSDIRECT Australia Post Redirection
  655. 69 BARCODE_ISBNX ISBN (EAN-13 with verification stage)
  656. 70 BARCODE_RM4SCC Royal Mail 4-State Customer Code (RM4SCC)
  657. 71 BARCODE_DATAMATRIX Data Matrix (ECC200)
  658. 72 BARCODE_EAN14 EAN-14
  659. 73 BARCODE_VIN Vehicle Identification Number
  660. 74 BARCODE_CODABLOCKF Codablock-F
  661. 75 BARCODE_NVE18 NVE-18 (SSCC-18)
  662. 76 BARCODE_JAPANPOST Japanese Postal Code
  663. 77 BARCODE_KOREAPOST Korea Post
  664. 79* BARCODE_DBAR_STK GS1 DataBar Stacked
  665. 80* BARCODE_DBAR_OMNSTK GS1 DataBar Stacked Omnidirectional
  666. 81* BARCODE_DBAR_EXPSTK GS1 DataBar Expanded Stacked
  667. 82 BARCODE_PLANET PLANET
  668. 84 BARCODE_MICROPDF417 MicroPDF417
  669. 85* BARCODE_USPS_IMAIL USPS Intelligent Mail (OneCode)
  670. 86 BARCODE_PLESSEY UK Plessey
  671. 87 BARCODE_TELEPEN_NUM Telepen Numeric
  672. 89 BARCODE_ITF14 ITF-14
  673. 90 BARCODE_KIX Dutch Post KIX Code
  674. 92 BARCODE_AZTEC Aztec Code
  675. 93 BARCODE_DAFT DAFT Code
  676. 96 BARCODE_DPD DPD Code
  677. 97 BARCODE_MICROQR Micro QR Code
  678. 98 BARCODE_HIBC_128 HIBC Code 128
  679. 99 BARCODE_HIBC_39 HIBC Code 39
  680. 102 BARCODE_HIBC_DM HIBC Data Matrix ECC200
  681. 104 BARCODE_HIBC_QR HIBC QR Code
  682. 106 BARCODE_HIBC_PDF HIBC PDF417
  683. 108 BARCODE_HIBC_MICPDF HIBC MicroPDF417
  684. 110 BARCODE_HIBC_BLOCKF HIBC Codablock-F
  685. 112 BARCODE_HIBC_AZTEC HIBC Aztec Code
  686. 115 BARCODE_DOTCODE DotCode
  687. 116 BARCODE_HANXIN Han Xin (Chinese Sensible) Code
  688. 119 BARCODE_MAILMARK_2D Royal Mail 2D Mailmark (CMDM) (Data
  689. Matrix)
  690. 121 BARCODE_MAILMARK_4S Royal Mail 4-State Mailmark
  691. 128 BARCODE_AZRUNE Aztec Runes
  692. 129 BARCODE_CODE32 Code 32
  693. 130 BARCODE_EANX_CC GS1 Composite Symbol with EAN linear
  694. component
  695. 131* BARCODE_GS1_128_CC GS1 Composite Symbol with GS1-128 linear
  696. component
  697. 132* BARCODE_DBAR_OMN_CC GS1 Composite Symbol with GS1 DataBar
  698. Omnidirectional linear component
  699. 133* BARCODE_DBAR_LTD_CC GS1 Composite Symbol with GS1 DataBar
  700. Limited linear component
  701. 134* BARCODE_DBAR_EXP_CC GS1 Composite Symbol with GS1 DataBar
  702. Expanded linear component
  703. 135 BARCODE_UPCA_CC GS1 Composite Symbol with UPC-A linear
  704. component
  705. 136 BARCODE_UPCE_CC GS1 Composite Symbol with UPC-E linear
  706. component
  707. 137* BARCODE_DBAR_STK_CC GS1 Composite Symbol with GS1 DataBar
  708. Stacked component
  709. 138* BARCODE_DBAR_OMNSTK_CC GS1 Composite Symbol with GS1 DataBar
  710. Stacked Omnidirectional component
  711. 139* BARCODE_DBAR_EXPSTK_CC GS1 Composite Symbol with GS1 DataBar
  712. Expanded Stacked component
  713. 140 BARCODE_CHANNEL Channel Code
  714. 141 BARCODE_CODEONE Code One
  715. 142 BARCODE_GRIDMATRIX Grid Matrix
  716. 143 BARCODE_UPNQR UPNQR (Univerzalnega Plačilnega Naloga QR)
  717. 144 BARCODE_ULTRA Ultracode
  718. 145 BARCODE_RMQR Rectangular Micro QR Code (rMQR)
  719. 146 BARCODE_BC412 IBM BC412 (SEMI T1-95)
  720. 147 BARCODE_DXFILMEDGE DX Film Edge Barcode
  721. ------------------------------------------------------------------------------
  722. Table : Barcode Types (Symbologies)
  723. 4.4 Adjusting Height
  724. The height of a symbol (except those with a fixed width-to-height ratio) can be
  725. adjusted using the --height switch. For example:
  726. zint --height=100 -d "This Text"
  727. This specifies a symbol height of 100 times the X-dimension of the symbol.
  728. The default height of most linear barcodes is 50.0X, but this can be changed for
  729. barcodes whose specifications give a standard height by using the switch
  730. --compliantheight. For instance
  731. zint -b LOGMARS -d "This Text" --compliantheight
  732. will produce a barcode of height 45.455X instead of the normal default of 50.0X.
  733. The flag also causes Zint to return a warning if a non-compliant height is
  734. given:
  735. zint -b LOGMARS -d "This Text" --compliantheight --height=6.2
  736. Warning 247: Height not compliant with standards
  737. Another switch is --heightperrow, which can be useful for symbologies that have
  738. a variable number of linear rows, namely Codablock-F, Code 16K, Code 49, GS1
  739. DataBar Expanded Stacked, MicroPDF417 and PDF417, as it changes the treatment of
  740. the height value from overall height to per-row height, allowing you to specify
  741. a consistent height for each linear row without having to know how many there
  742. are. For instance
  743. zint -b PDF417 -d "This Text" --height=4 --heightperrow
  744. [zint -b PDF417 -d "This Text" --height=4 --heightperrow]
  745. will produce a barcode of height 32X, with each of the 8 rows 4X high.
  746. 4.5 Adjusting Whitespace
  747. The amount of horizontal whitespace to the left and right of the generated
  748. barcode can be altered using the -w or --whitesp switch, in integral multiples
  749. of the X-dimension. For example:
  750. zint -w 10 -d "This Text"
  751. This specifies a whitespace width of 10 times the X-dimension of the symbol both
  752. to the left and to the right of the barcode.
  753. The amount of vertical whitespace above and below the barcode can be altered
  754. using the --vwhitesp switch, in integral multiples of the X-dimension. For
  755. example for 3 times the X-dimension:
  756. zint --vwhitesp=3 -d "This Text"
  757. Note that the whitespace at the bottom appears below the text, if any.
  758. Horizontal and vertical whitespace can of course be used together:
  759. zint -b DATAMATRIX --whitesp=1 --vwhitesp=1 -d "This Text"
  760. A --quietzones option is also available which adds quiet zones compliant with
  761. the symbology’s specification. This is in addition to any whitespace specified
  762. with the --whitesp or --vwhitesp switches.
  763. Note that Codablock-F, Code 16K, Code 49, ITF-14, EAN-2 to EAN-13, ISBN, UPC-A
  764. and UPC-E have compliant quiet zones added by default. This can be disabled with
  765. the option --noquietzones.
  766. 4.6 Adding Boundary Bars and Boxes
  767. Zint allows the symbol to be bound with ‘boundary bars’ (also known as ‘bearer
  768. bars’) using the option --bind. These bars help to prevent misreading of the
  769. symbol by corrupting a scan if the scanning beam strays off the top or bottom of
  770. the symbol. Zint can also put a border right around the symbol and its
  771. horizontal whitespace with the --box option.
  772. The width of the boundary bars or box borders, in integral multiples of the
  773. X-dimension, must be specified using the --border switch. For example:
  774. zint --box --border=10 -w 10 -d "This Text"
  775. [zint --border=10 --box -d "This Text" -w 10]
  776. gives a box with a width 10 times the X-dimension of the symbol. Note that when
  777. specifying a box, horizontal whitespace is usually required in order to create a
  778. quiet zone between the barcode and the sides of the box. To add a boundary bar
  779. to the top only use --bindtop.
  780. For linear symbols, horizontal boundary bars appear tight against the barcode,
  781. inside any vertical whitespace (or text). For matrix symbols, however, where
  782. they are decorative rather than functional, boundary bars appear outside any
  783. whitespace.
  784. [zint -b QRCODE --border=1 --box -d "This Text" --quietzones]
  785. Codablock-F, Code 16K and Code 49 always have boundary bars, and default to
  786. particular horizontal whitespace values. Special considerations apply to ITF-14
  787. and DPD - see 6.1.2.6 ITF-14 and 6.1.10.7 DPD Code for those symbologies.
  788. 4.7 Using Colour
  789. The default colours of a symbol are a black symbol on a white background. Zint
  790. allows you to change this. The -r or --reverse switch allows the default colours
  791. to be inverted so that a white symbol is shown on a black background (known as
  792. “reflectance reversal” or “reversed reflectance”). For example the command
  793. zint -r -d "This Text"
  794. gives an inverted Code 128 symbol. This is not practical for most symbologies
  795. but white-on-black is allowed by the Aztec Code, Data Matrix, DotCode, Han Xin
  796. Code, Grid Matrix and QR Code symbology specifications.
  797. For more specific needs the foreground (ink) and background (paper) colours can
  798. be specified using the --fg and --bg options followed by a number in "RRGGBB"
  799. hexadecimal notation (the same system used in HTML) or in "C,M,Y,K" decimal
  800. percentages format (the latter normally used with the --cmyk option - see
  801. below). For example the command
  802. zint --fg=00FF00 -d "This Text"
  803. alters the symbol to a bright green.
  804. [zint -d "This Text" --fg=00FF00]
  805. Zint also supports RGBA colour information for those output file formats which
  806. support alpha channels (currently only GIF, PCX, PNG, SVG and TIF, with GIF
  807. supporting either a background or foreground alpha but not both) in a "RRGGBBAA"
  808. format. For example:
  809. zint --fg=00ff0055 -d "This Text"
  810. [zint -d "This Text" --fg=00FF0055]
  811. will produce a semi-transparent green foreground with a standard (white)
  812. background. Note that transparency is treated differently by raster and vector
  813. (SVG) output formats, as for vector output the background will “shine through” a
  814. transparent foreground. For instance
  815. zint --bg=ff0000 --fg=ffffff00 ...
  816. will give different results for PNG and SVG. Experimentation is advised!
  817. In addition the --nobackground option will remove the background from all output
  818. formats except BMP.[4]
  819. The --cmyk option is specific to output in Encapsulated PostScript (EPS) and
  820. TIF, and selects the CMYK colour space. Custom colours should then usually be
  821. given in the comma-separated "C,M,Y,K" format, where C, M, Y and K are expressed
  822. as decimal percentage values from 0 to 100. RGB values may still be used, in
  823. which case they will be converted formulaically to CMYK approximations.
  824. 4.8 Rotating the Symbol
  825. The symbol can be rotated through four orientations using the --rotate option
  826. followed by the angle of rotation as shown below.
  827. --rotate=0 (default)
  828. --rotate=90
  829. --rotate=180
  830. --rotate=270
  831. [zint -d "This Text" --rotate=90]
  832. 4.9 Adjusting Image Size (X-dimension)
  833. The size of the image can be altered using the --scale option, which sets the
  834. X-dimension. The default scale is 1.0.
  835. The scale is multiplied by 2 (with the exception of MaxiCode) before being
  836. applied to the X-dimension. For MaxiCode, it is multiplied by 10 for raster
  837. output, by 40 for EMF vector output, and by 2 otherwise (non-EMF vector output).
  838. For non-MaxiCode raster output, the default scale of 1 results in an X-dimension
  839. of 2 pixels. For example for non-MaxiCode PNG images a scale of 5 will increase
  840. the X-dimension to 10 pixels. For MaxiCode, see 4.9.3 MaxiCode Raster Scaling
  841. below.
  842. Scales for non-MaxiCode raster output should be given in increments of 0.5, i.e.
  843. 0.5, 1, 1.5, 2, 2.5, 3, 3.5, etc., to avoid the X-dimension varying across the
  844. symbol due to interpolation. 0.5 increments are also faster to render.
  845. The minimum scale for non-MaxiCode raster output in non-dotty mode is 0.5,
  846. giving a minimum X-dimension of 1 pixel. For MaxiCode, it is 0.2. The minimum
  847. scale for raster output in dotty mode is 1 (see 4.15 Working with Dots). For
  848. raster output, text will not be printed for scales less than 1.
  849. The minimum scale for vector output is 0.1, giving a minimum X-dimension of 0.2
  850. (or for MaxiCode EMF output, 4). The maximum scale for both raster and vector is
  851. 200.
  852. To summarize the more intricate details:
  853. -------------------------------------------------------------------
  854. MaxiCode? Output Multiplier Min. Scale Min. Scale
  855. (non-dotty) (dotty)
  856. ----------- ----------------- ------------ ------------- ----------
  857. No Raster 2 0.5 1
  858. No Vector 2 0.1 0.1
  859. Yes Raster 10 0.2 N/A
  860. Yes Vector (non-EMF) 2 0.1 N/A
  861. Yes EMF 40 0.1 N/A
  862. -------------------------------------------------------------------
  863. Table : Scaling Multipliers and Minima
  864. 4.9.1 Scaling by X-dimension and Resolution
  865. An alternative way to specify the scale, which takes the above details into
  866. account, is to specify measurable units using the --scalexdimdp option, which
  867. has the format
  868. --scalexdimdp=X[,R]
  869. where X is the X-dimension (in mm by default) and R is the resolution (in dpmm,
  870. dots per mm, by default). R is optional, and defaults to 12 dpmm, and X may be
  871. zero, in which case it uses a symbology-specific default. The units may be given
  872. in inches for X by appending "in", and in dpi (dots per inch) for R by appending
  873. "dpi". For example
  874. zint -d "1234" --scalexdimdp=0.013in,300dpi
  875. Explicit metric units may also be given by appending "mm" and "dpmm" as
  876. appropriate, and may be mixed with U.S. units:
  877. zint -d "1234" --scalexdimdp=0.33mm,300dpi
  878. 4.9.2 Scaling Example
  879. The GS1 General Specifications Section 5.2.6.6 ‘Symbol dimensions at nominal
  880. size’ gives an example of an EAN-13 barcode using the X-dimension of 0.33mm. To
  881. print that example as a PNG at 12 dpmm, the approximate equivalent of 300 dpi
  882. (dpi = dpmm * 25.4), specify a scale of 2, since 0.33 * 12 = 3.96 pixels, or 4
  883. pixels rounding to the nearest pixel:
  884. zint -b EANX -d "501234567890" --compliantheight --scale=2
  885. This will result in output of 37.29mm x 25.56mm (WxH) at 12 dpmm. The same
  886. result can be achieved using the --scalexdimdp option with
  887. zint -b EANX -d "501234567890" --compliantheight --scalexdimdp=0
  888. as 0.33mm is the default X-dimension for EAN, and 12 dpmm the default
  889. resolution.
  890. 4.9.3 MaxiCode Raster Scaling
  891. For MaxiCode symbols, which use hexagons, the scale for raster output is
  892. multiplied by 10 before being applied. The 0.5 increment recommended for normal
  893. raster output does not apply.
  894. The minimum scale is 0.2, so the minimum X-dimension is 2 pixels. However scales
  895. below 0.5 are not recommended and may produce symbols that are not within the
  896. following size ranges.
  897. MaxiCode symbols have fixed size ranges of 24.82mm to 27.93mm in width, and
  898. 23.71mm to 26.69mm in height, excluding quiet zones. The default X-dimension is
  899. 0.88mm. For example, to output at the default X-dimension at 600 dpi specify:
  900. zint -b MAXICODE -d "MaxiCode (19 chars)" --scalexdimdp=0,600dpi
  901. 4.10 Human Readable Text (HRT) Options
  902. For linear barcodes the text present in the output image can be removed by using
  903. the --notext option. Note also that for raster output text will not be printed
  904. for scales less than 1 (see 4.9 Adjusting Image Size (X-dimension)).
  905. Text can be set to bold using the --bold option, or a smaller font can be
  906. substituted using the --small option. The --bold and --small options can be used
  907. together if required, but only for vector output.
  908. [zint --bold -d "This Text" --small]
  909. The gap between the barcode and the text can be adjusted using the --textgap
  910. option, where the gap is given in X-dimensions, and may be negative (minimum
  911. -5.0X, maximum 10.0X). The default gap is 1X. Note that a very small gap may
  912. cause accented texts to overlap with the barcode:
  913. [zint -d "Áccent" --textgap=0.1]
  914. For SVG output, the font preferred by Zint (monospaced “OCR-B” for EAN/UPC,
  915. “Arimo” - a proportional sans-serif font metrically compatible with “Arial” -
  916. for all others) can be embedded in the file for portability using the
  917. --embedfont option:
  918. [zint -d "Áccent" --embedfont]
  919. 4.11 Input Modes
  920. 4.11.1 Unicode, Data, and GS1 Modes
  921. By default all CLI input data is assumed to be encoded in UTF-8 format. Many
  922. barcode symbologies encode data using the Latin-1 (ISO/IEC 8859-1 plus ASCII)
  923. character set, so input is converted from UTF-8 to Latin-1 before being put in
  924. the symbol. In addition QR Code and its variants and Han Xin Code can by default
  925. encode Japanese (Kanji) or Chinese (Hanzi) characters which are also converted
  926. from UTF-8.
  927. There are two exceptions to the Latin-1 default: Grid Matrix, whose default
  928. character set is GB 2312 (Chinese); and UPNQR, whose default character set is
  929. Latin-2 (ISO/IEC 8859-2 plus ASCII).
  930. Symbology Default character sets Alternate if input not Latin-1
  931. --------------- -------------------------- --------------------------------
  932. Aztec Code Latin-1 None
  933. Codablock-F Latin-1 None
  934. Code 128 Latin-1 None
  935. Code 16K Latin-1 None
  936. Code One Latin-1 None
  937. Data Matrix Latin-1 None
  938. DotCode Latin-1 None
  939. Grid Matrix GB 2312 (includes ASCII) N/A
  940. Han Xin Latin-1 GB 18030 (includes ASCII)
  941. MaxiCode Latin-1 None
  942. MicroPDF417 Latin-1 None
  943. Micro QR Code Latin-1 Shift JIS (includes ASCII[5])
  944. PDF417 Latin-1 None
  945. QR Code Latin-1 Shift JIS (see above)
  946. rMQR Latin-1 Shift JIS (see above)
  947. Ultracode Latin-1 None
  948. UPNQR Latin-2 N/A
  949. All others ASCII N/A
  950. Table : Default Character Sets
  951. If Zint encounters characters which can not be encoded using the default
  952. character encoding then it will take advantage of the ECI (Extended Channel
  953. Interpretations) mechanism to encode the data if the symbology supports it - see
  954. 4.11.2 Input Modes and ECI below.
  955. GS1 data can be encoded in a number of symbologies. Application Identifiers
  956. (AIs) should be enclosed in [square brackets] followed by the data to be encoded
  957. (see 6.1.10.3 GS1-128). To encode GS1 data use the --gs1 option. GS1 mode is
  958. assumed (and doesn’t need to be set) for GS1-128, EAN-14, GS1 DataBar and GS1
  959. Composite symbologies but is also available for Aztec Code, Code 16K, Code 49,
  960. Code One, Data Matrix, DotCode, QR Code and Ultracode.
  961. Health Industry Barcode (HIBC) data may also be encoded in the symbologies Aztec
  962. Code, Codablock-F, Code 128, Code 39, Data Matrix, MicroPDF417, PDF417 and QR
  963. Code. Within this mode, the leading '+' and the check character are
  964. automatically added by Zint, conforming to HIBC Labeler Identification Code
  965. (HIBC LIC). For HIBC Provider Applications Standard (HIBC PAS), preface the data
  966. with a slash '/'.
  967. The --binary option encodes the input data as given. Automatic code page
  968. translation to an ECI page is disabled, and no validation of the data’s encoding
  969. takes place. This may be used for raw binary or binary encrypted data. This
  970. switch plays together with the built-in ECI logic and examples may be found
  971. below.
  972. The --fullmultibyte option uses the multibyte modes of QR Code, Micro QR Code,
  973. Rectangular Micro QR Code, Han Xin Code and Grid Matrix for non-ASCII data,
  974. maximizing density. This is achieved by using compression designed for
  975. Kanji/Hanzi characters; however some decoders take blocks which are encoded this
  976. way and interpret them as Kanji/Hanzi characters, thus causing data corruption.
  977. Symbols encoded with this option should be checked against decoders before they
  978. are used. The popular open-source ZXing decoder is known to exhibit this
  979. behaviour.
  980. 4.11.2 Input Modes and ECI
  981. If your data contains characters that are not in the default character set, you
  982. may encode it using an ECI-aware symbology and an ECI value from Table
  983. : ECI Codes below. The ECI information is added to your code symbol as prefix
  984. data. The symbologies that support ECI are
  985. ------------- -------------- -----------
  986. Aztec Code Grid Matrix PDF417
  987. Code One Han Xin Code QR Code
  988. Data Matrix MaxiCode rMQR
  989. DotCode MicroPDF417 Ultracode
  990. ------------- -------------- -----------
  991. Table : ECI-Aware Symbologies
  992. Be aware that not all barcode readers support ECI mode, so this can sometimes
  993. lead to unreadable barcodes. If you are using characters beyond those supported
  994. by the default character set then you should check that the resulting barcode
  995. can be understood by your target barcode reader.
  996. The ECI value may be specified with the --eci switch, followed by the value in
  997. the column "ECI Code" in the table below. The input data should be UTF-8
  998. formatted. Zint automatically translates the data into the target encoding.
  999. ECI Code Character Encoding Scheme (ISO/IEC 8859 schemes include ASCII)
  1000. ---------- ----------------------------------------------------------------
  1001. 3 ISO/IEC 8859-1 - Latin alphabet No. 1
  1002. 4 ISO/IEC 8859-2 - Latin alphabet No. 2
  1003. 5 ISO/IEC 8859-3 - Latin alphabet No. 3
  1004. 6 ISO/IEC 8859-4 - Latin alphabet No. 4
  1005. 7 ISO/IEC 8859-5 - Latin/Cyrillic alphabet
  1006. 8 ISO/IEC 8859-6 - Latin/Arabic alphabet
  1007. 9 ISO/IEC 8859-7 - Latin/Greek alphabet
  1008. 10 ISO/IEC 8859-8 - Latin/Hebrew alphabet
  1009. 11 ISO/IEC 8859-9 - Latin alphabet No. 5 (Turkish)
  1010. 12 ISO/IEC 8859-10 - Latin alphabet No. 6 (Nordic)
  1011. 13 ISO/IEC 8859-11 - Latin/Thai alphabet
  1012. 15 ISO/IEC 8859-13 - Latin alphabet No. 7 (Baltic)
  1013. 16 ISO/IEC 8859-14 - Latin alphabet No. 8 (Celtic)
  1014. 17 ISO/IEC 8859-15 - Latin alphabet No. 9
  1015. 18 ISO/IEC 8859-16 - Latin alphabet No. 10
  1016. 20 Shift JIS (JIS X 0208 and JIS X 0201)
  1017. 21 Windows 1250 - Latin 2 (Central Europe)
  1018. 22 Windows 1251 - Cyrillic
  1019. 23 Windows 1252 - Latin 1
  1020. 24 Windows 1256 - Arabic
  1021. 25 UTF-16BE (High order byte first)
  1022. 26 UTF-8
  1023. 27 ASCII (ISO/IEC 646 IRV)
  1024. 28 Big5 (Taiwan) Chinese Character Set
  1025. 29 GB 2312 (PRC) Chinese Character Set
  1026. 30 Korean Character Set EUC-KR (KS X 1001:2002)
  1027. 31 GBK Chinese Character Set
  1028. 32 GB 18030 Chinese Character Set
  1029. 33 UTF-16LE (Low order byte first)
  1030. 34 UTF-32BE (High order bytes first)
  1031. 35 UTF-32LE (Low order bytes first)
  1032. 170 ISO/IEC 646 Invariant[6]
  1033. 899 8-bit binary data
  1034. Table : ECI Codes
  1035. An ECI value of 0 does not encode any ECI information in the code symbol (unless
  1036. the data contains non-default character set characters). In this case, the
  1037. default character set applies (see Table : Default Character Sets above).
  1038. If no ECI is specified or a value of 0 is given, and the data does contain
  1039. characters other than in the default character set, then Zint will automatically
  1040. insert the appropriate single-byte ECI if possible (ECIs 3 to 24, excluding ECI
  1041. 20), or failing that ECI 26 (UTF-8). A warning will be generated. This mechanism
  1042. is not applied if the --binary option is given.
  1043. Multiple ECIs can be specified using the --segN options - see 4.16 Multiple
  1044. Segments.
  1045. Note: the --eci=3 specification should only be used for special purposes. Using
  1046. this parameter, the ECI information is explicitly added to the symbol.
  1047. Nevertheless, for ECI Code 3, this is not usually required, as this is the
  1048. default encoding for most barcodes, which is also active without any ECI
  1049. information.
  1050. 4.11.2.1 Input Modes and ECI Example 1
  1051. The Euro sign U+20AC can be encoded in ISO/IEC 8859-15. The Euro sign has the
  1052. ISO/IEC 8859-15 codepoint hex "A4". It is encoded in UTF-8 as the hex sequence:
  1053. "E2 82 AC". Those 3 bytes are contained in the file "utf8euro.txt". This command
  1054. will generate the corresponding code:
  1055. zint -b 71 --scale=10 --eci=17 -i utf8euro.txt
  1056. This is equivalent to the commands (using the --esc switch):
  1057. zint -b 71 --scale=10 --eci=17 --esc -d "\xE2\x82\xAC"
  1058. zint -b 71 --scale=10 --eci=17 --esc -d "\u20AC"
  1059. and to the command:
  1060. zint -b 71 --scale=10 --eci=17 -d "€"
  1061. [zint -b DATAMATRIX --eci=17 -d "€"]
  1062. 4.11.2.2 Input Modes and ECI Example 2
  1063. The Chinese character with the Unicode codepoint U+5E38 can be encoded in Big5
  1064. encoding. The Big5 representation of this character is the two hex bytes:
  1065. "B1 60" (contained in the file "big5char.txt"). The generation command for Data
  1066. Matrix is:
  1067. zint -b 71 --scale=10 --eci=28 --binary -i big5char.txt
  1068. This is equivalent to the command (using the --esc switch):
  1069. zint -b 71 --scale=10 --eci=28 --binary --esc -d "\xB1\x60"
  1070. and to the commands (no --binary switch so conversion occurs):
  1071. zint -b 71 --scale=10 --eci=28 --esc -d "\xE5\xB8\xB8"
  1072. zint -b 71 --scale=10 --eci=28 --esc -d "\u5E38"
  1073. zint -b 71 --scale=10 --eci=28 -d "常"
  1074. [zint -b DATAMATRIX --eci=28 -d "\u5E38" --esc]
  1075. 4.11.2.3 Input Modes and ECI Example 3
  1076. Some decoders (in particular mobile app ones) for QR Code assume UTF-8 encoding
  1077. by default and do not support ECI. In this case supply UTF-8 data and use the
  1078. --binary switch so that the data will be encoded as UTF-8 without conversion:
  1079. zint -b 58 --binary -d "UTF-8 data"
  1080. [zint -b QRCODE --binary -d "\xE2\x82\xAC\xE5\xB8\xB8" --esc]
  1081. 4.12 Batch Processing
  1082. Data can be batch processed by reading from a text file and producing a separate
  1083. barcode image for each line of text in that file. To do this use the --batch
  1084. switch together with -i to select the input file from which to read data. For
  1085. example
  1086. zint -b EANX --batch -i ean13nos.txt
  1087. where "ean13nos.txt" contains a list of EAN-13 numbers (GTINs), each on its own
  1088. line. Zint will automatically detect the end of a line of text (in either Unix
  1089. or Windows formatted text files) and produce a symbol each time it finds this.
  1090. Input files should end with a line feed character - if this is not present then
  1091. Zint will not encode the last line of text, and will warn you that there is a
  1092. problem.
  1093. By default Zint will output numbered filenames starting with 00001.png,
  1094. 00002.png etc. To change this behaviour specify the -o option using special
  1095. characters in the output filename as shown in the table below:
  1096. Input Character Interpretation
  1097. ----------------- ----------------------------------------
  1098. ~ Insert a number or 0
  1099. # Insert a number or space
  1100. @ Insert a number or * (or + on Windows)
  1101. Any other Insert literally
  1102. Table : Batch Filename Formatting
  1103. For instance
  1104. zint -b EANX --batch -i ean13nos.txt -o file~~~.svg
  1105. The following table shows some examples to clarify this method:
  1106. Input Filenames Generated
  1107. ----------------- -----------------------------------------------------
  1108. -o file~~~.svg "file001.svg", "file002.svg", "file003.svg"
  1109. -o @@@@bar.png "***1.png", "***2.png", "***3.png" (except Windows)
  1110. -o @@@@bar.png "+++1.png", "+++2.png", "+++3.png" (on Windows)
  1111. -o my~~~bar.eps "my001bar.eps", "my002bar.eps", "my003bar.eps"
  1112. -o t#es~t~.png "t es0t1.png", "t es0t2.png", "t es0t3.png"
  1113. Table : Batch Filename Examples
  1114. The special characters can span directories also, which is useful when creating
  1115. a large number of barcodes:
  1116. Input Filenames Generated
  1117. --------------------- ---------------------------------------------
  1118. -o dir~/file~~~.svg "dir0/file001.svg", "dir0/file002.svg", …
  1119. , "dir0/file999.svg", "dir1/file000.svg", …
  1120. Table : Batch Directory Examples
  1121. For an alternative method of naming output files see the --mirror option in 4.14
  1122. Automatic Filenames below.
  1123. 4.13 Direct Output to stdout
  1124. The finished image files can be output directly to stdout for use as part of a
  1125. pipe by using the --direct option. By default --direct will output data as a PNG
  1126. image (or GIF image if libpng is not present), but this can be altered by
  1127. supplementing the --direct option with a --filetype option followed by the
  1128. suffix of the file type required. For example:
  1129. zint -b 84 --direct --filetype=pcx -d "Data to encode"
  1130. This command will output the symbol as a PCX file to stdout. For the supported
  1131. output file formats see Table : Output File Formats.
  1132. --------------------------------------------------------------------------------
  1133. CAUTION: Outputting binary files to the command shell without catching that data
  1134. in a pipe can have unpredictable results. Use with care!
  1135. --------------------------------------------------------------------------------
  1136. 4.14 Automatic Filenames
  1137. The --mirror option instructs Zint to use the data to be encoded as an indicator
  1138. of the filename to be used. This is particularly useful if you are processing
  1139. batch data. For example the input data "1234567" will result in a file named
  1140. "1234567.png".
  1141. There are restrictions, however, on what characters can be stored in a filename,
  1142. so the filename may vary from the data if the data includes non-printable
  1143. characters, for example, and may be shortened if the data input is long.
  1144. To set the output file format use the --filetype option as detailed above in
  1145. 4.13 Direct Output to stdout. To output to a specific directory use the -o
  1146. option giving the name of the directory (any filename will be ignored, unless
  1147. --filetype is not specified, in which case the filename’s extension will be
  1148. used).
  1149. 4.15 Working with Dots
  1150. Matrix codes can be rendered as a series of dots or circles rather than the
  1151. normal squares by using the --dotty option. This option is only available for
  1152. matrix symbologies, and is automatically selected for DotCode. The size of the
  1153. dots can be adjusted using the --dotsize option followed by the diameter of the
  1154. dot, where that diameter is in X-dimensions. The minimum dot size is 0.01, the
  1155. maximum is 20. The default size is 0.8.
  1156. The default and minimum scale for raster output in dotty mode is 1.
  1157. [zint -b CODEONE -d "123456789012345678" --dotty --vers=9]
  1158. 4.16 Multiple Segments
  1159. If you need to specify different ECIs for different sections of the input data,
  1160. the --seg1 to --seg9 options can be used. Each option is of the form
  1161. --segN=ECI,data where ECI is the ECI code (see Table : ECI Codes) and data is
  1162. the data to which this applies. This is in addition to the ECI and data
  1163. specified using the --eci and -d options which must still be present and which
  1164. in effect constitute segment 0. For instance
  1165. zint -b AZTEC_CODE --eci=9 -d "Κείμενο" --seg1=7,"Текст" --seg2=20,"文章"
  1166. specifies 3 segments: segment 0 with ECI 9 (Greek), segment 1 with ECI 7
  1167. (Cyrillic), and segment 2 with ECI 20 (Shift JIS). Segments must be consecutive.
  1168. Naturally the symbology must be ECI-aware (see Table : ECI-Aware Symbologies).
  1169. [zint -b AZTEC --eci=9 -d "Κείμενο" --seg1=7,"Текст" --seg2=20,"文章"]
  1170. ECIs of zero may be given, in which case Zint will automatically determine an
  1171. ECI if necessary, as described in section 4.11.2 Input Modes and ECI.
  1172. Multiple segments are not currently supported for use with GS1 data.
  1173. 4.17 Structured Append
  1174. Structured Append is a method of splitting data among several symbols so that
  1175. they form a sequence that can be scanned and re-assembled in the correct order
  1176. on reading, and is available for Aztec Code, Code One, Data Matrix, DotCode,
  1177. Grid Matrix, MaxiCode, MicroPDF417, PDF417, QR Code and Ultracode.
  1178. The --structapp option marks a symbol as part of a Structured Append sequence,
  1179. and has the format
  1180. --structapp=I,C[,ID]
  1181. [zint -b DATAMATRIX -d "2nd of 3" --structapp="2,3,5006"]
  1182. where I is the index (position) of the symbol in the Structured Append sequence,
  1183. C is the count or total number of symbols in the sequence, and ID is an optional
  1184. identifier (not available for Code One, DotCode or MaxiCode) that is the same
  1185. for all symbols belonging to the same sequence. The index is 1-based and goes
  1186. from 1 to count. Count must be 2 or more. See the individual symbologies for
  1187. further details.
  1188. 4.18 Help Options
  1189. There are three help options which give information about how to use the command
  1190. line. The -h or --help option will display a list of all of the valid options
  1191. available, and also gives the exact version of the software (the version by
  1192. itself can be displayed with -v or --version).
  1193. The -t or --types option gives the table of symbologies along with the symbol ID
  1194. numbers and names.
  1195. The -e or --ecinos option gives a list of the ECI codes.
  1196. 4.19 Other Options
  1197. Zint can output a representation of the symbol data as a set of hexadecimal
  1198. values if asked to output to a text file ("*.txt") or if given the option
  1199. --filetype=txt. This can be used for test and diagnostic purposes.
  1200. Additional options are available which are specific to certain symbologies.
  1201. These may, for example, control the amount of error correction data or the size
  1202. of the symbol. These options are discussed in section 6. Types of Symbology of
  1203. this guide.
  1204. 5. Using the API
  1205. Zint has been written using the C language and has an API for use with C/C++
  1206. language programs. A Qt interface (see Annex B. Qt Backend QZint) is available
  1207. in the "backend_qt" sub-directory, and a Tcl interface is available in the
  1208. "backend_tcl" sub-directory (see Annex C. Tcl Backend Binding).
  1209. The libzint API has been designed to be very similar to that used by the GNU
  1210. Barcode package. This allows easy migration from GNU Barcode to Zint. Zint,
  1211. however, uses none of the same function names or option names as GNU Barcode.
  1212. This allows you to use both packages in your application without conflict if you
  1213. wish.
  1214. 5.1 Creating and Deleting Symbols
  1215. The symbols manipulated by Zint are held in a zint_symbol structure defined in
  1216. "zint.h". These symbol structures are created with the ZBarcode_Create()
  1217. function and deleted using the ZBarcode_Delete() function. For example the
  1218. following code creates and then deletes a symbol:
  1219. #include <zint.h>
  1220. #include <stdio.h>
  1221. int main()
  1222. {
  1223. struct zint_symbol *my_symbol;
  1224. my_symbol = ZBarcode_Create();
  1225. if (my_symbol != NULL) {
  1226. printf("Symbol successfully created!\n");
  1227. ZBarcode_Delete(my_symbol);
  1228. }
  1229. return 0;
  1230. }
  1231. When compiling this code it will need to be linked with the libzint library
  1232. using the -lzint option:
  1233. gcc -o simple simple.c -lzint
  1234. 5.2 Encoding and Saving to File
  1235. To encode data in a barcode use the ZBarcode_Encode() function. To write the
  1236. symbol to a file use the ZBarcode_Print() function. For example the following
  1237. code takes a string from the command line and outputs a Code 128 symbol to a PNG
  1238. file named "out.png" (or a GIF file "out.gif" if libpng is not present) in the
  1239. current working directory:
  1240. #include <zint.h>
  1241. int main(int argc, char **argv)
  1242. {
  1243. struct zint_symbol *my_symbol;
  1244. my_symbol = ZBarcode_Create();
  1245. ZBarcode_Encode(my_symbol, argv[1], 0);
  1246. ZBarcode_Print(my_symbol, 0);
  1247. ZBarcode_Delete(my_symbol);
  1248. return 0;
  1249. }
  1250. This can also be done in one stage using the ZBarcode_Encode_and_Print()
  1251. function as shown in the next example:
  1252. #include <zint.h>
  1253. int main(int argc, char **argv)
  1254. {
  1255. struct zint_symbol *my_symbol;
  1256. my_symbol = ZBarcode_Create();
  1257. ZBarcode_Encode_and_Print(my_symbol, argv[1], 0, 0);
  1258. ZBarcode_Delete(my_symbol);
  1259. return 0;
  1260. }
  1261. Note that when using the API, the input data is assumed to be 8-bit binary
  1262. unless the input_mode member of the zint_symbol structure is set - see 5.11
  1263. Setting the Input Mode for details.
  1264. 5.3 Encoding and Printing Functions in Depth
  1265. The functions for encoding and printing barcodes are defined as:
  1266. int ZBarcode_Encode(struct zint_symbol *symbol,
  1267. const unsigned char *source, int length);
  1268. int ZBarcode_Encode_File(struct zint_symbol *symbol,
  1269. const char *filename);
  1270. int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle);
  1271. int ZBarcode_Encode_and_Print(struct zint_symbol *symbol,
  1272. const unsigned char *source, int length, int rotate_angle);
  1273. int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol,
  1274. const char *filename, int rotate_angle);
  1275. In these definitions length can be used to set the length of the input string.
  1276. This allows the encoding of NUL (ASCII 0) characters in those symbologies which
  1277. allow this. A value of 0 (or less than 0) will disable this usage and Zint will
  1278. encode data up to the first NUL character in the input string, which must be
  1279. present.
  1280. The rotate_angle value can be used to rotate the image when outputting. Valid
  1281. values are 0, 90, 180 and 270.
  1282. The ZBarcode_Encode_File() and ZBarcode_Encode_File_and_Print() functions can be
  1283. used to encode data read directly from a text file where the filename is given
  1284. in the NUL-terminated filename string. The special filename "-" (single hyphen)
  1285. can be used to read from stdin. Note that on Windows, filenames are assumed to
  1286. be UTF-8 encoded.
  1287. If printing more than one barcode, the zint_symbol structure may be re-used by
  1288. calling the ZBarcode_Clear() function after each barcode to free any output
  1289. buffers allocated. The zint_symbol input members must be reset. To fully restore
  1290. zint_symbol to its default state, call ZBarcode_Reset() instead.
  1291. 5.4 Buffering Symbols in Memory (raster)
  1292. In addition to saving barcode images to file Zint allows you to access a
  1293. representation of the resulting bitmap image in memory. The following functions
  1294. allow you to do this:
  1295. int ZBarcode_Buffer(struct zint_symbol *symbol, int rotate_angle);
  1296. int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol,
  1297. const unsigned char *source, int length, int rotate_angle);
  1298. int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol,
  1299. const char *filename, int rotate_angle);
  1300. The arguments here are the same as above, and rotation and colour options can be
  1301. used with the buffer functions in the same way as when saving to a file. The
  1302. difference is that instead of saving the image to a file it is placed in a byte
  1303. (unsigned char) array pointed to by the bitmap member, with bitmap_width set to
  1304. the number of columns and bitmap_height set to the number of rows.
  1305. The RGB channels are split into 3 consecutive red, green, blue bytes per pixel,
  1306. and there are bitmap_width pixels per row and bitmap_height rows, so the total
  1307. size of the bitmap array is 3 * bitmap_width * bitmap_height.
  1308. If the background and/or foreground are RGBA then the byte array alphamap will
  1309. also be set, with a single alpha value for each pixel. Its total size will be
  1310. bitmap_width * bitmap_height.
  1311. The pixel data can be extracted from the array (or arrays) by the method shown
  1312. in the example below, where render_rgb() and render_rgba() are assumed to be
  1313. functions for drawing an RGB and RGBA pixel on the screen implemented by the
  1314. client application:
  1315. int row, col, i = 0, j = 0;
  1316. int red, blue, green, alpha;
  1317. for (row = 0; row < my_symbol->bitmap_height; row++) {
  1318. for (col = 0; col < my_symbol->bitmap_width; col++) {
  1319. red = (int) my_symbol->bitmap[i];
  1320. green = (int) my_symbol->bitmap[i + 1];
  1321. blue = (int) my_symbol->bitmap[i + 2];
  1322. if (my_symbol->alphamap) {
  1323. alpha = (int) my_symbol->alphamap[j];
  1324. render_rgba(row, col, red, green, blue, alpha);
  1325. j++;
  1326. } else {
  1327. render_rgb(row, col, red, green, blue);
  1328. }
  1329. i += 3;
  1330. }
  1331. }
  1332. Where speed is important, the buffer can be returned instead in a more compact
  1333. intermediate form using the output option OUT_BUFFER_INTERMEDIATE. Here each
  1334. byte is an ASCII value: '1' for foreground colour and '0' for background colour,
  1335. except for Ultracode, which also uses colour codes: 'W' for white, 'C' for cyan,
  1336. 'B' for blue, 'M' for magenta, 'R' for red, 'Y' for yellow, 'G' for green, and
  1337. 'K' for black. Alpha values are not reported (alphamap will always be NULL). The
  1338. loop for accessing the data is then:
  1339. int row, col, i = 0;
  1340. for (row = 0; row < my_symbol->bitmap_height; row++) {
  1341. for (col = 0; col < my_symbol->bitmap_width; col++) {
  1342. render_pixel(row, col, my_symbol->bitmap[i]);
  1343. i++;
  1344. }
  1345. }
  1346. 5.5 Buffering Symbols in Memory (vector)
  1347. Symbols can also be saved to memory in a vector representation as well as a
  1348. bitmap one. The following functions, exactly analogous to the ones above, allow
  1349. you to do this:
  1350. int ZBarcode_Buffer_Vector(struct zint_symbol *symbol, int rotate_angle);
  1351. int ZBarcode_Encode_and_Buffer_Vector(struct zint_symbol *symbol,
  1352. const unsigned char *source, int length, int rotate_angle);
  1353. int ZBarcode_Encode_File_and_Buffer_Vector(struct zint_symbol *symbol,
  1354. const char *filename, int rotate_angle);
  1355. Here the vector member is set to point to a zint_vector header structure which
  1356. contains pointers to lists of structures representing the various elements of
  1357. the barcode: rectangles, hexagons, strings and circles. To draw the barcode,
  1358. each of the element types is iterated in turn, and using the information stored
  1359. is drawn by a rendering system. For instance, to draw a barcode using a
  1360. rendering system with prepare_canvas(), draw_rect(), draw_hexagon(),
  1361. draw_string(), and draw_circle() routines available:
  1362. struct zint_vector_rect *rect;
  1363. struct zint_vector_hexagon *hex;
  1364. struct zint_vector_string *string;
  1365. struct zint_vector_circle *circle;
  1366. prepare_canvas(my_symbol->vector->width, my_symbol->vector->height,
  1367. my_symbol->scale, my_symbol->fgcolour, my_symbol->bgcolour,
  1368. rotate_angle);
  1369. for (rect = my_symbol->vector->rectangles; rect; rect = rect->next) {
  1370. draw_rect(rect->x, rect->y, rect->width, rect->height,
  1371. rect->colour);
  1372. }
  1373. for (hex = my_symbol->vector->hexagons; hex; hex = hex->next) {
  1374. draw_hexagon(hex->x, hex->y, hex->diameter, hex->rotation);
  1375. }
  1376. for (string = my_symbol->vector->strings; string; string = string->next) {
  1377. draw_string(string->x, string->y, string->fsize,
  1378. string->rotation, string->halign,
  1379. string->text, string->length);
  1380. }
  1381. for (circle = my_symbol->vector->circles; circle; circle = circle->next) {
  1382. draw_circle(circle->x, circle->y, circle->diameter, circle->width);
  1383. }
  1384. 5.6 Buffering Symbols in Memory (memfile)
  1385. Symbols can also be stored as “in-memory” file buffers by giving the
  1386. BARCODE_MEMORY_FILE option to the output_options member, which saves the print
  1387. output to member memfile instead of to the output file outfile. The length of
  1388. the buffer is given in memfile_size. For instance:
  1389. #include <zint.h>
  1390. #include <stdio.h>
  1391. #include <string.h>
  1392. int main(int argc, char **argv)
  1393. {
  1394. struct zint_symbol *my_symbol;
  1395. my_symbol = ZBarcode_Create();
  1396. my_symbol->output_options |= BARCODE_MEMORY_FILE;
  1397. /* Only the extension is used, to determine output format */
  1398. strcpy(my_symbol->outfile, "mem.svg");
  1399. ZBarcode_Encode_and_Print(my_symbol, argv[1], 0, 0);
  1400. /* `my_symbol->memfile` now contains the SVG output */
  1401. fwrite(my_symbol->memfile, 1, my_symbol->memfile_size, stdout);
  1402. ZBarcode_Delete(my_symbol);
  1403. return 0;
  1404. }
  1405. will print the SVG output to stdout (the file “mem.svg” is not created). This is
  1406. particularly useful for the textual formats EPS and SVG,[7] allowing the output
  1407. to be manipulated and processed by the client.
  1408. 5.7 Setting Options
  1409. So far our application is not very useful unless we plan to only make Code 128
  1410. symbols and we don’t mind that they only save to "out.png" (or to memory, as
  1411. above). As with the CLI program, of course, these options can be altered. The
  1412. way this is done is by altering the contents of the zint_symbol structure
  1413. between the creation and encoding stages. The zint_symbol structure consists of
  1414. the following members:
  1415. ------------------------------------------------------------------------------
  1416. Member Name Type Meaning Default Value
  1417. -------------------- ------------ -------------------------- -----------------
  1418. symbology integer Symbol to use - see 5.9 BARCODE_CODE128
  1419. Specifying a Symbology.
  1420. height float Symbol height in Symbol dependent
  1421. X-dimensions, excluding
  1422. fixed width-to-height
  1423. symbols.[8]
  1424. scale float Scale factor for adjusting 1.0
  1425. size of image (sets
  1426. X-dimension).
  1427. whitespace_width integer Horizontal whitespace 0
  1428. width in X-dimensions.
  1429. whitespace_height integer Vertical whitespace height 0
  1430. in X-dimensions.
  1431. border_width integer Border width in 0
  1432. X-dimensions.
  1433. output_options integer Set various output 0 (none)
  1434. parameters - see 5.10
  1435. Adjusting Output Options.
  1436. fgcolour character Foreground (ink) colour as "000000"
  1437. string RGB/RGBA hexadecimal
  1438. string or "C,M,Y,K"
  1439. decimal percentages
  1440. string, with a terminating
  1441. NUL.
  1442. bgcolour character Background (paper) colour "ffffff"
  1443. string as RGB/RGBA hexadecimal
  1444. string or "C,M,Y,K"
  1445. decimal percentages
  1446. string, with a terminating
  1447. NUL.
  1448. fgcolor pointer Points to fgcolour
  1449. allowing alternate
  1450. spelling.
  1451. bgcolor pointer Points to bgcolour
  1452. allowing alternate
  1453. spelling.
  1454. outfile character Contains the name of the "out.png"
  1455. string file to output a resulting
  1456. barcode symbol to. Must
  1457. end in .png, .gif, .bmp,
  1458. .emf, .eps, .pcx, .svg,
  1459. .tif or .txt followed by a
  1460. terminating NUL.[9]
  1461. primary character Primary message data for "" (empty)
  1462. string more complex symbols, with
  1463. a terminating NUL.
  1464. option_1 integer Symbol specific options. -1
  1465. option_2 integer Symbol specific options. 0
  1466. option_3 integer Symbol specific options. 0
  1467. show_hrt integer Set to 0 to hide Human 1
  1468. Readable Text (HRT).
  1469. input_mode integer Set encoding of input DATA_MODE
  1470. data - see 5.11 Setting
  1471. the Input Mode.
  1472. eci integer Extended Channel 0 (none)
  1473. Interpretation code.
  1474. dpmm float Resolution of output in 0 (none)
  1475. dots per mm (BMP, EMF,
  1476. PCX, PNG and TIF only).
  1477. dot_size float Diameter of dots used in 0.8
  1478. dotty mode (in
  1479. X-dimensions).
  1480. text_gap float Gap between barcode and 1.0
  1481. text (HRT) in
  1482. X-dimensions.
  1483. guard_descent float Height of guard bar 5.0
  1484. descent (EAN/UPC only) in
  1485. X-dimensions.
  1486. structapp Structured Mark a symbol as part of a count 0
  1487. Append sequence of symbols. (disabled)
  1488. structure
  1489. debug integer Debugging flags. 0
  1490. warn_level integer Affects error/warning WARN_DEFAULT
  1491. value returned by Zint
  1492. API - see 5.8 Handling
  1493. Errors.
  1494. text unsigned Human Readable Text, which "" (empty)
  1495. character usually consists of input (output only)
  1496. string data plus one more check
  1497. digit. Uses UTF-8
  1498. formatting, with a
  1499. terminating NUL.
  1500. rows integer Number of rows used by the (output only)
  1501. symbol.
  1502. width integer Width of the generated (output only)
  1503. symbol.
  1504. encoded_data array of Representation of the (output only)
  1505. unsigned encoded data.
  1506. character
  1507. arrays
  1508. row_height array of Heights of each row. (output only)
  1509. floats
  1510. errtxt character Error message in the event (output only)
  1511. string that an error occurred,
  1512. with a terminating NUL -
  1513. see 5.8 Handling Errors.
  1514. bitmap pointer to Pointer to stored bitmap (output only)
  1515. unsigned image - see 5.4 Buffering
  1516. character Symbols in Memory
  1517. array (raster).
  1518. bitmap_width integer Width of stored bitmap (output only)
  1519. image (in pixels) - see
  1520. bitmap member.
  1521. bitmap_height integer Height of stored bitmap (output only)
  1522. image (in pixels) - see
  1523. bitmap member.
  1524. alphamap pointer to Pointer to array (output only)
  1525. unsigned representing alpha channel
  1526. character of stored bitmap image (or
  1527. array NULL if no alpha channel
  1528. used) - see bitmap member.
  1529. vector pointer to Pointer to vector header (output only)
  1530. vector containing pointers to
  1531. structure vector elements - see 5.5
  1532. Buffering Symbols in
  1533. Memory (vector).
  1534. memfile pointer to Pointer to in-memory file (output only)
  1535. unsigned buffer if
  1536. character BARCODE_MEMORY_FILE set in
  1537. array output_options - see 5.6
  1538. Buffering Symbols in
  1539. Memory (memfile).
  1540. memfile_size integer Length of in-memory file (output only)
  1541. buffer.
  1542. ------------------------------------------------------------------------------
  1543. : Table  : API Structure zint_symbol
  1544. To alter these values use the syntax shown in the example below. This code has
  1545. the same result as the previous example except the output is now taller and
  1546. plotted in green.
  1547. #include <zint.h>
  1548. #include <string.h>
  1549. int main(int argc, char **argv)
  1550. {
  1551. struct zint_symbol *my_symbol;
  1552. my_symbol = ZBarcode_Create();
  1553. strcpy(my_symbol->fgcolour, "00ff00");
  1554. my_symbol->height = 400.0f;
  1555. ZBarcode_Encode_and_Print(my_symbol, argv[1], 0, 0);
  1556. ZBarcode_Delete(my_symbol);
  1557. return 0;
  1558. }
  1559. Note that background removal for all outputs except BMP can be achieved by
  1560. setting the background alpha to "00" where the values for R, G and B will be
  1561. ignored:
  1562. strcpy(my_symbol->bgcolour, "55555500");
  1563. This is what the CLI option --nobackground does - see 4.7 Using Colour.
  1564. 5.8 Handling Errors
  1565. If errors occur during encoding a non-zero integer value is passed back to the
  1566. calling application. In addition the errtxt member is set to a message detailing
  1567. the nature of the error. The errors generated by Zint are:
  1568. ------------------------------------------------------------------------------
  1569. Return Value Meaning
  1570. ------------------------------ -----------------------------------------------
  1571. ZINT_WARN_HRT_TRUNCATED The Human Readable Text returned in text was
  1572. truncated (maximum 255 bytes).
  1573. ZINT_WARN_INVALID_OPTION One of the values in zint_struct was set
  1574. incorrectly but Zint has made a guess at what
  1575. it should have been and generated a barcode
  1576. accordingly.
  1577. ZINT_WARN_USES_ECI Zint has automatically inserted an ECI
  1578. character. The symbol may not be readable with
  1579. some readers.
  1580. ZINT_WARN_NONCOMPLIANT The symbol was created but is not compliant
  1581. with certain standards set in its specification
  1582. (e.g. height, GS1 AI data lengths).
  1583. ZINT_ERROR Marks the divide between warnings and errors.
  1584. For return values greater than or equal to this
  1585. no symbol (or only an incomplete symbol) is
  1586. generated.
  1587. ZINT_ERROR_TOO_LONG The input data is too long or too short for the
  1588. selected symbology. No symbol has been
  1589. generated.
  1590. ZINT_ERROR_INVALID_DATA The data to be encoded includes characters
  1591. which are not permitted by the selected
  1592. symbology (e.g. alphabetic characters in an EAN
  1593. symbol). No symbol has been generated.
  1594. ZINT_ERROR_INVALID_CHECK Data with an incorrect check digit has been
  1595. entered. No symbol has been generated.
  1596. ZINT_ERROR_INVALID_OPTION One of the values in zint_struct was set
  1597. incorrectly and Zint was unable (or unwilling)
  1598. to guess what it should have been. No symbol
  1599. has been generated.
  1600. ZINT_ERROR_ENCODING_PROBLEM A problem has occurred during encoding of the
  1601. data. This should never happen. Please contact
  1602. the developer if you encounter this error.
  1603. ZINT_ERROR_FILE_ACCESS Zint was unable to open the requested output
  1604. file. This is usually a file permissions
  1605. problem.
  1606. ZINT_ERROR_MEMORY Zint ran out of memory. This should only be a
  1607. problem with legacy systems.
  1608. ZINT_ERROR_FILE_WRITE Zint failed to write all contents to the
  1609. requested output file. This should only occur
  1610. if the output device becomes full.
  1611. ZINT_ERROR_USES_ECI Returned if warn_level set to WARN_FAIL_ALL and
  1612. ZINT_WARN_USES_ECI occurs.
  1613. ZINT_ERROR_NONCOMPLIANT Returned if warn_level set to WARN_FAIL_ALL and
  1614. ZINT_WARN_NONCOMPLIANT occurs.
  1615. ZINT_ERROR_HRT_TRUNCATED Returned if warn_level set to WARN_FAIL_ALL and
  1616. ZINT_WARN_HRT_TRUNCATED occurs.
  1617. ------------------------------------------------------------------------------
  1618. Table : API Warning and Error Return Values
  1619. To catch errors use an integer variable as shown in the code below:
  1620. #include <zint.h>
  1621. #include <stdio.h>
  1622. #include <string.h>
  1623. int main(int argc, char **argv)
  1624. {
  1625. struct zint_symbol *my_symbol;
  1626. int error;
  1627. my_symbol = ZBarcode_Create();
  1628. /* Set invalid foreground colour */
  1629. strcpy(my_symbol->fgcolour, "nonsense");
  1630. error = ZBarcode_Encode_and_Print(my_symbol, argv[1], 0, 0);
  1631. if (error != 0) {
  1632. /* Some warning or error occurred */
  1633. printf("%s\n", my_symbol->errtxt);
  1634. if (error >= ZINT_ERROR) {
  1635. /* Stop now */
  1636. ZBarcode_Delete(my_symbol);
  1637. return 1;
  1638. }
  1639. }
  1640. /* Otherwise carry on with the rest of the application */
  1641. ZBarcode_Delete(my_symbol);
  1642. return 0;
  1643. }
  1644. This code will exit with the appropriate message:
  1645. Error 881: Malformed foreground RGB colour 'nonsense' (hexadecimal only)
  1646. To treat all warnings as errors, set symbol->warn_level to WARN_FAIL_ALL.
  1647. 5.9 Specifying a Symbology
  1648. Symbologies can be specified by number or by name as shown in the Table
  1649. : Barcode Types (Symbologies). For example
  1650. symbol->symbology = BARCODE_LOGMARS;
  1651. means the same as
  1652. symbol->symbology = 50;
  1653. 5.10 Adjusting Output Options
  1654. The output_options member can be used to adjust various aspects of the output
  1655. file. To select more than one option from the table below simply OR them
  1656. together when adjusting this value:
  1657. my_symbol->output_options |= BARCODE_BIND | READER_INIT;
  1658. ------------------------------------------------------------------------------
  1659. Value Effect
  1660. -------------------------- ---------------------------------------------------
  1661. 0 No options selected.
  1662. BARCODE_BIND_TOP Boundary bar above the symbol only.[10]
  1663. BARCODE_BIND Boundary bars above and below the symbol and
  1664. between rows if stacking multiple symbols.[11]
  1665. BARCODE_BOX Add a box surrounding the symbol and whitespace.
  1666. BARCODE_STDOUT Output the file to stdout.
  1667. READER_INIT Create as a Reader Initialisation (Programming)
  1668. symbol.
  1669. SMALL_TEXT Use a smaller font for the Human Readable Text.
  1670. BOLD_TEXT Embolden the Human Readable Text.
  1671. CMYK_COLOUR Select the CMYK colour space option for
  1672. Encapsulated PostScript and TIF files.
  1673. BARCODE_DOTTY_MODE Plot a matrix symbol using dots rather than
  1674. squares.
  1675. GS1_GS_SEPARATOR Use GS (Group Separator) instead of FNC1 as GS1
  1676. separator (Data Matrix only).
  1677. OUT_BUFFER_INTERMEDIATE Return the bitmap buffer as ASCII values instead of
  1678. separate colour channels - see 5.4 Buffering
  1679. Symbols in Memory (raster).
  1680. BARCODE_QUIET_ZONES Add compliant quiet zones (additional to any
  1681. specified whitespace).[12]
  1682. BARCODE_NO_QUIET_ZONES Disable quiet zones, notably those with defaults.
  1683. COMPLIANT_HEIGHT Warn if height specified not compliant, or use
  1684. standard height (if any) as default.
  1685. EANUPC_GUARD_WHITESPACE Add quiet zone indicators (“<” and/or “>”) to HRT
  1686. whitespace (EAN/UPC).
  1687. EMBED_VECTOR_FONT Embed font in vector output - currently available
  1688. for SVG output only.
  1689. BARCODE_MEMORY_FILE Write output to in-memory buffer symbol->memfile
  1690. instead of to outfile file.
  1691. ------------------------------------------------------------------------------
  1692. : Table  : API output_options Values
  1693. 5.11 Setting the Input Mode
  1694. The way in which the input data is encoded can be set using the input_mode
  1695. member. Valid values are shown in the table below.
  1696. ------------------------------------------------------------------------------
  1697. Value Effect
  1698. ------------------- ----------------------------------------------------------
  1699. DATA_MODE Uses full 8-bit range interpreted as binary data.
  1700. UNICODE_MODE Uses UTF-8 input.
  1701. GS1_MODE Encodes GS1 data using FNC1 characters.
  1702. The above are exclusive, the following optional and OR-ed.
  1703. ESCAPE_MODE Process input data for escape sequences.
  1704. GS1PARENS_MODE Parentheses (round brackets) used in GS1 data instead of
  1705. square brackets to delimit Application Identifiers
  1706. (parentheses must not otherwise occur in the data).
  1707. GS1NOCHECK_MODE Do not check GS1 data for validity, i.e. suppress checks
  1708. for valid AIs and data lengths. Invalid characters (e.g.
  1709. control characters, extended ASCII characters) are still
  1710. checked for.
  1711. HEIGHTPERROW_MODE Interpret the height member as per-row rather than as
  1712. overall height.
  1713. FAST_MODE Use faster if less optimal encodation or other shortcuts
  1714. if available (affects DATAMATRIX, MICROPDF417, PDF417,
  1715. QRCODE and UPNQR only).
  1716. EXTRA_ESCAPE_MODE Process special symbology-specific escape sequences
  1717. (CODE128 only).
  1718. ------------------------------------------------------------------------------
  1719. : Table  : API input_mode Values
  1720. The default mode is DATA_MODE. (Note that this differs from the default for the
  1721. CLI and GUI, which is UNICODE_MODE.)
  1722. DATA_MODE, UNICODE_MODE and GS1_MODE are mutually exclusive, whereas
  1723. ESCAPE_MODE, GS1PARENS_MODE, GS1NOCHECK_MODE, HEIGHTPERROW_MODE, FAST_MODE and
  1724. EXTRA_ESCAPE_MODE are optional. So, for example, you can set
  1725. my_symbol->input_mode = UNICODE_MODE | ESCAPE_MODE;
  1726. or
  1727. my_symbol->input_mode = GS1_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE;
  1728. whereas
  1729. my_symbol->input_mode = DATA_MODE | GS1_MODE;
  1730. is not valid.
  1731. Permissible escape sequences (ESCAPE_MODE) are listed in Table
  1732. : Escape Sequences, and the special Code 128-only EXTRA_ESCAPE_MODE escape
  1733. sequences are given in 6.1.10.1 Standard Code 128 (ISO 15417). An example of
  1734. GS1PARENS_MODE usage is given in section 6.1.10.3 GS1-128.
  1735. GS1NOCHECK_MODE is for use with legacy systems that have data that does not
  1736. conform to the current GS1 standard. Printable ASCII input is still checked for,
  1737. as is the validity of GS1 data specified without AIs (e.g. linear data for GS1
  1738. DataBar Omnidirectional/Limited/etc.). Also checked is GS1 DataBar Expanded and
  1739. GS1 Composite input that is not in the GS1 encodable character set 82 (see GS1
  1740. General Specifications Figure 7.11.1 ‘GS1 AI encodable character set 82’),
  1741. otherwise encodation would fail.
  1742. For HEIGHTPERROW_MODE, see --heightperrow in section 4.4 Adjusting Height. The
  1743. height member should be set to the desired per-row value on input (it will be
  1744. set to the overall height on output).
  1745. FAST_MODE causes a less optimal encodation scheme to be used for Data Matrix,
  1746. MicroPDF417 and PDF417. For QR Code and UPNQR, it affects Zint’s automatic mask
  1747. selection - see 6.6.3 QR Code (ISO 18004) for details.
  1748. 5.12 Multiple Segments
  1749. For input data requiring multiple ECIs, the following functions may be used:
  1750. int ZBarcode_Encode_Segs(struct zint_symbol *symbol,
  1751. const struct zint_seg segs[], const int seg_count);
  1752. int ZBarcode_Encode_Segs_and_Print(struct zint_symbol *symbol,
  1753. const struct zint_seg segs[], const int seg_count, int rotate_angle);
  1754. int ZBarcode_Encode_Segs_and_Buffer(struct zint_symbol *symbol,
  1755. const struct zint_seg segs[], const int seg_count, int rotate_angle);
  1756. int ZBarcode_Encode_Segs_and_Buffer_Vector(struct zint_symbol *symbol,
  1757. const struct zint_seg segs[], const int seg_count, int rotate_angle);
  1758. These are direct analogues of the previously mentioned ZBarcode_Encode(),
  1759. ZBarcode_Encode_and_Print(), ZBarcode_Encode_and_Buffer() and
  1760. ZBarcode_Encode_and_Buffer_Vector() respectively, where instead of a pair
  1761. consisting of "source, length", a pair consisting of "segs, seg_count" is given,
  1762. with segs being an array of struct zint_seg segments and seg_count being the
  1763. number of elements it contains. The zint_seg structure is of the form:
  1764. struct zint_seg {
  1765. unsigned char *source; /* Data to encode */
  1766. int length; /* Length of `source`. If 0, `source` must be
  1767. NUL-terminated */
  1768. int eci; /* Extended Channel Interpretation */
  1769. };
  1770. The symbology must support ECIs (see Table : ECI-Aware Symbologies). For
  1771. example:
  1772. #include <zint.h>
  1773. int main(int argc, char **argv)
  1774. {
  1775. struct zint_seg segs[] = {
  1776. { "Κείμενο", 0, 9 },
  1777. { "Текст", 0, 7 },
  1778. { "文章", 0, 20 }
  1779. };
  1780. struct zint_symbol *my_symbol;
  1781. my_symbol = ZBarcode_Create();
  1782. my_symbol->symbology = BARCODE_AZTEC;
  1783. my_symbol->input_mode = UNICODE_MODE;
  1784. ZBarcode_Encode_Segs(my_symbol, segs, 3);
  1785. ZBarcode_Print(my_symbol, 0);
  1786. ZBarcode_Delete(my_symbol);
  1787. return 0;
  1788. }
  1789. A maximum of 256 segments may be specified. Use of multiple segments with GS1
  1790. data is not currently supported.
  1791. 5.13 Scaling Helpers
  1792. To help with scaling the output, the following three function are available:
  1793. float ZBarcode_Default_Xdim(int symbol_id);
  1794. float ZBarcode_Scale_From_XdimDp(int symbol_id, float x_dim_mm, float dpmm,
  1795. const char *filetype) {
  1796. float ZBarcode_XdimDP_From_Scale(int symbol_id, float scale,
  1797. float x_dim_mm_or_dpmm, const char *filetype);
  1798. The first ZBarcode_Default_Xdim() returns the default X-dimension suggested by
  1799. Zint for symbology symbol_id.
  1800. The second ZBarcode_Scale_From_XdimDp() returns the scale to use to output to a
  1801. file of type filetype with X-dimension x_dim_mm at dpmm dots per mm. The given
  1802. X-dimension must be non-zero and less than or equal to 10mm, however dpmm may be
  1803. zero and defaults to 12 dpmm, and filetype may be NULL or empty in which case a
  1804. GIF filetype is assumed. For raster output (BMP/GIF/PCX/PNG/TIF) the scale is
  1805. rounded to half-integer increments.
  1806. For example:
  1807. /* Royal Mail 4-State Customer Code */
  1808. my_symbol->symbology = BARCODE_RM4SCC;
  1809. my_symbol->dpmm = 600.0f / 25.4f; /* 600 dpi */
  1810. my_symbol->scale = ZBarcode_Scale_From_XdimDp(
  1811. my_symbol->symbology,
  1812. ZBarcode_Default_Xdim(my_symbol->symbology),
  1813. my_symbol->dpmm, "PNG"); /* Returns 7.5 */
  1814. The third function ZBarcode_XdimDP_From_Scale() is the “reverse” of
  1815. ZBarcode_Scale_From_XdimDp(), returning the X-dimension (in mm) or the dot
  1816. density (in dpmm) given a scale scale. Both scale and x_dim_mm_or_dpmm must be
  1817. non-zero. The returned value is bound to the maximum value of dpmm (1000), so
  1818. must be further bound to 10 on return if the X-dimension is sought.
  1819. Note that the X-dimension to use is application dependent, and varies not only
  1820. due to the symbology, resolution and filetype but also due to the type of
  1821. scanner used, the intended scanning distance, and what media (“substrates”) the
  1822. barcode appears on.
  1823. 5.14 Verifying Symbology Availability
  1824. An additional function available in the API is:
  1825. int ZBarcode_ValidID(int symbol_id);
  1826. which allows you to check whether a given symbology is available, returning a
  1827. non-zero value if so. For example:
  1828. if (ZBarcode_ValidID(BARCODE_PDF417) != 0) {
  1829. printf("PDF417 available\n");
  1830. } else {
  1831. printf("PDF417 not available\n");
  1832. }
  1833. Another function that may be useful is:
  1834. int ZBarcode_BarcodeName(int symbol_id, char name[32]);
  1835. which copies the name of a symbology into the supplied name buffer, which should
  1836. be 32 characters in length. The name is NUL-terminated, and zero is returned on
  1837. success. For instance:
  1838. char name[32];
  1839. if (ZBarcode_BarcodeName(BARCODE_PDF417, name) == 0) {
  1840. printf("%s\n", name);
  1841. }
  1842. will print BARCODE_PDF417.
  1843. 5.15 Checking Symbology Capabilities
  1844. It can be useful for frontend programs to know the capabilities of a symbology.
  1845. This can be determined using another additional function:
  1846. unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag);
  1847. by OR-ing the flags below in the cap_flag argument and checking the return to
  1848. see which are set.
  1849. ------------------------------------------------------------------------------
  1850. Value Meaning
  1851. --------------------------- --------------------------------------------------
  1852. ZINT_CAP_HRT Can the symbology print Human Readable Text?
  1853. ZINT_CAP_STACKABLE Is the symbology stackable?
  1854. ZINT_CAP_EANUPC[13] Is the symbology EAN/UPC?
  1855. ZINT_CAP_COMPOSITE Does the symbology support composite data? (see
  1856. 6.3 GS1 Composite Symbols (ISO 24723) below)
  1857. ZINT_CAP_ECI Does the symbology support Extended Channel
  1858. Interpretations?
  1859. ZINT_CAP_GS1 Does the symbology support GS1 data?
  1860. ZINT_CAP_DOTTY Can the symbology be outputted as dots?
  1861. ZINT_CAP_QUIET_ZONES Does the symbology have default quiet zones?
  1862. ZINT_CAP_FIXED_RATIO Does the symbology have a fixed width-to-height
  1863. (aspect) ratio?
  1864. ZINT_CAP_READER_INIT Does the symbology support Reader Initialisation?
  1865. ZINT_CAP_FULL_MULTIBYTE Is the ZINT_FULL_MULTIBYTE option applicable?
  1866. ZINT_CAP_MASK Is mask selection applicable?
  1867. ZINT_CAP_STRUCTAPP Does the symbology support Structured Append?
  1868. ZINT_CAP_COMPLIANT_HEIGHT Does the symbology have a compliant height
  1869. defined?
  1870. ------------------------------------------------------------------------------
  1871. Table : API Capability Flags
  1872. For example:
  1873. unsigned int cap;
  1874. cap = ZBarcode_Cap(BARCODE_PDF417, ZINT_CAP_HRT | ZINT_CAP_ECI);
  1875. if (cap & ZINT_CAP_HRT) {
  1876. printf("PDF417 supports HRT\n");
  1877. } else {
  1878. printf("PDF417 does not support HRT\n");
  1879. }
  1880. if (cap & ZINT_CAP_ECI) {
  1881. printf("PDF417 supports ECI\n");
  1882. } else {
  1883. printf("PDF417 does not support ECI\n");
  1884. }
  1885. 5.16 Zint Version
  1886. Whether the Zint library linked to was built with PNG support may be determined
  1887. with:
  1888. int ZBarcode_NoPng();
  1889. which returns 1 if no PNG support is available, else zero.
  1890. Lastly, the version of the Zint library linked to is returned by:
  1891. int ZBarcode_Version();
  1892. The version parts are separated by hundreds. For instance, version "2.9.1" is
  1893. returned as "20901".
  1894. 6. Types of Symbology
  1895. 6.1 One-Dimensional Symbols
  1896. One-dimensional or linear symbols are what most people associate with the term
  1897. barcode. They consist of a number of bars and a number of spaces of differing
  1898. widths.
  1899. 6.1.1 Code 11
  1900. [zint -b CODE11 -d "9212320967"]
  1901. Developed by Intermec in 1977, Code 11 is similar to Code 2 of 5 Matrix and is
  1902. primarily used in telecommunications. The symbol can encode data consisting of
  1903. the digits 0-9 and the dash character (-) up to a maximum of 140 characters. Two
  1904. modulo-11 check digits are added by default. To add just one check digit, set
  1905. --vers=1 (API option_2 = 1). To add no check digits, set --vers=2 (API
  1906. option_2 = 2).
  1907. 6.1.2 Code 2 of 5
  1908. Code 2 of 5 is a family of one-dimensional symbols, 8 of which are supported by
  1909. Zint. Note that the names given to these standards alters from one source to
  1910. another so you should take care to ensure that you have the right barcode type
  1911. before using these standards.
  1912. 6.1.2.1 Standard Code 2 of 5
  1913. [zint -b C25STANDARD -d "9212320967"]
  1914. Also known as Code 2 of 5 Matrix, this is a self-checking code used in
  1915. industrial applications and photo development. Standard Code 2 of 5 will encode
  1916. numeric input (digits 0-9) up to a maximum of 112 digits. No check digit is
  1917. added by default. To add a check digit, set --vers=1 (API option_2 = 1). To add
  1918. a check digit but not show it in the Human Readable Text, set --vers=2 (API
  1919. option_2 = 2).
  1920. 6.1.2.2 IATA Code 2 of 5
  1921. [zint -b C25IATA -d "9212320967"]
  1922. Used for baggage handling in the air-transport industry by the International Air
  1923. Transport Agency, this self-checking code will encode numeric input (digits 0-9)
  1924. up to a maximum of 80 digits. No check digit is added by default, but can be set
  1925. the same as for 6.1.2.1 Standard Code 2 of 5.
  1926. 6.1.2.3 Industrial Code 2 of 5
  1927. [zint -b C25IND -d "9212320967"]
  1928. Industrial Code 2 of 5 can encode numeric input (digits 0-9) up to a maximum of
  1929. 79 digits. No check digit is added by default, but can be set the same as for
  1930. 6.1.2.1 Standard Code 2 of 5.
  1931. 6.1.2.4 Interleaved Code 2 of 5 (ISO 16390)
  1932. [zint -b C25INTER --compliantheight -d "9212320967"]
  1933. This self-checking symbology encodes pairs of numbers, and so can only encode an
  1934. even number of digits (0-9). If an odd number of digits is entered a leading
  1935. zero is added by Zint. A maximum of 62 pairs (124 digits) can be encoded. No
  1936. check digit is added by default, but can be set the same as for 6.1.2.1 Standard
  1937. Code 2 of 5.
  1938. 6.1.2.5 Code 2 of 5 Data Logic
  1939. [zint -b C25LOGIC -d "9212320967"]
  1940. Data Logic does not include a check digit by default and can encode numeric
  1941. input (digits 0-9) up to a maximum of 113 digits. Check digit options are the
  1942. same as for 6.1.2.1 Standard Code 2 of 5.
  1943. 6.1.2.6 ITF-14
  1944. [zint -b ITF14 --compliantheight -d "9212320967145"]
  1945. ITF-14, also known as UPC Shipping Container Symbol or Case Code, is based on
  1946. Interleaved Code 2 of 5 and requires a 13-digit numeric input (digits 0-9). One
  1947. modulo-10 check digit is added by Zint.
  1948. If no border option is specified Zint defaults to adding a bounding box with a
  1949. border width of 5. This behaviour can be overridden by using the --bind option
  1950. (API output_options |= BARCODE_BIND). Similarly the border width can be
  1951. overridden using --border (API border_width). If a symbol with no border is
  1952. required this can be achieved by explicitly setting the border type to box (or
  1953. bind or bindtop) and leaving the border width 0.
  1954. [zint -b ITF14 --box --compliantheight -d "9212320967145"]
  1955. 6.1.2.7 Deutsche Post Leitcode
  1956. [zint -b DPLEIT -d "9212320967145"]
  1957. Leitcode is based on Interleaved Code 2 of 5 and is used by Deutsche Post for
  1958. routing purposes. Leitcode requires a 13-digit numerical input to which Zint
  1959. adds a check digit.
  1960. 6.1.2.8 Deutsche Post Identcode
  1961. [zint -b DPIDENT -d "91232096712"]
  1962. Identcode is based on Interleaved Code 2 of 5 and is used by Deutsche Post for
  1963. identification purposes. Identcode requires an 11-digit numerical input to which
  1964. Zint adds a check digit.
  1965. 6.1.3 UPC (Universal Product Code) (ISO 15420)
  1966. 6.1.3.1 UPC Version A
  1967. [zint -b UPCA --compliantheight -d "72527270270"]
  1968. UPC-A is used in the United States for retail applications. The symbol requires
  1969. an 11-digit article number. The check digit is calculated by Zint. In addition
  1970. EAN-2 and EAN-5 add-on symbols can be added using the + character. For example,
  1971. to draw a UPC-A symbol with the data 72527270270 with an EAN-5 add-on showing
  1972. the data 12345 use the command:
  1973. zint -b UPCA -d "72527270270+12345"
  1974. or using the API encode a data string with the + character included:
  1975. my_symbol->symbology = BARCODE_UPCA;
  1976. error = ZBarcode_Encode_and_Print(my_symbol, "72527270270+12345", 0, 0);
  1977. [zint -b UPCA --compliantheight -d "72527270270+12345"]
  1978. If your input data already includes the check digit symbology BARCODE_UPCA_CHK
  1979. (35) can be used which takes a 12-digit input and validates the check digit
  1980. before encoding.
  1981. A quiet zone indicator can be added to the HRT by setting --guardwhitespace (API
  1982. output_options |= EANUPC_GUARD_WHITESPACE). For UPC, this is only relevant when
  1983. there is add-on:
  1984. zint -b UPCA -d "72527270270+12345" --guardwhitespace
  1985. or using the API:
  1986. my_symbol->symbology = BARCODE_UPCA;
  1987. my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
  1988. error = ZBarcode_Encode_and_Print(my_symbol, "72527270270+12345", 0, 0);
  1989. [zint -b UPCA --compliantheight -d "72527270270+12345" --guardwhitespace]
  1990. You can adjust the gap between the main symbol and an add-on in integral
  1991. multiples of the X-dimension by setting --addongap (API option_2) to a value
  1992. between 9 (default) and 12. The height in X-dimensions that the guard bars
  1993. descend below the main bars can be adjusted by setting --guarddescent (API
  1994. guard_descent) to a value between 0.0 and 20.0 (default 5.0).
  1995. 6.1.3.2 UPC Version E
  1996. [zint -b UPCE --compliantheight -d "1123456"]
  1997. UPC-E is a zero-compressed version of UPC-A developed for smaller packages. The
  1998. code requires a 6-digit article number (digits 0-9). The check digit is
  1999. calculated by Zint. EAN-2 and EAN-5 add-on symbols can be added using the +
  2000. character as with UPC-A. In addition Zint also supports Number System 1 encoding
  2001. by entering a 7-digit article number starting with the digit 1. For example:
  2002. zint -b UPCE -d "1123456"
  2003. or
  2004. my_symbol->symbology = BARCODE_UPCE;
  2005. error = ZBarcode_Encode_and_Print(my_symbol, "1123456", 0, 0);
  2006. If your input data already includes the check digit symbology BARCODE_UPCE_CHK
  2007. (38) can be used which takes a 7 or 8-digit input and validates the check digit
  2008. before encoding.
  2009. As with UPC-A, a quiet zone indicator can be added when there is an add-on by
  2010. setting --guardwhitespace (API output_options |= EANUPC_GUARD_WHITESPACE):
  2011. zint -b UPCE -d "1123456+12" --guardwhitespace
  2012. [zint -b UPCE --compliantheight -d "1123456+12" --guardwhitespace]
  2013. You can adjust the gap between the main symbol and an add-on in integral
  2014. multiples of the X-dimension by setting --addongap (API option_2) to a value
  2015. between 7 (default) and 12. The height in X-dimensions that the guard bars
  2016. descend below the main bars can be adjusted by setting --guarddescent (API
  2017. guard_descent) to a value between 0.0 and 20.0 (default 5.0).
  2018. 6.1.4 EAN (European Article Number) (ISO 15420)
  2019. 6.1.4.1 EAN-2, EAN-5, EAN-8 and EAN-13
  2020. [zint -b EANX --compliantheight -d "4512345678906"]
  2021. The EAN system is used in retail across Europe and includes standards for EAN-2,
  2022. EAN-5, EAN-8 and EAN-13 which encode 2, 5, 7 or 12-digit numbers respectively.
  2023. Zint will decide which symbology to use depending on the length of the input
  2024. data. In addition EAN-2 and EAN-5 add-on symbols can be added to EAN-8 and
  2025. EAN-13 symbols using the + character as with UPC symbols. For example:
  2026. zint -b EANX -d "54321"
  2027. [zint -b EANX --compliantheight -d "54321"]
  2028. will encode a stand-alone EAN-5, whereas
  2029. zint -b EANX -d "7432365+54321"
  2030. will encode an EAN-8 symbol with an EAN-5 add-on. As before these results can be
  2031. achieved using the API:
  2032. my_symbol->symbology = BARCODE_EANX;
  2033. error = ZBarcode_Encode_and_Print(my_symbol, "54321", 0, 0);
  2034. error = ZBarcode_Encode_and_Print(my_symbol, "7432365+54321", 0, 0);
  2035. [zint -b EANX --compliantheight -d "7432365+54321"]
  2036. All of the EAN symbols include check digits which are added by Zint.
  2037. If you are encoding an EAN-8 or EAN-13 symbol and your data already includes the
  2038. check digit then you can use symbology BARCODE_EANX_CHK (14) which takes an 8 or
  2039. 13-digit input and validates the check digit before encoding.
  2040. Options to add quiet zone indicators and to adjust the add-on gap and the guard
  2041. bar descent height are the same as for 6.1.3.2 UPC Version E. For instance:
  2042. zint -b EANX_CHK -d "74323654" --guardwhitespace
  2043. [zint -b EANX_CHK --compliantheight -d "74323654" –guardwhitespace]
  2044. 6.1.4.2 SBN, ISBN and ISBN-13
  2045. [zint -b ISBNX --compliantheight -d "9789295055124"]
  2046. EAN-13 symbols (also known as Bookland EAN-13) can also be produced from 9-digit
  2047. SBN, 10-digit ISBN or 13-digit ISBN-13 data. The relevant check digit needs to
  2048. be present in the input data and will be verified before the symbol is
  2049. generated.
  2050. As with EAN-13, a quiet zone indicator can be added using --guardwhitespace:
  2051. [zint -b ISBNX --compliantheight -d "9789295055124" --guardwhitespace]
  2052. EAN-2 and EAN-5 add-on symbols can be added using the + character, and there are
  2053. options to adjust the add-on gap and the guard bar descent height - see 6.1.3.2
  2054. UPC Version E.
  2055. 6.1.5 Plessey
  2056. 6.1.5.1 UK Plessey
  2057. [zint -b PLESSEY -d "C64"]
  2058. Also known as Plessey Code, this symbology was developed by the Plessey Company
  2059. Ltd. in the UK. The symbol can encode data consisting of digits (0-9) or letters
  2060. A-F up to a maximum of 67 characters and includes a hidden CRC check digit.
  2061. 6.1.5.2 MSI Plessey
  2062. [zint -b MSI_PLESSEY -d "6502" --vers=2]
  2063. Based on Plessey and developed by MSI Data Corporation, MSI Plessey can encode
  2064. numeric (digits 0-9) input of up to 92 digits. It has a range of check digit
  2065. options that are selectable by setting --vers (API option_2), shown in the table
  2066. below:
  2067. Value Check Digits
  2068. ------- -----------------------------
  2069. 0 None
  2070. 1 Modulo-10 (Luhn)
  2071. 2 Modulo-10 & Modulo-10
  2072. 3 Modulo-11 (IBM)
  2073. 4 Modulo-11 (IBM) & Modulo-10
  2074. 5 Modulo-11 (NCR)
  2075. 6 Modulo-11 (NCR) & Modulo-10
  2076. Table : MSI Plessey Check Digit Options
  2077. To not show the check digit or digits in the Human Readable Text, add 10 to the
  2078. --vers value. For example --vers=12 (API option_2 = 12) will add two hidden
  2079. modulo-10 check digits.
  2080. 6.1.6 Telepen
  2081. 6.1.6.1 Telepen Alpha
  2082. [zint -b TELEPEN --compliantheight -d "Z80"]
  2083. Telepen Alpha was developed by SB Electronic Systems Limited and can encode
  2084. ASCII text input, up to a maximum of 69 characters. Telepen includes a hidden
  2085. modulo-127 check digit, added by Zint.
  2086. 6.1.6.2 Telepen Numeric
  2087. [zint -b TELEPEN_NUM --compliantheight -d "466X33"]
  2088. Telepen Numeric allows compression of numeric data into a Telepen symbol. Data
  2089. can consist of pairs of numbers or pairs consisting of a numerical digit
  2090. followed an X character. For example: 466333 and 466X33 are valid codes whereas
  2091. 46X333 is not (the digit pair "X3" is not valid). Up to 136 digits can be
  2092. encoded. Telepen Numeric includes a hidden modulo-127 check digit which is added
  2093. by Zint.
  2094. 6.1.7 Code 39
  2095. 6.1.7.1 Standard Code 39 (ISO 16388)
  2096. [zint -b CODE39 --compliantheight -d "1A" --vers=1]
  2097. Standard Code 39 was developed in 1974 by Intermec. Input data can be up to 86
  2098. characters in length and can include the characters 0-9, A-Z, dash (-), full
  2099. stop (.), space, asterisk (*), dollar ($), slash (/), plus (+) and percent (%).
  2100. The standard does not require a check digit but a modulo-43 check digit can be
  2101. added if desired by setting --vers=1 (API option_2 = 1). To add a check digit
  2102. but not show it in the Human Readable Text, set --vers=2 (API option_2 = 2).
  2103. 6.1.7.2 Extended Code 39
  2104. [zint -b EXCODE39 --compliantheight -d "123.45$@fd"]
  2105. Also known as Code 39e and Code39+, this symbology expands on Standard Code 39
  2106. to provide support for the full 7-bit ASCII character set. The check digit
  2107. options are the same as for 6.1.7.1 Standard Code 39 (ISO 16388).
  2108. 6.1.7.3 Code 93
  2109. [zint -b CODE93 --compliantheight -d "C93"]
  2110. A variation of Extended Code 39, Code 93 also supports full ASCII text,
  2111. accepting up to 123 characters. Two check characters are added by Zint. By
  2112. default these check characters are not shown in the Human Readable Text, but may
  2113. be shown by setting --vers=1 (API option_2 = 1).
  2114. 6.1.7.4 PZN (Pharmazentralnummer)
  2115. [zint -b PZN --compliantheight -d "2758089"]
  2116. PZN is a Code 39 based symbology used by the pharmaceutical industry in Germany.
  2117. PZN encodes a 7-digit number to which Zint will add a modulo-11 check digit
  2118. (PZN8). Input less than 7 digits will be zero-filled. An 8-digit input can be
  2119. supplied in which case Zint will validate the check digit.
  2120. To encode a PZN7 (obsolete since 2013) instead set --vers=1 (API option_2 = 1)
  2121. and supply up to 7 digits. As with PZN8, a modulo-11 check digit will be added
  2122. or if 7 digits supplied the check digit validated.
  2123. 6.1.7.5 LOGMARS
  2124. [zint -b LOGMARS --compliantheight -d "12345/ABCDE" --vers=1]
  2125. LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) is a
  2126. variation of the Code 39 symbology used by the U.S. Department of Defense.
  2127. LOGMARS encodes the same character set as 6.1.7.1 Standard Code 39 (ISO 16388),
  2128. and the check digit options are also the same. Input is restricted to a maximum
  2129. of 30 characters.
  2130. 6.1.7.6 Code 32
  2131. [zint -b CODE32 --compliantheight -d "14352312"]
  2132. A variation of Code 39 used by the Italian Ministry of Health (“Ministero della
  2133. Sanità”) for encoding identifiers on pharmaceutical products. This symbology
  2134. requires a numeric input up to 8 digits in length. A check digit is added by
  2135. Zint.
  2136. 6.1.7.7 HIBC Code 39
  2137. [zint -b HIBC_39 --compliantheight -d "14352312"]
  2138. This variant adds a leading '+' character and a trailing modulo-49 check digit
  2139. to a standard Code 39 symbol as required by the Health Industry Barcode
  2140. standards.
  2141. 6.1.7.8 Vehicle Identification Number (VIN)
  2142. [zint -b VIN -d "2FTPX28L0XCA15511" --vers=1]
  2143. A variation of Code 39 that for vehicle identification numbers used in North
  2144. America (first character '1' to '5') has a check character verification stage. A
  2145. 17 character input (0-9, and A-Z excluding 'I', 'O' and 'Q') is required. An
  2146. invisible Import character prefix 'I' can be added by setting --vers=1 (API
  2147. option_2 = 1).
  2148. 6.1.8 Codabar (EN 798)
  2149. [zint -b CODABAR --compliantheight -d "A37859B"]
  2150. Also known as NW-7, Monarch, ABC Codabar, USD-4, Ames Code and Code 27, this
  2151. symbology was developed in 1972 by Monarch Marketing Systems for retail
  2152. purposes. The American Blood Commission adopted Codabar in 1977 as the standard
  2153. symbology for blood identification. Codabar can encode up to 103 characters
  2154. starting and ending with the letters A-D and containing between these letters
  2155. the numbers 0-9, dash (-), dollar ($), colon (:), slash (/), full stop (.) or
  2156. plus (+). No check character is generated by default, but a modulo-16 one can be
  2157. added by setting --vers=1 (API option_2 = 1). To have the check character appear
  2158. in the Human Readable Text, set --vers=2 (API option_2 = 2).
  2159. 6.1.9 Pharmacode
  2160. [zint -b PHARMA --compliantheight -d "130170"]
  2161. Developed by Laetus, Pharmacode is used for the identification of
  2162. pharmaceuticals. The symbology is able to encode whole numbers between 3 and
  2163. 131070.
  2164. 6.1.10 Code 128
  2165. 6.1.10.1 Standard Code 128 (ISO 15417)
  2166. [zint -b CODE128 --bind -d "130170X178"]
  2167. One of the most ubiquitous one-dimensional barcode symbologies, Code 128 was
  2168. developed in 1981 by Computer Identics. This symbology supports full ASCII text
  2169. and uses a three-Code Set system to compress the data into a smaller symbol.
  2170. Zint automatically switches between Code Sets A, B and C (but see below) and
  2171. adds a hidden modulo-103 check digit.
  2172. Code 128 is the default barcode symbology used by Zint. In addition Zint
  2173. supports the encoding of ISO/IEC 8859-1 (non-English) characters in Code 128
  2174. symbols. The ISO/IEC 8859-1 character set is shown in Annex A.2 Latin Alphabet
  2175. No. 1 (ISO/IEC 8859-1).
  2176. Manual switching of Code Sets is possible using the --extraesc option (API
  2177. input_mode |= EXTRA_ESCAPE_MODE), which apart from processing normal escape
  2178. sequences also processes the Code 128-specific escapes \^A, \^B, \^C and \^@
  2179. (the latter turns off manual Code Set selection). For instance the following
  2180. will force switching to Code Set B for the data "5678" (normally Code Set C
  2181. would be used throughout):
  2182. zint -b CODE128 -d "1234\^B5678" --extraesc
  2183. The manually selected Code Set will apply until the next Code Set escape
  2184. sequence or until a \^@, with the exception that data that cannot be represented
  2185. in that Code Set will be switched as appropriate. If the data contains an extra
  2186. escape sequence, it can be escaped by doubling the caret (^). For instance
  2187. zint -b CODE128 -d "\^AABC\^^BDEF" --extraesc
  2188. will encode the data "ABC\^BDEF" in Code Set A.
  2189. There is also the extra escape \^1, which will encode a special Function Code 1
  2190. character (FNC1) anywhere you chose in the data, for instance
  2191. zint -b CODE128 -d "A\^1BC\^1DEF" --extraesc
  2192. Zint can encode a maximum of 102 symbol characters, which allows for e.g. 202
  2193. all-numeric or 101 all-uppercase characters. Sizes above 120 digits (60
  2194. alphanumerics) are not recommended.
  2195. 6.1.10.2 Code 128 Suppress Code Set C (Code Sets A and B only)
  2196. [zint -b CODE128AB -d "130170X178"]
  2197. It is sometimes advantageous to stop Code 128 from using Code Set C which
  2198. compresses numerical data. The BARCODE_CODE128AB[14] variant (symbology 60)
  2199. suppresses Code Set C in favour of Code Sets A and B.
  2200. Note that the special extra escapes mentioned above are not available for this
  2201. variant (nor for any other).
  2202. 6.1.10.3 GS1-128
  2203. [zint -b GS1_128 --compliantheight -d "[01]98898765432106[3202]012345[15]991231"
  2204. ]
  2205. A variation of Code 128 previously known as UCC/EAN-128, this symbology is
  2206. defined by the GS1 General Specifications. Application Identifiers (AIs) should
  2207. be entered using [square bracket] notation. These will be converted to
  2208. parentheses (round brackets) for the Human Readable Text. This will allow round
  2209. brackets to be used in the data strings to be encoded.
  2210. For compatibility with data entry in other systems, if the data does not include
  2211. round brackets, the option --gs1parens (API input_mode |= GS1PARENS_MODE) may be
  2212. used to signal that AIs are encased in round brackets instead of square ones.
  2213. Fixed length data should be entered at the appropriate length for correct
  2214. encoding. GS1-128 does not support extended ASCII (ISO/IEC 8859-1) characters.
  2215. Check digits for GTIN data AI (01) are not generated and need to be included in
  2216. the input data. The following is an example of a valid GS1-128 input:
  2217. zint -b 16 -d "[01]98898765432106[3202]012345[15]991231"
  2218. or using the --gs1parens option:
  2219. zint -b 16 --gs1parens -d "(01)98898765432106(3202)012345(15)991231"
  2220. 6.1.10.4 EAN-14
  2221. [zint -b EAN14 --compliantheight -d "9889876543210"]
  2222. A shorter version of GS1-128 which encodes GTIN data only. A 13-digit number is
  2223. required. The GTIN check digit and HRT-only AI “(01)” are added by Zint.
  2224. 6.1.10.5 NVE-18 (SSCC-18)
  2225. [zint -b NVE18 --compliantheight -d "37612345000001003"]
  2226. A variation of Code 128 the ‘Nummer der Versandeinheit’ standard, also known as
  2227. SSCC-18 (Serial Shipping Container Code), includes both a visible modulo-10 and
  2228. a hidden modulo-103 check digit. NVE-18 requires a 17-digit numerical input.
  2229. Check digits and HRT-only AI “(00)” are added by Zint.
  2230. 6.1.10.6 HIBC Code 128
  2231. [zint -b HIBC_128 -d "A123BJC5D6E71"]
  2232. This option adds a leading '+' character and a trailing modulo-49 check digit to
  2233. a standard Code 128 symbol as required by the Health Industry Barcode standards.
  2234. 6.1.10.7 DPD Code
  2235. [zint -b DPD --compliantheight -d "000393206219912345678101040"]
  2236. Another variation of Code 128 as used by DPD (Deutscher Paketdienst). Requires a
  2237. 27 or 28 character input. For 28 character input, the first character is an
  2238. identification tag (Barcode ID), which should usually be "%" (ASCII 37). If 27
  2239. characters are supplied, "%" will be prefixed by Zint (except if marked as a
  2240. “relabel”, see below). The rest of the 27-character input must be alphanumeric,
  2241. and is of the form:
  2242. -----------------------------------------------------------------------
  2243. Destination Post Tracking Number Service Destination Country
  2244. Code Code Code
  2245. ------------------ ------------------- ----------- --------------------
  2246. PPPPPPP (7 TTTTTTTTTTTTTT (14 SSS (3 CCC (3-digit ISO
  2247. alphanumerics) alphanumerics) digits) 3166-1)
  2248. -----------------------------------------------------------------------
  2249. Table : DPD Input Fields
  2250. A warning will be generated if the Service Code, the Destination Country Code,
  2251. or the last 10 characters of the Tracking Number are non-numeric.
  2252. Zint formats the Human Readable Text as specified by DPD, leaving out the
  2253. identication tag, and adds a modulo-36 check character to the text (not to the
  2254. barcode itself), thus:
  2255. PPPP PPP TTTT TTTT TTTT TT SSS CCC D
  2256. By default a top boundary bar is added, with default width 3X. The width can be
  2257. overridden using --border (API border_width). For a symbol with no top boundary
  2258. bar, explicitly set the border type to bindtop (or bind or box) and leave the
  2259. border width 0.
  2260. A DPD Code can be marked as a “relabel” by specifying --vers=1 (API
  2261. option_2 = 1), which omits the identification tag and prints the barcode at half
  2262. height. In this case, an input of 27 alphanumeric characters is required.
  2263. 6.1.10.8 UPU S10
  2264. [zint -b UPU_S10 --compliantheight -d "EE876543216CA"]
  2265. The Universal Postal Union S10 variant of Code 128 encodes 13 characters in the
  2266. format "SSNNNNNNNNXCC", where "SS" is a two-character alphabetic service
  2267. indicator, "NNNNNNNN" is an 8-digit serial number, "X" is a modulo-11 check
  2268. digit, and "CC" is a two-character ISO 3166-1 country code.
  2269. The check digit may be omitted in which case Zint will add it. Warnings will be
  2270. generated if the service indicator is non-standard or the country code is not
  2271. ISO 3361-1.
  2272. 6.1.11 GS1 DataBar (ISO 24724)
  2273. Previously known as RSS (Reduced Spaced Symbology), these symbols are due to
  2274. replace GS1-128 symbols in accordance with the GS1 General Specifications. If a
  2275. GS1 DataBar symbol is to be printed with a 2D component as specified in ISO/IEC
  2276. 24723 set --mode=2 (API option_1 = 2). See 6.3 GS1 Composite Symbols (ISO 24723)
  2277. to find out how to generate DataBar symbols with 2D components.
  2278. 6.1.11.1 GS1 DataBar Omnidirectional and GS1 DataBar Truncated
  2279. [zint -b DBAR_OMN --compliantheight -d "0950110153001"]
  2280. Previously known as RSS-14 this standard encodes a 13-digit item code. A check
  2281. digit and HRT-only Application Identifier of “(01)” are added by Zint. (A
  2282. 14-digit code that appends the check digit may be given, in which case the check
  2283. digit will be verified.)
  2284. GS1 DataBar Omnidirectional symbols should have a height of 33 or greater. To
  2285. produce a GS1 DataBar Truncated symbol set the symbol height to a value between
  2286. 13 and 32. Truncated symbols may not be scannable by omnidirectional scanners.
  2287. [zint -b DBAR_OMN -d "0950110153001" --height=13]
  2288. 6.1.11.2 GS1 DataBar Limited
  2289. [zint -b DBAR_LTD --compliantheight -d "0950110153001"]
  2290. Previously known as RSS Limited this standard encodes a 13-digit item code and
  2291. can be used in the same way as GS1 DataBar Omnidirectional above. GS1 DataBar
  2292. Limited, however, is limited to data starting with digits 0 and 1 (i.e. numbers
  2293. in the range 0 to 1999999999999). As with GS1 DataBar Omnidirectional a check
  2294. digit and HRT-only Application Identifier of “(01)” are added by Zint, and a
  2295. 14-digit code may be given in which case the check digit will be verified.
  2296. 6.1.11.3 GS1 DataBar Expanded
  2297. [zint -b DBAR_EXP --compliantheight -d "[01]98898765432106[3202]012345[15]991231
  2298. "]
  2299. Previously known as RSS Expanded this is a variable length symbology capable of
  2300. encoding data from a number of AIs in a single symbol. AIs should be encased in
  2301. [square brackets] in the input data, which will be converted to parentheses
  2302. (round brackets) before being included in the Human Readable Text attached to
  2303. the symbol. This method allows the inclusion of parentheses in the data to be
  2304. encoded. If the data does not include parentheses, the AIs may alternatively be
  2305. encased in parentheses using the --gs1parens switch. See 6.1.10.3 GS1-128.
  2306. GTIN data AI (01) should also include the check digit data as this is not
  2307. calculated by Zint when this symbology is encoded. Fixed length data should be
  2308. entered at the appropriate length for correct encoding. The following is an
  2309. example of a valid GS1 DataBar Expanded input:
  2310. zint -b 31 -d "[01]98898765432106[3202]012345[15]991231"
  2311. 6.1.12 Korea Post Barcode
  2312. [zint -b KOREAPOST -d "923457"]
  2313. The Korean Postal Barcode is used to encode a 6-digit number and includes one
  2314. check digit.
  2315. 6.1.13 Channel Code
  2316. [zint -b CHANNEL -d "453678" --compliantheight]
  2317. A highly compressed symbol for numeric data. The number of channels in the
  2318. symbol can be between 3 and 8 and this can be specified by setting the value of
  2319. the --vers option (API option_2). It can also be determined by the length of the
  2320. input data: e.g. a three character input string generates a 4 channel code by
  2321. default.
  2322. The maximum values permitted depend on the number of channels used as shown in
  2323. the table below:
  2324. Channels Minimum Value Maximum Value
  2325. ---------- --------------- ---------------
  2326. 3 00 26
  2327. 4 000 292
  2328. 5 0000 3493
  2329. 6 00000 44072
  2330. 7 000000 576688
  2331. 8 0000000 7742862
  2332. Table : Channel Value Ranges
  2333. 6.1.14 BC412 (SEMI T1-95)
  2334. [zint -b BC412 -d "AQ45670" --compliantheight]
  2335. Designed by IBM for marking silicon wafers, each BC412 character is represented
  2336. by 4 bars of a single size, interleaved with 4 spaces of varying sizes that
  2337. total 8 (hence 4 bars in 12). Zint implements the SEMI T1-95 standard, where
  2338. input must be alphanumeric, excluding the letter O, and must be from 7 to 18
  2339. characters in length. A single check character is added by Zint, appearing in
  2340. the 2nd character position. Lowercase input is automatically made uppercase.
  2341. 6.2 Stacked Symbologies
  2342. 6.2.1 Basic Symbol Stacking
  2343. An early innovation to get more information into a symbol, used primarily in the
  2344. vehicle industry, is to simply stack one-dimensional codes on top of each other.
  2345. This can be achieved at the command prompt by giving more than one set of input
  2346. data. For example
  2347. zint -d "This" -d "That"
  2348. will draw two Code 128 symbols, one on top of the other. The same result can be
  2349. achieved using the API by executing the ZBarcode_Encode() function more than
  2350. once on a symbol. For example:
  2351. my_symbol->symbology = BARCODE_CODE128;
  2352. error = ZBarcode_Encode(my_symbol, "This", 0);
  2353. error = ZBarcode_Encode(my_symbol, "That", 0);
  2354. error = ZBarcode_Print(my_symbol);
  2355. [zint -d "This" -d "That"]
  2356. Note that the Human Readable Text will be that of the last data, so it’s best to
  2357. use the option --notext (API show_hrt = 0).
  2358. The stacked barcode rows can be separated by row separator bars by specifying
  2359. --bind (API output_options |= BARCODE_BIND). The height of the row separator
  2360. bars in integral multiples of the X-dimension (minimum and default 1, maximum 4)
  2361. can be set by --separator (API option_3):
  2362. zint --bind --notext --separator=2 -d "This" -d "That"
  2363. [zint --notext --bind --separator=2 -d "This" -d "That"]
  2364. A more sophisticated method is to use some type of line indexing which indicates
  2365. to the barcode reader which order the stacked symbols should be read in. This is
  2366. demonstrated by the symbologies below.
  2367. 6.2.2 Codablock-F
  2368. [zint -b CODABLOCKF -d "CODABLOCK F Symbology" --rows=3]
  2369. This is a stacked symbology based on Code 128 which can encode Latin-1 data up
  2370. to a maximum length of 2726 symbol characters, meaning for instance up to 2726
  2371. all ASCII characters, or 5452 all numeric, or up to 1363 all extended ASCII
  2372. (ISO/IEC 8859-1).
  2373. The width of the Codablock-F symbol can be set using the --cols option (API
  2374. option_2), to a value between 9 and 67. The height (number of rows) can be set
  2375. using the --rows option (API option_1), with a maximum of 44. Zint does not
  2376. currently support encoding of GS1 data in Codablock-F symbols.
  2377. A separate symbology ID (BARCODE_HIBC_BLOCKF) can be used to encode Health
  2378. Industry Barcode (HIBC) data which adds a leading '+' character and a modulo-49
  2379. check digit to the encoded data.
  2380. 6.2.3 Code 16K (EN 12323)
  2381. [zint -b CODE16K --compliantheight -d "ab0123456789"]
  2382. Code 16K uses a Code 128 based system which can stack up to 16 rows in a block.
  2383. This gives a maximum data capacity of 77 characters or 154 numerical digits and
  2384. includes two modulo-107 check digits. Code 16K also supports ISO/IEC 8859-1
  2385. character encoding in the same manner as Code 128. GS1 data encoding is also
  2386. supported. The minimum number of rows to use can be set using the --rows option
  2387. (API option_1), with values from 2 to 16.
  2388. 6.2.4 PDF417 (ISO 15438)
  2389. [zint -b PDF417 -d "PDF417"]
  2390. Heavily used in the parcel industry, the PDF417 symbology can encode a vast
  2391. amount of data into a small space. Zint supports encoding up to the ISO standard
  2392. maximum symbol size of 925 codewords which (at error correction level 0) allows
  2393. a maximum data size of 1850 text characters, or 2710 digits.
  2394. The width of the generated PDF417 symbol can be specified at the command line
  2395. using the --cols switch (API option_2) followed by a number between 1 and 30,
  2396. the number of rows using the --rows switch (API option_3) followed by a number
  2397. between 3 and 90, and the amount of error correction information can be
  2398. specified by using the --secure switch (API option_1) followed by a number
  2399. between 0 and 8 where the number of codewords used for error correction is
  2400. determined by 2^(value + 1). The default level of error correction is determined
  2401. by the amount of data being encoded.
  2402. This symbology uses Latin-1 character encoding by default but also supports the
  2403. ECI encoding mechanism. A separate symbology ID (BARCODE_HIBC_PDF) can be used
  2404. to encode Health Industry Barcode (HIBC) data.
  2405. For a faster but less optimal encoding, the --fast option (API
  2406. input_mode |= FAST_MODE) may be used.
  2407. PDF417 supports Structured Append of up to 99,999 symbols and an optional
  2408. numeric ID of up to 30 digits, which can be set by using the --structapp option
  2409. (see 4.17 Structured Append) (API structapp). The ID consists of up to 10
  2410. triplets, each ranging from "000" to "899". For instance "123456789" would be a
  2411. valid ID of 3 triplets. However "123456900" would not, as the last triplet "900"
  2412. exceeds "899". The triplets are 0-filled, for instance "1234" becomes "123004".
  2413. If an ID is not given, no ID is encoded.
  2414. 6.2.5 Compact PDF417 (ISO 15438)
  2415. [zint -b PDF417COMP -d "PDF417"]
  2416. Previously known as Truncated PDF417, Compact PDF417 omits some per-row overhead
  2417. to produce a narrower but less robust symbol. Options are the same as for PDF417
  2418. above.
  2419. 6.2.6 MicroPDF417 (ISO 24728)
  2420. [zint -b MICROPDF417 -d "12345678"]
  2421. A variation of the PDF417 standard, MicroPDF417 is intended for applications
  2422. where symbol size needs to be kept to a minimum. 34 predefined symbol sizes are
  2423. available with 1 - 4 columns and 4 - 44 rows. The maximum amount a MicroPDF417
  2424. symbol can hold is 250 alphanumeric characters or 366 digits. The amount of
  2425. error correction used is dependent on symbol size. The number of columns used
  2426. can be determined using the --cols switch (API option_2) as with PDF417.
  2427. This symbology uses Latin-1 character encoding by default but also supports the
  2428. ECI encoding mechanism. A separate symbology ID (BARCODE_HIBC_MICPDF) can be
  2429. used to encode Health Industry Barcode (HIBC) data. MicroPDF417 supports
  2430. FAST_MODE and Structured Append the same as PDF417, for which see details.
  2431. 6.2.7 GS1 DataBar Stacked (ISO 24724)
  2432. 6.2.7.1 GS1 DataBar Stacked
  2433. [zint -b DBAR_STK --compliantheight -d "9889876543210"]
  2434. A stacked variation of the GS1 DataBar Truncated symbol requiring the same input
  2435. (see 6.1.11.1 GS1 DataBar Omnidirectional and GS1 DataBar Truncated), this
  2436. symbol is the same as the following GS1 DataBar Stacked Omnidirectional symbol
  2437. except that its height is reduced and its central separator is a single row,
  2438. making it suitable for small items when omnidirectional scanning is not
  2439. required. It can be generated with a two-dimensional component to make a
  2440. composite symbol.
  2441. 6.2.7.2 GS1 DataBar Stacked Omnidirectional
  2442. [zint -b DBAR_OMNSTK --compliantheight -d "9889876543210"]
  2443. A stacked variation of the GS1 DataBar Omnidirectional symbol requiring the same
  2444. input (see 6.1.11.1 GS1 DataBar Omnidirectional and GS1 DataBar Truncated). The
  2445. data is encoded in two rows of bars with a central 3-row separator. This symbol
  2446. can be generated with a two-dimensional component to make a composite symbol.
  2447. 6.2.7.3 GS1 DataBar Expanded Stacked
  2448. [zint -b DBAR_EXPSTK --compliantheight -d "[01]98898765432106[3202]012345[15]991
  2449. 231"]
  2450. A stacked variation of the GS1 DataBar Expanded symbol for smaller packages.
  2451. Input is the same as for GS1 DataBar Expanded (see 6.1.11.3 GS1 DataBar
  2452. Expanded). In addition the width of the symbol can be altered using the --cols
  2453. switch (API option_2). In this case the number of columns (values 1 to 11)
  2454. relates to the number of character pairs on each row of the symbol.
  2455. Alternatively the --rows switch (API option_3) can be used to specify the
  2456. maximum number of rows (values 2 to 11), and the number of columns will be
  2457. adjusted accordingly. This symbol can be generated with a two-dimensional
  2458. component to make a composite symbol. For symbols with a 2D component the number
  2459. of columns must be at least 2.
  2460. 6.2.8 Code 49
  2461. [zint -b CODE49 --compliantheight -d "MULTIPLE ROWS IN CODE 49"]
  2462. Developed in 1987 at Intermec, Code 49 is a cross between UPC and Code 39. It is
  2463. one of the earliest stacked symbologies and influenced the design of Code 16K a
  2464. few years later. It supports full 7-bit ASCII input up to a maximum of 49
  2465. characters or 81 numeric digits. GS1 data encoding is also supported. The
  2466. minimum number of rows to use can be set using the --rows option (API option_1),
  2467. with values from 2 to 8.
  2468. 6.3 GS1 Composite Symbols (ISO 24723)
  2469. GS1 Composite symbols employ a mixture of components to give more comprehensive
  2470. information about a product. The permissible contents of a composite symbol is
  2471. determined by the terms of the GS1 General Specifications. Composite symbols
  2472. consist of a linear component which can be an EAN, UPC, GS1-128 or GS1 DataBar
  2473. symbol, a two-dimensional (2D) component which is based on PDF417 or
  2474. MicroPDF417, and a separator pattern. The type of linear component to be used is
  2475. determined using the -b or --barcode switch (API symbology) as with other
  2476. encoding methods. Valid values are shown below.
  2477. ----------------------------------------------------------------------------
  2478. Numeric Name Barcode Name
  2479. Value
  2480. --------- ------------------------- ----------------------------------------
  2481. 130 BARCODE_EANX_CC GS1 Composite Symbol with EAN linear
  2482. component
  2483. 131 BARCODE_GS1_128_CC GS1 Composite Symbol with GS1-128 linear
  2484. component
  2485. 132 BARCODE_DBAR_OMN_CC GS1 Composite Symbol with GS1 DataBar
  2486. Omnidirectional linear component
  2487. 133 BARCODE_DBAR_LTD_CC GS1 Composite Symbol with GS1 DataBar
  2488. Limited linear component
  2489. 134 BARCODE_DBAR_EXP_CC GS1 Composite Symbol with GS1 DataBar
  2490. Expanded linear component
  2491. 135 BARCODE_UPCA_CC GS1 Composite Symbol with UPC-A linear
  2492. component
  2493. 136 BARCODE_UPCE_CC GS1 Composite Symbol with UPC-E linear
  2494. component
  2495. 137 BARCODE_DBAR_STK_CC GS1 Composite Symbol with GS1 DataBar
  2496. Stacked component
  2497. 138 BARCODE_DBAR_OMNSTK_CC GS1 Composite Symbol with GS1 DataBar
  2498. Stacked Omnidirectional component
  2499. 139 BARCODE_DBAR_EXPSTK_CC GS1 Composite Symbol with GS1 DataBar
  2500. Expanded Stacked component
  2501. ----------------------------------------------------------------------------
  2502. Table : GS1 Composite Symbology Values
  2503. The data to be encoded in the linear component of a composite symbol should be
  2504. entered into a primary string with the data for the 2D component being entered
  2505. in the normal way. To do this at the command prompt use the --primary switch
  2506. (API primary). For example:
  2507. zint -b EANX_CC --mode=1 --primary=331234567890 -d "[99]1234-abcd"
  2508. This creates an EAN-13 linear component with the data "331234567890" and a 2D
  2509. CC-A (see below) component with the data "(99)1234-abcd". The same results can
  2510. be achieved using the API as shown below:
  2511. my_symbol->symbology = BARCODE_EANX_CC;
  2512. my_symbol->option_1 = 1;
  2513. strcpy(my_symbol->primary, "331234567890");
  2514. ZBarcode_Encode_and_Print(my_symbol, "[99]1234-abcd", 0, 0);
  2515. EAN-2 and EAN-5 add-on data can be used with EAN and UPC symbols using the +
  2516. symbol as described in sections 6.1.3 UPC (Universal Product Code) (ISO 15420)
  2517. and 6.1.4 EAN (European Article Number) (ISO 15420).
  2518. The 2D component of a composite symbol can use one of three systems: CC-A, CC-B
  2519. and CC-C, as described below. The 2D component type can be selected
  2520. automatically by Zint dependent on the length of the input string. Alternatively
  2521. the three methods can be accessed using the --mode prompt (API option_1)
  2522. followed by 1, 2 or 3 for CC-A, CC-B or CC-C respectively.
  2523. 6.3.1 CC-A
  2524. [zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=3312345
  2525. 67890]
  2526. This system uses a variation of MicroPDF417 which is optimised to fit into a
  2527. small space. The size of the 2D component and the amount of error correction is
  2528. determined by the amount of data to be encoded and the type of linear component
  2529. which is being used. CC-A can encode up to 56 numeric digits or an alphanumeric
  2530. string of shorter length. To select CC-A use --mode=1 (API option_1 = 1).
  2531. 6.3.2 CC-B
  2532. [zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=3312345
  2533. 67890]
  2534. This system uses MicroPDF417 to encode the 2D component. The size of the 2D
  2535. component and the amount of error correction is determined by the amount of data
  2536. to be encoded and the type of linear component which is being used. CC-B can
  2537. encode up to 338 numeric digits or an alphanumeric string of shorter length. To
  2538. select CC-B use --mode=2 (API option_1 = 2).
  2539. 6.3.3 CC-C
  2540. [zint -b GS1_128_CC --compliantheight -d "[99]1234-abcd" --mode=3 --primary="[01
  2541. ]03312345678903"]
  2542. This system uses PDF417 and can only be used in conjunction with a GS1-128
  2543. linear component. CC-C can encode up to 2361 numeric digits or an alphanumeric
  2544. string of shorter length. To select CC-C use --mode=3 (API option_1 = 3).
  2545. 6.4 Two-Track Symbols
  2546. 6.4.1 Two-Track Pharmacode
  2547. [zint -b PHARMA_TWO --compliantheight -d "29876543"]
  2548. Developed by Laetus, Pharmacode Two-Track is an alternative system to Pharmacode
  2549. One-Track (see 6.1.9 Pharmacode) used for the identification of pharmaceuticals.
  2550. The symbology is able to encode whole numbers between 4 and 64570080.
  2551. 6.4.2 POSTNET
  2552. [zint -b POSTNET --compliantheight -d "12345678901"]
  2553. Used by the United States Postal Service until 2009, the POSTNET barcode was
  2554. used for encoding zip-codes on mail items. POSTNET uses numerical input data and
  2555. includes a modulo-10 check digit. While Zint will encode POSTNET symbols of up
  2556. to 38 digits in length, standard lengths as used by USPS were PostNet6 (5-digit
  2557. ZIP input), PostNet10 (5-digit ZIP + 4-digit user data) and PostNet12 (5-digit
  2558. ZIP + 6-digit user data), and a warning will be issued if the input length is
  2559. not one of these.
  2560. 6.4.3 PLANET
  2561. [zint -b PLANET --compliantheight -d "4012345235636"]
  2562. Used by the United States Postal Service until 2009, the PLANET (Postal Alpha
  2563. Numeric Encoding Technique) barcode was used for encoding routing data on mail
  2564. items. PLANET uses numerical input data and includes a modulo-10 check digit.
  2565. While Zint will encode PLANET symbols of up to 38 digits in length, standard
  2566. lengths used by USPS were Planet12 (11-digit input) and Planet14 (13-digit
  2567. input), and as with POSTNET a warning will be issued if the length is not one of
  2568. these.
  2569. 6.4.4 Brazilian CEPNet
  2570. [zint -b CEPNET --compliantheight -d "12345678"]
  2571. Based on POSTNET, the CEPNet symbol is used by Correios, the Brazilian postal
  2572. service, to encode CEP (Código de Endereçamento Postal) numbers on mail items.
  2573. Input should consist of eight digits with the check digit being automatically
  2574. added by Zint.
  2575. 6.4.5 DX Film Edge Barcode
  2576. [zint -b DXFILMEDGE --compliantheight -d "112-1/10A"]
  2577. Introduced by Kodak in the 1980s, the DX (Digital Index) barcode is printed on
  2578. the bottom edge of 35mm film to aid in the reordering and post-processing of
  2579. prints.
  2580. The data can be in two parts. The first part (required) is the “DX number”,
  2581. identifying the manufacturer and film type - the National Association of
  2582. Photographic Manufacturers (NAPM) number. The second part, which is optional and
  2583. if present is separated from the first by a slash (/), gives the frame number.
  2584. The DX number is in either of two formats. The first format is a number of 1 to
  2585. 4 digits (“DX Extract”) or 6 digits (“DX Full”), but for the 6-digit version the
  2586. first and last digit are ignored, leaving a 4-digit DX Extract number in any
  2587. case, which must be in the range 16 to 2047. The second format “NNN-NN”
  2588. represents the DX Extract as two numbers separated by a dash (-), the first
  2589. number being 1 to 3 digits (range 1 to 127) and the second 1 to 2 digits (range
  2590. 0 to 15).[15]
  2591. The optional frame number is a number in the range 0 to 63, and may have a half
  2592. frame indicator “A” appended. Special character sequences (with or without a
  2593. half frame indicator appended) may also be used: “S” or “X” means frame number
  2594. 62, “K” or “00” means frame number 63, and “F” means frame number 0.
  2595. A parity bit is automatically added by Zint.
  2596. 6.5 4-State Postal Codes
  2597. 6.5.1 Australia Post 4-State Symbols
  2598. 6.5.1.1 Customer Barcodes
  2599. [zint -b AUSPOST --compliantheight -d "96184209"]
  2600. Australia Post Standard Customer Barcode, Customer Barcode 2 and Customer
  2601. Barcode 3 are 37-bar, 52-bar and 67-bar specifications respectively, developed
  2602. by Australia Post for printing Delivery Point ID (DPID) and customer information
  2603. on mail items. Valid data characters are 0-9, A-Z, a-z, space and hash (#). A
  2604. Format Control Code (FCC) is added by Zint and should not be included in the
  2605. input data. Reed-Solomon error correction data is generated by Zint. Encoding
  2606. behaviour is determined by the length of the input data according to the formula
  2607. shown in the following table.
  2608. ---------------------------------------------------------------
  2609. Input Required Input Format Symbol FCC Encoding
  2610. Length Length Table
  2611. --------- --------------------------- -------- ----- ----------
  2612. 8 99999999 37-bar 11 None
  2613. 13 99999999AAAAA 52-bar 59 C
  2614. 16 9999999999999999 52-bar 59 N
  2615. 18 99999999AAAAAAAAAA 67-bar 62 C
  2616. 23 99999999999999999999999 67-bar 62 N
  2617. ---------------------------------------------------------------
  2618. Table : Australia Post Input Formats
  2619. 6.5.1.2 Reply Paid Barcode
  2620. [zint -b AUSREPLY --compliantheight -d "12345678"]
  2621. A Reply Paid version of the Australia Post 4-State Barcode (FCC 45) which
  2622. requires an 8-digit DPID input.
  2623. 6.5.1.3 Routing Barcode
  2624. [zint -b AUSROUTE --compliantheight -d "34567890"]
  2625. A Routing version of the Australia Post 4-State Barcode (FCC 87) which requires
  2626. an 8-digit DPID input.
  2627. 6.5.1.4 Redirect Barcode
  2628. [zint -b AUSREDIRECT --compliantheight -d "98765432"]
  2629. A Redirection version of the Australia Post 4-State Barcode (FCC 92) which
  2630. requires an 8-digit DPID input.
  2631. 6.5.2 Dutch Post KIX Code
  2632. [zint -b KIX --compliantheight -d "2500GG30250"]
  2633. This symbology is used by Royal Dutch TPG Post (Netherlands) for Postal code and
  2634. automatic mail sorting. Data input can consist of numbers 0-9 and letters A-Z
  2635. and needs to be 11 characters in length. No check digit is included.
  2636. 6.5.3 Royal Mail 4-State Customer Code (RM4SCC)
  2637. [zint -b RM4SCC --compliantheight -d "W1J0TR01"]
  2638. The RM4SCC standard is used by the Royal Mail in the UK to encode postcode and
  2639. customer data on mail items. Data input can consist of numbers 0-9 and letters
  2640. A-Z and usually includes delivery postcode followed by house number. For example
  2641. "W1J0TR01" for 1 Piccadilly Circus in London. Check digit data is generated by
  2642. Zint.
  2643. 6.5.4 Royal Mail 4-State Mailmark
  2644. [zint -b MAILMARK_4S --compliantheight -d "1100000000000XY11"]
  2645. Developed in 2014 as a replacement for RM4SCC this 4-state symbol includes Reed-
  2646. Solomon error correction. Input is a pre-formatted alphanumeric string of 22
  2647. (for Barcode C) or 26 (for Barcode L) characters, producing a symbol with 66 or
  2648. 78 bars respectively. The rules for the input data are complex, as summarized in
  2649. the following table.
  2650. ----------------------------------------------------------------------------
  2651. Format Version Class Supply Chain ID Item ID Destination+DPS
  2652. ID
  2653. -------- --------- ------------ ---------------- --------- -----------------
  2654. 1 digit 1 digit 1 alphanum. 2 digits (C) or 8 digits 9 alphanumerics
  2655. (0-4) (0-3) (0-9A-E) 6 digits (L) (1 of 6 patterns)
  2656. ----------------------------------------------------------------------------
  2657. Table : Royal Mail 4-State Mailmark Input Fields
  2658. The 6 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
  2659. patterns are:
  2660. ----------- ----------- -----------
  2661. FNFNLLNLS FFNNLLNLS FFNNNLLNL
  2662. FFNFNLLNL FNNLLNLSS FNNNLLNLS
  2663. ----------- ----------- -----------
  2664. Table : Royal Mail Mailmark Destination+DPS Patterns
  2665. where 'F' stands for full alphabetic (A-Z), 'L' for limited alphabetic (A-Z less
  2666. 'CIKMOV'), 'N' for numeric (0-9), and 'S' for space.
  2667. Four of the permitted patterns include a number of trailing space characters -
  2668. these will be appended by Zint if not included in the input data.
  2669. For the two-dimensional Data Matrix-based version, see 6.6.2 Royal Mail 2D
  2670. Mailmark (CMDM) (Data Matrix).
  2671. 6.5.5 USPS Intelligent Mail
  2672. [zint -b USPS_IMAIL --compliantheight -d "01234567094987654321-01234"]
  2673. Also known as the OneCode barcode and used in the U.S. by the United States
  2674. Postal Service (USPS), the Intelligent Mail system replaced the POSTNET and
  2675. PLANET symbologies in 2009. Intelligent Mail is a fixed length (65-bar) symbol
  2676. which combines routing and customer information in a single symbol. Input data
  2677. consists of a 20-digit tracking code, followed by a dash (-), followed by a
  2678. delivery point zip-code which can be 0, 5, 9 or 11 digits in length. For example
  2679. all of the following inputs are valid data entries:
  2680. - "01234567094987654321"
  2681. - "01234567094987654321-01234"
  2682. - "01234567094987654321-012345678"
  2683. - "01234567094987654321-01234567891"
  2684. 6.5.6 Japanese Postal Code
  2685. [zint -b JAPANPOST --compliantheight -d "15400233-16-4-205"]
  2686. Used for address data on mail items for Japan Post. Accepted values are 0-9, A-Z
  2687. and dash (-). A modulo 19 check digit is added by Zint.
  2688. 6.5.7 DAFT Code
  2689. [zint -b DAFT -d "AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF" --height=8.494 --vers=
  2690. 256]
  2691. This is a method for creating 4-state codes where the data encoding is provided
  2692. by an external program. Input data should consist of the letters 'D', 'A', 'F'
  2693. and 'T' where these refer to descender, ascender, full (ascender and descender)
  2694. and tracker (neither ascender nor descender) respectively. All other characters
  2695. are invalid. The ratio of the tracker size to full height can be given in
  2696. thousandths (permille) using the --vers option (API option_2). The default value
  2697. is 250 (25%).
  2698. For example the following
  2699. zint -b DAFT -d AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF --height=8.494 --vers
  2700. =256
  2701. produces the same barcode (see 6.5.3 Royal Mail 4-State Customer Code (RM4SCC))
  2702. as
  2703. zint -b RM4SCC --compliantheight -d "W1J0TR01"
  2704. 6.6 Matrix Symbols
  2705. 6.6.1 Data Matrix (ISO 16022)
  2706. [zint -b HIBC_DM -d "/ACMRN123456/V200912190833" --fast --square]
  2707. Also known as Semacode this symbology was developed in 1989 by Acuity CiMatrix
  2708. in partnership with the U.S. DoD and NASA. The symbol can encode a large amount
  2709. of data in a small area. Data Matrix encodes characters in the Latin-1 set by
  2710. default but also supports encoding in other character sets using the ECI
  2711. mechanism. It can also encode GS1 data. The size of the generated symbol can be
  2712. adjusted using the --vers option (API option_2) as shown in the table below. A
  2713. separate symbology ID (BARCODE_HIBC_DM) can be used to encode Health Industry
  2714. Barcode (HIBC) data. Note that only ECC200 encoding is supported, the older
  2715. standards have now been removed from Zint.
  2716. Input Symbol Size Input Symbol Size Input Symbol Size
  2717. ------- ------------- -- ------- ------------- -- ------- -------------
  2718. 1 10 x 10 11 36 x 36 21 104 x 104
  2719. 2 12 x 12 12 40 x 40 22 120 x 120
  2720. 3 14 x 14 13 44 x 44 23 132 x 132
  2721. 4 16 x 16 14 48 x 48 24 144 x 144
  2722. 5 18 x 18 15 52 x 52 25 8 x 18
  2723. 6 20 x 20 16 64 x 64 26 8 x 32
  2724. 7 22 x 22 17 72 x 72 28 12 x 26
  2725. 8 24 x 24 18 80 x 80 28 12 x 36
  2726. 9 26 x 26 19 88 x 88 29 16 x 36
  2727. 10 32 x 32 20 96 x 96 30 16 x 48
  2728. Table : Data Matrix Sizes
  2729. The largest version 24 (144 x 144) can encode 3116 digits, around 2335
  2730. alphanumeric characters, or 1555 bytes of data.
  2731. When using automatic symbol sizes you can force Zint to use square symbols
  2732. (versions 1-24) at the command line by using the option --square (API
  2733. option_3 = DM_SQUARE).
  2734. Data Matrix Rectangular Extension (ISO/IEC 21471) codes may be generated with
  2735. the following values as before:
  2736. Input Symbol Size Input Symbol Size
  2737. ------- ------------- -- ------- -------------
  2738. 31 8 x 48 40 20 x 36
  2739. 32 8 x 64 41 20 x 44
  2740. 33 8 x 80 42 20 x 64
  2741. 34 8 x 96 43 22 x 48
  2742. 35 8 x 120 44 24 x 48
  2743. 36 8 x 144 45 24 x 64
  2744. 37 12 x 64 46 26 x 40
  2745. 38 12 x 88 47 26 x 48
  2746. 39 16 x 64 48 26 x 64
  2747. Table : DMRE Sizes
  2748. DMRE symbol sizes may be activated in automatic size mode using the option
  2749. --dmre (API option_3 = DM_DMRE).
  2750. GS1 data may be encoded using FNC1 (default) or GS (Group Separator, ASCII 29)
  2751. as separator. Use the option --gssep to change to GS (API
  2752. output_options |= GS1_GS_SEPARATOR).
  2753. By default Zint uses a “de facto” codeword placement for symbols of size 144 x
  2754. 144 (version 24). To override this and use the now clarified ISO/IEC standard
  2755. placement, use option --dmiso144 (API option_3 |= DM_ISO_144).
  2756. For a faster but less optimal encoding, the --fast option (API
  2757. input_mode |= FAST_MODE) may be used.
  2758. Data Matrix supports Structured Append of up to 16 symbols and a numeric ID
  2759. (file identifications), which can be set by using the --structapp option (see
  2760. 4.17 Structured Append) (API structapp). The ID consists of 2 numbers ID1 and
  2761. ID2, each of which can range from 1 to 254, and is specified as the single
  2762. number ID1 * 1000 + ID2, so for instance ID1 "123" and ID2 "234" would be given
  2763. as "123234". Note that both ID1 and ID2 must be non-zero, so e.g. "123000" or
  2764. "000123" would be invalid IDs. If an ID is not given it defaults to "001001".
  2765. 6.6.2 Royal Mail 2D Mailmark (CMDM) (Data Matrix)
  2766. [zint -b MAILMARK_2D -d "JGB 01Z999999900000001EC1A1AA1A0SN35TQ" --vers=30]
  2767. This variant of Data Matrix, also known as “Complex Mail Data Mark” (CMDM), was
  2768. introduced by Royal Mail along with 6.5.4 Royal Mail 4-State Mailmark, and
  2769. offers space for customer data following an initial pre-formatted 45 character
  2770. section, as summarized below.
  2771. Field Name Length Values
  2772. ------------------ ------------- --------------------------------
  2773. UPU Country ID 4 "JGB "
  2774. Information Type 1 Alphanumeric
  2775. Version ID 1 "1"
  2776. Class 1 Alphanumeric
  2777. Supply Chain ID 7 Numeric
  2778. Item ID 8 Numeric
  2779. Destination+DPS 9 Alphanumeric (1 of 6 patterns)
  2780. Service Type 1 Numeric
  2781. RTS Post Code 7 Alphanumeric (1 of 6 patterns)
  2782. Reserved 6 Spaces
  2783. Customer Data 6, 45 or 29 Anything (Latin-1)
  2784. Table : Royal Mail 2D Mailmark Input Fields
  2785. The 6 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
  2786. patterns are the same as for the 4-state - see Table
  2787. : Royal Mail Mailmark Destination+DPS Patterns. The 6 RTS (Return to Sender)
  2788. Post Code patterns are the same also except without the additional DPS 'NL',
  2789. i.e.
  2790. --------- --------- ---------
  2791. FNFNLLS FFNNLLS FFNNNLL
  2792. FFNFNLL FNNLLSS FNNNLLS
  2793. --------- --------- ---------
  2794. Table : Royal Mail 2D Mailmark RTS Patterns
  2795. where 'F' is full alphabetic (A-Z), 'L' limited alphabetic (A-Z less 'CIKMOV'),
  2796. 'N' numeric (0-9), and 'S' space.
  2797. Three sizes are defined, one rectangular, with varying maximum amounts of
  2798. optional customer data:
  2799. Name Size Customer Data Zint Version
  2800. --------- --------- --------------- --------------
  2801. Type 7 24 x 24 6 characters 8
  2802. Type 9 32 x 32 45 characters 10
  2803. Type 29 16 x 48 29 characters 30
  2804. Table : Royal Mail 2D Mailmark Sizes
  2805. Zint will automatically select a size based on the amount of customer data, or
  2806. it can be specified using the --vers option (API option_2), which takes the Zint
  2807. version number (one more than the Royal Mail Type number). Zint will prefix the
  2808. input data with "JGB " if it’s missing, and also space-pad the input if the
  2809. customer data is absent or falls short. As with Data Matrix, the rectangular
  2810. symbol Type 29 can be excluded from automatic size selection by using the option
  2811. --square (API option_3 = DM_SQUARE).
  2812. GS1 data, the ECI mechanism, and Structured Append are not supported.
  2813. 6.6.3 QR Code (ISO 18004)
  2814. [zint -b QRCODE -d "QR Code Symbol" --mask=5]
  2815. Also known as Quick Response Code this symbology was developed by Denso. Four
  2816. levels of error correction are available using the --secure option (API
  2817. option_1) as shown in the following table.
  2818. Input ECC Level Error Correction Capacity Recovery Capacity
  2819. ------- ----------- --------------------------- -------------------
  2820. 1 L Approx 20% of symbol Approx 7%
  2821. 2 M Approx 37% of symbol Approx 15%
  2822. 3 Q Approx 55% of symbol Approx 25%
  2823. 4 H Approx 65% of symbol Approx 30%
  2824. Table : QR Code ECC Levels
  2825. The size of the symbol can be specified by setting the --vers option (API
  2826. option_2) to the QR Code version required (1-40). The size of symbol generated
  2827. is shown in the table below.
  2828. Input Symbol Size Input Symbol Size Input Symbol Size
  2829. ------- ------------- -- ------- ------------- -- ------- -------------
  2830. 1 21 x 21 15 77 x 77 29 133 x 133
  2831. 2 25 x 25 16 81 x 81 30 137 x 137
  2832. 3 29 x 29 17 85 x 85 31 141 x 141
  2833. 4 33 x 33 18 89 x 89 32 145 x 145
  2834. 5 37 x 37 19 93 x 93 33 149 x 149
  2835. 6 41 x 41 20 97 x 97 34 153 x 153
  2836. 7 45 x 45 21 101 x 101 35 157 x 157
  2837. 8 49 x 49 22 105 x 105 36 161 x 161
  2838. 9 53 x 53 23 109 x 109 37 165 x 165
  2839. 10 57 x 57 24 113 x 113 38 169 x 169
  2840. 11 61 x 61 25 117 x 117 39 173 x 173
  2841. 12 65 x 65 26 121 x 121 40 177 x 177
  2842. 13 69 x 69 27 125 x 125
  2843. 14 73 x 73 28 129 x 129
  2844. Table : QR Code Sizes
  2845. The maximum capacity of a QR Code symbol (version 40) is 7089 numeric digits,
  2846. 4296 alphanumeric characters or 2953 bytes of data. QR Code symbols can also be
  2847. used to encode GS1 data. QR Code symbols can by default encode either characters
  2848. in the Latin-1 set or Kanji, Katakana and ASCII characters which are members of
  2849. the Shift JIS encoding scheme. In addition QR Code supports other character sets
  2850. using the ECI mechanism. Input should usually be entered as UTF-8 with
  2851. conversion to Latin-1 or Shift JIS being carried out by Zint. A separate
  2852. symbology ID (BARCODE_HIBC_QR) can be used to encode Health Industry Barcode
  2853. (HIBC) data.
  2854. Non-ASCII data density may be maximized by using the --fullmultibyte switch (API
  2855. option_3 = ZINT_FULL_MULTIBYTE), but check that your barcode reader supports
  2856. this before using.
  2857. QR Code has eight different masks designed to minimize unwanted patterns. The
  2858. best mask to use is selected automatically by Zint but may be manually specified
  2859. by using the --mask switch with values 0-7, or in the API by setting
  2860. option_3 = (N + 1) << 8 where N is 0-7. To use with ZINT_FULL_MULTIBYTE set
  2861. option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8
  2862. The --fast option (API input_mode |= FAST_MODE) may be used when leaving Zint to
  2863. automatically select a mask to reduce the number of masks to try to four (0, 2,
  2864. 4, 7).
  2865. QR Code supports Structured Append of up to 16 symbols and a numeric ID
  2866. (parity), which can be set by using the --structapp option (see 4.17 Structured
  2867. Append) (API structapp). The parity ID ranges from 0 (default) to 255, and for
  2868. full compliance should be set to the value obtained by XOR-ing together each
  2869. byte of the complete data forming the sequence. Currently this calculation must
  2870. be done outside of Zint.
  2871. 6.6.4 Micro QR Code (ISO 18004)
  2872. [zint -b MICROQR -d "01234567"]
  2873. A miniature version of the QR Code symbol for short messages, Micro QR Code
  2874. symbols can encode either Latin-1 characters or Shift JIS characters. Input
  2875. should be entered as a UTF-8 stream with conversion to Latin-1 or Shift JIS
  2876. being carried out automatically by Zint. A preferred symbol size can be selected
  2877. by using the --vers option (API option_2), as shown in the table below. Note
  2878. that versions M1 and M2 have restrictions on what characters can be encoded.
  2879. ------------------------------------------------------------------
  2880. Input Version Symbol Size Allowed Characters
  2881. ------- --------- ------------- ----------------------------------
  2882. 1 M1 11 x 11 Numeric only
  2883. 2 M2 13 x 13 Numeric, uppercase letters, space,
  2884. and the characters "$%*+-./:"
  2885. 3 M3 15 x 15 Latin-1 and Shift JIS
  2886. 4 M4 17 x 17 Latin-1 and Shift JIS
  2887. ------------------------------------------------------------------
  2888. Table : Micro QR Code Sizes
  2889. Version M4 can encode up to 35 digits, 21 alphanumerics, 15 bytes or 9 Kanji
  2890. characters.
  2891. Except for version M1, which is always ECC level L, the amount of ECC codewords
  2892. can be adjusted using the --secure option (API option_1); however ECC level H is
  2893. not available for any version, and ECC level Q is only available for version M4:
  2894. ----------------------------------------------------------------------
  2895. Input ECC Error Correction Recovery Available for
  2896. Level Capacity Capacity Versions
  2897. -------- -------- ----------------------- ------------- --------------
  2898. 1 L Approx 20% of symbol Approx 7% M1, M2, M3, M4
  2899. 2 M Approx 37% of symbol Approx 15% M2, M3, M4
  2900. 3 Q Approx 55% of symbol Approx 25% M4
  2901. ----------------------------------------------------------------------
  2902. Table : Micro QR ECC Levels
  2903. The defaults for symbol size and ECC level depend on the input and whether
  2904. either of them is specified.
  2905. For barcode readers that support it, non-ASCII data density may be maximized by
  2906. using the --fullmultibyte switch (API option_3 = ZINT_FULL_MULTIBYTE).
  2907. Micro QR Code has four different masks designed to minimize unwanted patterns.
  2908. The best mask to use is selected automatically by Zint but may be manually
  2909. specified by using the --mask switch with values 0-3, or in the API by setting
  2910. option_3 = (N + 1) << 8 where N is 0-3. To use with ZINT_FULL_MULTIBYTE set
  2911. option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8
  2912. 6.6.5 Rectangular Micro QR Code (rMQR) (ISO 23941)
  2913. [zint -b RMQR -d "0123456"]
  2914. A rectangular version of QR Code, rMQR supports encoding of GS1 data, and either
  2915. Latin-1 characters or Shift JIS characters, and other encodings using the ECI
  2916. mechanism. As with other symbologies data should be entered as UTF-8 with
  2917. conversion being handled by Zint. The amount of ECC codewords can be adjusted
  2918. using the --secure option (API option_1), however only ECC levels M and H are
  2919. valid for this type of symbol.
  2920. Input ECC Level Error Correction Capacity Recovery Capacity
  2921. ------- ----------- --------------------------- -------------------
  2922. 2 M Approx 37% of symbol Approx 15%
  2923. 4 H Approx 65% of symbol Approx 30%
  2924. Table : rMQR ECC Levels
  2925. The preferred symbol sizes can be selected using the --vers option (API
  2926. option_2) as shown in the table below. Input values between 33 and 38 fix the
  2927. height of the symbol while allowing Zint to determine the minimum symbol width.
  2928. ------------------------------------------------------------------------------
  2929. Input Version Symbol Size (HxW) Input Version Symbol Size (HxW)
  2930. ------- --------- ------------------ -- ------- --------- --------------------
  2931. 1 R7x43 7 x 43 20 R13x77 13 x 77
  2932. 2 R7x59 7 x 59 21 R13x99 13 x 99
  2933. 3 R7x77 7 x 77 22 R13x139 13 x 139
  2934. 4 R7x99 7 x 99 23 R15x43 15 x 43
  2935. 5 R7x139 7 x 139 24 R15x59 15 x 59
  2936. 6 R9x43 9 x 43 25 R15x77 15 x 77
  2937. 7 R9x59 9 x 59 26 R15x99 15 x 99
  2938. 8 R9x77 9 x 77 27 R15x139 15 x 139
  2939. 9 R9x99 9 x 99 28 R17x43 17 x 43
  2940. 10 R9x139 9 x 139 29 R17x59 17 x 59
  2941. 11 R11x27 11 x 27 30 R17x77 17 x 77
  2942. 12 R11x43 11 x 43 31 R17x99 17 x 99
  2943. 13 R11x59 11 x 59 32 R17x139 17 x 139
  2944. 14 R11x77 11 x 77 33 R7xW 7 x automatic width
  2945. 15 R11x99 11 x 99 34 R9xW 9 x automatic width
  2946. 16 R11x139 11 x 139 35 R11xW 11 x automatic width
  2947. 17 R13x27 13 x 27 36 R13xW 13 x automatic width
  2948. 18 R13x43 13 x 43 37 R15xW 15 x automatic width
  2949. 19 R13x59 13 x 59 38 R17xW 17 x automatic width
  2950. ------------------------------------------------------------------------------
  2951. Table : rMQR Sizes
  2952. The largest version R17x139 (32) can encode up to 361 digits, 219 alphanumerics,
  2953. 150 bytes, or 92 Kanji characters.
  2954. For barcode readers that support it, non-ASCII data density may be maximized by
  2955. using the --fullmultibyte switch or in the API by setting
  2956. option_3 = ZINT_FULL_MULTIBYTE.
  2957. 6.6.6 UPNQR (Univerzalnega Plačilnega Naloga QR)
  2958. [zint -b UPNQR -i upn_utf8.txt --quietzones]
  2959. A variation of QR Code used by Združenje Bank Slovenije (Bank Association of
  2960. Slovenia). The size, error correction level and ECI are set by Zint and do not
  2961. need to be specified. UPNQR is unusual in that it uses Latin-2 (ISO/IEC 8859-2
  2962. plus ASCII) formatted data. Zint will accept UTF-8 data and convert it to
  2963. Latin-2, or if your data is already Latin-2 formatted use the --binary switch
  2964. (API input_mode = DATA_MODE).
  2965. The following example creates a symbol from data saved as a Latin-2 file:
  2966. zint -o upnqr.png -b 143 --scale=3 --binary -i upn.txt
  2967. A mask may be manually specified or the --fast option used as with QRCODE.
  2968. 6.6.7 MaxiCode (ISO 16023)
  2969. [zint -b MAXICODE -d "1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN S
  2970. T\GNY\GNY\R\E" --esc --primary="152382802000000" --scmvv=96]
  2971. Developed by UPS the MaxiCode symbology employs a grid of hexagons surrounding a
  2972. bullseye finder pattern. This symbology is designed for the identification of
  2973. parcels. MaxiCode symbols can be encoded in one of five modes. In modes 2 and 3
  2974. MaxiCode symbols are composed of two parts named the primary and secondary
  2975. messages. The primary message consists of a Structured Carrier Message which
  2976. includes various data about the package being sent and the secondary message
  2977. usually consists of address data in a data structure. The format of the primary
  2978. message required by Zint is given in the following table.
  2979. Characters Meaning
  2980. ------------ -----------------------------------------------------------------
  2981. 1 - 9 Postcode data which can consist of up to 9 digits (for mode 2)
  2982. or up to 6 alphanumeric characters (for mode 3). Remaining
  2983. unused characters for mode 3 can be filled with the SPACE
  2984. character (ASCII 32) or omitted.
  2985. (adjust the following character positions according to postcode
  2986. length)
  2987. 10 - 12 Three-digit country code according to ISO 3166-1.
  2988. 13 - 15 Three-digit service code. This depends on your parcel courier.
  2989. Table : MaxiCode Structured Carrier Message Format
  2990. The primary message can be set at the command prompt using the --primary switch
  2991. (API primary). The secondary message uses the normal data entry method. For
  2992. example:
  2993. zint -o test.eps -b 57 --primary="999999999840012" \
  2994. -d "Secondary Message Here"
  2995. When using the API the primary message must be placed in the primary string. The
  2996. secondary is entered in the same way as described in 5.2 Encoding and Saving to
  2997. File. When either of these modes is selected Zint will analyse the primary
  2998. message and select either mode 2 or mode 3 as appropriate.
  2999. As a convenience the secondary message for modes 2 and 3 can be set to be
  3000. prefixed by the ISO/IEC 15434 Format "01" (transportation) sequence
  3001. "[)>\R01\Gvv", where vv is a 2-digit version, by using the --scmvv switch (API
  3002. option_2 = vv + 1). For example to use the common version "96" (ASC MH10/SC 8):
  3003. zint -b 57 --primary="152382802840001" --scmvv=96 --esc -d \
  3004. "1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN ST\GNY\GNY\R\E"
  3005. will prefix "[)>\R01\G96" to the secondary message. (\R, \G and \E are the
  3006. escape sequences for Record Separator, Group Separator and End of Transmission
  3007. respectively - see Table : Escape Sequences.)
  3008. Modes 4 to 6 can be accessed using the --mode switch (API option_1). Modes 4 to
  3009. 6 do not have a primary message. For example:
  3010. zint -o test.eps -b 57 --mode=4 -d "A MaxiCode Message in Mode 4"
  3011. Mode 6 is reserved for the maintenance of scanner hardware and should not be
  3012. used to encode user data.
  3013. This symbology uses Latin-1 character encoding by default but also supports the
  3014. ECI encoding mechanism. The maximum length of text which can be placed in a
  3015. MaxiCode symbol depends on the type of characters used in the text.
  3016. Example maximum data lengths are given in the table below:
  3017. ------------------------------------------------------------------------
  3018. Mode Maximum Data Length Maximum Data Length Number of Error
  3019. for Capital Letters for Numeric Digits Correction Codewords
  3020. ------ --------------------- --------------------- ---------------------
  3021. 2* 84 126 50
  3022. 3* 84 126 50
  3023. 4 93 138 50
  3024. 5 77 113 66
  3025. 6 93 138 50
  3026. ------------------------------------------------------------------------
  3027. Table : MaxiCode Data Length Maxima
  3028. * - secondary only
  3029. MaxiCode supports Structured Append of up to 8 symbols, which can be set by
  3030. using the --structapp option (see 4.17 Structured Append) (API structapp). It
  3031. does not support specifying an ID.
  3032. MaxiCode uses a different scaling than other symbols for raster output, see
  3033. 4.9.3 MaxiCode Raster Scaling, and also for EMF vector output, when the scale is
  3034. multiplied by 20 instead of 2.
  3035. 6.6.8 Aztec Code (ISO 24778)
  3036. [zint -b AZTEC -d "123456789012"]
  3037. Invented by Andrew Longacre at Welch Allyn Inc in 1995 the Aztec Code symbol is
  3038. a matrix symbol with a distinctive bullseye finder pattern. Zint can generate
  3039. Compact Aztec Code (sometimes called Small Aztec Code) as well as ‘full-range’
  3040. Aztec Code symbols and by default will automatically select symbol type and size
  3041. dependent on the length of the data to be encoded. Error correction codewords
  3042. will normally be generated to fill at least 23% of the symbol. Two options are
  3043. available to change this behaviour:
  3044. The size of the symbol can be specified using the --vers option (API option_2)
  3045. to a value between 1 and 36 according to the following table. The symbols marked
  3046. with an asterisk (*) in the table below are ‘compact’ symbols, meaning they have
  3047. a smaller bullseye pattern at the centre of the symbol.
  3048. Input Symbol Size Input Symbol Size Input Symbol Size
  3049. ------- ------------- -- ------- ------------- -- ------- -------------
  3050. 1 15 x 15* 13 53 x 53 25 105 x 105
  3051. 2 19 x 19* 14 57 x 57 26 109 x 109
  3052. 3 23 x 23* 15 61 x 61 27 113 x 113
  3053. 4 27 x 27* 16 67 x 67 28 117 x 117
  3054. 5 19 x 19 17 71 x 71 29 121 x 121
  3055. 6 23 x 23 18 75 x 75 30 125 x 125
  3056. 7 27 x 27 19 79 x 79 31 131 x 131
  3057. 8 31 x 31 20 83 x 83 32 135 x 135
  3058. 9 37 x 37 21 87 x 87 33 139 x 139
  3059. 10 41 x 41 22 91 x 91 34 143 x 143
  3060. 11 45 x 45 23 95 x 95 35 147 x 147
  3061. 12 49 x 49 24 101 x 101 36 151 x 151
  3062. Table : Aztec Code Sizes
  3063. Note that in symbols which have a specified size the amount of error correction
  3064. is dependent on the length of the data input and Zint will allow error
  3065. correction capacities as low as 3 codewords.
  3066. Alternatively the amount of error correction data can be specified by setting
  3067. the --secure option (API option_1) to a value from the following table.
  3068. Mode Error Correction Capacity
  3069. ------ ---------------------------
  3070. 1 >10% + 3 codewords
  3071. 2 >23% + 3 codewords
  3072. 3 >36% + 3 codewords
  3073. 4 >50% + 3 codewords
  3074. Table : Aztec Code Error Correction Modes
  3075. It is not possible to select both symbol size and error correction capacity for
  3076. the same symbol. If both options are selected then the error correction capacity
  3077. selection will be ignored.
  3078. Aztec Code supports ECI encoding and can encode up to a maximum length of
  3079. approximately 3823 numeric or 3067 alphabetic characters or 1914 bytes of data.
  3080. A separate symbology ID (BARCODE_HIBC_AZTEC) can be used to encode Health
  3081. Industry Barcode (HIBC) data.
  3082. Aztec Code supports Structured Append of up to 26 symbols and an optional
  3083. alphanumeric ID of up to 32 characters, which can be set by using the
  3084. --structapp option (see 4.17 Structured Append) (API structapp). The ID cannot
  3085. contain spaces. If an ID is not given, no ID is encoded.
  3086. 6.6.9 Aztec Runes (ISO 24778)
  3087. [zint -b AZRUNE -d "125"]
  3088. A truncated version of compact Aztec Code for encoding whole integers between 0
  3089. and 255, as defined in ISO/IEC 24778 Annex A. Includes Reed-Solomon error
  3090. correction. It does not support Structured Append.
  3091. 6.6.10 Code One
  3092. [zint -b CODEONE -d "1234567890123456789012"]
  3093. A matrix symbology developed by Ted Williams in 1992 which encodes data in a way
  3094. similar to Data Matrix, Code One is able to encode the Latin-1 character set or
  3095. GS1 data, and also supports the ECI mechanism. There are two types of Code One
  3096. symbol - fixed-ratio symbols which are roughly square (versions A through to H)
  3097. and variable-width versions (versions S and T). These can be selected by using
  3098. --vers (API option_2) as shown in the table below:
  3099. --------------------------------------------------------------
  3100. Input Version Size (W x H) Numeric Data Alphanumeric
  3101. Capacity Data Capacity
  3102. ------- --------- ------------ --------------- ---------------
  3103. 1 A 16 x 18 22 13
  3104. 2 B 22 x 22 44 27
  3105. 3 C 28 x 28 104 64
  3106. 4 D 40 x 42 217 135
  3107. 5 E 52 x 54 435 271
  3108. 6 F 70 x 76 886 553
  3109. 7 G 104 x 98 1755 1096
  3110. 8 H 148 x 134 3550 2218
  3111. 9 S width x 8 18 N/A
  3112. 10 T width x 16 90 55
  3113. --------------------------------------------------------------
  3114. Table : Code One Sizes
  3115. Version S symbols can only encode numeric data. The width of version S and
  3116. version T symbols is determined by the length of the input data.
  3117. Code One supports Structured Append of up to 128 symbols, which can be set by
  3118. using the --structapp option (see 4.17 Structured Append) (API structapp). It
  3119. does not support specifying an ID. Structured Append is not supported with GS1
  3120. data nor for Version S symbols.
  3121. 6.6.11 Grid Matrix
  3122. [zint -b GRIDMATRIX --eci=29 -d "AAT2556 电池充电器+降压转换器 200mA至2A tel:86 019 825127
  3123. 38"]
  3124. Grid Matrix groups modules in a chequerboard pattern, and by default supports
  3125. the GB 2312 standard set, which includes Hanzi, ASCII and a small number of
  3126. ISO/IEC 8859-1 characters. Input should be entered as UTF-8 with conversion to
  3127. GB 2312 being carried out automatically by Zint. Up to around 1529 alphanumeric
  3128. characters or 2751 digits may be encoded. The symbology also supports the ECI
  3129. mechanism. Support for GS1 data has not yet been implemented.
  3130. The size of the symbol and the error correction capacity can be specified. If
  3131. you specify both of these values then Zint will make a ‘best-fit’ attempt to
  3132. satisfy both conditions. The symbol size can be specified using the --vers
  3133. option (API option_2), and the error correction capacity can be specified by
  3134. using the --secure option (API option_1), according to the following tables.
  3135. Input Symbol Size Input Symbol Size
  3136. ------- ------------- -- ------- -------------
  3137. 1 18 x 18 8 102 x 102
  3138. 2 30 x 30 9 114 x 114
  3139. 3 42 x 42 10 126 x 126
  3140. 4 54 x 54 11 138 x 138
  3141. 5 66 x 66 12 150 x 150
  3142. 6 78 x 78 13 162 x 162
  3143. 7 90 x 90
  3144. Table : Grid Matrix Sizes
  3145. Mode Error Correction Capacity
  3146. ------ ---------------------------
  3147. 1 Approximately 10%
  3148. 2 Approximately 20%
  3149. 3 Approximately 30%
  3150. 4 Approximately 40%
  3151. 5 Approximately 50%
  3152. Table : Grid Matrix Error Correction Modes
  3153. Non-ASCII data density may be maximized by using the --fullmultibyte switch (API
  3154. option_3 = ZINT_FULL_MULTIBYTE), but check that your barcode reader supports
  3155. this before using.
  3156. Grid Matrix supports Structured Append of up to 16 symbols and a numeric ID
  3157. (file signature), which can be set by using the --structapp option (see 4.17
  3158. Structured Append) (API structapp). The ID ranges from 0 (default) to 255.
  3159. 6.6.12 DotCode
  3160. [zint -b DOTCODE -d "[01]00012345678905[17]201231[10]ABC123456" --gs1]
  3161. DotCode uses a grid of dots in a rectangular formation to encode characters up
  3162. to a maximum of approximately 450 characters (or 900 numeric digits). The
  3163. symbology supports ECI encoding and GS1 data encoding. By default Zint will
  3164. produce a symbol which is approximately square, however the width of the symbol
  3165. can be adjusted by using the --cols option (API option_2) (maximum 200).
  3166. Outputting DotCode to raster images (BMP, GIF, PCX, PNG, TIF) will require
  3167. setting the scale of the image to a larger value than the default (e.g.
  3168. approximately 10) for the dots to be plotted correctly. Approximately 33% of the
  3169. resulting symbol is comprised of error correction codewords.
  3170. DotCode has two sets of 4 masks, designated 0-3 and 0’-3’, the second "prime"
  3171. set being the same as the first with corners lit. The best mask to use is
  3172. selected automatically by Zint but may be manually specified by using the --mask
  3173. switch with values 0-7, where 4-7 denote 0’-3’, or in the API by setting
  3174. option_3 = (N + 1) << 8 where N is 0-7.
  3175. DotCode supports Structured Append of up to 35 symbols, which can be set by
  3176. using the --structapp option (see 4.17 Structured Append) (API structapp). It
  3177. does not support specifying an ID.
  3178. 6.6.13 Han Xin Code (ISO 20830)
  3179. [zint -b HANXIN -d "Hanxin Code symbol"]
  3180. Also known as Chinese Sensible Code, Han Xin is capable of encoding characters
  3181. in either the Latin-1 character set or the GB 18030 character set (which is a
  3182. UTF, i.e. includes all Unicode characters, optimized for Chinese characters) and
  3183. is also able to support the ECI mechanism. Support for the encoding of GS1 data
  3184. has not yet been implemented.
  3185. The size of the symbol can be specified using the --vers option (API option_2)
  3186. to a value between 1 and 84 according to the following table.
  3187. Input Symbol Size Input Symbol Size Input Symbol Size
  3188. ------- ------------- -- ------- ------------- -- ------- -------------
  3189. 1 23 x 23 29 79 x 79 57 135 x 135
  3190. 2 25 x 25 30 81 x 81 58 137 x 137
  3191. 3 27 x 27 31 83 x 83 59 139 x 139
  3192. 4 29 x 29 32 85 x 85 60 141 x 141
  3193. 5 31 x 31 33 87 x 87 61 143 x 143
  3194. 6 33 x 33 34 89 x 89 62 145 x 145
  3195. 7 35 x 35 35 91 x 91 63 147 x 147
  3196. 8 37 x 37 36 93 x 93 64 149 x 149
  3197. 9 39 x 39 37 95 x 95 65 151 x 151
  3198. 10 41 x 41 38 97 x 97 66 153 x 153
  3199. 11 43 x 43 39 99 x 99 67 155 x 155
  3200. 12 45 x 45 40 101 x 101 68 157 x 157
  3201. 13 47 x 47 41 103 x 103 69 159 x 159
  3202. 14 49 x 49 42 105 x 105 70 161 x 161
  3203. 15 51 x 51 43 107 x 107 71 163 x 163
  3204. 16 53 x 53 44 109 x 109 72 165 x 165
  3205. 17 55 x 55 45 111 x 111 73 167 x 167
  3206. 18 57 x 57 46 113 x 113 74 169 x 169
  3207. 19 59 x 59 47 115 x 115 75 171 x 171
  3208. 20 61 x 61 48 117 x 117 76 173 x 173
  3209. 21 63 x 63 49 119 x 119 77 175 x 175
  3210. 22 65 x 65 50 121 x 121 78 177 x 177
  3211. 23 67 x 67 51 123 x 123 79 179 x 179
  3212. 24 69 x 69 52 125 x 125 80 181 x 181
  3213. 25 71 x 71 53 127 x 127 81 183 x 183
  3214. 26 73 x 73 54 129 x 129 82 185 x 185
  3215. 27 75 x 75 55 131 x 131 83 187 x 187
  3216. 28 77 x 77 56 133 x 133 84 189 x 189
  3217. Table : Han Xin Sizes
  3218. The largest version (84) can encode 7827 digits, 4350 ASCII characters, up to
  3219. 2175 Chinese characters, or 3261 bytes, making it the most capacious of all the
  3220. barcodes supported by Zint.
  3221. There are four levels of error correction capacity available for Han Xin Code
  3222. which can be set by using the --secure option (API option_1) to a value from the
  3223. following table.
  3224. Mode Recovery Capacity
  3225. ------ -------------------
  3226. 1 Approx 8%
  3227. 2 Approx 15%
  3228. 3 Approx 23%
  3229. 4 Approx 30%
  3230. Table : Han Xin Error Correction Modes
  3231. Non-ASCII data density may be maximized by using the --fullmultibyte switch (API
  3232. option_3 = ZINT_FULL_MULTIBYTE), but check that your barcode reader supports
  3233. this before using.
  3234. Han Xin has four different masks designed to minimize unwanted patterns. The
  3235. best mask to use is selected automatically by Zint but may be manually specified
  3236. by using the --mask switch with values 0-3, or in the API by setting
  3237. option_3 = (N + 1) << 8 where N is 0-3. To use with ZINT_FULL_MULTIBYTE set
  3238. option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8
  3239. 6.6.14 Ultracode
  3240. [zint -b ULTRA -d "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS"]
  3241. This symbology uses a grid of coloured elements to encode data. ECI and GS1
  3242. modes are supported. The amount of error correction can be set using the
  3243. --secure option (API option_1) to a value as shown in the following table.
  3244. Value EC Level Amount of symbol holding error correction data
  3245. ------- ---------- ------------------------------------------------
  3246. 1 EC0 0% - Error detection only
  3247. 2 EC1 Approx 5%
  3248. 3 EC2 Approx 9% - Default value
  3249. 4 EC3 Approx 17%
  3250. 5 EC4 Approx 25%
  3251. 6 EC5 Approx 33%
  3252. Table : Ultracode Error Correction Values
  3253. Zint does not currently implement data compression by default, but this can be
  3254. initiated through the API by setting
  3255. symbol->option_3 = ULTRA_COMPRESSION;
  3256. With compression, up to 504 digits, 375 alphanumerics or 252 bytes can be
  3257. encoded.
  3258. Revision 2 of Ultracode (2023) may be specified using --vers=2 (API
  3259. option_2 = 2).
  3260. --------------------------------------------------------------------------------
  3261. WARNING: Revision 2 of Ultracode was only finalized December 2023 and Zint has
  3262. not yet been updated to support it. Do not use.
  3263. --------------------------------------------------------------------------------
  3264. Ultracode supports Structured Append of up to 8 symbols and an optional numeric
  3265. ID (File Number), which can be set by using the --structapp option (see 4.17
  3266. Structured Append) (API structapp). The ID ranges from 1 to 80088. If an ID is
  3267. not given, no ID is encoded.
  3268. 6.7 Other Barcode-Like Markings
  3269. 6.7.1 Facing Identification Mark (FIM)
  3270. [zint -b FIM --compliantheight -d "C"]
  3271. Used by the United States Postal Service (USPS), the FIM symbology is used to
  3272. assist automated mail processing. There are only 5 valid symbols which can be
  3273. generated using the characters A-E as shown in the table below.
  3274. Code Letter Usage
  3275. ------------- ----------------------------------------------------------------
  3276. A Used for courtesy reply mail and metered reply mail with a
  3277. pre-printed POSTNET symbol.
  3278. B Used for business reply mail without a pre-printed zip code.
  3279. C Used for business reply mail with a pre-printed zip code.
  3280. D Used for Information Based Indicia (IBI) postage.
  3281. E Used for customized mail with a USPS Intelligent Mail barcode.
  3282. Table : Valid FIM Characters
  3283. 6.7.2 Flattermarken
  3284. [zint -b FLAT -d "1304056"]
  3285. Used for the recognition of page sequences in print-shops, the Flattermarken is
  3286. not a true barcode symbol and requires precise knowledge of the position of the
  3287. mark on the page. The Flattermarken system can encode numeric data up to a
  3288. maximum of 128 digits and does not include a check digit.
  3289. 7. Legal and Version Information
  3290. 7.1 License
  3291. Zint, libzint and Zint Barcode Studio are Copyright © 2024 Robin Stuart. All
  3292. historical versions are distributed under the GNU General Public License version
  3293. 3 or later. Versions 2.5 and later are released under a dual license: the
  3294. encoding library is released under the BSD (3 clause) license whereas the GUI,
  3295. Zint Barcode Studio, and the CLI are released under the GNU General Public
  3296. License version 3 or later.
  3297. Telepen is a trademark of SB Electronic Systems Ltd.
  3298. QR Code is a registered trademark of Denso Wave Incorporated.
  3299. Mailmark is a registered trademark of Royal Mail Group Ltd.
  3300. Microsoft, Windows and the Windows logo are either registered trademarks or
  3301. trademarks of Microsoft Corporation in the United States and/or other countries.
  3302. Linux is the registered trademark of Linus Torvalds in the U.S. and other
  3303. countries.
  3304. Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other
  3305. countries.
  3306. The Zint logo is derived from “SF Planetary Orbiter” font by ShyFoundary.
  3307. Zint.org.uk website design and hosting provided by Robert Elliott.
  3308. 7.2 Patent Issues
  3309. All of the code in Zint is developed using information in the public domain,
  3310. usually freely available on the Internet. Some of the techniques used may be
  3311. subject to patents and other intellectual property legislation. It is my belief
  3312. that any patents involved in the technology underlying symbologies utilised by
  3313. Zint are ‘unadopted’, that is the holder does not object to their methods being
  3314. used.
  3315. Any methods patented or owned by third parties or trademarks or registered
  3316. trademarks used within Zint or in this document are and remain the property of
  3317. their respective owners and do not indicate endorsement or affiliation with
  3318. those owners, companies or organisations.
  3319. 7.3 Version Information
  3320. The current stable version of Zint is 2.13.0, released on 18th December 2023.
  3321. See "ChangeLog" in the project root directory for information on all releases.
  3322. 7.4 Sources of Information
  3323. Below is a list of some of the sources used in rough chronological order:
  3324. - Nick Johnson’s Barcode Specifications
  3325. - Bar Code 1 Specification Source Page
  3326. - SB Electronic Systems Telepen website
  3327. - Pharmacode specifications from Laetus
  3328. - Morovia RM4SCC specification
  3329. - Australia Post’s ‘A Guide to Printing the 4-State Barcode’ and bcsample
  3330. source code
  3331. - Plessey algorithm from GNU-Barcode v0.98 by Leonid A. Broukhis
  3332. - GS1 General Specifications v 8.0 Issue 2
  3333. - PNG: The Definitive Guide and wpng source code by Greg Reolofs
  3334. - PDF417 specification and pdf417 source code by Grand Zebu
  3335. - Barcode Reference, TBarCode/X User Documentation and TBarCode/X
  3336. demonstration program from Tec-It
  3337. - IEC16022 source code by Stefan Schmidt et al
  3338. - United States Postal Service Specification USPS-B-3200
  3339. - Adobe Systems Incorporated Encapsulated PostScript File Format Specification
  3340. - BSI Online Library
  3341. - Libdmtx Data Matrix ECC200 decoding library
  3342. 7.5 Standards Compliance
  3343. Zint was developed to provide compliance with the following British and
  3344. international standards:
  3345. 7.5.1 Symbology Standards
  3346. - ISO/IEC 24778:2008 Information technology - Automatic identification and
  3347. data capture techniques - Aztec Code bar code symbology specification
  3348. - SEMI T1-95 Specification for Back Surface Bar Code Marking of Silicon Wafers
  3349. (BC412) (1996)
  3350. - ANSI/AIM BC12-1998 - Uniform Symbology Specification Channel Code
  3351. - BS EN 798:1996 Bar coding - Symbology specifications - ‘Codabar’
  3352. - AIM Europe ISS-X-24 - Uniform Symbology Specification Codablock-F (1995)
  3353. - ISO/IEC 15417:2007 Information technology - Automatic identification and
  3354. data capture techniques - Code 128 bar code symbology specification
  3355. - BS EN 12323:2005 AIDC technologies - Symbology specifications - Code 16K
  3356. - ISO/IEC 16388:2007 Information technology - Automatic identification and
  3357. data capture techniques - Code 39 bar code symbology specification
  3358. - ANSI/AIM BC6-2000 - Uniform Symbology Specification Code 49
  3359. - ANSI/AIM BC5-1995 - Uniform Symbology Specification Code 93
  3360. - AIM Uniform Symbology Specification Code One (1994)
  3361. - ISO/IEC 16022:2006 Information technology - Automatic identification and
  3362. data capture techniques - Data Matrix ECC200 bar code symbology
  3363. specification
  3364. - ISO/IEC 21471:2020 Information technology - Automatic identification and
  3365. data capture techniques - Extended rectangular data matrix (DMRE) bar code
  3366. symbology specification
  3367. - AIM TSC1705001 (v 4.0 Draft 0.15) - Information technology - Automatic
  3368. identification and data capture techniques - Bar code symbology
  3369. specification - DotCode (Revised 28th May 2019)
  3370. - ISO/IEC 15420:2009 Information technology - Automatic identification and
  3371. data capture techniques - EAN/UPC bar code symbology specification
  3372. - AIMD014 (v 1.63) - Information technology, Automatic identification and data
  3373. capture techniques - Bar code symbology specification - Grid Matrix
  3374. (Released 9th Dec 2008)
  3375. - ISO/IEC 24723:2010 Information technology - Automatic identification and
  3376. data capture techniques - GS1 Composite bar code symbology specification
  3377. - ISO/IEC 24724:2011 Information technology - Automatic identification and
  3378. data capture techniques - GS1 DataBar bar code symbology specification
  3379. - ISO/IEC 20830:2021 Information technology - Automatic identification and
  3380. data capture techniques - Han Xin Code bar code symbology specification
  3381. - ISO/IEC 16390:2007 Information technology - Automatic identification and
  3382. data capture techniques - Interleaved 2 of 5 bar code symbology
  3383. specification
  3384. - ISO/IEC 16023:2000 Information technology - International symbology
  3385. specification - MaxiCode
  3386. - ISO/IEC 24728:2006 Information technology - Automatic identification and
  3387. data capture techniques - MicroPDF417 bar code symbology specification
  3388. - ISO/IEC 15438:2015 Information technology - Automatic identification and
  3389. data capture techniques - PDF417 bar code symbology specification
  3390. - ISO/IEC 18004:2015 Information technology - Automatic identification and
  3391. data capture techniques - QR Code bar code symbology specification
  3392. - ISO/IEC 23941:2022 Information technology - Automatic identification and
  3393. data capture techniques - Rectangular Micro QR Code (rMQR) bar code
  3394. symbology specification
  3395. - AIMD/TSC15032-43 (v 0.99c) - International Technical Specification -
  3396. Ultracode Symbology (Draft) (Released 4th Nov 2015)
  3397. A number of other specification documents have also been referenced, such as
  3398. MIL-STD-1189 Rev. B (1989) (LOGMARS), USPS DMM 300 2006 (2011) (POSTNET, PLANET,
  3399. FIM) and USPS-B-3200 (2015) (IMAIL). Those not named include postal and delivery
  3400. company references in particular.
  3401. 7.5.2 General Standards
  3402. - AIM ITS/04-001 International Technical Standard - Extended Channel
  3403. Interpretations Part 1: Identification Schemes and Protocol (Released 24th
  3404. May 2004)
  3405. - AIM ITS/04-023 International Technical Standard - Extended Channel
  3406. Interpretations Part 3: Register (Version 2, February 2022)
  3407. - GS1 General Specifications Release 24.0 (Jan 2024)
  3408. - ANSI/HIBC 2.6-2016 - The Health Industry Bar Code (HIBC) Supplier Labeling
  3409. Standard
  3410. Annex A. Character Encoding
  3411. This section is intended as a quick reference to the character sets used by
  3412. Zint. All symbologies use standard ASCII input as shown in section A.1, but some
  3413. support extended characters as shown in the subsequent section A.2 Latin
  3414. Alphabet No. 1 (ISO/IEC 8859-1).
  3415. A.1 ASCII Standard
  3416. The ubiquitous ASCII standard is well known to most computer users. It’s
  3417. reproduced here for reference.
  3418. Hex 0 1 2 3 4 5 6 7
  3419. ----- ----- ----- ------- --- --- --- --- -----
  3420. 0 NUL DLE SPACE 0 @ P ` p
  3421. 1 SOH DC1 ! 1 A Q a q
  3422. 2 STX DC2 " 2 B R b r
  3423. 3 ETX DC3 # 3 C S c s
  3424. 4 EOT DC4 $ 4 D T d t
  3425. 5 ENQ NAK % 5 E U e u
  3426. 6 ACK SYN & 6 F V f v
  3427. 7 BEL ETB ' 7 G W g w
  3428. 8 BS CAN ( 8 H X h x
  3429. 9 TAB EM ) 9 I Y i y
  3430. A LF SUB * : J Z j z
  3431. B VT ESC + ; K [ k {
  3432. C FF FS , < L \ l |
  3433. D CR GS - = M ] m }
  3434. E SO RS . > N ^ n ~
  3435. F SI US / ? O _ o DEL
  3436. Table : ASCII
  3437. A.2 Latin Alphabet No. 1 (ISO/IEC 8859-1)
  3438. ISO/IEC 8859-1 defines additional characters common in western European
  3439. languages like French, German, Italian and Spanish. This extension is the
  3440. default encoding of many barcodes (see Table : Default Character Sets) when a
  3441. codepoint above hex 9F is encoded. Note that codepoints hex 80 to 9F are not
  3442. defined.
  3443. Hex 8 9 A B C D E F
  3444. ----- --- --- ------ --- --- --- --- ---
  3445. 0 NBSP ° À Ð à ð
  3446. 1 ¡ ± Á Ñ á ñ
  3447. 2 ¢ ² Â Ò â ò
  3448. 3 £ ³ Ã Ó ã ó
  3449. 4 ¤ ´ Ä Ô ä ô
  3450. 5 ¥ μ Å Õ å õ
  3451. 6 ¦ ¶ Æ Ö æ ö
  3452. 7 § · Ç × ç ÷
  3453. 8 ¨ ¸ È Ø è ø
  3454. 9 © ¹ É Ù é ù
  3455. A ª º Ê Ú ê ú
  3456. B « » Ë Û ë û
  3457. C ¬ ¼ Ì Ü ì ü
  3458. D SHY ½ Í Ý í ý
  3459. E ® ¾ Î Þ î þ
  3460. F ¯ ¿ Ï ß ï ÿ
  3461. Table : ISO/IEC 8859-1
  3462. Annex B. Qt Backend QZint
  3463. Used internally by Zint Barcode Studio to display the preview, the Qt Backend
  3464. QZint renders a barcode by drawing the vector representation (see 5.5 Buffering
  3465. Symbols in Memory (vector)) provided by the Zint library libzint.
  3466. The main class is Zint::QZint, which has getter/setter properties that
  3467. correspond to the zint_symbol structure (see 5.7 Setting Options), and a main
  3468. method render() which takes a Qt QPainter to paint with, and a QRectF
  3469. rectangular area specifying where to paint into:
  3470. /* Encode and display barcode in `paintRect` using `painter`.
  3471. Note: legacy argument `mode` is not used */
  3472. void render(QPainter& painter, const QRectF& paintRect,
  3473. AspectRatioMode mode = IgnoreAspectRatio);
  3474. render() will emit one of two Qt signals - encoded on successful encoding and
  3475. drawing, or errored on failure. The client can connect and act appropriately,
  3476. for instance:
  3477. connect(qzint, SIGNAL(encoded()), SLOT(on_encoded()));
  3478. connect(qzint, SIGNAL(errored()), SLOT(on_errored()));
  3479. where qzint is an instance of Zint::QZint and on_encoded() and on_error() are Qt
  3480. slot methods provided by the caller. On error, the error value and message can
  3481. be retrieved by the methods getError() and lastError() respectively.
  3482. The other main method is save_to_file():
  3483. /* Encode and print barcode to file `filename`.
  3484. Only sets `getError()` on error, not on warning */
  3485. bool save_to_file(const QString& filename); // `ZBarcode_Print()`
  3486. which takes a filename to output to. It too will emit an errored signal on
  3487. failure, returning false (but nothing on success, which just returns true). Note
  3488. that rotation is achieved through the setter method setRotateAngleValue() (as
  3489. opposed to the rotate_angle argument used by ZBarcode_Print()).
  3490. Various other methods are available, for instance methods for testing symbology
  3491. capabilities, and utility methods such as defaultXdim() and getAsCLI().
  3492. For full details, see "backend_qt/qzint.h".
  3493. Annex C. Tcl Backend Binding
  3494. A Tcl binding is available in the "backend_tcl” sub-directory. To make on Unix:
  3495. cd backend_tcl
  3496. autoconf
  3497. ./configure
  3498. make
  3499. sudo make install
  3500. For Windows, a Visual Studio 6.0 project file is available at
  3501. "backend_tcl\zint_tcl.dsp". This can also be opened (and converted) by more
  3502. modern Visual Studio versions, though some fixing up of the project
  3503. configuration will likely be required.
  3504. Once built and installed, invoke the Tcl/Tk CLI "wish":
  3505. wish
  3506. and ignoring the Tk window click back to the command prompt "%" and type:
  3507. require package zint
  3508. zint help
  3509. which will show the usage message, with options very similiar to the Zint CLI.
  3510. (One notable difference is that boolean options such as -bold take a 1 or 0 as
  3511. an argument.)
  3512. A demonstration Tcl/Tk program which is also useful in itself is available at
  3513. "backend_tcl/demo/demo.tcl". To run type:
  3514. wish demo/demo.tcl
  3515. which will display the following window.
  3516. [Tcl/Tk demonstration program window]
  3517. You can select the symbology, enter the data to encode, and set options (which
  3518. are the same as those given in the usage message). A raster preview of the
  3519. configured barcode is displayed once the "Generate" button is pressed.
  3520. Annex D. Man Page ZINT(1)
  3521. % ZINT(1) Version 2.13.0.9 % % December 2024
  3522. NAME
  3523. zint - encode data as a barcode image
  3524. SYNOPSIS
  3525. zint [-h | --help]
  3526. zint [options]
  3527. DESCRIPTION
  3528. zint takes input data from the command line or a file to encode in a barcode
  3529. which is then output to an image file.
  3530. Input data is UTF-8, unless --binary is specified.
  3531. Human Readable Text (HRT) is displayed by default for those barcodes that
  3532. support HRT, unless --notext is specified.
  3533. The output image file (specified with -o | --output) may be in one of these
  3534. formats: Windows Bitmap (BMP), Enhanced Metafile Format (EMF), Encapsulated
  3535. PostScript (EPS), Graphics Interchange Format (GIF), ZSoft Paintbrush (PCX),
  3536. Portable Network Format (PNG), Scalable Vector Graphic (SVG), or Tagged Image
  3537. File Format (TIF).
  3538. OPTIONS
  3539. -h, --help
  3540. Print usage information summarizing command line options.
  3541. -b TYPE, --barcode=TYPE
  3542. Set the barcode symbology that will be used to encode the data. TYPE is the
  3543. number or name of the barcode symbology. If not given, the symbology
  3544. defaults to 20 (Code 128). To see what types are available, use the -t |
  3545. --types option. Type names are case-insensitive, and non-alphanumerics are
  3546. ignored.
  3547. --addongap=INTEGER
  3548. For EAN/UPC symbologies, set the gap between the main data and the add-on.
  3549. INTEGER is in integral multiples of the X-dimension. The maximum gap that
  3550. can be set is 12. The minimum is 7, except for UPC-A, when the minimum is 9.
  3551. --batch
  3552. Treat each line of an input file specified with -i | --input as a separate
  3553. data set and produce a barcode image for each one. The barcode images are
  3554. outputted by default to numbered filenames starting with “00001.png”,
  3555. “00002.png” etc., which can be changed by using the -o | --output option.
  3556. --bg=COLOUR
  3557. Specify a background (paper) colour where COLOUR is in hexadecimal RRGGBB or
  3558. RRGGBBAA format or in decimal C,M,Y,K percentages format.
  3559. --binary
  3560. Treat input data as raw 8-bit binary data instead of the default UTF-8.
  3561. Automatic code page translation to an ECI page is disabled, and no
  3562. validation of the data’s character encoding takes place.
  3563. --bind
  3564. Add horizontal boundary bars (also known as bearer bars) to the symbol. The
  3565. width of the boundary bars is specified by the --border option. --bind can
  3566. also be used to add row separator bars to symbols stacked with multiple -d |
  3567. --data inputs, in which case the width of the separator bars is specified
  3568. with the --separator option.
  3569. --bindtop
  3570. Add a horizontal boundary bar to the top of the symbol. The width of the
  3571. boundary bar is specified by the --border option.
  3572. --bold
  3573. Use a bold font for the Human Readable Text (HRT).
  3574. --border=INTEGER
  3575. Set the width of boundary bars (--bind or --bindtop) or box borders (--box),
  3576. where INTEGER is in integral multiples of the X-dimension. The default is
  3577. zero.
  3578. --box
  3579. Add a box around the symbol. The width of the borders is specified by the
  3580. --border option.
  3581. --cmyk
  3582. Use the CMYK colour space when outputting to Encapsulated PostScript (EPS)
  3583. or TIF files.
  3584. --cols=INTEGER
  3585. Set the number of data columns in the symbol to INTEGER. Affects
  3586. Codablock-F, DotCode, GS1 DataBar Expanded Stacked (DBAR_EXPSTK),
  3587. MicroPDF417 and PDF417 symbols.
  3588. --compliantheight
  3589. Warn if the height specified by the --height option is not compliant with
  3590. the barcode’s specification, or if --height is not given, default to the
  3591. height specified by the specification (if any).
  3592. -d, --data=DATA
  3593. Specify the input DATA to encode. The --esc option may be used to enter
  3594. non-printing characters using escape sequences. The DATA should be UTF-8,
  3595. unless the --binary option is given, in which case it can be anything.
  3596. --direct
  3597. Send output to stdout, which in most cases should be re-directed to a pipe
  3598. or a file. Use --filetype to specify output format.
  3599. --dmiso144
  3600. For Data Matrix symbols, use the standard ISO/IEC codeword placement for 144
  3601. x 144 (--vers=24) sized symbols, instead of the default “de facto” placement
  3602. (which rotates the placement of ECC codewords).
  3603. --dmre
  3604. For Data Matrix symbols, allow Data Matrix Rectangular Extended (DMRE) sizes
  3605. when considering automatic sizes. See also --square.
  3606. --dotsize=NUMBER
  3607. Set the radius of the dots in dotty mode (--dotty). NUMBER is in
  3608. X-dimensions, and may be floating-point. The default is 0.8.
  3609. --dotty
  3610. Use dots instead of squares for matrix symbols. DotCode is always in dotty
  3611. mode.
  3612. --dump
  3613. Dump a hexadecimal representation of the symbol’s encodation to stdout. The
  3614. same representation may be outputted to a file by using a .txt extension
  3615. with -o | --output or by specifying --filetype=txt.
  3616. -e, --ecinos
  3617. Display the table of ECIs (Extended Channel Interpretations).
  3618. --eci=INTEGER
  3619. Set the ECI code for the input data to INTEGER. See -e | --ecinos for a list
  3620. of the ECIs available. ECIs are supported by Aztec Code, Code One, Data
  3621. Matrix, DotCode, Grid Matrix, Han Xin Code, MaxiCode, MicroPDF417, PDF417,
  3622. QR Code, rMQR and Ultracode.
  3623. --embedfont
  3624. For vector output, embed the font in the file for portability. Currently
  3625. only available for SVG output.
  3626. --esc
  3627. Process escape characters in the input data. The escape sequences are:
  3628. \0 (0x00) NUL Null character
  3629. \E (0x04) EOT End of Transmission
  3630. \a (0x07) BEL Bell
  3631. \b (0x08) BS Backspace
  3632. \t (0x09) HT Horizontal Tab
  3633. \n (0x0A) LF Line Feed
  3634. \v (0x0B) VT Vertical Tab
  3635. \f (0x0C) FF Form Feed
  3636. \r (0x0D) CR Carriage Return
  3637. \e (0x1B) ESC Escape
  3638. \G (0x1D) GS Group Separator
  3639. \R (0x1E) RS Record Separator
  3640. \\ (0x5C) \ Backslash
  3641. \dNNN (NNN) Any 8-bit character where NNN is
  3642. decimal (000-255)
  3643. \oNNN (0oNNN) Any 8-bit character where NNN is
  3644. octal (000-377)
  3645. \xNN (0xNN) Any 8-bit character where NN is
  3646. hexadecimal (00-FF)
  3647. \uNNNN (U+NNNN) Any 16-bit Unicode BMP character
  3648. where NNNN is hexadecimal
  3649. \UNNNNNN (U+NNNNNN) Any 21-bit Unicode character
  3650. where NNNNNN is hexadecimal
  3651. --extraesc
  3652. For Code 128 only, as well as processing the normal escape sequences above,
  3653. process the special escape sequences \^A, \^B, \^C and \^@ that allow manual
  3654. switching of Code Sets, and the special escape sequence \^1 that inserts an
  3655. FNC1 character. The sequence \@ turns off manual switching. The sequence \^^
  3656. can be used to encode data that contains special escape sequences.
  3657. --fast
  3658. Use faster if less optimal encodation or other shortcuts (affects Data
  3659. Matrix, MicroPDF417, PDF417, QRCODE & UPNQR only).
  3660. --fg=COLOUR
  3661. Specify a foreground (ink) colour where COLOUR is in hexadecimal RRGGBB or
  3662. RRGGBBAA format or in decimal C,M,Y,K percentages format.
  3663. --filetype=TYPE
  3664. Set the output file type to TYPE, which is one of BMP, EMF, EPS, GIF, PCX,
  3665. PNG, SVG, TIF, TXT.
  3666. --fullmultibyte
  3667. Use the multibyte modes of Grid Matrix, Han Xin and QR Code for non-ASCII
  3668. data.
  3669. --gs1
  3670. Treat input as GS1 compatible data. Application Identifiers (AIs) should be
  3671. placed in square brackets "[]" (but see --gs1parens).
  3672. --gs1nocheck
  3673. Do not check the validity of GS1 data.
  3674. --gs1parens
  3675. Process parentheses "()" as GS1 AI delimiters, rather than square brackets
  3676. "[]". The input data must not otherwise contain parentheses.
  3677. --gssep
  3678. For Data Matrix in GS1 mode, use GS (0x1D) as the GS1 data separator instead
  3679. of FNC1.
  3680. --guarddescent=NUMBER
  3681. For EAN/UPC symbols, set the height the guard bars descend below the main
  3682. bars, where NUMBER is in X-dimensions. NUMBER may be floating-point.
  3683. --guardwhitespace
  3684. For EAN/UPC symbols, add quiet zone indicators "<" and/or ">" to HRT where
  3685. applicable.
  3686. --height=NUMBER
  3687. Set the height of the symbol in X-dimensions. NUMBER may be floating-point.
  3688. --heightperrow
  3689. Treat height as per-row. Affects Codablock-F, Code 16K, Code 49, GS1 DataBar
  3690. Expanded Stacked (DBAR_EXPSTK), MicroPDF417 and PDF417.
  3691. -i, --input=FILE
  3692. Read the input data from FILE. Specify a single hyphen (-) for FILE to read
  3693. from stdin.
  3694. --init
  3695. Create a Reader Initialisation (Programming) symbol.
  3696. --mask=INTEGER
  3697. Set the masking pattern to use for DotCode, Han Xin or QR Code to INTEGER,
  3698. overriding the automatic selection.
  3699. --mirror
  3700. Use the batch data to determine the filename in batch mode (--batch). The -o
  3701. | --output option can be used to specify an output directory (any filename
  3702. will be ignored).
  3703. --mode=INTEGER
  3704. For MaxiCode and GS1 Composite symbols, set the encoding mode to INTEGER.
  3705. For MaxiCode (SCM is Structured Carrier Message, with 3 fields: postcode,
  3706. 3-digit ISO 3166-1 country code, 3-digit service code):
  3707. 2 SCM with 9-digit numeric postcode
  3708. 3 SCM with 6-character alphanumeric postcode
  3709. 4 Enhanced ECC for the primary part of the message
  3710. 5 Enhanced ECC for all of the message
  3711. 6 Reader Initialisation (Programming)
  3712. For GS1 Composite symbols (names end in _CC, i.e. EANX_CC, GS1_128_CC,
  3713. DBAR_OMN_CC etc.):
  3714. 1 CC-A
  3715. 2 CC-B
  3716. 3 CC-C (GS1_128_CC only)
  3717. --nobackground
  3718. Remove the background colour (EMF, EPS, GIF, PNG, SVG and TIF only).
  3719. --noquietzones
  3720. Disable any quiet zones for symbols that define them by default.
  3721. --notext
  3722. Remove the Human Readable Text (HRT).
  3723. -o, --output=FILE
  3724. Send the output to FILE. When not in batch mode, the default is “out.png”
  3725. (or “out.gif” if zint built without PNG support). When in batch mode
  3726. (--batch), special characters can be used to format the output filenames:
  3727. ~ Insert a number or 0
  3728. # Insert a number or space
  3729. @ Insert a number or * (+ on Windows)
  3730. Any other Insert literally
  3731. --primary=STRING
  3732. For MaxiCode, set the content of the primary message. For GS1 Composite
  3733. symbols, set the content of the linear symbol.
  3734. --quietzones
  3735. Add compliant quiet zones for symbols that specify them. This is in addition
  3736. to any whitespace specified by -w | --whitesp or --vwhitesp.
  3737. -r, --reverse
  3738. Reverse the foreground and background colours (white on black). Known as
  3739. “reflectance reversal” or “reversed reflectance”.
  3740. --rotate=INTEGER
  3741. Rotate the symbol by INTEGER degrees, where INTEGER can be 0, 90, 270 or
  3742. 360.
  3743. --rows=INTEGER
  3744. Set the number of rows for Codablock-F or PDF417 to INTEGER. It will also
  3745. set the minimum number of rows for Code 16K or Code 49, and the maximum
  3746. number of rows for GS1 DataBar Expanded Stacked (DBAR_EXPSTK).
  3747. --scale=NUMBER
  3748. Adjust the size of the X-dimension. NUMBER may be floating-point, and is
  3749. multiplied by 2 (except for MaxiCode) before being applied. The default
  3750. scale is 1.
  3751. For MaxiCode, the scale is multiplied by 10 for raster output, by 40 for EMF
  3752. output, and by 2 otherwise.
  3753. Increments of 0.5 (half-integers) are recommended for non-MaxiCode raster
  3754. output (BMP, GIF, PCX, PNG and TIF).
  3755. See also --scalexdimdp below.
  3756. --scalexdimdp=X[,R]
  3757. Scale the image according to X-dimension X and resolution R, where X is in
  3758. mm and R is in dpmm (dots per mm). X and R may be floating-point. R is
  3759. optional and defaults to 12 dpmm (approximately 300 dpi). X may be zero in
  3760. which case a symbology-specific default is used.
  3761. The scaling takes into account the output filetype, and deals with all the
  3762. details mentioned above. Units may be specified for X by appending “in”
  3763. (inch) or “mm”, and for R by appending “dpi” (dots per inch) or “dpmm” -
  3764. e.g. --scalexdimdp=0.013in,300dpi.
  3765. --scmvv=INTEGER
  3766. For MaxiCode, prefix the Structured Carrier Message (SCM) with
  3767. "[)>\R01\Gvv", where vv is a 2-digit INTEGER.
  3768. --secure=INTEGER
  3769. Set the error correction level (ECC) to INTEGER. The meaning is specific to
  3770. the following matrix symbols (all except PDF417 are approximate):
  3771. Aztec Code 1 to 4 (10%, 23%, 36%, 50%)
  3772. Grid Matrix 1 to 5 (10% to 50%)
  3773. Han Xin 1 to 4 (8%, 15%, 23%, 30%)
  3774. Micro QR 1 to 3 (7%, 15%, 25%) (L, M, Q)
  3775. PDF417 0 to 8 (2^(INTEGER + 1) codewords)
  3776. QR Code 1 to 4 (7%, 15%, 25%, 30%) (L, M, Q, H)
  3777. rMQR 2 or 4 (15% or 30%) (M or H)
  3778. Ultracode 1 to 6 (0%, 5%, 9%, 17%, 25%, 33%)
  3779. --segN=ECI,DATA
  3780. Set the ECI & DATA content for segment N, where N is 1 to 9. -d | --data
  3781. must still be given, and counts as segment 0, its ECI given by --eci.
  3782. Segments must be consecutive.
  3783. --separator=INTEGER
  3784. Set the height of row separator bars for stacked symbologies, where INTEGER
  3785. is in integral multiples of the X-dimension. The default is zero.
  3786. --small
  3787. Use a smaller font for Human Readable Text (HRT).
  3788. --square
  3789. For Data Matrix symbols, exclude rectangular sizes when considering
  3790. automatic sizes. See also --dmre.
  3791. --structapp=I,C[,ID]
  3792. Set Structured Append info, where I is the 1-based index, C is the total
  3793. number of symbols in the sequence, and ID, which is optional, is the
  3794. identifier that all symbols in the sequence share. Structured Append is
  3795. supported by Aztec Code, Code One, Data Matrix, DotCode, Grid Matrix,
  3796. MaxiCode, MicroPDF417, PDF417, QR Code and Ultracode.
  3797. -t, --types
  3798. Display the table of barcode types (symbologies). The numbers or names can
  3799. be used with -b | --barcode.
  3800. --textgap=NUMBER
  3801. Adjust the gap between the barcode and the Human Readable Text (HRT). NUMBER
  3802. is in X-dimensions, and may be floating-point. Maximum is 10 and minimum is
  3803. -5. The default is 1.
  3804. --vers=INTEGER
  3805. Set the symbol version (size, check digits, other options) to INTEGER. The
  3806. meaning is symbol-specific.
  3807. For most matrix symbols, it specifies size:
  3808. Aztec Code 1 to 36 (1 to 4 compact)
  3809. 1 15x15 13 53x53 25 105x105
  3810. 2 19x19 14 57x57 26 109x109
  3811. 3 23x23 15 61x61 27 113x113
  3812. 4 27x27 16 67x67 28 117x117
  3813. 5 19x19 17 71x71 29 121x121
  3814. 6 23x23 18 75x75 30 125x125
  3815. 7 27x27 19 79x79 31 131x131
  3816. 8 31x31 20 83x83 32 135x135
  3817. 9 37x37 21 87x87 33 139x139
  3818. 10 41x41 22 91x91 34 143x143
  3819. 11 45x45 23 95x95 35 147x147
  3820. 12 49x49 24 101x101 36 151x151
  3821. Code One 1 to 10 (9 and 10 variable width) (WxH)
  3822. 1 16x18 6 70x76
  3823. 2 22x22 7 104x98
  3824. 3 28x28 8 148x134
  3825. 4 40x42 9 Wx8
  3826. 5 52x54 10 Wx16
  3827. Data Matrix 1 to 48 (31 to 48 DMRE) (HxW)
  3828. 1 10x10 17 72x72 33 8x80
  3829. 2 12x12 18 80x80 34 8x96
  3830. 3 14x14 19 88x88 35 8x120
  3831. 4 16x16 20 96x96 36 8x144
  3832. 5 18x18 21 104x104 37 12x64
  3833. 6 20x20 22 120x120 38 12x88
  3834. 7 22x22 23 132x132 39 16x64
  3835. 8 24x24 24 144x144 40 20x36
  3836. 9 26x26 25 8x18 41 20x44
  3837. 10 32x32 26 8x32 42 20x64
  3838. 11 36x36 28 12x26 43 22x48
  3839. 12 40x40 28 12x36 44 24x48
  3840. 13 44x44 29 16x36 45 24x64
  3841. 14 48x48 30 16x48 46 26x40
  3842. 15 52x52 31 8x48 47 26x48
  3843. 16 64x64 32 8x64 48 26x64
  3844. Grid Matrix 1 to 13
  3845. 1 18x18 6 78x78 11 138x138
  3846. 2 30x30 7 90x90 12 150x150
  3847. 3 42x42 8 102x102 13 162x162
  3848. 4 54x54 9 114x114
  3849. 5 66x66 10 126x126
  3850. Han Xin 1 to 84
  3851. 1 23x23 29 79x79 57 135x135
  3852. 2 25x25 30 81x81 58 137x137
  3853. 3 27x27 31 83x83 59 139x139
  3854. 4 29x29 32 85x85 60 141x141
  3855. 5 31x31 33 87x87 61 143x143
  3856. 6 33x33 34 89x89 62 145x145
  3857. 7 35x35 35 91x91 63 147x147
  3858. 8 37x37 36 93x93 64 149x149
  3859. 9 39x39 37 95x95 65 151x151
  3860. 10 41x41 38 97x97 66 153x153
  3861. 11 43x43 39 99x99 67 155x155
  3862. 12 45x45 40 101x101 68 157x157
  3863. 13 47x47 41 103x103 69 159x159
  3864. 14 49x49 42 105x105 70 161x161
  3865. 15 51x51 43 107x107 71 163x163
  3866. 16 53x53 44 109x109 72 165x165
  3867. 17 55x55 45 111x111 73 167x167
  3868. 18 57x57 46 113x113 74 169x169
  3869. 19 59x59 47 115x115 75 171x171
  3870. 20 61x61 48 117x117 76 173x173
  3871. 21 63x63 49 119x119 77 175x175
  3872. 22 65x65 50 121x121 78 177x177
  3873. 23 67x67 51 123x123 79 179x179
  3874. 24 69x69 52 125x125 80 181x181
  3875. 25 71x71 53 127x127 81 183x183
  3876. 26 73x73 54 129x129 82 185x185
  3877. 27 75x75 55 131x131 83 187x187
  3878. 28 77x77 56 133x133 84 189x189
  3879. Micro QR 1 to 4 (M1, M2, M3, M4)
  3880. 1 11x11 3 15x15
  3881. 2 13x13 4 17x17
  3882. QR Code 1 to 40
  3883. 1 21x21 15 77x77 29 133x133
  3884. 2 25x25 16 81x81 30 137x137
  3885. 3 29x29 17 85x85 31 141x141
  3886. 4 33x33 18 89x89 32 145x145
  3887. 5 37x37 19 93x93 33 149x149
  3888. 6 41x41 20 97x97 34 153x153
  3889. 7 45x45 21 101x101 35 157x157
  3890. 8 49x49 22 105x105 36 161x161
  3891. 9 53x53 23 109x109 37 165x165
  3892. 10 57x57 24 113x113 38 169x169
  3893. 11 61x61 25 117x117 39 173x173
  3894. 12 65x65 26 121x121 40 177x177
  3895. 13 69x69 27 125x125
  3896. 14 73x73 28 129x129
  3897. rMQR 1 to 38 (33 to 38 automatic width) (HxW)
  3898. 1 7x43 14 11x77 27 15x139
  3899. 2 7x59 15 11x99 28 17x43
  3900. 3 7x77 16 11x139 29 17x59
  3901. 4 7x99 17 13x27 30 17x77
  3902. 5 7x139 18 13x43 31 17x99
  3903. 6 9x43 19 13x59 32 17x139
  3904. 7 9x59 20 13x77 33 7xW
  3905. 8 9x77 21 13x99 34 9xW
  3906. 9 9x99 22 13x139 35 11xW
  3907. 10 9x139 23 15x43 36 13xW
  3908. 11 11x27 24 15x59 37 15xW
  3909. 12 11x43 25 15x77 38 17xW
  3910. 13 11x59 26 15x99
  3911. For a number of linear symbols, it specifies check character options (“hide”
  3912. or “hidden” means don’t show in HRT, “visible” means do display in HRT):
  3913. C25IATA 1 or 2 (add visible or hidden check digit)
  3914. C25IND ditto
  3915. C25INTER ditto
  3916. C25LOGIC ditto
  3917. C25STANDARD ditto
  3918. Codabar 1 or 2 (add hidden or visible check digit)
  3919. Code 11 0 to 2 (2 visible check digits to none)
  3920. 0 (default 2 visible check digits)
  3921. 1 (1 visible check digit)
  3922. 2 (no check digits)
  3923. Code 39 1 or 2 (add visible or hidden check digit)
  3924. Code 93 1 (hide the default check characters)
  3925. EXCODE39 1 or 2 (add visible or hidden check digit)
  3926. LOGMARS 1 or 2 (add visible or hidden check digit)
  3927. MSI Plessey 0 to 6 (none to various visible options)
  3928. 1, 2 (mod-10, mod-10 + mod-10)
  3929. 3, 4 (mod-11 IBM, mod-11 IBM + mod-10)
  3930. 5, 6 (mod-11 NCR, mod-11 NCR + mod-10)
  3931. +10 (hide)
  3932. For a few other symbologies, it specifies other characteristics:
  3933. Channel Code 3 to 8 (no. of channels)
  3934. DAFT 50 to 900 (permille tracker ratio)
  3935. DPD 1 (relabel)
  3936. PZN 1 (PZN7 instead of default PZN8)
  3937. Ultracode 2 (revision 2)
  3938. VIN 1 (add international prefix)
  3939. -v, --version
  3940. Display zint version.
  3941. --vwhitesp=INTEGER
  3942. Set the height of vertical whitespace above and below the barcode, where
  3943. INTEGER is in integral multiples of the X-dimension.
  3944. -w, --whitesp=INTEGER
  3945. Set the width of horizontal whitespace either side of the barcode, where
  3946. INTEGER is in integral multiples of the X-dimension.
  3947. --werror
  3948. Convert all warnings into errors.
  3949. EXIT STATUS
  3950. 0
  3951. Success (including when given informational options -h | --help, -e |
  3952. --ecinos, -t | --types, -v | --version).
  3953. 1
  3954. Human Readable Text was truncated (maximum 199 bytes)
  3955. (ZINT_WARN_HRT_TRUNCATED)
  3956. 2
  3957. Invalid option given but overridden by Zint (ZINT_WARN_INVALID_OPTION)
  3958. 3
  3959. Automatic ECI inserted by Zint (ZINT_WARN_USES_ECI)
  3960. 4
  3961. Symbol created not compliant with standards (ZINT_WARN_NONCOMPLIANT)
  3962. 5
  3963. Input data wrong length (ZINT_ERROR_TOO_LONG)
  3964. 6
  3965. Input data incorrect (ZINT_ERROR_INVALID_DATA)
  3966. 7
  3967. Input check digit incorrect (ZINT_ERROR_INVALID_CHECK)
  3968. 8
  3969. Incorrect option given (ZINT_ERROR_INVALID_OPTION)
  3970. 9
  3971. Internal error (should not happen) (ZINT_ERROR_ENCODING_PROBLEM)
  3972. 10
  3973. Error opening output file (ZINT_ERROR_FILE_ACCESS)
  3974. 11
  3975. Memory allocation (malloc) failure (ZINT_ERROR_MEMORY)
  3976. 12
  3977. Error writing to output file (ZINT_ERROR_FILE_WRITE)
  3978. 13
  3979. Error counterpart of warning if --werror given (ZINT_ERROR_USES_ECI)
  3980. 14
  3981. Error counterpart of warning if --werror given (ZINT_ERROR_NONCOMPLIANT)
  3982. 15
  3983. Error counterpart of warning if --werror given (ZINT_ERROR_HRT_TRUNCATED)
  3984. EXAMPLES
  3985. Create “out.png” (or “out.gif” if zint built without PNG support) in the current
  3986. directory, as a Code 128 symbol.
  3987. zint -d 'This Text'
  3988. Create “qr.svg” in the current directory, as a QR Code symbol.
  3989. zint -b QRCode -d 'This Text' -o 'qr.svg'
  3990. Use batch mode to read from an input file “ean13nos.txt” containing a list of
  3991. 13-digit GTINs, each on a separate line, to create a series of EAN-13 barcodes,
  3992. formatting the output filenames to “ean001.gif”, “ean002.gif” etc. using the
  3993. special character “~”.
  3994. zint -b EANX --batch -i 'ean13nos.txt' -o 'ean~~~.gif'
  3995. BUGS
  3996. Please send bug reports to https://sourceforge.net/p/zint/tickets/.
  3997. SEE ALSO
  3998. Full documention for zint (and the API libzint and the GUI zint-qt) is available
  3999. from
  4000. https://zint.org.uk/manual/
  4001. and at
  4002. https://sourceforge.net/p/zint/docs/manual.txt
  4003. CONFORMING TO
  4004. Zint is designed to be compliant with a number of international standards,
  4005. including:
  4006. ISO/IEC 24778:2008, ANSI/AIM BC12-1998, EN 798:1996, AIM ISS-X-24 (1995),
  4007. ISO/IEC 15417:2007, EN 12323:2005, ISO/IEC 16388:2007, ANSI/AIM BC6-2000,
  4008. ANSI/AIM BC5-1995, AIM USS Code One (1994), ISO/IEC 16022:2006, ISO/IEC
  4009. 21471:2019, ISO/IEC 15420:2009, AIMD014 (v 1.63) (2008), ISO/IEC 24723:2010,
  4010. ISO/IEC 24724:2011, ISO/IEC 20830:2021, ISO/IEC 16390:2007, ISO/IEC 16023:2000,
  4011. ISO/IEC 24728:2006, ISO/IEC 15438:2015, ISO/IEC 18004:2015, ISO/IEC 23941:2022,
  4012. AIM ITS/04-023 (2022)
  4013. COPYRIGHT
  4014. Copyright © 2024 Robin Stuart. Released under GNU GPL 3.0 or later.
  4015. AUTHOR
  4016. Robin Stuart robin@zint.org.uk
  4017. [1] See the Homebrew website https://brew.sh.
  4018. [2] In Unicode contexts, BMP stands for Basic Multilingual Plane, the plane 0
  4019. codeset from U+0000 to U+D7FF and U+E000 to U+FFFF (i.e. excluding surrogates).
  4020. Not to be confused with the Windows Bitmap file format BMP!
  4021. [3] The symbologies marked with an asterisk (*) in Table
  4022. : Barcode Types (Symbologies) above used different names in Zint before version
  4023. 2.9.0. For example, symbology 29 used the name BARCODE_RSS14. These names are
  4024. now deprecated but are still recognised by Zint and will continue to be
  4025. supported in future versions.
  4026. [4] The background is omitted for vector outputs EMF, EPS and SVG when
  4027. --nobackground is given. For raster outputs GIF, PCX, PNG and TIF, the
  4028. background’s alpha channel is set to zero (fully transparent).
  4029. [5] Shift JIS (JIS X 0201 Roman) re-maps two ASCII characters: backslash (\) to
  4030. the yen sign (¥), and tilde (~) to overline (U+203E).
  4031. [6] ISO/IEC 646 Invariant is a subset of ASCII with 12 characters undefined: #,
  4032. $, @, [, \, ], ^, `, {, |, }, ~.
  4033. [7] BARCODE_MEMORY_FILE textual formats EPS and SVG will have Unix newlines (LF)
  4034. on both Windows and Unix, i.e. not CR+LF on Windows.
  4035. [8] The height value is ignored for Aztec (including HIBC and Aztec Rune), Code
  4036. One, Data Matrix (including HIBC), DotCode, Grid Matrix, Han Xin, MaxiCode, QR
  4037. Code (including HIBC, Micro QR, rMQR and UPNQR), and Ultracode - all of which
  4038. have a fixed width-to-height ratio (or, in the case of Code One, a fixed
  4039. height).
  4040. [9] For Windows, outfile is assumed to be UTF-8 encoded.
  4041. [10] The BARCODE_BIND_TOP flag is set by default for DPD - see 6.1.10.7 DPD
  4042. Code.
  4043. [11] The BARCODE_BIND flag is always set for Codablock-F, Code 16K and Code 49.
  4044. Special considerations apply to ITF-14 - see 6.1.2.6 ITF-14.
  4045. [12] Codablock-F, Code 16K, Code 49, EAN-2 to EAN-13, ISBN, ITF-14, UPC-A and
  4046. UPC-E have compliant quiet zones added by default.
  4047. [13] ZINT_CAP_EANUPC was previously named ZINT_CAP_EXTENDABLE, which is still
  4048. recognised.
  4049. [14] BARCODE_CODE128AB previously used the name BARCODE_CODE128B, which is still
  4050. recognised.
  4051. [15] The DX Number may be looked up in The (Modified) Big Film Database at
  4052. https://thebigfilmdatabase.merinorus.com.