Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zint/docs/manual.html @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 <!DOCTYPE html> | |
| 2 <html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> | |
| 3 <head> | |
| 4 <meta charset="utf-8" /> | |
| 5 <meta name="generator" content="pandoc" /> | |
| 6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> | |
| 7 <meta name="author" content="Version 2.13.0.9" /> | |
| 8 <title>Zint Barcode Generator and Zint Barcode Studio User Manual</title> | |
| 9 <style> | |
| 10 html { | |
| 11 font-family: TeX Gyre Pagella; | |
| 12 color: #1a1a1a; | |
| 13 background-color: #ffffff; | |
| 14 } | |
| 15 body { | |
| 16 line-height: 1.2; | |
| 17 margin: 0 auto; | |
| 18 max-width: 50em; | |
| 19 padding-left: 50px; | |
| 20 padding-right: 50px; | |
| 21 padding-top: 50px; | |
| 22 padding-bottom: 50px; | |
| 23 hyphens: auto; | |
| 24 overflow-wrap: break-word; | |
| 25 text-rendering: optimizeLegibility; | |
| 26 font-kerning: normal; | |
| 27 } | |
| 28 @media (max-width: 600px) { | |
| 29 body { | |
| 30 font-size: 0.9em; | |
| 31 padding: 12px; | |
| 32 } | |
| 33 h1 { | |
| 34 font-size: 1.8em; | |
| 35 } | |
| 36 } | |
| 37 @media print { | |
| 38 html { | |
| 39 background-color: white; | |
| 40 } | |
| 41 body { | |
| 42 background-color: transparent; | |
| 43 color: black; | |
| 44 font-size: 12pt; | |
| 45 } | |
| 46 p, h2, h3 { | |
| 47 orphans: 3; | |
| 48 widows: 3; | |
| 49 } | |
| 50 h2, h3, h4 { | |
| 51 page-break-after: avoid; | |
| 52 } | |
| 53 } | |
| 54 p { | |
| 55 margin: 1em 0; | |
| 56 } | |
| 57 a { | |
| 58 color: #800000; | |
| 59 } | |
| 60 a:visited { | |
| 61 color: #800000; | |
| 62 } | |
| 63 a:not(:hover) { | |
| 64 text-decoration: none; | |
| 65 } | |
| 66 figure { | |
| 67 margin-left: 0; | |
| 68 margin-right: 0; | |
| 69 text-align: center; | |
| 70 } | |
| 71 img { | |
| 72 max-width: 100%; | |
| 73 } | |
| 74 img.btn { | |
| 75 height: 0.9em; | |
| 76 } | |
| 77 img.win { | |
| 78 max-width: 80%; | |
| 79 } | |
| 80 img.pop { | |
| 81 max-width: 60%; | |
| 82 } | |
| 83 img[src*="gui_set_printing_scale.png"] { | |
| 84 max-width: 50%; | |
| 85 } | |
| 86 img.lin { | |
| 87 max-height: 10em; | |
| 88 } | |
| 89 img[src*="code128_rotate90.svg"] { | |
| 90 max-height: 20em; | |
| 91 } | |
| 92 img.i2d { | |
| 93 max-height: 10em; | |
| 94 } | |
| 95 img[src*="upnqr.svg"] { | |
| 96 max-height: 20em; | |
| 97 } | |
| 98 img.i2dbig { | |
| 99 } | |
| 100 img.trk { | |
| 101 max-height: 3em; | |
| 102 } | |
| 103 img[src*="fim.svg"] { | |
| 104 max-height: 10em; | |
| 105 } | |
| 106 img.dotty { | |
| 107 max-height: 7em; | |
| 108 } | |
| 109 img.ultra { | |
| 110 max-height: 12em; | |
| 111 } | |
| 112 img.upcean { | |
| 113 max-height: 12em; | |
| 114 } | |
| 115 h1, h2, h3, h4, h5, h6 { | |
| 116 margin-top: 1.4em; | |
| 117 } | |
| 118 h5, h6 { | |
| 119 font-size: 1em; | |
| 120 font-style: italic; | |
| 121 } | |
| 122 h6 { | |
| 123 font-weight: normal; | |
| 124 } | |
| 125 ol, ul { | |
| 126 padding-left: 1.7em; | |
| 127 margin-top: 1em; | |
| 128 } | |
| 129 li > ol, li > ul { | |
| 130 margin-top: 0; | |
| 131 } | |
| 132 dt { | |
| 133 font-weight:bold; | |
| 134 } | |
| 135 blockquote { | |
| 136 margin: 1em 0 1em 1.7em; | |
| 137 padding-left: 1em; | |
| 138 border-left: 2px solid #e6e6e6; | |
| 139 color: #606060; | |
| 140 } | |
| 141 code { | |
| 142 font-family: Liberation Mono; | |
| 143 font-size: 90%; | |
| 144 margin: 0; | |
| 145 hyphens: manual; | |
| 146 color: #000000; | |
| 147 } | |
| 148 pre { | |
| 149 margin: 1em 0; | |
| 150 overflow: auto; | |
| 151 } | |
| 152 pre code { | |
| 153 padding: 0; | |
| 154 overflow: visible; | |
| 155 overflow-wrap: normal; | |
| 156 } | |
| 157 .sourceCode { | |
| 158 background-color: transparent; | |
| 159 overflow: visible; | |
| 160 } | |
| 161 div.sourceCode { | |
| 162 background-color: #f7f7f7; | |
| 163 padding: 0.3em 0; | |
| 164 } | |
| 165 aside.footnotes { | |
| 166 font-size:90%; | |
| 167 } | |
| 168 hr { | |
| 169 background-color: #1a1a1a; | |
| 170 border: none; | |
| 171 height: 1px; | |
| 172 margin: 1em 0; | |
| 173 } | |
| 174 table { | |
| 175 margin: 0 auto 0.4em auto; | |
| 176 border-collapse: collapse; | |
| 177 overflow-x: auto; | |
| 178 font-variant-numeric: lining-nums tabular-nums; | |
| 179 } | |
| 180 #tbl\:gridmatrix_eccs { | |
| 181 margin-top: 1em; | |
| 182 } | |
| 183 table caption { | |
| 184 margin-bottom: 0.75em; | |
| 185 } | |
| 186 tbody { | |
| 187 margin-top: 0.5em; | |
| 188 border-top: 1px solid #1a1a1a; | |
| 189 border-bottom: 1px solid #1a1a1a; | |
| 190 } | |
| 191 th { | |
| 192 border-top: 1px solid #1a1a1a; | |
| 193 padding: 0.25em 0.5em 0.25em 0.5em; | |
| 194 } | |
| 195 td { | |
| 196 padding: 0.125em 0.5em 0.25em 0.5em; | |
| 197 vertical-align: top; | |
| 198 } | |
| 199 tbody tr:first-child td { | |
| 200 padding-top: 0.5em; | |
| 201 } | |
| 202 thead > tr { | |
| 203 margin-bottom: 4em; | |
| 204 text-align: center; | |
| 205 } | |
| 206 #banner { | |
| 207 text-align: center; | |
| 208 } | |
| 209 #banner img.img_hdr { | |
| 210 height: 7em; | |
| 211 } | |
| 212 #TOC { | |
| 213 font-size: 115%; | |
| 214 } | |
| 215 #TOC li { | |
| 216 list-style: none; | |
| 217 margin-bottom: 0.1em; | |
| 218 margin-top: 0.2em; | |
| 219 } | |
| 220 #TOC ul { | |
| 221 padding-left: 1.3em; | |
| 222 } | |
| 223 #TOC > ul { | |
| 224 padding-left: 0; | |
| 225 } | |
| 226 #TOC > ul > li { | |
| 227 margin-top: 0.5em; | |
| 228 } | |
| 229 #TOC > ul > li > a { | |
| 230 font-weight: bold; | |
| 231 } | |
| 232 #TOC a:not(:hover) { | |
| 233 color: #1a1a1a; | |
| 234 text-decoration: none; | |
| 235 } | |
| 236 dd > p { | |
| 237 margin-bottom:1.5em; | |
| 238 margin-top:0.5em; | |
| 239 } | |
| 240 #exit-status + dl > dt { | |
| 241 float: left; | |
| 242 } | |
| 243 #exit-status + dl > dd { | |
| 244 margin-bottom: 1em; | |
| 245 } | |
| 246 | |
| 247 code{white-space: pre-wrap;} | |
| 248 span.smallcaps{font-variant: small-caps;} | |
| 249 div.columns{display: flex; gap: min(4vw, 1.5em);} | |
| 250 div.column{flex: auto; overflow-x: auto;} | |
| 251 div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} | |
| 252 /* The extra [class] is a hack that increases specificity enough to | |
| 253 override a similar rule in reveal.js */ | |
| 254 ul.task-list[class]{list-style: none;} | |
| 255 ul.task-list li input[type="checkbox"] { | |
| 256 font-size: inherit; | |
| 257 width: 0.8em; | |
| 258 margin: 0 0.8em 0.2em -1.6em; | |
| 259 vertical-align: middle; | |
| 260 } | |
| 261 .display.math{display: block; text-align: center; margin: 0.5rem auto;} | |
| 262 /* CSS for syntax highlighting */ | |
| 263 html { -webkit-text-size-adjust: 100%; } | |
| 264 pre > code.sourceCode { white-space: pre; position: relative; } | |
| 265 pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } | |
| 266 pre > code.sourceCode > span:empty { height: 1.2em; } | |
| 267 .sourceCode { overflow: visible; } | |
| 268 code.sourceCode > span { color: inherit; text-decoration: inherit; } | |
| 269 div.sourceCode { margin: 1em 0; } | |
| 270 pre.sourceCode { margin: 0; } | |
| 271 @media screen { | |
| 272 div.sourceCode { overflow: auto; } | |
| 273 } | |
| 274 @media print { | |
| 275 pre > code.sourceCode { white-space: pre-wrap; } | |
| 276 pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } | |
| 277 } | |
| 278 pre.numberSource code | |
| 279 { counter-reset: source-line 0; } | |
| 280 pre.numberSource code > span | |
| 281 { position: relative; left: -4em; counter-increment: source-line; } | |
| 282 pre.numberSource code > span > a:first-child::before | |
| 283 { content: counter(source-line); | |
| 284 position: relative; left: -1em; text-align: right; vertical-align: baseline; | |
| 285 border: none; display: inline-block; | |
| 286 -webkit-touch-callout: none; -webkit-user-select: none; | |
| 287 -khtml-user-select: none; -moz-user-select: none; | |
| 288 -ms-user-select: none; user-select: none; | |
| 289 padding: 0 4px; width: 4em; | |
| 290 color: #aaaaaa; | |
| 291 } | |
| 292 pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } | |
| 293 div.sourceCode | |
| 294 { } | |
| 295 @media screen { | |
| 296 pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } | |
| 297 } | |
| 298 code span.al { color: #ff0000; } /* Alert */ | |
| 299 code span.an { color: #008000; } /* Annotation */ | |
| 300 code span.at { } /* Attribute */ | |
| 301 code span.bu { } /* BuiltIn */ | |
| 302 code span.cf { color: #0000ff; } /* ControlFlow */ | |
| 303 code span.ch { color: #008080; } /* Char */ | |
| 304 code span.cn { } /* Constant */ | |
| 305 code span.co { color: #008000; } /* Comment */ | |
| 306 code span.cv { color: #008000; } /* CommentVar */ | |
| 307 code span.do { color: #008000; } /* Documentation */ | |
| 308 code span.er { color: #ff0000; font-weight: bold; } /* Error */ | |
| 309 code span.ex { } /* Extension */ | |
| 310 code span.im { } /* Import */ | |
| 311 code span.in { color: #008000; } /* Information */ | |
| 312 code span.kw { color: #0000ff; } /* Keyword */ | |
| 313 code span.op { } /* Operator */ | |
| 314 code span.ot { color: #ff4000; } /* Other */ | |
| 315 code span.pp { color: #ff4000; } /* Preprocessor */ | |
| 316 code span.sc { color: #008080; } /* SpecialChar */ | |
| 317 code span.ss { color: #008080; } /* SpecialString */ | |
| 318 code span.st { color: #008080; } /* String */ | |
| 319 code span.va { } /* Variable */ | |
| 320 code span.vs { color: #008080; } /* VerbatimString */ | |
| 321 code span.wa { color: #008000; font-weight: bold; } /* Warning */ | |
| 322 </style> | |
| 323 <!--[if lt IE 9]> | |
| 324 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> | |
| 325 <![endif]--> | |
| 326 </head> | |
| 327 <body> | |
| 328 <div id="banner"> | |
| 329 <img src="images/zint.png" class="img_hdr"> | |
| 330 <img src="images/zint-qt.png" class="img_hdr"> | |
| 331 </div> | |
| 332 <header id="title-block-header"> | |
| 333 <h1 class="title">Zint Barcode Generator and Zint Barcode Studio User | |
| 334 Manual</h1> | |
| 335 <p class="author">Version 2.13.0.9</p> | |
| 336 <p class="date">December 2024</p> | |
| 337 </header> | |
| 338 <nav id="TOC" role="doc-toc"> | |
| 339 <ul> | |
| 340 <li><a href="#introduction" id="toc-introduction">1. Introduction</a> | |
| 341 <ul> | |
| 342 <li><a href="#glossary" id="toc-glossary">1.1 Glossary</a></li> | |
| 343 </ul></li> | |
| 344 <li><a href="#installing-zint" id="toc-installing-zint">2. Installing | |
| 345 Zint</a> | |
| 346 <ul> | |
| 347 <li><a href="#linux" id="toc-linux">2.1 Linux</a></li> | |
| 348 <li><a href="#bsd" id="toc-bsd">2.2 BSD</a></li> | |
| 349 <li><a href="#microsoft-windows" id="toc-microsoft-windows">2.3 | |
| 350 Microsoft Windows</a></li> | |
| 351 <li><a href="#apple-macos" id="toc-apple-macos">2.4 Apple macOS</a></li> | |
| 352 <li><a href="#zint-tcl-backend" id="toc-zint-tcl-backend">2.5 Zint Tcl | |
| 353 Backend</a></li> | |
| 354 </ul></li> | |
| 355 <li><a href="#using-zint-barcode-studio" | |
| 356 id="toc-using-zint-barcode-studio">3. Using Zint Barcode Studio</a> | |
| 357 <ul> | |
| 358 <li><a href="#main-window-and-data-tab" | |
| 359 id="toc-main-window-and-data-tab">3.1 Main Window and Data Tab</a></li> | |
| 360 <li><a href="#gs1-composite-groupbox" | |
| 361 id="toc-gs1-composite-groupbox">3.2 GS1 Composite Groupbox</a></li> | |
| 362 <li><a href="#additional-ecidata-segments-groupbox" | |
| 363 id="toc-additional-ecidata-segments-groupbox">3.3 Additional ECI/Data | |
| 364 Segments Groupbox</a></li> | |
| 365 <li><a href="#symbology-specific-groupbox" | |
| 366 id="toc-symbology-specific-groupbox">3.4 Symbology-specific | |
| 367 Groupbox</a></li> | |
| 368 <li><a href="#symbology-specific-tab" | |
| 369 id="toc-symbology-specific-tab">3.5 Symbology-specific Tab</a></li> | |
| 370 <li><a href="#appearance-tab" id="toc-appearance-tab">3.6 Appearance | |
| 371 Tab</a></li> | |
| 372 <li><a href="#data-dialog" id="toc-data-dialog">3.7 Data Dialog</a></li> | |
| 373 <li><a href="#sequence-dialog" id="toc-sequence-dialog">3.8 Sequence | |
| 374 Dialog</a></li> | |
| 375 <li><a href="#export-dialog" id="toc-export-dialog">3.9 Export | |
| 376 Dialog</a></li> | |
| 377 <li><a href="#cli-equivalent-dialog" id="toc-cli-equivalent-dialog">3.10 | |
| 378 CLI Equivalent Dialog</a></li> | |
| 379 </ul></li> | |
| 380 <li><a href="#using-the-command-line" id="toc-using-the-command-line">4. | |
| 381 Using the Command Line</a> | |
| 382 <ul> | |
| 383 <li><a href="#inputting-data" id="toc-inputting-data">4.1 Inputting | |
| 384 Data</a></li> | |
| 385 <li><a href="#directing-output" id="toc-directing-output">4.2 Directing | |
| 386 Output</a></li> | |
| 387 <li><a href="#selecting-barcode-type" | |
| 388 id="toc-selecting-barcode-type">4.3 Selecting Barcode Type</a></li> | |
| 389 <li><a href="#adjusting-height" id="toc-adjusting-height">4.4 Adjusting | |
| 390 Height</a></li> | |
| 391 <li><a href="#adjusting-whitespace" id="toc-adjusting-whitespace">4.5 | |
| 392 Adjusting Whitespace</a></li> | |
| 393 <li><a href="#adding-boundary-bars-and-boxes" | |
| 394 id="toc-adding-boundary-bars-and-boxes">4.6 Adding Boundary Bars and | |
| 395 Boxes</a></li> | |
| 396 <li><a href="#using-colour" id="toc-using-colour">4.7 Using | |
| 397 Colour</a></li> | |
| 398 <li><a href="#rotating-the-symbol" id="toc-rotating-the-symbol">4.8 | |
| 399 Rotating the Symbol</a></li> | |
| 400 <li><a href="#adjusting-image-size-x-dimension" | |
| 401 id="toc-adjusting-image-size-x-dimension">4.9 Adjusting Image Size | |
| 402 (X-dimension)</a> | |
| 403 <ul> | |
| 404 <li><a href="#scaling-by-x-dimension-and-resolution" | |
| 405 id="toc-scaling-by-x-dimension-and-resolution">4.9.1 Scaling by | |
| 406 X-dimension and Resolution</a></li> | |
| 407 <li><a href="#scaling-example" id="toc-scaling-example">4.9.2 Scaling | |
| 408 Example</a></li> | |
| 409 <li><a href="#maxicode-raster-scaling" | |
| 410 id="toc-maxicode-raster-scaling">4.9.3 MaxiCode Raster Scaling</a></li> | |
| 411 </ul></li> | |
| 412 <li><a href="#human-readable-text-hrt-options" | |
| 413 id="toc-human-readable-text-hrt-options">4.10 Human Readable Text (HRT) | |
| 414 Options</a></li> | |
| 415 <li><a href="#input-modes" id="toc-input-modes">4.11 Input Modes</a> | |
| 416 <ul> | |
| 417 <li><a href="#unicode-data-and-gs1-modes" | |
| 418 id="toc-unicode-data-and-gs1-modes">4.11.1 Unicode, Data, and GS1 | |
| 419 Modes</a></li> | |
| 420 <li><a href="#input-modes-and-eci" id="toc-input-modes-and-eci">4.11.2 | |
| 421 Input Modes and ECI</a> | |
| 422 <ul> | |
| 423 <li><a href="#input-modes-and-eci-example-1" | |
| 424 id="toc-input-modes-and-eci-example-1">4.11.2.1 Input Modes and ECI | |
| 425 Example 1</a></li> | |
| 426 <li><a href="#input-modes-and-eci-example-2" | |
| 427 id="toc-input-modes-and-eci-example-2">4.11.2.2 Input Modes and ECI | |
| 428 Example 2</a></li> | |
| 429 <li><a href="#input-modes-and-eci-example-3" | |
| 430 id="toc-input-modes-and-eci-example-3">4.11.2.3 Input Modes and ECI | |
| 431 Example 3</a></li> | |
| 432 </ul></li> | |
| 433 </ul></li> | |
| 434 <li><a href="#batch-processing" id="toc-batch-processing">4.12 Batch | |
| 435 Processing</a></li> | |
| 436 <li><a href="#direct-output-to-stdout" | |
| 437 id="toc-direct-output-to-stdout">4.13 Direct Output to stdout</a></li> | |
| 438 <li><a href="#automatic-filenames" id="toc-automatic-filenames">4.14 | |
| 439 Automatic Filenames</a></li> | |
| 440 <li><a href="#working-with-dots" id="toc-working-with-dots">4.15 Working | |
| 441 with Dots</a></li> | |
| 442 <li><a href="#multiple-segments" id="toc-multiple-segments">4.16 | |
| 443 Multiple Segments</a></li> | |
| 444 <li><a href="#structured-append" id="toc-structured-append">4.17 | |
| 445 Structured Append</a></li> | |
| 446 <li><a href="#help-options" id="toc-help-options">4.18 Help | |
| 447 Options</a></li> | |
| 448 <li><a href="#other-options" id="toc-other-options">4.19 Other | |
| 449 Options</a></li> | |
| 450 </ul></li> | |
| 451 <li><a href="#using-the-api" id="toc-using-the-api">5. Using the API</a> | |
| 452 <ul> | |
| 453 <li><a href="#creating-and-deleting-symbols" | |
| 454 id="toc-creating-and-deleting-symbols">5.1 Creating and Deleting | |
| 455 Symbols</a></li> | |
| 456 <li><a href="#encoding-and-saving-to-file" | |
| 457 id="toc-encoding-and-saving-to-file">5.2 Encoding and Saving to | |
| 458 File</a></li> | |
| 459 <li><a href="#encoding-and-printing-functions-in-depth" | |
| 460 id="toc-encoding-and-printing-functions-in-depth">5.3 Encoding and | |
| 461 Printing Functions in Depth</a></li> | |
| 462 <li><a href="#buffering-symbols-in-memory-raster" | |
| 463 id="toc-buffering-symbols-in-memory-raster">5.4 Buffering Symbols in | |
| 464 Memory (raster)</a></li> | |
| 465 <li><a href="#buffering-symbols-in-memory-vector" | |
| 466 id="toc-buffering-symbols-in-memory-vector">5.5 Buffering Symbols in | |
| 467 Memory (vector)</a></li> | |
| 468 <li><a href="#buffering-symbols-in-memory-memfile" | |
| 469 id="toc-buffering-symbols-in-memory-memfile">5.6 Buffering Symbols in | |
| 470 Memory (memfile)</a></li> | |
| 471 <li><a href="#setting-options" id="toc-setting-options">5.7 Setting | |
| 472 Options</a></li> | |
| 473 <li><a href="#handling-errors" id="toc-handling-errors">5.8 Handling | |
| 474 Errors</a></li> | |
| 475 <li><a href="#specifying-a-symbology" | |
| 476 id="toc-specifying-a-symbology">5.9 Specifying a Symbology</a></li> | |
| 477 <li><a href="#adjusting-output-options" | |
| 478 id="toc-adjusting-output-options">5.10 Adjusting Output Options</a></li> | |
| 479 <li><a href="#setting-the-input-mode" | |
| 480 id="toc-setting-the-input-mode">5.11 Setting the Input Mode</a></li> | |
| 481 <li><a href="#multiple-segments-1" id="toc-multiple-segments-1">5.12 | |
| 482 Multiple Segments</a></li> | |
| 483 <li><a href="#scaling-helpers" id="toc-scaling-helpers">5.13 Scaling | |
| 484 Helpers</a></li> | |
| 485 <li><a href="#verifying-symbology-availability" | |
| 486 id="toc-verifying-symbology-availability">5.14 Verifying Symbology | |
| 487 Availability</a></li> | |
| 488 <li><a href="#checking-symbology-capabilities" | |
| 489 id="toc-checking-symbology-capabilities">5.15 Checking Symbology | |
| 490 Capabilities</a></li> | |
| 491 <li><a href="#zint-version" id="toc-zint-version">5.16 Zint | |
| 492 Version</a></li> | |
| 493 </ul></li> | |
| 494 <li><a href="#types-of-symbology" id="toc-types-of-symbology">6. Types | |
| 495 of Symbology</a> | |
| 496 <ul> | |
| 497 <li><a href="#one-dimensional-symbols" | |
| 498 id="toc-one-dimensional-symbols">6.1 One-Dimensional Symbols</a> | |
| 499 <ul> | |
| 500 <li><a href="#code-11" id="toc-code-11">6.1.1 Code 11</a></li> | |
| 501 <li><a href="#code-2-of-5" id="toc-code-2-of-5">6.1.2 Code 2 of 5</a> | |
| 502 <ul> | |
| 503 <li><a href="#standard-code-2-of-5" | |
| 504 id="toc-standard-code-2-of-5">6.1.2.1 Standard Code 2 of 5</a></li> | |
| 505 <li><a href="#iata-code-2-of-5" id="toc-iata-code-2-of-5">6.1.2.2 IATA | |
| 506 Code 2 of 5</a></li> | |
| 507 <li><a href="#industrial-code-2-of-5" | |
| 508 id="toc-industrial-code-2-of-5">6.1.2.3 Industrial Code 2 of 5</a></li> | |
| 509 <li><a href="#interleaved-code-2-of-5-iso-16390" | |
| 510 id="toc-interleaved-code-2-of-5-iso-16390">6.1.2.4 Interleaved Code 2 of | |
| 511 5 (ISO 16390)</a></li> | |
| 512 <li><a href="#code-2-of-5-data-logic" | |
| 513 id="toc-code-2-of-5-data-logic">6.1.2.5 Code 2 of 5 Data Logic</a></li> | |
| 514 <li><a href="#itf-14" id="toc-itf-14">6.1.2.6 ITF-14</a></li> | |
| 515 <li><a href="#deutsche-post-leitcode" | |
| 516 id="toc-deutsche-post-leitcode">6.1.2.7 Deutsche Post Leitcode</a></li> | |
| 517 <li><a href="#deutsche-post-identcode" | |
| 518 id="toc-deutsche-post-identcode">6.1.2.8 Deutsche Post | |
| 519 Identcode</a></li> | |
| 520 </ul></li> | |
| 521 <li><a href="#upc-universal-product-code-iso-15420" | |
| 522 id="toc-upc-universal-product-code-iso-15420">6.1.3 UPC (Universal | |
| 523 Product Code) (ISO 15420)</a> | |
| 524 <ul> | |
| 525 <li><a href="#upc-version-a" id="toc-upc-version-a">6.1.3.1 UPC Version | |
| 526 A</a></li> | |
| 527 <li><a href="#upc-version-e" id="toc-upc-version-e">6.1.3.2 UPC Version | |
| 528 E</a></li> | |
| 529 </ul></li> | |
| 530 <li><a href="#ean-european-article-number-iso-15420" | |
| 531 id="toc-ean-european-article-number-iso-15420">6.1.4 EAN (European | |
| 532 Article Number) (ISO 15420)</a> | |
| 533 <ul> | |
| 534 <li><a href="#ean-2-ean-5-ean-8-and-ean-13" | |
| 535 id="toc-ean-2-ean-5-ean-8-and-ean-13">6.1.4.1 EAN-2, EAN-5, EAN-8 and | |
| 536 EAN-13</a></li> | |
| 537 <li><a href="#sbn-isbn-and-isbn-13" | |
| 538 id="toc-sbn-isbn-and-isbn-13">6.1.4.2 SBN, ISBN and ISBN-13</a></li> | |
| 539 </ul></li> | |
| 540 <li><a href="#plessey" id="toc-plessey">6.1.5 Plessey</a> | |
| 541 <ul> | |
| 542 <li><a href="#uk-plessey" id="toc-uk-plessey">6.1.5.1 UK | |
| 543 Plessey</a></li> | |
| 544 <li><a href="#msi-plessey" id="toc-msi-plessey">6.1.5.2 MSI | |
| 545 Plessey</a></li> | |
| 546 </ul></li> | |
| 547 <li><a href="#telepen" id="toc-telepen">6.1.6 Telepen</a> | |
| 548 <ul> | |
| 549 <li><a href="#telepen-alpha" id="toc-telepen-alpha">6.1.6.1 Telepen | |
| 550 Alpha</a></li> | |
| 551 <li><a href="#telepen-numeric" id="toc-telepen-numeric">6.1.6.2 Telepen | |
| 552 Numeric</a></li> | |
| 553 </ul></li> | |
| 554 <li><a href="#code-39" id="toc-code-39">6.1.7 Code 39</a> | |
| 555 <ul> | |
| 556 <li><a href="#standard-code-39-iso-16388" | |
| 557 id="toc-standard-code-39-iso-16388">6.1.7.1 Standard Code 39 (ISO | |
| 558 16388)</a></li> | |
| 559 <li><a href="#extended-code-39" id="toc-extended-code-39">6.1.7.2 | |
| 560 Extended Code 39</a></li> | |
| 561 <li><a href="#code-93" id="toc-code-93">6.1.7.3 Code 93</a></li> | |
| 562 <li><a href="#pzn-pharmazentralnummer" | |
| 563 id="toc-pzn-pharmazentralnummer">6.1.7.4 PZN | |
| 564 (Pharmazentralnummer)</a></li> | |
| 565 <li><a href="#logmars" id="toc-logmars">6.1.7.5 LOGMARS</a></li> | |
| 566 <li><a href="#code-32" id="toc-code-32">6.1.7.6 Code 32</a></li> | |
| 567 <li><a href="#hibc-code-39" id="toc-hibc-code-39">6.1.7.7 HIBC Code | |
| 568 39</a></li> | |
| 569 <li><a href="#vehicle-identification-number-vin" | |
| 570 id="toc-vehicle-identification-number-vin">6.1.7.8 Vehicle | |
| 571 Identification Number (VIN)</a></li> | |
| 572 </ul></li> | |
| 573 <li><a href="#codabar-en-798" id="toc-codabar-en-798">6.1.8 Codabar (EN | |
| 574 798)</a></li> | |
| 575 <li><a href="#pharmacode" id="toc-pharmacode">6.1.9 Pharmacode</a></li> | |
| 576 <li><a href="#code-128" id="toc-code-128">6.1.10 Code 128</a> | |
| 577 <ul> | |
| 578 <li><a href="#standard-code-128-iso-15417" | |
| 579 id="toc-standard-code-128-iso-15417">6.1.10.1 Standard Code 128 (ISO | |
| 580 15417)</a></li> | |
| 581 <li><a href="#code-128-suppress-code-set-c-code-sets-a-and-b-only" | |
| 582 id="toc-code-128-suppress-code-set-c-code-sets-a-and-b-only">6.1.10.2 | |
| 583 Code 128 Suppress Code Set C (Code Sets A and B only)</a></li> | |
| 584 <li><a href="#gs1-128" id="toc-gs1-128">6.1.10.3 GS1-128</a></li> | |
| 585 <li><a href="#ean-14" id="toc-ean-14">6.1.10.4 EAN-14</a></li> | |
| 586 <li><a href="#nve-18-sscc-18" id="toc-nve-18-sscc-18">6.1.10.5 NVE-18 | |
| 587 (SSCC-18)</a></li> | |
| 588 <li><a href="#hibc-code-128" id="toc-hibc-code-128">6.1.10.6 HIBC Code | |
| 589 128</a></li> | |
| 590 <li><a href="#dpd-code" id="toc-dpd-code">6.1.10.7 DPD Code</a></li> | |
| 591 <li><a href="#upu-s10" id="toc-upu-s10">6.1.10.8 UPU S10</a></li> | |
| 592 </ul></li> | |
| 593 <li><a href="#gs1-databar-iso-24724" | |
| 594 id="toc-gs1-databar-iso-24724">6.1.11 GS1 DataBar (ISO 24724)</a> | |
| 595 <ul> | |
| 596 <li><a href="#gs1-databar-omnidirectional-and-gs1-databar-truncated" | |
| 597 id="toc-gs1-databar-omnidirectional-and-gs1-databar-truncated">6.1.11.1 | |
| 598 GS1 DataBar Omnidirectional and GS1 DataBar Truncated</a></li> | |
| 599 <li><a href="#gs1-databar-limited" id="toc-gs1-databar-limited">6.1.11.2 | |
| 600 GS1 DataBar Limited</a></li> | |
| 601 <li><a href="#gs1-databar-expanded" | |
| 602 id="toc-gs1-databar-expanded">6.1.11.3 GS1 DataBar Expanded</a></li> | |
| 603 </ul></li> | |
| 604 <li><a href="#korea-post-barcode" id="toc-korea-post-barcode">6.1.12 | |
| 605 Korea Post Barcode</a></li> | |
| 606 <li><a href="#channel-code" id="toc-channel-code">6.1.13 Channel | |
| 607 Code</a></li> | |
| 608 <li><a href="#bc412-semi-t1-95" id="toc-bc412-semi-t1-95">6.1.14 BC412 | |
| 609 (SEMI T1-95)</a></li> | |
| 610 </ul></li> | |
| 611 <li><a href="#stacked-symbologies" id="toc-stacked-symbologies">6.2 | |
| 612 Stacked Symbologies</a> | |
| 613 <ul> | |
| 614 <li><a href="#basic-symbol-stacking" | |
| 615 id="toc-basic-symbol-stacking">6.2.1 Basic Symbol Stacking</a></li> | |
| 616 <li><a href="#codablock-f" id="toc-codablock-f">6.2.2 | |
| 617 Codablock-F</a></li> | |
| 618 <li><a href="#code-16k-en-12323" id="toc-code-16k-en-12323">6.2.3 Code | |
| 619 16K (EN 12323)</a></li> | |
| 620 <li><a href="#pdf417-iso-15438" id="toc-pdf417-iso-15438">6.2.4 PDF417 | |
| 621 (ISO 15438)</a></li> | |
| 622 <li><a href="#compact-pdf417-iso-15438" | |
| 623 id="toc-compact-pdf417-iso-15438">6.2.5 Compact PDF417 (ISO | |
| 624 15438)</a></li> | |
| 625 <li><a href="#micropdf417-iso-24728" | |
| 626 id="toc-micropdf417-iso-24728">6.2.6 MicroPDF417 (ISO 24728)</a></li> | |
| 627 <li><a href="#gs1-databar-stacked-iso-24724" | |
| 628 id="toc-gs1-databar-stacked-iso-24724">6.2.7 GS1 DataBar Stacked (ISO | |
| 629 24724)</a> | |
| 630 <ul> | |
| 631 <li><a href="#gs1-databar-stacked" id="toc-gs1-databar-stacked">6.2.7.1 | |
| 632 GS1 DataBar Stacked</a></li> | |
| 633 <li><a href="#gs1-databar-stacked-omnidirectional" | |
| 634 id="toc-gs1-databar-stacked-omnidirectional">6.2.7.2 GS1 DataBar Stacked | |
| 635 Omnidirectional</a></li> | |
| 636 <li><a href="#gs1-databar-expanded-stacked" | |
| 637 id="toc-gs1-databar-expanded-stacked">6.2.7.3 GS1 DataBar Expanded | |
| 638 Stacked</a></li> | |
| 639 </ul></li> | |
| 640 <li><a href="#code-49" id="toc-code-49">6.2.8 Code 49</a></li> | |
| 641 </ul></li> | |
| 642 <li><a href="#gs1-composite-symbols-iso-24723" | |
| 643 id="toc-gs1-composite-symbols-iso-24723">6.3 GS1 Composite Symbols (ISO | |
| 644 24723)</a> | |
| 645 <ul> | |
| 646 <li><a href="#cc-a" id="toc-cc-a">6.3.1 CC-A</a></li> | |
| 647 <li><a href="#cc-b" id="toc-cc-b">6.3.2 CC-B</a></li> | |
| 648 <li><a href="#cc-c" id="toc-cc-c">6.3.3 CC-C</a></li> | |
| 649 </ul></li> | |
| 650 <li><a href="#two-track-symbols" id="toc-two-track-symbols">6.4 | |
| 651 Two-Track Symbols</a> | |
| 652 <ul> | |
| 653 <li><a href="#two-track-pharmacode" id="toc-two-track-pharmacode">6.4.1 | |
| 654 Two-Track Pharmacode</a></li> | |
| 655 <li><a href="#postnet" id="toc-postnet">6.4.2 POSTNET</a></li> | |
| 656 <li><a href="#planet" id="toc-planet">6.4.3 PLANET</a></li> | |
| 657 <li><a href="#brazilian-cepnet" id="toc-brazilian-cepnet">6.4.4 | |
| 658 Brazilian CEPNet</a></li> | |
| 659 <li><a href="#dx-film-edge-barcode" id="toc-dx-film-edge-barcode">6.4.5 | |
| 660 DX Film Edge Barcode</a></li> | |
| 661 </ul></li> | |
| 662 <li><a href="#state-postal-codes" id="toc-state-postal-codes">6.5 | |
| 663 4-State Postal Codes</a> | |
| 664 <ul> | |
| 665 <li><a href="#australia-post-4-state-symbols" | |
| 666 id="toc-australia-post-4-state-symbols">6.5.1 Australia Post 4-State | |
| 667 Symbols</a> | |
| 668 <ul> | |
| 669 <li><a href="#customer-barcodes" id="toc-customer-barcodes">6.5.1.1 | |
| 670 Customer Barcodes</a></li> | |
| 671 <li><a href="#reply-paid-barcode" id="toc-reply-paid-barcode">6.5.1.2 | |
| 672 Reply Paid Barcode</a></li> | |
| 673 <li><a href="#routing-barcode" id="toc-routing-barcode">6.5.1.3 Routing | |
| 674 Barcode</a></li> | |
| 675 <li><a href="#redirect-barcode" id="toc-redirect-barcode">6.5.1.4 | |
| 676 Redirect Barcode</a></li> | |
| 677 </ul></li> | |
| 678 <li><a href="#dutch-post-kix-code" id="toc-dutch-post-kix-code">6.5.2 | |
| 679 Dutch Post KIX Code</a></li> | |
| 680 <li><a href="#royal-mail-4-state-customer-code-rm4scc" | |
| 681 id="toc-royal-mail-4-state-customer-code-rm4scc">6.5.3 Royal Mail | |
| 682 4-State Customer Code (RM4SCC)</a></li> | |
| 683 <li><a href="#royal-mail-4-state-mailmark" | |
| 684 id="toc-royal-mail-4-state-mailmark">6.5.4 Royal Mail 4-State | |
| 685 Mailmark</a></li> | |
| 686 <li><a href="#usps-intelligent-mail" | |
| 687 id="toc-usps-intelligent-mail">6.5.5 USPS Intelligent Mail</a></li> | |
| 688 <li><a href="#japanese-postal-code" id="toc-japanese-postal-code">6.5.6 | |
| 689 Japanese Postal Code</a></li> | |
| 690 <li><a href="#daft-code" id="toc-daft-code">6.5.7 DAFT Code</a></li> | |
| 691 </ul></li> | |
| 692 <li><a href="#matrix-symbols" id="toc-matrix-symbols">6.6 Matrix | |
| 693 Symbols</a> | |
| 694 <ul> | |
| 695 <li><a href="#data-matrix-iso-16022" | |
| 696 id="toc-data-matrix-iso-16022">6.6.1 Data Matrix (ISO 16022)</a></li> | |
| 697 <li><a href="#royal-mail-2d-mailmark-cmdm-data-matrix" | |
| 698 id="toc-royal-mail-2d-mailmark-cmdm-data-matrix">6.6.2 Royal Mail 2D | |
| 699 Mailmark (CMDM) (Data Matrix)</a></li> | |
| 700 <li><a href="#qr-code-iso-18004" id="toc-qr-code-iso-18004">6.6.3 QR | |
| 701 Code (ISO 18004)</a></li> | |
| 702 <li><a href="#micro-qr-code-iso-18004" | |
| 703 id="toc-micro-qr-code-iso-18004">6.6.4 Micro QR Code (ISO | |
| 704 18004)</a></li> | |
| 705 <li><a href="#rectangular-micro-qr-code-rmqr-iso-23941" | |
| 706 id="toc-rectangular-micro-qr-code-rmqr-iso-23941">6.6.5 Rectangular | |
| 707 Micro QR Code (rMQR) (ISO 23941)</a></li> | |
| 708 <li><a href="#upnqr-univerzalnega-plačilnega-naloga-qr" | |
| 709 id="toc-upnqr-univerzalnega-plačilnega-naloga-qr">6.6.6 UPNQR | |
| 710 (Univerzalnega Plačilnega Naloga QR)</a></li> | |
| 711 <li><a href="#maxicode-iso-16023" id="toc-maxicode-iso-16023">6.6.7 | |
| 712 MaxiCode (ISO 16023)</a></li> | |
| 713 <li><a href="#aztec-code-iso-24778" id="toc-aztec-code-iso-24778">6.6.8 | |
| 714 Aztec Code (ISO 24778)</a></li> | |
| 715 <li><a href="#aztec-runes-iso-24778" | |
| 716 id="toc-aztec-runes-iso-24778">6.6.9 Aztec Runes (ISO 24778)</a></li> | |
| 717 <li><a href="#code-one" id="toc-code-one">6.6.10 Code One</a></li> | |
| 718 <li><a href="#grid-matrix" id="toc-grid-matrix">6.6.11 Grid | |
| 719 Matrix</a></li> | |
| 720 <li><a href="#dotcode" id="toc-dotcode">6.6.12 DotCode</a></li> | |
| 721 <li><a href="#han-xin-code-iso-20830" | |
| 722 id="toc-han-xin-code-iso-20830">6.6.13 Han Xin Code (ISO 20830)</a></li> | |
| 723 <li><a href="#ultracode" id="toc-ultracode">6.6.14 Ultracode</a></li> | |
| 724 </ul></li> | |
| 725 <li><a href="#other-barcode-like-markings" | |
| 726 id="toc-other-barcode-like-markings">6.7 Other Barcode-Like Markings</a> | |
| 727 <ul> | |
| 728 <li><a href="#facing-identification-mark-fim" | |
| 729 id="toc-facing-identification-mark-fim">6.7.1 Facing Identification Mark | |
| 730 (FIM)</a></li> | |
| 731 <li><a href="#flattermarken" id="toc-flattermarken">6.7.2 | |
| 732 Flattermarken</a></li> | |
| 733 </ul></li> | |
| 734 </ul></li> | |
| 735 <li><a href="#legal-and-version-information" | |
| 736 id="toc-legal-and-version-information">7. Legal and Version | |
| 737 Information</a> | |
| 738 <ul> | |
| 739 <li><a href="#license" id="toc-license">7.1 License</a></li> | |
| 740 <li><a href="#patent-issues" id="toc-patent-issues">7.2 Patent | |
| 741 Issues</a></li> | |
| 742 <li><a href="#version-information" id="toc-version-information">7.3 | |
| 743 Version Information</a></li> | |
| 744 <li><a href="#sources-of-information" | |
| 745 id="toc-sources-of-information">7.4 Sources of Information</a></li> | |
| 746 <li><a href="#standards-compliance" id="toc-standards-compliance">7.5 | |
| 747 Standards Compliance</a> | |
| 748 <ul> | |
| 749 <li><a href="#symbology-standards" id="toc-symbology-standards">7.5.1 | |
| 750 Symbology Standards</a></li> | |
| 751 <li><a href="#general-standards" id="toc-general-standards">7.5.2 | |
| 752 General Standards</a></li> | |
| 753 </ul></li> | |
| 754 </ul></li> | |
| 755 <li><a href="#annex-a.-character-encoding" | |
| 756 id="toc-annex-a.-character-encoding">Annex A. Character Encoding</a> | |
| 757 <ul> | |
| 758 <li><a href="#a.1-ascii-standard" id="toc-a.1-ascii-standard">A.1 ASCII | |
| 759 Standard</a></li> | |
| 760 <li><a href="#a.2-latin-alphabet-no.-1-isoiec-8859-1" | |
| 761 id="toc-a.2-latin-alphabet-no.-1-isoiec-8859-1">A.2 Latin Alphabet No. 1 | |
| 762 (ISO/IEC 8859-1)</a></li> | |
| 763 </ul></li> | |
| 764 <li><a href="#annex-b.-qt-backend-qzint" | |
| 765 id="toc-annex-b.-qt-backend-qzint">Annex B. Qt Backend QZint</a></li> | |
| 766 <li><a href="#annex-c.-tcl-backend-binding" | |
| 767 id="toc-annex-c.-tcl-backend-binding">Annex C. Tcl Backend | |
| 768 Binding</a></li> | |
| 769 <li><a href="#annex-d.-man-page-zint1" | |
| 770 id="toc-annex-d.-man-page-zint1">Annex D. Man Page ZINT(1)</a><ul> | |
| 771 <li><a href="#name" id="toc-name">NAME</a></li> | |
| 772 <li><a href="#synopsis" id="toc-synopsis">SYNOPSIS</a></li> | |
| 773 <li><a href="#description" id="toc-description">DESCRIPTION</a></li> | |
| 774 <li><a href="#options" id="toc-options">OPTIONS</a></li> | |
| 775 <li><a href="#exit-status" id="toc-exit-status">EXIT STATUS</a></li> | |
| 776 <li><a href="#examples" id="toc-examples">EXAMPLES</a></li> | |
| 777 <li><a href="#bugs" id="toc-bugs">BUGS</a></li> | |
| 778 <li><a href="#see-also" id="toc-see-also">SEE ALSO</a></li> | |
| 779 <li><a href="#conforming-to" id="toc-conforming-to">CONFORMING | |
| 780 TO</a></li> | |
| 781 <li><a href="#copyright" id="toc-copyright">COPYRIGHT</a></li> | |
| 782 <li><a href="#author" id="toc-author">AUTHOR</a></li> | |
| 783 </ul> | |
| 784 </nav> | |
| 785 <h1 id="introduction">1. Introduction</h1> | |
| 786 <p>The Zint project aims to provide a complete cross-platform open | |
| 787 source barcode generating solution. The package currently consists of a | |
| 788 Qt-based GUI, a CLI command line executable and a library with an API to | |
| 789 allow developers access to the capabilities of Zint. It is hoped that | |
| 790 Zint provides a solution which is flexible enough for professional users | |
| 791 while at the same time takes care of as much of the processing as | |
| 792 possible to allow easy translation from input data to barcode image.</p> | |
| 793 <p>The library which forms the main component of the Zint project is | |
| 794 currently able to encode data in over 50 barcode symbologies (types of | |
| 795 barcode), for each of which it is possible to translate that data from | |
| 796 either UTF-8 (Unicode) or a raw 8-bit data stream. The image can be | |
| 797 rendered as a</p> | |
| 798 <ul> | |
| 799 <li>Windows Bitmap (BMP),</li> | |
| 800 <li>Enhanced Metafile Format (EMF),</li> | |
| 801 <li>Encapsulated PostScript (EPS),</li> | |
| 802 <li>Graphics Interchange Format (GIF),</li> | |
| 803 <li>ZSoft Paintbrush (PCX) image,</li> | |
| 804 <li>Portable Network Graphic (PNG) image,</li> | |
| 805 <li>Tagged Image File Format (TIF), or a</li> | |
| 806 <li>Scalable Vector Graphic (SVG).</li> | |
| 807 </ul> | |
| 808 <p>Many options are available for setting the characteristics of the | |
| 809 output image including the size and colour of the image, the amount of | |
| 810 error correction used in the symbol and the orientation of the | |
| 811 image.</p> | |
| 812 <h2 id="glossary">1.1 Glossary</h2> | |
| 813 <p>Some of the words and phrases used in this document are specific to | |
| 814 barcoding, and so a brief explanation is given to help | |
| 815 understanding:</p> | |
| 816 <dl> | |
| 817 <dt>symbol</dt> | |
| 818 <dd> | |
| 819 <p>A symbol is an image which encodes data according to one of the | |
| 820 standards. This encompasses barcodes (linear symbols) as well as any of | |
| 821 the other methods of representing data used in this program.</p> | |
| 822 </dd> | |
| 823 <dt>symbology</dt> | |
| 824 <dd> | |
| 825 <p>A method of encoding data to create a certain type of symbol.</p> | |
| 826 </dd> | |
| 827 <dt>linear</dt> | |
| 828 <dd> | |
| 829 <p>A linear or one-dimensional symbol is one which consists of bars and | |
| 830 spaces, and is what most people associate with the term ‘barcode’. | |
| 831 Examples include Code 128.</p> | |
| 832 </dd> | |
| 833 <dt>stacked</dt> | |
| 834 <dd> | |
| 835 <p>A stacked symbol consists of multiple linear symbols placed one above | |
| 836 another and which together hold the message, usually alongside some | |
| 837 error correction data. Examples include PDF417.</p> | |
| 838 </dd> | |
| 839 <dt>matrix</dt> | |
| 840 <dd> | |
| 841 <p>A matrix symbol is one based on a (usually square) grid of elements | |
| 842 called modules. Examples include Data Matrix, but MaxiCode and DotCode | |
| 843 are also considered matrix symbologies.</p> | |
| 844 </dd> | |
| 845 <dt>composite</dt> | |
| 846 <dd> | |
| 847 <p>A composite symbology is one which is made up of elements which are | |
| 848 both linear and stacked. Those currently supported are made up of a | |
| 849 linear ‘primary’ message above which is printed a stacked component | |
| 850 based on the PDF417 symbology. These symbols also have a separator which | |
| 851 separates the linear and the stacked components. The stacked component | |
| 852 is most often referred to as the 2D (two-dimensional) component.</p> | |
| 853 </dd> | |
| 854 <dt>X-dimension</dt> | |
| 855 <dd> | |
| 856 <p>The X-dimension of a symbol is the size (usually the width) of the | |
| 857 smallest element. For a linear symbology this is the width of the | |
| 858 smallest bar. For matrix symbologies it is the width of the smallest | |
| 859 module (usually a square). Barcode widths and heights are expressed in | |
| 860 X-dimensions. Most linear symbologies can have their height varied | |
| 861 whereas most matrix symbologies have a fixed width-to-height ratio where | |
| 862 the height is determined by the width.</p> | |
| 863 </dd> | |
| 864 <dt>GS1 data</dt> | |
| 865 <dd> | |
| 866 <p>This is a structured way of representing information which consists | |
| 867 of ‘chunks’ of data, each of which starts with an Application Identifier | |
| 868 (AI). The AI identifies what type of information is being encoded.</p> | |
| 869 </dd> | |
| 870 <dt>Reader Initialisation (Programming)</dt> | |
| 871 <dd> | |
| 872 <p>Some symbologies allow a special character to be included which can | |
| 873 be detected by the scanning equipment as signifying that the data is | |
| 874 used to program or change settings in that equipment. This data is | |
| 875 usually not passed on to the software which handles normal input data. | |
| 876 This feature should only be used if you are familiar with the | |
| 877 programming codes relevant to your scanner.</p> | |
| 878 </dd> | |
| 879 <dt>ECI</dt> | |
| 880 <dd> | |
| 881 <p>The Extended Channel Interpretations (ECI) mechanism allows for | |
| 882 multi-language data to be encoded in symbols which would usually support | |
| 883 only Latin-1 (ISO/IEC 8859-1 plus ASCII) characters. This can be useful, | |
| 884 for example, if you need to encode Cyrillic characters, but should be | |
| 885 used with caution as not all scanners support this method.</p> | |
| 886 </dd> | |
| 887 </dl> | |
| 888 <p>Two other concepts that are important are raster and vector.</p> | |
| 889 <dl> | |
| 890 <dt>raster</dt> | |
| 891 <dd> | |
| 892 <p>A low level bitmap representation of an image. BMP, GIF, PCX, PNG and | |
| 893 TIF are raster file formats.</p> | |
| 894 </dd> | |
| 895 <dt>vector</dt> | |
| 896 <dd> | |
| 897 <p>A high level command- or data-based representation of an image. EMF, | |
| 898 EPS and SVG are vector file formats. They require renderers to turn them | |
| 899 into bitmaps.</p> | |
| 900 </dd> | |
| 901 </dl> | |
| 902 <h1 id="installing-zint">2. Installing Zint</h1> | |
| 903 <h2 id="linux">2.1 Linux</h2> | |
| 904 <p>The easiest way to configure compilation is to take advantage of the | |
| 905 CMake utilities. You will need to install CMake and | |
| 906 <code>libpng-dev</code> first. For instance on <code>apt</code> | |
| 907 systems:</p> | |
| 908 <div class="sourceCode" id="cb1"><pre | |
| 909 class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> apt install git cmake build-essential libpng-dev</span></code></pre></div> | |
| 910 <p>If you want to take advantage of Zint Barcode Studio you will also | |
| 911 need to have Qt and its component <code>"Desktop gcc 64-bit"</code> | |
| 912 installed, as well as <code>mesa</code>. For details see | |
| 913 <code>"README.linux"</code> in the project root directory.</p> | |
| 914 <p>Once you have fulfilled these requirements unzip the source code | |
| 915 tarball or clone the latest source</p> | |
| 916 <div class="sourceCode" id="cb2"><pre | |
| 917 class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> clone https://git.code.sf.net/p/zint/code zint</span></code></pre></div> | |
| 918 <p>and follow these steps in the top directory:</p> | |
| 919 <div class="sourceCode" id="cb3"><pre | |
| 920 class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mkdir</span> build</span> | |
| 921 <span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> build</span> | |
| 922 <span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="fu">cmake</span> ..</span> | |
| 923 <span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span> | |
| 924 <span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> make install</span></code></pre></div> | |
| 925 <p>The CLI command line program can be accessed by typing</p> | |
| 926 <div class="sourceCode" id="cb4"><pre | |
| 927 class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="pp">[</span><span class="ss">options</span><span class="pp">]</span></span></code></pre></div> | |
| 928 <p>The GUI can be accessed by typing</p> | |
| 929 <div class="sourceCode" id="cb5"><pre | |
| 930 class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint-qt</span></span></code></pre></div> | |
| 931 <p>To test that the installation has been successful a shell script is | |
| 932 included in the <code>"frontend"</code> sub-directory. To run the test | |
| 933 type</p> | |
| 934 <div class="sourceCode" id="cb6"><pre | |
| 935 class="sourceCode bash"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./test.sh</span></span></code></pre></div> | |
| 936 <p>This should create numerous files in the sub-directory | |
| 937 <code>"frontend/test_sh_out"</code> showing the many modes of operation | |
| 938 which are available from Zint.</p> | |
| 939 <h2 id="bsd">2.2 BSD</h2> | |
| 940 <p>The latest Zint CLI, <code>libzint</code> library and GUI can be | |
| 941 installed from the <code>zint</code> package on FreeBSD:</p> | |
| 942 <div class="sourceCode" id="cb7"><pre | |
| 943 class="sourceCode bash"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">su</span></span> | |
| 944 <span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">pkg</span> install zint</span> | |
| 945 <span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="bu">exit</span></span></code></pre></div> | |
| 946 <p>and on OpenBSD (where the GUI is in a separate <code>zint-gui</code> | |
| 947 package):</p> | |
| 948 <div class="sourceCode" id="cb8"><pre | |
| 949 class="sourceCode bash"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">su</span></span> | |
| 950 <span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="ex">pkg_add</span> zint zint-gui</span> | |
| 951 <span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="bu">exit</span></span></code></pre></div> | |
| 952 <p>To build from source (including for NetBSD) see | |
| 953 <code>"README.bsd"</code> in the project root directory.</p> | |
| 954 <h2 id="microsoft-windows">2.3 Microsoft Windows</h2> | |
| 955 <p>For Microsoft Windows, Zint is distributed as a binary executable. | |
| 956 Simply download the ZIP file, then right-click on the ZIP file and | |
| 957 <code>"Extract All"</code>. A new folder will be created within which | |
| 958 are two binary files:</p> | |
| 959 <ul> | |
| 960 <li><code>qtZint.exe</code> - Zint Barcode Studio</li> | |
| 961 <li><code>zint.exe</code> - Command Line Interface</li> | |
| 962 </ul> | |
| 963 <p>For fresh releases you will get a warning message from Microsoft | |
| 964 Defender SmartScreen that this is an ‘unrecognised app’. This happens | |
| 965 because Zint is a free and open-source software project with no | |
| 966 advertising and hence no income, meaning we are not able to afford the | |
| 967 $664 per year to have the application digitally signed by Microsoft.</p> | |
| 968 <p>To build Zint on Windows from source, see | |
| 969 <code>"win32/README"</code>.</p> | |
| 970 <h2 id="apple-macos">2.4 Apple macOS</h2> | |
| 971 <p>The latest Zint CLI and <code>libzint</code> can be installed using | |
| 972 Homebrew.<a href="#fn1" class="footnote-ref" id="fnref1" | |
| 973 role="doc-noteref"><sup>1</sup></a> To install Homebrew input the | |
| 974 following line into the macOS terminal</p> | |
| 975 <div class="sourceCode" id="cb9"><pre | |
| 976 class="sourceCode bash"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">/bin/bash</span> <span class="at">-c</span> <span class="st">"</span><span class="va">$(</span><span class="ex">curl</span> <span class="at">-fsSL</span> <span class="dt">\</span></span> | |
| 977 <span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh<span class="va">)</span><span class="st">"</span></span></code></pre></div> | |
| 978 <p>Once Homebrew is installed use the following command to install the | |
| 979 CLI and library</p> | |
| 980 <div class="sourceCode" id="cb10"><pre | |
| 981 class="sourceCode bash"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">brew</span> install zint</span></code></pre></div> | |
| 982 <p>To build from source (and install the GUI) see | |
| 983 <code>"README.macos"</code> in the project root directory.</p> | |
| 984 <h2 id="zint-tcl-backend">2.5 Zint Tcl Backend</h2> | |
| 985 <p>The Tcl backend in the <code>"backend_tcl"</code> sub-directory may | |
| 986 be built using the provided TEA (Tcl Extension Architecture) build on | |
| 987 Linux, Windows, macOS and Android. For Windows, an MSVC6 makefile is | |
| 988 also available. See <a href="#annex-c.-tcl-backend-binding">Annex C. Tcl | |
| 989 Backend Binding</a> for further details.</p> | |
| 990 <h1 id="using-zint-barcode-studio">3. Using Zint Barcode Studio</h1> | |
| 991 <p>Zint Barcode Studio is the graphical user interface for Zint. If you | |
| 992 are starting from a command line interface you can start the GUI by | |
| 993 typing</p> | |
| 994 <div class="sourceCode" id="cb11"><pre | |
| 995 class="sourceCode bash"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint-qt</span></span></code></pre></div> | |
| 996 <p>or on Windows</p> | |
| 997 <div class="sourceCode" id="cb12"><pre | |
| 998 class="sourceCode bash"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">qtZint.exe</span></span></code></pre></div> | |
| 999 <p>See the note in section <a href="#microsoft-windows">2.3 Microsoft | |
| 1000 Windows</a> about Microsoft Defender SmartScreen.</p> | |
| 1001 <p>Below is a brief guide to Zint Barcode Studio.</p> | |
| 1002 <h2 id="main-window-and-data-tab">3.1 Main Window and Data Tab</h2> | |
| 1003 <figure> | |
| 1004 <img src="images/gui_main.png" title="fig:" class="win" | |
| 1005 alt="Zint Barcode Studio on startup - main window with Data tab" /> | |
| 1006 <figcaption aria-hidden="true">Zint Barcode Studio on startup - main | |
| 1007 window with Data tab</figcaption> | |
| 1008 </figure> | |
| 1009 <p>This is the main window of Zint Barcode Studio. The top of the window | |
| 1010 shows a preview of the barcode that the current settings would create. | |
| 1011 These settings can be changed using the controls below. The text box in | |
| 1012 the <code>"Data to Encode"</code> groupbox on this first Data tab allows | |
| 1013 you to enter the data to be encoded. When you are happy with your | |
| 1014 settings you can use the <code>"Save..."</code> button to save the | |
| 1015 resulting image to a file.</p> | |
| 1016 <p>The <code>"Symbology"</code> drop-down box gives access to all of the | |
| 1017 symbologies supported by Zint shown in alphabetical order. The text box | |
| 1018 to its right can filter the drop-down to only show matching symbologies. | |
| 1019 For instance typing <code>"mail"</code> will only show barcodes in the | |
| 1020 drop-down whose names contain the word <code>"mail"</code>. Each word | |
| 1021 entered will match. So typing <code>"mail post"</code> will show | |
| 1022 barcodes whose names contain <code>"mail"</code> or <code>"post"</code> | |
| 1023 (or both).</p> | |
| 1024 <p>The ellipsis button <code>"..."</code> to the right of the data text | |
| 1025 box invokes the Data Dialog - see <a href="#data-dialog">3.7 Data | |
| 1026 Dialog</a> for details. The delete button <img | |
| 1027 src="images/gui_delete.png" class="btn" alt="delete" /> next to it will | |
| 1028 clear the data text box and the ECI (Extended Channel Interpretations) | |
| 1029 drop-down if set.</p> | |
| 1030 <p>To set the barcode as a Programming Initialisation symbol click the | |
| 1031 <code>"Reader Init"</code> checkbox. The <code>"1234.."</code> button to | |
| 1032 its right invokes the Sequence Dialog - see <a | |
| 1033 href="#sequence-dialog">3.8 Sequence Dialog</a>. The zap button <img | |
| 1034 src="images/gui_zap.png" class="btn" alt="zap" /> will clear all data | |
| 1035 and reset all settings for the barcode to defaults.</p> | |
| 1036 <p>The <code>"BMP"</code> and <code>"SVG"</code> buttons at the bottom | |
| 1037 will copy the image to the clipboard in BMP format and SVG format | |
| 1038 respectively. Further copy-to-clipboard formats are available by | |
| 1039 clicking the <code>"Menu"</code> button, along with | |
| 1040 <code>"CLI Equivalent..."</code>, <code>"Save As..."</code>, | |
| 1041 <code>"Factory Reset..."</code>, <code>"Help"</code>, | |
| 1042 <code>"About..."</code> and <code>"Quit"</code> options. Most of the | |
| 1043 options are also available in a context menu by right-clicking the | |
| 1044 preview.</p> | |
| 1045 <figure> | |
| 1046 <img src="images/gui_menus.png" title="fig:" class="win" | |
| 1047 alt="Zint Barcode Studio main menu (left) and context menu (right)" /> | |
| 1048 <figcaption aria-hidden="true">Zint Barcode Studio main menu (left) and | |
| 1049 context menu (right)</figcaption> | |
| 1050 </figure> | |
| 1051 <h2 id="gs1-composite-groupbox">3.2 GS1 Composite Groupbox</h2> | |
| 1052 <figure> | |
| 1053 <img src="images/gui_composite.png" title="fig:" class="win" | |
| 1054 alt="Zint Barcode Studio encoding GS1 Composite data" /> | |
| 1055 <figcaption aria-hidden="true">Zint Barcode Studio encoding GS1 | |
| 1056 Composite data</figcaption> | |
| 1057 </figure> | |
| 1058 <p>In the middle of the Data tab is an area for creating composite | |
| 1059 symbologies which appears when the currently selected symbology is | |
| 1060 supported by the GS1 Composite symbology standard. GS1 data can then be | |
| 1061 entered with square brackets used to separate Application Identifier | |
| 1062 (AI) information from data as shown here. For details, see <a | |
| 1063 href="#gs1-composite-symbols-iso-24723">6.3 GS1 Composite Symbols (ISO | |
| 1064 24723)</a>.</p> | |
| 1065 <h2 id="additional-ecidata-segments-groupbox">3.3 Additional ECI/Data | |
| 1066 Segments Groupbox</h2> | |
| 1067 <figure> | |
| 1068 <img src="images/gui_segs.png" title="fig:" class="win" | |
| 1069 alt="Zint Barcode Studio encoding multiple segments" /> | |
| 1070 <figcaption aria-hidden="true">Zint Barcode Studio encoding multiple | |
| 1071 segments</figcaption> | |
| 1072 </figure> | |
| 1073 <p>For symbologies that support ECIs (Extended Channel Interpretations) | |
| 1074 the middle of the Data tab is an area for entering additional data | |
| 1075 segments with their own ECIs. Up to 4 segments (including the main | |
| 1076 <code>"Data to Encode"</code> as segment 0) may be specified. See <a | |
| 1077 href="#multiple-segments">4.16 Multiple Segments</a> for details.</p> | |
| 1078 <h2 id="symbology-specific-groupbox">3.4 Symbology-specific | |
| 1079 Groupbox</h2> | |
| 1080 <figure> | |
| 1081 <img src="images/gui_c25inter.png" title="fig:" class="win" | |
| 1082 alt="Zint Barcode Studio showing Code 2 of 5 Interleaved settings" /> | |
| 1083 <figcaption aria-hidden="true">Zint Barcode Studio showing Code 2 of 5 | |
| 1084 Interleaved settings</figcaption> | |
| 1085 </figure> | |
| 1086 <p>Many symbologies have extra options to change the content, format and | |
| 1087 appearance of the symbol generated. For those with few additional | |
| 1088 options (and no support for GS1 data or ECIs), the middle of the Data | |
| 1089 tab is an area for setting those options.</p> | |
| 1090 <p>Here is shown the check digit options for an Interleaved Code 2 of 5 | |
| 1091 symbol (see <a href="#interleaved-code-2-of-5-iso-16390">6.1.2.4 | |
| 1092 Interleaved Code 2 of 5 (ISO 16390)</a>).</p> | |
| 1093 <p>Symbologies with more than a few options (or support for GS1 data or | |
| 1094 ECIs) have a second Symbology-specific tab, shown next.</p> | |
| 1095 <h2 id="symbology-specific-tab">3.5 Symbology-specific Tab</h2> | |
| 1096 <figure> | |
| 1097 <img src="images/gui_aztec.png" title="fig:" class="win" | |
| 1098 alt="Zint Barcode Studio showing Aztec Code options" /> | |
| 1099 <figcaption aria-hidden="true">Zint Barcode Studio showing Aztec Code | |
| 1100 options</figcaption> | |
| 1101 </figure> | |
| 1102 <p>A second tab appears for those symbologies with more than a few extra | |
| 1103 options.</p> | |
| 1104 <p>Here is shown the options available for an Aztec Code symbol.</p> | |
| 1105 <p>You can adjust its size or error correction level (see <a | |
| 1106 href="#aztec-code-iso-24778">6.6.8 Aztec Code (ISO 24778)</a>), select | |
| 1107 how its data is to be treated (see <a href="#input-modes">4.11 Input | |
| 1108 Modes</a>), and set it as part of a Structured Append sequence of | |
| 1109 symbols (see <a href="#structured-append">4.17 Structured | |
| 1110 Append</a>).</p> | |
| 1111 <h2 id="appearance-tab">3.6 Appearance Tab</h2> | |
| 1112 <figure> | |
| 1113 <img src="images/gui_appearance.png" title="fig:" class="win" | |
| 1114 alt="Zint Barcode Studio showing Appearance tab options" /> | |
| 1115 <figcaption aria-hidden="true">Zint Barcode Studio showing Appearance | |
| 1116 tab options</figcaption> | |
| 1117 </figure> | |
| 1118 <p>The Appearance tab can be used to adjust the dimensions and other | |
| 1119 properties of the symbol.</p> | |
| 1120 <p>The <code>"Height"</code> value affects the height of symbologies | |
| 1121 which do not have a fixed width-to-height ratio, i.e. those other than | |
| 1122 matrix symbologies. For such symbologies the | |
| 1123 <code>"Automatic Height"</code> checkbox will be enabled - uncheck this | |
| 1124 to manually adjust the height. The <code>"Compliant Height"</code> | |
| 1125 checkbox applies to symbologies that define a standard height - see <a | |
| 1126 href="#adjusting-height">4.4 Adjusting Height</a>.</p> | |
| 1127 <p>Boundary bars can be added with the <code>"Border Type"</code> | |
| 1128 drop-down and their size adjusted with <code>"Border Width"</code>, and | |
| 1129 whitespace can be adjusted both horizontally (first spinbox) and | |
| 1130 vertically (second spinbox), and also through the | |
| 1131 <code>"Quiet Zones"</code> checkbox if standard quiet zones are defined | |
| 1132 for the symbology.</p> | |
| 1133 <p>The size of the saved image can be specified with | |
| 1134 <code>"Printing Scale"</code>, and also by clicking the <img | |
| 1135 src="images/gui_scaling.png" class="btn" alt="scaling" /> icon to invoke | |
| 1136 the Set Printing Scale Dialog - see <a | |
| 1137 href="#adjusting-image-size-x-dimension">4.9 Adjusting Image Size | |
| 1138 (X-dimension)</a> for further details.</p> | |
| 1139 <figure> | |
| 1140 <img src="images/gui_set_printing_scale.png" title="fig:" class="pop" | |
| 1141 alt="Adjusting the Print Size" /> | |
| 1142 <figcaption aria-hidden="true">Adjusting the Print Size</figcaption> | |
| 1143 </figure> | |
| 1144 <p>The foreground and background colours can be set either using the | |
| 1145 text boxes which accept <code>"RRGGBBAA"</code> hexadecimal values and | |
| 1146 <code>"C,M,Y,K"</code> decimal percentage values, or by clicking the | |
| 1147 foreground eye <img src="images/gui_black_eye.png" class="btn" | |
| 1148 alt="eye" /> and background eye <img src="images/gui_white_eye.png" | |
| 1149 class="btn" alt="eye" /> buttons which invoke a colour picker.</p> | |
| 1150 <figure> | |
| 1151 <img src="images/gui_colour.png" title="fig:" class="pop" | |
| 1152 alt="The colour picker tool" /> | |
| 1153 <figcaption aria-hidden="true">The colour picker tool</figcaption> | |
| 1154 </figure> | |
| 1155 <p>(Note that to change the colours visually, the luminence slider, the | |
| 1156 long narrow column on the right, must be adjusted.) The color picker | |
| 1157 only deals in RGB(A), and will overwrite any CMYK values with RGB(A) | |
| 1158 values once <code>"OK"</code> is selected.</p> | |
| 1159 <p>Back in the Appearance tab, the colours can be reset to | |
| 1160 black-on-white using the <code>"Reset"</code> button, and exchanged one | |
| 1161 for the other using the swap <img src="images/gui_swap.png" class="btn" | |
| 1162 alt="swap" /> button next to it.</p> | |
| 1163 <h2 id="data-dialog">3.7 Data Dialog</h2> | |
| 1164 <figure> | |
| 1165 <img src="images/gui_data_dialog.png" title="fig:" class="pop" | |
| 1166 alt="Entering longer text input" /> | |
| 1167 <figcaption aria-hidden="true">Entering longer text input</figcaption> | |
| 1168 </figure> | |
| 1169 <p>Clicking on the ellipsis <code>"..."</code> button next to the | |
| 1170 <code>"Data to Encode"</code> text box in the Data tab opens a larger | |
| 1171 window which can be used to enter longer strings of text. You can also | |
| 1172 use this window to load data from a file.</p> | |
| 1173 <p>The dialog is also available for additional ECI/Data segments by | |
| 1174 clicking the ellipsis button to the right of their data text boxes.</p> | |
| 1175 <p>Note that if your data contains line feeds (<code>LF</code>) then the | |
| 1176 data will be split into separate lines in the dialog box. On saving the | |
| 1177 data back to the main text box any separate lines in the data will be | |
| 1178 escaped as <code>'\n'</code> and the <code>"Parse Escapes"</code> | |
| 1179 checkbox will be set. This only affects line feeds, not carriage returns | |
| 1180 (<code>CR</code>) or <code>CR+LF</code> pairs, and behaves the same on | |
| 1181 both Windows and Unix. (For details on escape sequences, see <a | |
| 1182 href="#inputting-data">4.1 Inputting Data</a>.)</p> | |
| 1183 <h2 id="sequence-dialog">3.8 Sequence Dialog</h2> | |
| 1184 <figure> | |
| 1185 <img src="images/gui_sequence.png" title="fig:" class="pop" | |
| 1186 alt="Creating a sequence of barcode symbols" /> | |
| 1187 <figcaption aria-hidden="true">Creating a sequence of barcode | |
| 1188 symbols</figcaption> | |
| 1189 </figure> | |
| 1190 <p>Clicking on the sequence button (labelled <code>"1234.."</code>) in | |
| 1191 the Data tab opens the Sequence Dialog. This allows you to create | |
| 1192 multiple barcode images by entering a sequence of data inputs in the | |
| 1193 right hand panel. Sequences can also be automatically generated by | |
| 1194 entering parameters on the left hand side or by importing the data from | |
| 1195 a file. Zint will generate a separate barcode image for each line of | |
| 1196 text in the right hand panel. The format field determines the format of | |
| 1197 the automatically generated sequence where characters have the meanings | |
| 1198 as given below:</p> | |
| 1199 <div id="tbl:sequence_format_characters" class="tablenos"> | |
| 1200 <table id="tbl:sequence_format_characters" | |
| 1201 data-tag=": Sequence Format Characters"> | |
| 1202 <caption><span>Table : Sequence Format Characters</span> </caption> | |
| 1203 <thead> | |
| 1204 <tr> | |
| 1205 <th style="text-align: left;">Character</th> | |
| 1206 <th style="text-align: left;">Effect</th> | |
| 1207 </tr> | |
| 1208 </thead> | |
| 1209 <tbody> | |
| 1210 <tr> | |
| 1211 <td style="text-align: left;"><code>$</code></td> | |
| 1212 <td style="text-align: left;">Insert leading zeroes</td> | |
| 1213 </tr> | |
| 1214 <tr> | |
| 1215 <td style="text-align: left;"><code>#</code></td> | |
| 1216 <td style="text-align: left;">Insert leading spaces</td> | |
| 1217 </tr> | |
| 1218 <tr> | |
| 1219 <td style="text-align: left;"><code>*</code></td> | |
| 1220 <td style="text-align: left;">Insert leading asterisks</td> | |
| 1221 </tr> | |
| 1222 <tr> | |
| 1223 <td style="text-align: left;">Any other character</td> | |
| 1224 <td style="text-align: left;">Interpreted literally</td> | |
| 1225 </tr> | |
| 1226 </tbody> | |
| 1227 </table> | |
| 1228 </div> | |
| 1229 <p>Once you’re happy with the Sequence Data, click the | |
| 1230 <code>"Export..."</code> button to bring up the Export Dialog, discussed | |
| 1231 next.</p> | |
| 1232 <h2 id="export-dialog">3.9 Export Dialog</h2> | |
| 1233 <figure> | |
| 1234 <img src="images/gui_export.png" title="fig:" class="pop" | |
| 1235 alt="Setting filenames for an exported sequence of barcode symbols" /> | |
| 1236 <figcaption aria-hidden="true">Setting filenames for an exported | |
| 1237 sequence of barcode symbols</figcaption> | |
| 1238 </figure> | |
| 1239 <p>The Export Dialog invoked by pressing the <code>"Export..."</code> | |
| 1240 button in the Sequence Dialog sets the parameters for exporting the | |
| 1241 sequence of barcode images. Here you can set the output directory, the | |
| 1242 format of the output filenames and what their image type will be. Note | |
| 1243 that the symbology, colour and other formatting information are taken | |
| 1244 from the main window.</p> | |
| 1245 <h2 id="cli-equivalent-dialog">3.10 CLI Equivalent Dialog</h2> | |
| 1246 <figure> | |
| 1247 <img src="images/gui_cli_equivalent.png" title="fig:" class="pop" | |
| 1248 alt="CLI Equivalent Dialog" /> | |
| 1249 <figcaption aria-hidden="true">CLI Equivalent Dialog</figcaption> | |
| 1250 </figure> | |
| 1251 <p>The CLI Equivalent Dialog can be invoked from the main menu or the | |
| 1252 context menu and displays the CLI command that will reproduce the | |
| 1253 barcode as currently configured in the GUI. Press the | |
| 1254 <code>"Copy"</code> button to copy the command to the clipboard, which | |
| 1255 can then be pasted into the command line.</p> | |
| 1256 <h1 id="using-the-command-line">4. Using the Command Line</h1> | |
| 1257 <p>This section describes how to encode data using the command line | |
| 1258 frontend (CLI) program. The examples given are for the Unix platform, | |
| 1259 but the same options are available for Windows - just remember to | |
| 1260 include the executable file extension if <code>".EXE"</code> is not in | |
| 1261 your <code>PATHEXT</code> environment variable, i.e.:</p> | |
| 1262 <div class="sourceCode" id="cb13"><pre | |
| 1263 class="sourceCode bash"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint.exe</span> <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 1264 <p>For compatibility with Windows the examples use double quotes to | |
| 1265 delimit data, though on Unix single quotes are generally preferable as | |
| 1266 they stop the shell from processing any characters such as backslash or | |
| 1267 dollar. A single quote itself is dealt with by terminating the | |
| 1268 single-quoted text, backslashing the single quote, and then | |
| 1269 continuing:</p> | |
| 1270 <div class="sourceCode" id="cb14"><pre | |
| 1271 class="sourceCode bash"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-d</span> <span class="st">'Text containing a single quote '</span><span class="dt">\'</span><span class="st">' in the middle'</span></span></code></pre></div> | |
| 1272 <p>Some examples use backslash (<code>\</code>) to continue commands | |
| 1273 onto the next line. For Windows, use caret (<code>^</code>) instead.</p> | |
| 1274 <p>Certain options that take values have short names as well as long | |
| 1275 ones, namely <code>-b</code> (<code>--barcode</code>), <code>-d</code> | |
| 1276 (<code>--data</code>), <code>-i</code> (<code>--input</code>), | |
| 1277 <code>-o</code> (<code>--output</code>) and <code>-w</code> | |
| 1278 (<code>--whitesp</code>). For these a space should be used to separate | |
| 1279 the short name from its value, to avoid ambiguity. For long names a | |
| 1280 space or an equals sign may be used. For instance:</p> | |
| 1281 <div class="sourceCode" id="cb15"><pre | |
| 1282 class="sourceCode bash"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-d</span> <span class="st">"This Text"</span></span> | |
| 1283 <span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--data</span><span class="op">=</span><span class="st">"This Text"</span></span> | |
| 1284 <span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--data</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 1285 <p>The examples use a space separator for short option names, and an | |
| 1286 equals sign for long option names.</p> | |
| 1287 <h2 id="inputting-data">4.1 Inputting Data</h2> | |
| 1288 <p>The data to encode can be entered at the command line using the | |
| 1289 <code>-d</code> or <code>--data</code> option, for example</p> | |
| 1290 <div class="sourceCode" id="cb16"><pre | |
| 1291 class="sourceCode bash"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 1292 <p>This will encode the text <code>"This Text"</code>. Zint will use the | |
| 1293 default symbology, Code 128, and output to the default file | |
| 1294 <code>"out.png"</code> in the current directory. Alternatively, if | |
| 1295 <code>libpng</code> was not present when Zint was built, the default | |
| 1296 output file will be <code>"out.gif"</code>.</p> | |
| 1297 <p>The data input to the Zint CLI is assumed to be encoded in UTF-8 | |
| 1298 (Unicode) format (Zint will correctly handle UTF-8 data on Windows). If | |
| 1299 you are encoding characters beyond the 7-bit ASCII set using a scheme | |
| 1300 other than UTF-8 then you will need to set the appropriate input options | |
| 1301 as shown in <a href="#input-modes">4.11 Input Modes</a> below.</p> | |
| 1302 <p>Non-printing characters can be entered on the command line using | |
| 1303 backslash (<code>\</code>) as an escape character in combination with | |
| 1304 the <code>--esc</code> switch. Permissible sequences are shown in the | |
| 1305 table below.</p> | |
| 1306 <div id="tbl:escape_sequences" class="tablenos"> | |
| 1307 <table id="tbl:escape_sequences" data-tag=": Escape Sequences"> | |
| 1308 <caption><span>Table : Escape Sequences</span> </caption> | |
| 1309 <colgroup> | |
| 1310 <col style="width: 15%" /> | |
| 1311 <col style="width: 15%" /> | |
| 1312 <col style="width: 10%" /> | |
| 1313 <col style="width: 57%" /> | |
| 1314 </colgroup> | |
| 1315 <thead> | |
| 1316 <tr> | |
| 1317 <th style="text-align: left;">Escape Sequence</th> | |
| 1318 <th style="text-align: left;">ASCII Equivalent</th> | |
| 1319 <th style="text-align: left;">Name</th> | |
| 1320 <th style="text-align: left;">Interpretation</th> | |
| 1321 </tr> | |
| 1322 </thead> | |
| 1323 <tbody> | |
| 1324 <tr> | |
| 1325 <td style="text-align: left;"><code>\0</code></td> | |
| 1326 <td style="text-align: left;">0x00</td> | |
| 1327 <td style="text-align: left;"><code>NUL</code></td> | |
| 1328 <td style="text-align: left;">Null character</td> | |
| 1329 </tr> | |
| 1330 <tr> | |
| 1331 <td style="text-align: left;"><code>\E</code></td> | |
| 1332 <td style="text-align: left;">0x04</td> | |
| 1333 <td style="text-align: left;"><code>EOT</code></td> | |
| 1334 <td style="text-align: left;">End of Transmission</td> | |
| 1335 </tr> | |
| 1336 <tr> | |
| 1337 <td style="text-align: left;"><code>\a</code></td> | |
| 1338 <td style="text-align: left;">0x07</td> | |
| 1339 <td style="text-align: left;"><code>BEL</code></td> | |
| 1340 <td style="text-align: left;">Bell</td> | |
| 1341 </tr> | |
| 1342 <tr> | |
| 1343 <td style="text-align: left;"><code>\b</code></td> | |
| 1344 <td style="text-align: left;">0x08</td> | |
| 1345 <td style="text-align: left;"><code>BS</code></td> | |
| 1346 <td style="text-align: left;">Backspace</td> | |
| 1347 </tr> | |
| 1348 <tr> | |
| 1349 <td style="text-align: left;"><code>\t</code></td> | |
| 1350 <td style="text-align: left;">0x09</td> | |
| 1351 <td style="text-align: left;"><code>HT</code></td> | |
| 1352 <td style="text-align: left;">Horizontal Tab</td> | |
| 1353 </tr> | |
| 1354 <tr> | |
| 1355 <td style="text-align: left;"><code>\n</code></td> | |
| 1356 <td style="text-align: left;">0x0A</td> | |
| 1357 <td style="text-align: left;"><code>LF</code></td> | |
| 1358 <td style="text-align: left;">Line Feed</td> | |
| 1359 </tr> | |
| 1360 <tr> | |
| 1361 <td style="text-align: left;"><code>\v</code></td> | |
| 1362 <td style="text-align: left;">0x0B</td> | |
| 1363 <td style="text-align: left;"><code>VT</code></td> | |
| 1364 <td style="text-align: left;">Vertical Tab</td> | |
| 1365 </tr> | |
| 1366 <tr> | |
| 1367 <td style="text-align: left;"><code>\f</code></td> | |
| 1368 <td style="text-align: left;">0x0C</td> | |
| 1369 <td style="text-align: left;"><code>FF</code></td> | |
| 1370 <td style="text-align: left;">Form Feed</td> | |
| 1371 </tr> | |
| 1372 <tr> | |
| 1373 <td style="text-align: left;"><code>\r</code></td> | |
| 1374 <td style="text-align: left;">0x0D</td> | |
| 1375 <td style="text-align: left;"><code>CR</code></td> | |
| 1376 <td style="text-align: left;">Carriage Return</td> | |
| 1377 </tr> | |
| 1378 <tr> | |
| 1379 <td style="text-align: left;"><code>\e</code></td> | |
| 1380 <td style="text-align: left;">0x1B</td> | |
| 1381 <td style="text-align: left;"><code>ESC</code></td> | |
| 1382 <td style="text-align: left;">Escape</td> | |
| 1383 </tr> | |
| 1384 <tr> | |
| 1385 <td style="text-align: left;"><code>\G</code></td> | |
| 1386 <td style="text-align: left;">0x1D</td> | |
| 1387 <td style="text-align: left;"><code>GS</code></td> | |
| 1388 <td style="text-align: left;">Group Separator</td> | |
| 1389 </tr> | |
| 1390 <tr> | |
| 1391 <td style="text-align: left;"><code>\R</code></td> | |
| 1392 <td style="text-align: left;">0x1E</td> | |
| 1393 <td style="text-align: left;"><code>RS</code></td> | |
| 1394 <td style="text-align: left;">Record Separator</td> | |
| 1395 </tr> | |
| 1396 <tr> | |
| 1397 <td style="text-align: left;"><code>\\</code></td> | |
| 1398 <td style="text-align: left;">0x5C</td> | |
| 1399 <td style="text-align: left;"><code>\</code></td> | |
| 1400 <td style="text-align: left;">Backslash</td> | |
| 1401 </tr> | |
| 1402 <tr> | |
| 1403 <td style="text-align: left;"><code>\dNNN</code></td> | |
| 1404 <td style="text-align: left;">NNN</td> | |
| 1405 <td style="text-align: left;"></td> | |
| 1406 <td style="text-align: left;">Any 8-bit character where NNN is decimal | |
| 1407 (000-255)</td> | |
| 1408 </tr> | |
| 1409 <tr> | |
| 1410 <td style="text-align: left;"><code>\oNNN</code></td> | |
| 1411 <td style="text-align: left;">0oNNN</td> | |
| 1412 <td style="text-align: left;"></td> | |
| 1413 <td style="text-align: left;">Any 8-bit character where NNN is octal | |
| 1414 (000-377)</td> | |
| 1415 </tr> | |
| 1416 <tr> | |
| 1417 <td style="text-align: left;"><code>\xNN</code></td> | |
| 1418 <td style="text-align: left;">0xNN</td> | |
| 1419 <td style="text-align: left;"></td> | |
| 1420 <td style="text-align: left;">Any 8-bit character where NN is | |
| 1421 hexadecimal (00-FF)</td> | |
| 1422 </tr> | |
| 1423 <tr> | |
| 1424 <td style="text-align: left;"><code>\uNNNN</code></td> | |
| 1425 <td style="text-align: left;"></td> | |
| 1426 <td style="text-align: left;"></td> | |
| 1427 <td style="text-align: left;">Any 16-bit Unicode BMP<a href="#fn2" | |
| 1428 class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> | |
| 1429 character where NNNN is hexadecimal (0000-FFFF)</td> | |
| 1430 </tr> | |
| 1431 <tr> | |
| 1432 <td style="text-align: left;"><code>\UNNNNNN</code></td> | |
| 1433 <td style="text-align: left;"></td> | |
| 1434 <td style="text-align: left;"></td> | |
| 1435 <td style="text-align: left;">Any 21-bit Unicode character where NNNNNN | |
| 1436 is hexadecimal (000000-10FFFF)</td> | |
| 1437 </tr> | |
| 1438 </tbody> | |
| 1439 </table> | |
| 1440 </div> | |
| 1441 <p>(Special escape sequences are available for Code 128 only to manually | |
| 1442 switch Code Sets and insert special FNC1 characters - see <a | |
| 1443 href="#standard-code-128-iso-15417">6.1.10.1 Standard Code 128 (ISO | |
| 1444 15417)</a> for details.)</p> | |
| 1445 <p>Input data can be read directly from file using the <code>-i</code> | |
| 1446 or <code>--input</code> switch as shown below. The input file is assumed | |
| 1447 to be UTF-8 formatted unless an alternative mode is selected. This | |
| 1448 option replaces the use of the <code>-d</code> switch.</p> | |
| 1449 <div class="sourceCode" id="cb17"><pre | |
| 1450 class="sourceCode bash"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-i</span> somefile.txt</span></code></pre></div> | |
| 1451 <p>To read from stdin specify a single hyphen <code>"-"</code> as the | |
| 1452 input file.</p> | |
| 1453 <p>Note that except when batch processing (see <a | |
| 1454 href="#batch-processing">4.12 Batch Processing</a> below), the file (or | |
| 1455 stdin) should not end with a newline (<code>LF</code> on Unix, | |
| 1456 <code>CR+LF</code> on Windows) unless you want the newline to be encoded | |
| 1457 in the symbol.</p> | |
| 1458 <h2 id="directing-output">4.2 Directing Output</h2> | |
| 1459 <p>Output can be directed to a file other than the default using the | |
| 1460 <code>-o</code> or <code>--output</code> switch. For example:</p> | |
| 1461 <div class="sourceCode" id="cb18"><pre | |
| 1462 class="sourceCode bash"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-o</span> here.png <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 1463 <p>This draws a Code 128 barcode in the file <code>"here.png"</code>. If | |
| 1464 an Encapsulated PostScript file is needed simply append the filename | |
| 1465 with <code>".eps"</code>, and so on for the other supported file | |
| 1466 types:</p> | |
| 1467 <div class="sourceCode" id="cb19"><pre | |
| 1468 class="sourceCode bash"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-o</span> there.eps <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 1469 <p>The currently supported output file formats are shown in the | |
| 1470 following table.</p> | |
| 1471 <div id="tbl:output_file_formats" class="tablenos"> | |
| 1472 <table id="tbl:output_file_formats" data-tag=": Output File Formats"> | |
| 1473 <caption><span>Table : Output File Formats</span> </caption> | |
| 1474 <thead> | |
| 1475 <tr> | |
| 1476 <th>Extension</th> | |
| 1477 <th style="text-align: left;">File format</th> | |
| 1478 </tr> | |
| 1479 </thead> | |
| 1480 <tbody> | |
| 1481 <tr> | |
| 1482 <td>bmp</td> | |
| 1483 <td style="text-align: left;">Windows Bitmap</td> | |
| 1484 </tr> | |
| 1485 <tr> | |
| 1486 <td>emf</td> | |
| 1487 <td style="text-align: left;">Enhanced Metafile Format</td> | |
| 1488 </tr> | |
| 1489 <tr> | |
| 1490 <td>eps</td> | |
| 1491 <td style="text-align: left;">Encapsulated PostScript</td> | |
| 1492 </tr> | |
| 1493 <tr> | |
| 1494 <td>gif</td> | |
| 1495 <td style="text-align: left;">Graphics Interchange Format</td> | |
| 1496 </tr> | |
| 1497 <tr> | |
| 1498 <td>pcx</td> | |
| 1499 <td style="text-align: left;">ZSoft Paintbrush image</td> | |
| 1500 </tr> | |
| 1501 <tr> | |
| 1502 <td>png</td> | |
| 1503 <td style="text-align: left;">Portable Network Graphic</td> | |
| 1504 </tr> | |
| 1505 <tr> | |
| 1506 <td>svg</td> | |
| 1507 <td style="text-align: left;">Scalable Vector Graphic</td> | |
| 1508 </tr> | |
| 1509 <tr> | |
| 1510 <td>tif</td> | |
| 1511 <td style="text-align: left;">Tagged Image File Format</td> | |
| 1512 </tr> | |
| 1513 <tr> | |
| 1514 <td>txt</td> | |
| 1515 <td style="text-align: left;">Text file (see <a | |
| 1516 href="#other-options">4.19 Other Options</a>)</td> | |
| 1517 </tr> | |
| 1518 </tbody> | |
| 1519 </table> | |
| 1520 </div> | |
| 1521 <p>The filename can contain directories and sub-directories also, which | |
| 1522 will be created if they don’t already exist:</p> | |
| 1523 <div class="sourceCode" id="cb20"><pre | |
| 1524 class="sourceCode bash"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-o</span> <span class="st">"dir/subdir/filename.eps"</span> <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 1525 <p>Note that on Windows, filenames are assumed to be UTF-8 encoded.</p> | |
| 1526 <h2 id="selecting-barcode-type">4.3 Selecting Barcode Type</h2> | |
| 1527 <p>Selecting which type of barcode you wish to produce (i.e. which | |
| 1528 symbology to use) can be done at the command line using the | |
| 1529 <code>-b</code> or <code>--barcode</code> switch followed by the | |
| 1530 appropriate integer value or name in the following table. For example to | |
| 1531 create a Data Matrix symbol you could use:</p> | |
| 1532 <div class="sourceCode" id="cb21"><pre | |
| 1533 class="sourceCode bash"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">-o</span> datamatrix.png <span class="at">-d</span> <span class="st">"Data to encode"</span></span></code></pre></div> | |
| 1534 <p>or</p> | |
| 1535 <div class="sourceCode" id="cb22"><pre | |
| 1536 class="sourceCode bash"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> DATAMATRIX <span class="at">-o</span> datamatrix.png <span class="at">-d</span> <span class="st">"Data to encode"</span></span></code></pre></div> | |
| 1537 <p>Names are treated case-insensitively by the CLI, and the | |
| 1538 <code>BARCODE_</code> prefix and any underscores are optional.</p> | |
| 1539 <div id="tbl:barcode_types" class="tablenos"> | |
| 1540 <table id="tbl:barcode_types" data-tag=": Barcode Types (Symbologies)"> | |
| 1541 <caption><span>Table : Barcode Types (Symbologies)</span> </caption> | |
| 1542 <colgroup> | |
| 1543 <col style="width: 11%" /> | |
| 1544 <col style="width: 33%" /> | |
| 1545 <col style="width: 55%" /> | |
| 1546 </colgroup> | |
| 1547 <thead> | |
| 1548 <tr> | |
| 1549 <th style="text-align: left;">Numeric Value</th> | |
| 1550 <th style="text-align: left;">Name<a href="#fn3" class="footnote-ref" | |
| 1551 id="fnref3" role="doc-noteref"><sup>3</sup></a></th> | |
| 1552 <th style="text-align: left;">Barcode Name</th> | |
| 1553 </tr> | |
| 1554 </thead> | |
| 1555 <tbody> | |
| 1556 <tr> | |
| 1557 <td style="text-align: left;">1</td> | |
| 1558 <td style="text-align: left;"><code>BARCODE_CODE11</code></td> | |
| 1559 <td style="text-align: left;">Code 11</td> | |
| 1560 </tr> | |
| 1561 <tr> | |
| 1562 <td style="text-align: left;">2<code>*</code></td> | |
| 1563 <td style="text-align: left;"><code>BARCODE_C25STANDARD</code></td> | |
| 1564 <td style="text-align: left;">Standard Code 2 of 5</td> | |
| 1565 </tr> | |
| 1566 <tr> | |
| 1567 <td style="text-align: left;">3</td> | |
| 1568 <td style="text-align: left;"><code>BARCODE_C25INTER</code></td> | |
| 1569 <td style="text-align: left;">Interleaved 2 of 5</td> | |
| 1570 </tr> | |
| 1571 <tr> | |
| 1572 <td style="text-align: left;">4</td> | |
| 1573 <td style="text-align: left;"><code>BARCODE_C25IATA</code></td> | |
| 1574 <td style="text-align: left;">Code 2 of 5 IATA</td> | |
| 1575 </tr> | |
| 1576 <tr> | |
| 1577 <td style="text-align: left;">6</td> | |
| 1578 <td style="text-align: left;"><code>BARCODE_C25LOGIC</code></td> | |
| 1579 <td style="text-align: left;">Code 2 of 5 Data Logic</td> | |
| 1580 </tr> | |
| 1581 <tr> | |
| 1582 <td style="text-align: left;">7</td> | |
| 1583 <td style="text-align: left;"><code>BARCODE_C25IND</code></td> | |
| 1584 <td style="text-align: left;">Code 2 of 5 Industrial</td> | |
| 1585 </tr> | |
| 1586 <tr> | |
| 1587 <td style="text-align: left;">8</td> | |
| 1588 <td style="text-align: left;"><code>BARCODE_CODE39</code></td> | |
| 1589 <td style="text-align: left;">Code 3 of 9 (Code 39)</td> | |
| 1590 </tr> | |
| 1591 <tr> | |
| 1592 <td style="text-align: left;">9</td> | |
| 1593 <td style="text-align: left;"><code>BARCODE_EXCODE39</code></td> | |
| 1594 <td style="text-align: left;">Extended Code 3 of 9 (Code 39+)</td> | |
| 1595 </tr> | |
| 1596 <tr> | |
| 1597 <td style="text-align: left;">13</td> | |
| 1598 <td style="text-align: left;"><code>BARCODE_EANX</code></td> | |
| 1599 <td style="text-align: left;">EAN (EAN-2, EAN-5, EAN-8 and EAN-13)</td> | |
| 1600 </tr> | |
| 1601 <tr> | |
| 1602 <td style="text-align: left;">14</td> | |
| 1603 <td style="text-align: left;"><code>BARCODE_EANX_CHK</code></td> | |
| 1604 <td style="text-align: left;">EAN + Check Digit</td> | |
| 1605 </tr> | |
| 1606 <tr> | |
| 1607 <td style="text-align: left;">16<code>*</code></td> | |
| 1608 <td style="text-align: left;"><code>BARCODE_GS1_128</code></td> | |
| 1609 <td style="text-align: left;">GS1-128 (UCC.EAN-128)</td> | |
| 1610 </tr> | |
| 1611 <tr> | |
| 1612 <td style="text-align: left;">18</td> | |
| 1613 <td style="text-align: left;"><code>BARCODE_CODABAR</code></td> | |
| 1614 <td style="text-align: left;">Codabar</td> | |
| 1615 </tr> | |
| 1616 <tr> | |
| 1617 <td style="text-align: left;">20</td> | |
| 1618 <td style="text-align: left;"><code>BARCODE_CODE128</code></td> | |
| 1619 <td style="text-align: left;">Code 128 (automatic Code Set | |
| 1620 switching)</td> | |
| 1621 </tr> | |
| 1622 <tr> | |
| 1623 <td style="text-align: left;">21</td> | |
| 1624 <td style="text-align: left;"><code>BARCODE_DPLEIT</code></td> | |
| 1625 <td style="text-align: left;">Deutsche Post Leitcode</td> | |
| 1626 </tr> | |
| 1627 <tr> | |
| 1628 <td style="text-align: left;">22</td> | |
| 1629 <td style="text-align: left;"><code>BARCODE_DPIDENT</code></td> | |
| 1630 <td style="text-align: left;">Deutsche Post Identcode</td> | |
| 1631 </tr> | |
| 1632 <tr> | |
| 1633 <td style="text-align: left;">23</td> | |
| 1634 <td style="text-align: left;"><code>BARCODE_CODE16K</code></td> | |
| 1635 <td style="text-align: left;">Code 16K</td> | |
| 1636 </tr> | |
| 1637 <tr> | |
| 1638 <td style="text-align: left;">24</td> | |
| 1639 <td style="text-align: left;"><code>BARCODE_CODE49</code></td> | |
| 1640 <td style="text-align: left;">Code 49</td> | |
| 1641 </tr> | |
| 1642 <tr> | |
| 1643 <td style="text-align: left;">25</td> | |
| 1644 <td style="text-align: left;"><code>BARCODE_CODE93</code></td> | |
| 1645 <td style="text-align: left;">Code 93</td> | |
| 1646 </tr> | |
| 1647 <tr> | |
| 1648 <td style="text-align: left;">28</td> | |
| 1649 <td style="text-align: left;"><code>BARCODE_FLAT</code></td> | |
| 1650 <td style="text-align: left;">Flattermarken</td> | |
| 1651 </tr> | |
| 1652 <tr> | |
| 1653 <td style="text-align: left;">29<code>*</code></td> | |
| 1654 <td style="text-align: left;"><code>BARCODE_DBAR_OMN</code></td> | |
| 1655 <td style="text-align: left;">GS1 DataBar Omnidirectional (including GS1 | |
| 1656 DataBar Truncated)</td> | |
| 1657 </tr> | |
| 1658 <tr> | |
| 1659 <td style="text-align: left;">30<code>*</code></td> | |
| 1660 <td style="text-align: left;"><code>BARCODE_DBAR_LTD</code></td> | |
| 1661 <td style="text-align: left;">GS1 DataBar Limited</td> | |
| 1662 </tr> | |
| 1663 <tr> | |
| 1664 <td style="text-align: left;">31<code>*</code></td> | |
| 1665 <td style="text-align: left;"><code>BARCODE_DBAR_EXP</code></td> | |
| 1666 <td style="text-align: left;">GS1 DataBar Expanded</td> | |
| 1667 </tr> | |
| 1668 <tr> | |
| 1669 <td style="text-align: left;">32</td> | |
| 1670 <td style="text-align: left;"><code>BARCODE_TELEPEN</code></td> | |
| 1671 <td style="text-align: left;">Telepen Alpha</td> | |
| 1672 </tr> | |
| 1673 <tr> | |
| 1674 <td style="text-align: left;">34</td> | |
| 1675 <td style="text-align: left;"><code>BARCODE_UPCA</code></td> | |
| 1676 <td style="text-align: left;">UPC-A</td> | |
| 1677 </tr> | |
| 1678 <tr> | |
| 1679 <td style="text-align: left;">35</td> | |
| 1680 <td style="text-align: left;"><code>BARCODE_UPCA_CHK</code></td> | |
| 1681 <td style="text-align: left;">UPC-A + Check Digit</td> | |
| 1682 </tr> | |
| 1683 <tr> | |
| 1684 <td style="text-align: left;">37</td> | |
| 1685 <td style="text-align: left;"><code>BARCODE_UPCE</code></td> | |
| 1686 <td style="text-align: left;">UPC-E</td> | |
| 1687 </tr> | |
| 1688 <tr> | |
| 1689 <td style="text-align: left;">38</td> | |
| 1690 <td style="text-align: left;"><code>BARCODE_UPCE_CHK</code></td> | |
| 1691 <td style="text-align: left;">UPC-E + Check Digit</td> | |
| 1692 </tr> | |
| 1693 <tr> | |
| 1694 <td style="text-align: left;">40</td> | |
| 1695 <td style="text-align: left;"><code>BARCODE_POSTNET</code></td> | |
| 1696 <td style="text-align: left;">POSTNET</td> | |
| 1697 </tr> | |
| 1698 <tr> | |
| 1699 <td style="text-align: left;">47</td> | |
| 1700 <td style="text-align: left;"><code>BARCODE_MSI_PLESSEY</code></td> | |
| 1701 <td style="text-align: left;">MSI Plessey</td> | |
| 1702 </tr> | |
| 1703 <tr> | |
| 1704 <td style="text-align: left;">49</td> | |
| 1705 <td style="text-align: left;"><code>BARCODE_FIM</code></td> | |
| 1706 <td style="text-align: left;">FIM</td> | |
| 1707 </tr> | |
| 1708 <tr> | |
| 1709 <td style="text-align: left;">50</td> | |
| 1710 <td style="text-align: left;"><code>BARCODE_LOGMARS</code></td> | |
| 1711 <td style="text-align: left;">LOGMARS</td> | |
| 1712 </tr> | |
| 1713 <tr> | |
| 1714 <td style="text-align: left;">51</td> | |
| 1715 <td style="text-align: left;"><code>BARCODE_PHARMA</code></td> | |
| 1716 <td style="text-align: left;">Pharmacode One-Track</td> | |
| 1717 </tr> | |
| 1718 <tr> | |
| 1719 <td style="text-align: left;">52</td> | |
| 1720 <td style="text-align: left;"><code>BARCODE_PZN</code></td> | |
| 1721 <td style="text-align: left;">PZN</td> | |
| 1722 </tr> | |
| 1723 <tr> | |
| 1724 <td style="text-align: left;">53</td> | |
| 1725 <td style="text-align: left;"><code>BARCODE_PHARMA_TWO</code></td> | |
| 1726 <td style="text-align: left;">Pharmacode Two-Track</td> | |
| 1727 </tr> | |
| 1728 <tr> | |
| 1729 <td style="text-align: left;">54</td> | |
| 1730 <td style="text-align: left;"><code>BARCODE_CEPNET</code></td> | |
| 1731 <td style="text-align: left;">Brazilian CEPNet</td> | |
| 1732 </tr> | |
| 1733 <tr> | |
| 1734 <td style="text-align: left;">55</td> | |
| 1735 <td style="text-align: left;"><code>BARCODE_PDF417</code></td> | |
| 1736 <td style="text-align: left;">PDF417</td> | |
| 1737 </tr> | |
| 1738 <tr> | |
| 1739 <td style="text-align: left;">56<code>*</code></td> | |
| 1740 <td style="text-align: left;"><code>BARCODE_PDF417COMP</code></td> | |
| 1741 <td style="text-align: left;">Compact PDF417 (Truncated PDF417)</td> | |
| 1742 </tr> | |
| 1743 <tr> | |
| 1744 <td style="text-align: left;">57</td> | |
| 1745 <td style="text-align: left;"><code>BARCODE_MAXICODE</code></td> | |
| 1746 <td style="text-align: left;">MaxiCode</td> | |
| 1747 </tr> | |
| 1748 <tr> | |
| 1749 <td style="text-align: left;">58</td> | |
| 1750 <td style="text-align: left;"><code>BARCODE_QRCODE</code></td> | |
| 1751 <td style="text-align: left;">QR Code</td> | |
| 1752 </tr> | |
| 1753 <tr> | |
| 1754 <td style="text-align: left;">60</td> | |
| 1755 <td style="text-align: left;"><code>BARCODE_CODE128AB</code></td> | |
| 1756 <td style="text-align: left;">Code 128 (Suppress Code Set C)</td> | |
| 1757 </tr> | |
| 1758 <tr> | |
| 1759 <td style="text-align: left;">63</td> | |
| 1760 <td style="text-align: left;"><code>BARCODE_AUSPOST</code></td> | |
| 1761 <td style="text-align: left;">Australia Post Standard Customer</td> | |
| 1762 </tr> | |
| 1763 <tr> | |
| 1764 <td style="text-align: left;">66</td> | |
| 1765 <td style="text-align: left;"><code>BARCODE_AUSREPLY</code></td> | |
| 1766 <td style="text-align: left;">Australia Post Reply Paid</td> | |
| 1767 </tr> | |
| 1768 <tr> | |
| 1769 <td style="text-align: left;">67</td> | |
| 1770 <td style="text-align: left;"><code>BARCODE_AUSROUTE</code></td> | |
| 1771 <td style="text-align: left;">Australia Post Routing</td> | |
| 1772 </tr> | |
| 1773 <tr> | |
| 1774 <td style="text-align: left;">68</td> | |
| 1775 <td style="text-align: left;"><code>BARCODE_AUSDIRECT</code></td> | |
| 1776 <td style="text-align: left;">Australia Post Redirection</td> | |
| 1777 </tr> | |
| 1778 <tr> | |
| 1779 <td style="text-align: left;">69</td> | |
| 1780 <td style="text-align: left;"><code>BARCODE_ISBNX</code></td> | |
| 1781 <td style="text-align: left;">ISBN (EAN-13 with verification stage)</td> | |
| 1782 </tr> | |
| 1783 <tr> | |
| 1784 <td style="text-align: left;">70</td> | |
| 1785 <td style="text-align: left;"><code>BARCODE_RM4SCC</code></td> | |
| 1786 <td style="text-align: left;">Royal Mail 4-State Customer Code | |
| 1787 (RM4SCC)</td> | |
| 1788 </tr> | |
| 1789 <tr> | |
| 1790 <td style="text-align: left;">71</td> | |
| 1791 <td style="text-align: left;"><code>BARCODE_DATAMATRIX</code></td> | |
| 1792 <td style="text-align: left;">Data Matrix (ECC200)</td> | |
| 1793 </tr> | |
| 1794 <tr> | |
| 1795 <td style="text-align: left;">72</td> | |
| 1796 <td style="text-align: left;"><code>BARCODE_EAN14</code></td> | |
| 1797 <td style="text-align: left;">EAN-14</td> | |
| 1798 </tr> | |
| 1799 <tr> | |
| 1800 <td style="text-align: left;">73</td> | |
| 1801 <td style="text-align: left;"><code>BARCODE_VIN</code></td> | |
| 1802 <td style="text-align: left;">Vehicle Identification Number</td> | |
| 1803 </tr> | |
| 1804 <tr> | |
| 1805 <td style="text-align: left;">74</td> | |
| 1806 <td style="text-align: left;"><code>BARCODE_CODABLOCKF</code></td> | |
| 1807 <td style="text-align: left;">Codablock-F</td> | |
| 1808 </tr> | |
| 1809 <tr> | |
| 1810 <td style="text-align: left;">75</td> | |
| 1811 <td style="text-align: left;"><code>BARCODE_NVE18</code></td> | |
| 1812 <td style="text-align: left;">NVE-18 (SSCC-18)</td> | |
| 1813 </tr> | |
| 1814 <tr> | |
| 1815 <td style="text-align: left;">76</td> | |
| 1816 <td style="text-align: left;"><code>BARCODE_JAPANPOST</code></td> | |
| 1817 <td style="text-align: left;">Japanese Postal Code</td> | |
| 1818 </tr> | |
| 1819 <tr> | |
| 1820 <td style="text-align: left;">77</td> | |
| 1821 <td style="text-align: left;"><code>BARCODE_KOREAPOST</code></td> | |
| 1822 <td style="text-align: left;">Korea Post</td> | |
| 1823 </tr> | |
| 1824 <tr> | |
| 1825 <td style="text-align: left;">79<code>*</code></td> | |
| 1826 <td style="text-align: left;"><code>BARCODE_DBAR_STK</code></td> | |
| 1827 <td style="text-align: left;">GS1 DataBar Stacked</td> | |
| 1828 </tr> | |
| 1829 <tr> | |
| 1830 <td style="text-align: left;">80<code>*</code></td> | |
| 1831 <td style="text-align: left;"><code>BARCODE_DBAR_OMNSTK</code></td> | |
| 1832 <td style="text-align: left;">GS1 DataBar Stacked Omnidirectional</td> | |
| 1833 </tr> | |
| 1834 <tr> | |
| 1835 <td style="text-align: left;">81<code>*</code></td> | |
| 1836 <td style="text-align: left;"><code>BARCODE_DBAR_EXPSTK</code></td> | |
| 1837 <td style="text-align: left;">GS1 DataBar Expanded Stacked</td> | |
| 1838 </tr> | |
| 1839 <tr> | |
| 1840 <td style="text-align: left;">82</td> | |
| 1841 <td style="text-align: left;"><code>BARCODE_PLANET</code></td> | |
| 1842 <td style="text-align: left;">PLANET</td> | |
| 1843 </tr> | |
| 1844 <tr> | |
| 1845 <td style="text-align: left;">84</td> | |
| 1846 <td style="text-align: left;"><code>BARCODE_MICROPDF417</code></td> | |
| 1847 <td style="text-align: left;">MicroPDF417</td> | |
| 1848 </tr> | |
| 1849 <tr> | |
| 1850 <td style="text-align: left;">85<code>*</code></td> | |
| 1851 <td style="text-align: left;"><code>BARCODE_USPS_IMAIL</code></td> | |
| 1852 <td style="text-align: left;">USPS Intelligent Mail (OneCode)</td> | |
| 1853 </tr> | |
| 1854 <tr> | |
| 1855 <td style="text-align: left;">86</td> | |
| 1856 <td style="text-align: left;"><code>BARCODE_PLESSEY</code></td> | |
| 1857 <td style="text-align: left;">UK Plessey</td> | |
| 1858 </tr> | |
| 1859 <tr> | |
| 1860 <td style="text-align: left;">87</td> | |
| 1861 <td style="text-align: left;"><code>BARCODE_TELEPEN_NUM</code></td> | |
| 1862 <td style="text-align: left;">Telepen Numeric</td> | |
| 1863 </tr> | |
| 1864 <tr> | |
| 1865 <td style="text-align: left;">89</td> | |
| 1866 <td style="text-align: left;"><code>BARCODE_ITF14</code></td> | |
| 1867 <td style="text-align: left;">ITF-14</td> | |
| 1868 </tr> | |
| 1869 <tr> | |
| 1870 <td style="text-align: left;">90</td> | |
| 1871 <td style="text-align: left;"><code>BARCODE_KIX</code></td> | |
| 1872 <td style="text-align: left;">Dutch Post KIX Code</td> | |
| 1873 </tr> | |
| 1874 <tr> | |
| 1875 <td style="text-align: left;">92</td> | |
| 1876 <td style="text-align: left;"><code>BARCODE_AZTEC</code></td> | |
| 1877 <td style="text-align: left;">Aztec Code</td> | |
| 1878 </tr> | |
| 1879 <tr> | |
| 1880 <td style="text-align: left;">93</td> | |
| 1881 <td style="text-align: left;"><code>BARCODE_DAFT</code></td> | |
| 1882 <td style="text-align: left;">DAFT Code</td> | |
| 1883 </tr> | |
| 1884 <tr> | |
| 1885 <td style="text-align: left;">96</td> | |
| 1886 <td style="text-align: left;"><code>BARCODE_DPD</code></td> | |
| 1887 <td style="text-align: left;">DPD Code</td> | |
| 1888 </tr> | |
| 1889 <tr> | |
| 1890 <td style="text-align: left;">97</td> | |
| 1891 <td style="text-align: left;"><code>BARCODE_MICROQR</code></td> | |
| 1892 <td style="text-align: left;">Micro QR Code</td> | |
| 1893 </tr> | |
| 1894 <tr> | |
| 1895 <td style="text-align: left;">98</td> | |
| 1896 <td style="text-align: left;"><code>BARCODE_HIBC_128</code></td> | |
| 1897 <td style="text-align: left;">HIBC Code 128</td> | |
| 1898 </tr> | |
| 1899 <tr> | |
| 1900 <td style="text-align: left;">99</td> | |
| 1901 <td style="text-align: left;"><code>BARCODE_HIBC_39</code></td> | |
| 1902 <td style="text-align: left;">HIBC Code 39</td> | |
| 1903 </tr> | |
| 1904 <tr> | |
| 1905 <td style="text-align: left;">102</td> | |
| 1906 <td style="text-align: left;"><code>BARCODE_HIBC_DM</code></td> | |
| 1907 <td style="text-align: left;">HIBC Data Matrix ECC200</td> | |
| 1908 </tr> | |
| 1909 <tr> | |
| 1910 <td style="text-align: left;">104</td> | |
| 1911 <td style="text-align: left;"><code>BARCODE_HIBC_QR</code></td> | |
| 1912 <td style="text-align: left;">HIBC QR Code</td> | |
| 1913 </tr> | |
| 1914 <tr> | |
| 1915 <td style="text-align: left;">106</td> | |
| 1916 <td style="text-align: left;"><code>BARCODE_HIBC_PDF</code></td> | |
| 1917 <td style="text-align: left;">HIBC PDF417</td> | |
| 1918 </tr> | |
| 1919 <tr> | |
| 1920 <td style="text-align: left;">108</td> | |
| 1921 <td style="text-align: left;"><code>BARCODE_HIBC_MICPDF</code></td> | |
| 1922 <td style="text-align: left;">HIBC MicroPDF417</td> | |
| 1923 </tr> | |
| 1924 <tr> | |
| 1925 <td style="text-align: left;">110</td> | |
| 1926 <td style="text-align: left;"><code>BARCODE_HIBC_BLOCKF</code></td> | |
| 1927 <td style="text-align: left;">HIBC Codablock-F</td> | |
| 1928 </tr> | |
| 1929 <tr> | |
| 1930 <td style="text-align: left;">112</td> | |
| 1931 <td style="text-align: left;"><code>BARCODE_HIBC_AZTEC</code></td> | |
| 1932 <td style="text-align: left;">HIBC Aztec Code</td> | |
| 1933 </tr> | |
| 1934 <tr> | |
| 1935 <td style="text-align: left;">115</td> | |
| 1936 <td style="text-align: left;"><code>BARCODE_DOTCODE</code></td> | |
| 1937 <td style="text-align: left;">DotCode</td> | |
| 1938 </tr> | |
| 1939 <tr> | |
| 1940 <td style="text-align: left;">116</td> | |
| 1941 <td style="text-align: left;"><code>BARCODE_HANXIN</code></td> | |
| 1942 <td style="text-align: left;">Han Xin (Chinese Sensible) Code</td> | |
| 1943 </tr> | |
| 1944 <tr> | |
| 1945 <td style="text-align: left;">119</td> | |
| 1946 <td style="text-align: left;"><code>BARCODE_MAILMARK_2D</code></td> | |
| 1947 <td style="text-align: left;">Royal Mail 2D Mailmark (CMDM) (Data | |
| 1948 Matrix)</td> | |
| 1949 </tr> | |
| 1950 <tr> | |
| 1951 <td style="text-align: left;">121</td> | |
| 1952 <td style="text-align: left;"><code>BARCODE_MAILMARK_4S</code></td> | |
| 1953 <td style="text-align: left;">Royal Mail 4-State Mailmark</td> | |
| 1954 </tr> | |
| 1955 <tr> | |
| 1956 <td style="text-align: left;">128</td> | |
| 1957 <td style="text-align: left;"><code>BARCODE_AZRUNE</code></td> | |
| 1958 <td style="text-align: left;">Aztec Runes</td> | |
| 1959 </tr> | |
| 1960 <tr> | |
| 1961 <td style="text-align: left;">129</td> | |
| 1962 <td style="text-align: left;"><code>BARCODE_CODE32</code></td> | |
| 1963 <td style="text-align: left;">Code 32</td> | |
| 1964 </tr> | |
| 1965 <tr> | |
| 1966 <td style="text-align: left;">130</td> | |
| 1967 <td style="text-align: left;"><code>BARCODE_EANX_CC</code></td> | |
| 1968 <td style="text-align: left;">GS1 Composite Symbol with EAN linear | |
| 1969 component</td> | |
| 1970 </tr> | |
| 1971 <tr> | |
| 1972 <td style="text-align: left;">131<code>*</code></td> | |
| 1973 <td style="text-align: left;"><code>BARCODE_GS1_128_CC</code></td> | |
| 1974 <td style="text-align: left;">GS1 Composite Symbol with GS1-128 linear | |
| 1975 component</td> | |
| 1976 </tr> | |
| 1977 <tr> | |
| 1978 <td style="text-align: left;">132<code>*</code></td> | |
| 1979 <td style="text-align: left;"><code>BARCODE_DBAR_OMN_CC</code></td> | |
| 1980 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 1981 Omnidirectional linear component</td> | |
| 1982 </tr> | |
| 1983 <tr> | |
| 1984 <td style="text-align: left;">133<code>*</code></td> | |
| 1985 <td style="text-align: left;"><code>BARCODE_DBAR_LTD_CC</code></td> | |
| 1986 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 1987 Limited linear component</td> | |
| 1988 </tr> | |
| 1989 <tr> | |
| 1990 <td style="text-align: left;">134<code>*</code></td> | |
| 1991 <td style="text-align: left;"><code>BARCODE_DBAR_EXP_CC</code></td> | |
| 1992 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 1993 Expanded linear component</td> | |
| 1994 </tr> | |
| 1995 <tr> | |
| 1996 <td style="text-align: left;">135</td> | |
| 1997 <td style="text-align: left;"><code>BARCODE_UPCA_CC</code></td> | |
| 1998 <td style="text-align: left;">GS1 Composite Symbol with UPC-A linear | |
| 1999 component</td> | |
| 2000 </tr> | |
| 2001 <tr> | |
| 2002 <td style="text-align: left;">136</td> | |
| 2003 <td style="text-align: left;"><code>BARCODE_UPCE_CC</code></td> | |
| 2004 <td style="text-align: left;">GS1 Composite Symbol with UPC-E linear | |
| 2005 component</td> | |
| 2006 </tr> | |
| 2007 <tr> | |
| 2008 <td style="text-align: left;">137<code>*</code></td> | |
| 2009 <td style="text-align: left;"><code>BARCODE_DBAR_STK_CC</code></td> | |
| 2010 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 2011 Stacked component</td> | |
| 2012 </tr> | |
| 2013 <tr> | |
| 2014 <td style="text-align: left;">138<code>*</code></td> | |
| 2015 <td style="text-align: left;"><code>BARCODE_DBAR_OMNSTK_CC</code></td> | |
| 2016 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 2017 Stacked Omnidirectional component</td> | |
| 2018 </tr> | |
| 2019 <tr> | |
| 2020 <td style="text-align: left;">139<code>*</code></td> | |
| 2021 <td style="text-align: left;"><code>BARCODE_DBAR_EXPSTK_CC</code></td> | |
| 2022 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 2023 Expanded Stacked component</td> | |
| 2024 </tr> | |
| 2025 <tr> | |
| 2026 <td style="text-align: left;">140</td> | |
| 2027 <td style="text-align: left;"><code>BARCODE_CHANNEL</code></td> | |
| 2028 <td style="text-align: left;">Channel Code</td> | |
| 2029 </tr> | |
| 2030 <tr> | |
| 2031 <td style="text-align: left;">141</td> | |
| 2032 <td style="text-align: left;"><code>BARCODE_CODEONE</code></td> | |
| 2033 <td style="text-align: left;">Code One</td> | |
| 2034 </tr> | |
| 2035 <tr> | |
| 2036 <td style="text-align: left;">142</td> | |
| 2037 <td style="text-align: left;"><code>BARCODE_GRIDMATRIX</code></td> | |
| 2038 <td style="text-align: left;">Grid Matrix</td> | |
| 2039 </tr> | |
| 2040 <tr> | |
| 2041 <td style="text-align: left;">143</td> | |
| 2042 <td style="text-align: left;"><code>BARCODE_UPNQR</code></td> | |
| 2043 <td style="text-align: left;">UPNQR (Univerzalnega Plačilnega Naloga | |
| 2044 QR)</td> | |
| 2045 </tr> | |
| 2046 <tr> | |
| 2047 <td style="text-align: left;">144</td> | |
| 2048 <td style="text-align: left;"><code>BARCODE_ULTRA</code></td> | |
| 2049 <td style="text-align: left;">Ultracode</td> | |
| 2050 </tr> | |
| 2051 <tr> | |
| 2052 <td style="text-align: left;">145</td> | |
| 2053 <td style="text-align: left;"><code>BARCODE_RMQR</code></td> | |
| 2054 <td style="text-align: left;">Rectangular Micro QR Code (rMQR)</td> | |
| 2055 </tr> | |
| 2056 <tr> | |
| 2057 <td style="text-align: left;">146</td> | |
| 2058 <td style="text-align: left;"><code>BARCODE_BC412</code></td> | |
| 2059 <td style="text-align: left;">IBM BC412 (SEMI T1-95)</td> | |
| 2060 </tr> | |
| 2061 <tr> | |
| 2062 <td style="text-align: left;">147</td> | |
| 2063 <td style="text-align: left;"><code>BARCODE_DXFILMEDGE</code></td> | |
| 2064 <td style="text-align: left;">DX Film Edge Barcode</td> | |
| 2065 </tr> | |
| 2066 </tbody> | |
| 2067 </table> | |
| 2068 </div> | |
| 2069 <h2 id="adjusting-height">4.4 Adjusting Height</h2> | |
| 2070 <p>The height of a symbol (except those with a fixed width-to-height | |
| 2071 ratio) can be adjusted using the <code>--height</code> switch. For | |
| 2072 example:</p> | |
| 2073 <div class="sourceCode" id="cb23"><pre | |
| 2074 class="sourceCode bash"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--height</span><span class="op">=</span>100 <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 2075 <p>This specifies a symbol height of 100 times the X-dimension of the | |
| 2076 symbol.</p> | |
| 2077 <p>The default height of most linear barcodes is 50.0X, but this can be | |
| 2078 changed for barcodes whose specifications give a standard height by | |
| 2079 using the switch <code>--compliantheight</code>. For instance</p> | |
| 2080 <div class="sourceCode" id="cb24"><pre | |
| 2081 class="sourceCode bash"><code class="sourceCode bash"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> LOGMARS <span class="at">-d</span> <span class="st">"This Text"</span> <span class="at">--compliantheight</span></span></code></pre></div> | |
| 2082 <p>will produce a barcode of height 45.455X instead of the normal | |
| 2083 default of 50.0X. The flag also causes Zint to return a warning if a | |
| 2084 non-compliant height is given:</p> | |
| 2085 <div class="sourceCode" id="cb25"><pre | |
| 2086 class="sourceCode bash"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> LOGMARS <span class="at">-d</span> <span class="st">"This Text"</span> <span class="at">--compliantheight</span> <span class="at">--height</span><span class="op">=</span>6.2</span> | |
| 2087 <span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a><span class="ex">Warning</span> 247: Height not compliant with standards</span></code></pre></div> | |
| 2088 <p>Another switch is <code>--heightperrow</code>, which can be useful | |
| 2089 for symbologies that have a variable number of linear rows, namely | |
| 2090 Codablock-F, Code 16K, Code 49, GS1 DataBar Expanded Stacked, | |
| 2091 MicroPDF417 and PDF417, as it changes the treatment of the height value | |
| 2092 from overall height to per-row height, allowing you to specify a | |
| 2093 consistent height for each linear row without having to know how many | |
| 2094 there are. For instance</p> | |
| 2095 <div class="sourceCode" id="cb26"><pre | |
| 2096 class="sourceCode bash"><code class="sourceCode bash"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> PDF417 <span class="at">-d</span> <span class="st">"This Text"</span> <span class="at">--height</span><span class="op">=</span>4 <span class="at">--heightperrow</span></span></code></pre></div> | |
| 2097 <figure> | |
| 2098 <img src="images/pdf417_heightperrow.svg" title="fig:" class="lin" | |
| 2099 alt="zint -b PDF417 -d "This Text" --height=4 --heightperrow" /> | |
| 2100 <figcaption | |
| 2101 aria-hidden="true"><code>zint -b PDF417 -d "This Text" --height=4 --heightperrow</code></figcaption> | |
| 2102 </figure> | |
| 2103 <p>will produce a barcode of height 32X, with each of the 8 rows 4X | |
| 2104 high.</p> | |
| 2105 <h2 id="adjusting-whitespace">4.5 Adjusting Whitespace</h2> | |
| 2106 <p>The amount of horizontal whitespace to the left and right of the | |
| 2107 generated barcode can be altered using the <code>-w</code> or | |
| 2108 <code>--whitesp</code> switch, in integral multiples of the X-dimension. | |
| 2109 For example:</p> | |
| 2110 <div class="sourceCode" id="cb27"><pre | |
| 2111 class="sourceCode bash"><code class="sourceCode bash"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-w</span> 10 <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 2112 <p>This specifies a whitespace width of 10 times the X-dimension of the | |
| 2113 symbol both to the left and to the right of the barcode.</p> | |
| 2114 <p>The amount of vertical whitespace above and below the barcode can be | |
| 2115 altered using the <code>--vwhitesp</code> switch, in integral multiples | |
| 2116 of the X-dimension. For example for 3 times the X-dimension:</p> | |
| 2117 <div class="sourceCode" id="cb28"><pre | |
| 2118 class="sourceCode bash"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--vwhitesp</span><span class="op">=</span>3 <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 2119 <p>Note that the whitespace at the bottom appears below the text, if | |
| 2120 any.</p> | |
| 2121 <p>Horizontal and vertical whitespace can of course be used | |
| 2122 together:</p> | |
| 2123 <div class="sourceCode" id="cb29"><pre | |
| 2124 class="sourceCode bash"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> DATAMATRIX <span class="at">--whitesp</span><span class="op">=</span>1 <span class="at">--vwhitesp</span><span class="op">=</span>1 <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 2125 <p>A <code>--quietzones</code> option is also available which adds quiet | |
| 2126 zones compliant with the symbology’s specification. This is in addition | |
| 2127 to any whitespace specified with the <code>--whitesp</code> or | |
| 2128 <code>--vwhitesp</code> switches.</p> | |
| 2129 <p>Note that Codablock-F, Code 16K, Code 49, ITF-14, EAN-2 to EAN-13, | |
| 2130 ISBN, UPC-A and UPC-E have compliant quiet zones added by default. This | |
| 2131 can be disabled with the option <code>--noquietzones</code>.</p> | |
| 2132 <h2 id="adding-boundary-bars-and-boxes">4.6 Adding Boundary Bars and | |
| 2133 Boxes</h2> | |
| 2134 <p>Zint allows the symbol to be bound with ‘boundary bars’ (also known | |
| 2135 as ‘bearer bars’) using the option <code>--bind</code>. These bars help | |
| 2136 to prevent misreading of the symbol by corrupting a scan if the scanning | |
| 2137 beam strays off the top or bottom of the symbol. Zint can also put a | |
| 2138 border right around the symbol and its horizontal whitespace with the | |
| 2139 <code>--box</code> option.</p> | |
| 2140 <p>The width of the boundary bars or box borders, in integral multiples | |
| 2141 of the X-dimension, must be specified using the <code>--border</code> | |
| 2142 switch. For example:</p> | |
| 2143 <div class="sourceCode" id="cb30"><pre | |
| 2144 class="sourceCode bash"><code class="sourceCode bash"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--box</span> <span class="at">--border</span><span class="op">=</span>10 <span class="at">-w</span> 10 <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 2145 <figure> | |
| 2146 <img src="images/code128_box.svg" title="fig:" class="lin" | |
| 2147 alt="zint --border=10 --box -d "This Text" -w 10" /> | |
| 2148 <figcaption | |
| 2149 aria-hidden="true"><code>zint --border=10 --box -d "This Text" -w 10</code></figcaption> | |
| 2150 </figure> | |
| 2151 <p>gives a box with a width 10 times the X-dimension of the symbol. Note | |
| 2152 that when specifying a box, horizontal whitespace is usually required in | |
| 2153 order to create a quiet zone between the barcode and the sides of the | |
| 2154 box. To add a boundary bar to the top only use | |
| 2155 <code>--bindtop</code>.</p> | |
| 2156 <p>For linear symbols, horizontal boundary bars appear tight against the | |
| 2157 barcode, inside any vertical whitespace (or text). For matrix symbols, | |
| 2158 however, where they are decorative rather than functional, boundary bars | |
| 2159 appear outside any whitespace.</p> | |
| 2160 <figure> | |
| 2161 <img src="images/qrcode_box.svg" title="fig:" class="i2d" | |
| 2162 alt="zint -b QRCODE --border=1 --box -d "This Text" --quietzones" /> | |
| 2163 <figcaption | |
| 2164 aria-hidden="true"><code>zint -b QRCODE --border=1 --box -d "This Text" --quietzones</code></figcaption> | |
| 2165 </figure> | |
| 2166 <p>Codablock-F, Code 16K and Code 49 always have boundary bars, and | |
| 2167 default to particular horizontal whitespace values. Special | |
| 2168 considerations apply to ITF-14 and DPD - see <a href="#itf-14">6.1.2.6 | |
| 2169 ITF-14</a> and <a href="#dpd-code">6.1.10.7 DPD Code</a> for those | |
| 2170 symbologies.</p> | |
| 2171 <h2 id="using-colour">4.7 Using Colour</h2> | |
| 2172 <p>The default colours of a symbol are a black symbol on a white | |
| 2173 background. Zint allows you to change this. The <code>-r</code> or | |
| 2174 <code>--reverse</code> switch allows the default colours to be inverted | |
| 2175 so that a white symbol is shown on a black background (known as | |
| 2176 “reflectance reversal” or “reversed reflectance”). For example the | |
| 2177 command</p> | |
| 2178 <div class="sourceCode" id="cb31"><pre | |
| 2179 class="sourceCode bash"><code class="sourceCode bash"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-r</span> <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 2180 <p>gives an inverted Code 128 symbol. This is not practical for most | |
| 2181 symbologies but white-on-black is allowed by the Aztec Code, Data | |
| 2182 Matrix, DotCode, Han Xin Code, Grid Matrix and QR Code symbology | |
| 2183 specifications.</p> | |
| 2184 <p>For more specific needs the foreground (ink) and background (paper) | |
| 2185 colours can be specified using the <code>--fg</code> and | |
| 2186 <code>--bg</code> options followed by a number in <code>"RRGGBB"</code> | |
| 2187 hexadecimal notation (the same system used in HTML) or in | |
| 2188 <code>"C,M,Y,K"</code> decimal percentages format (the latter normally | |
| 2189 used with the <code>--cmyk</code> option - see below). For example the | |
| 2190 command</p> | |
| 2191 <div class="sourceCode" id="cb32"><pre | |
| 2192 class="sourceCode bash"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--fg</span><span class="op">=</span>00FF00 <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 2193 <p>alters the symbol to a bright green.</p> | |
| 2194 <figure> | |
| 2195 <img src="images/code128_green.svg" title="fig:" class="lin" | |
| 2196 alt="zint -d "This Text" --fg=00FF00" /> | |
| 2197 <figcaption | |
| 2198 aria-hidden="true"><code>zint -d "This Text" --fg=00FF00</code></figcaption> | |
| 2199 </figure> | |
| 2200 <p>Zint also supports RGBA colour information for those output file | |
| 2201 formats which support alpha channels (currently only GIF, PCX, PNG, SVG | |
| 2202 and TIF, with GIF supporting either a background or foreground alpha but | |
| 2203 not both) in a <code>"RRGGBBAA"</code> format. For example:</p> | |
| 2204 <div class="sourceCode" id="cb33"><pre | |
| 2205 class="sourceCode bash"><code class="sourceCode bash"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--fg</span><span class="op">=</span>00ff0055 <span class="at">-d</span> <span class="st">"This Text"</span></span></code></pre></div> | |
| 2206 <figure> | |
| 2207 <img src="images/code128_green_alpha.svg" title="fig:" class="lin" | |
| 2208 alt="zint -d "This Text" --fg=00FF0055" /> | |
| 2209 <figcaption | |
| 2210 aria-hidden="true"><code>zint -d "This Text" --fg=00FF0055</code></figcaption> | |
| 2211 </figure> | |
| 2212 <p>will produce a semi-transparent green foreground with a standard | |
| 2213 (white) background. Note that transparency is treated differently by | |
| 2214 raster and vector (SVG) output formats, as for vector output the | |
| 2215 background will “shine through” a transparent foreground. For | |
| 2216 instance</p> | |
| 2217 <div class="sourceCode" id="cb34"><pre | |
| 2218 class="sourceCode bash"><code class="sourceCode bash"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--bg</span><span class="op">=</span>ff0000 <span class="at">--fg</span><span class="op">=</span>ffffff00 ...</span></code></pre></div> | |
| 2219 <p>will give different results for PNG and SVG. Experimentation is | |
| 2220 advised!</p> | |
| 2221 <p>In addition the <code>--nobackground</code> option will remove the | |
| 2222 background from all output formats except BMP.<a href="#fn4" | |
| 2223 class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a></p> | |
| 2224 <p>The <code>--cmyk</code> option is specific to output in Encapsulated | |
| 2225 PostScript (EPS) and TIF, and selects the CMYK colour space. Custom | |
| 2226 colours should then usually be given in the comma-separated | |
| 2227 <code>"C,M,Y,K"</code> format, where <code>C</code>, <code>M</code>, | |
| 2228 <code>Y</code> and <code>K</code> are expressed as decimal percentage | |
| 2229 values from 0 to 100. RGB values may still be used, in which case they | |
| 2230 will be converted formulaically to CMYK approximations.</p> | |
| 2231 <h2 id="rotating-the-symbol">4.8 Rotating the Symbol</h2> | |
| 2232 <p>The symbol can be rotated through four orientations using the | |
| 2233 <code>--rotate</code> option followed by the angle of rotation as shown | |
| 2234 below.</p> | |
| 2235 <pre><code>--rotate=0 (default) | |
| 2236 --rotate=90 | |
| 2237 --rotate=180 | |
| 2238 --rotate=270</code></pre> | |
| 2239 <figure> | |
| 2240 <img src="images/code128_rotate90.svg" title="fig:" class="lin" | |
| 2241 alt="zint -d "This Text" --rotate=90" /> | |
| 2242 <figcaption | |
| 2243 aria-hidden="true"><code>zint -d "This Text" --rotate=90</code></figcaption> | |
| 2244 </figure> | |
| 2245 <h2 id="adjusting-image-size-x-dimension">4.9 Adjusting Image Size | |
| 2246 (X-dimension)</h2> | |
| 2247 <p>The size of the image can be altered using the <code>--scale</code> | |
| 2248 option, which sets the X-dimension. The default scale is 1.0.</p> | |
| 2249 <p>The scale is multiplied by 2 (with the exception of MaxiCode) before | |
| 2250 being applied to the X-dimension. For MaxiCode, it is multiplied by 10 | |
| 2251 for raster output, by 40 for EMF vector output, and by 2 otherwise | |
| 2252 (non-EMF vector output).</p> | |
| 2253 <p>For non-MaxiCode raster output, the default scale of 1 results in an | |
| 2254 X-dimension of 2 pixels. For example for non-MaxiCode PNG images a scale | |
| 2255 of 5 will increase the X-dimension to 10 pixels. For MaxiCode, see <a | |
| 2256 href="#maxicode-raster-scaling">4.9.3 MaxiCode Raster Scaling</a> | |
| 2257 below.</p> | |
| 2258 <p>Scales for non-MaxiCode raster output should be given in increments | |
| 2259 of 0.5, i.e. 0.5, 1, 1.5, 2, 2.5, 3, 3.5, etc., to avoid the X-dimension | |
| 2260 varying across the symbol due to interpolation. 0.5 increments are also | |
| 2261 faster to render.</p> | |
| 2262 <p>The minimum scale for non-MaxiCode raster output in non-dotty mode is | |
| 2263 0.5, giving a minimum X-dimension of 1 pixel. For MaxiCode, it is 0.2. | |
| 2264 The minimum scale for raster output in dotty mode is 1 (see <a | |
| 2265 href="#working-with-dots">4.15 Working with Dots</a>). For raster | |
| 2266 output, text will not be printed for scales less than 1.</p> | |
| 2267 <p>The minimum scale for vector output is 0.1, giving a minimum | |
| 2268 X-dimension of 0.2 (or for MaxiCode EMF output, 4). The maximum scale | |
| 2269 for both raster and vector is 200.</p> | |
| 2270 <p>To summarize the more intricate details:</p> | |
| 2271 <div id="tbl:scaling_multiplers" class="tablenos"> | |
| 2272 <table id="tbl:scaling_multiplers" style="width:92%;" | |
| 2273 data-tag=": Scaling Multipliers and Minima"> | |
| 2274 <caption><span>Table : Scaling Multipliers and Minima</span> </caption> | |
| 2275 <colgroup> | |
| 2276 <col style="width: 15%" /> | |
| 2277 <col style="width: 25%" /> | |
| 2278 <col style="width: 16%" /> | |
| 2279 <col style="width: 19%" /> | |
| 2280 <col style="width: 15%" /> | |
| 2281 </colgroup> | |
| 2282 <thead> | |
| 2283 <tr> | |
| 2284 <th>MaxiCode?</th> | |
| 2285 <th style="text-align: left;">Output</th> | |
| 2286 <th>Multiplier</th> | |
| 2287 <th style="text-align: left;">Min. Scale (non-dotty)</th> | |
| 2288 <th style="text-align: left;">Min. Scale (dotty)</th> | |
| 2289 </tr> | |
| 2290 </thead> | |
| 2291 <tbody> | |
| 2292 <tr> | |
| 2293 <td>No</td> | |
| 2294 <td style="text-align: left;">Raster</td> | |
| 2295 <td>2</td> | |
| 2296 <td style="text-align: left;">0.5</td> | |
| 2297 <td style="text-align: left;">1</td> | |
| 2298 </tr> | |
| 2299 <tr> | |
| 2300 <td>No</td> | |
| 2301 <td style="text-align: left;">Vector</td> | |
| 2302 <td>2</td> | |
| 2303 <td style="text-align: left;">0.1</td> | |
| 2304 <td style="text-align: left;">0.1</td> | |
| 2305 </tr> | |
| 2306 <tr> | |
| 2307 <td>Yes</td> | |
| 2308 <td style="text-align: left;">Raster</td> | |
| 2309 <td>10</td> | |
| 2310 <td style="text-align: left;">0.2</td> | |
| 2311 <td style="text-align: left;">N/A</td> | |
| 2312 </tr> | |
| 2313 <tr> | |
| 2314 <td>Yes</td> | |
| 2315 <td style="text-align: left;">Vector (non-EMF)</td> | |
| 2316 <td>2</td> | |
| 2317 <td style="text-align: left;">0.1</td> | |
| 2318 <td style="text-align: left;">N/A</td> | |
| 2319 </tr> | |
| 2320 <tr> | |
| 2321 <td>Yes</td> | |
| 2322 <td style="text-align: left;">EMF</td> | |
| 2323 <td>40</td> | |
| 2324 <td style="text-align: left;">0.1</td> | |
| 2325 <td style="text-align: left;">N/A</td> | |
| 2326 </tr> | |
| 2327 </tbody> | |
| 2328 </table> | |
| 2329 </div> | |
| 2330 <h3 id="scaling-by-x-dimension-and-resolution">4.9.1 Scaling by | |
| 2331 X-dimension and Resolution</h3> | |
| 2332 <p>An alternative way to specify the scale, which takes the above | |
| 2333 details into account, is to specify measurable units using the | |
| 2334 <code>--scalexdimdp</code> option, which has the format</p> | |
| 2335 <pre><code>--scalexdimdp=X[,R]</code></pre> | |
| 2336 <p>where <code>X</code> is the X-dimension (in mm by default) and | |
| 2337 <code>R</code> is the resolution (in dpmm, dots per mm, by default). | |
| 2338 <code>R</code> is optional, and defaults to 12 dpmm, and <code>X</code> | |
| 2339 may be zero, in which case it uses a symbology-specific default. The | |
| 2340 units may be given in inches for <code>X</code> by appending | |
| 2341 <code>"in"</code>, and in dpi (dots per inch) for <code>R</code> by | |
| 2342 appending <code>"dpi"</code>. For example</p> | |
| 2343 <div class="sourceCode" id="cb37"><pre | |
| 2344 class="sourceCode bash"><code class="sourceCode bash"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-d</span> <span class="st">"1234"</span> <span class="at">--scalexdimdp</span><span class="op">=</span>0.013in,300dpi</span></code></pre></div> | |
| 2345 <p>Explicit metric units may also be given by appending | |
| 2346 <code>"mm"</code> and <code>"dpmm"</code> as appropriate, and may be | |
| 2347 mixed with U.S. units:</p> | |
| 2348 <div class="sourceCode" id="cb38"><pre | |
| 2349 class="sourceCode bash"><code class="sourceCode bash"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-d</span> <span class="st">"1234"</span> <span class="at">--scalexdimdp</span><span class="op">=</span>0.33mm,300dpi</span></code></pre></div> | |
| 2350 <h3 id="scaling-example">4.9.2 Scaling Example</h3> | |
| 2351 <p>The GS1 General Specifications Section 5.2.6.6 ‘Symbol dimensions at | |
| 2352 nominal size’ gives an example of an EAN-13 barcode using the | |
| 2353 X-dimension of 0.33mm. To print that example as a PNG at 12 dpmm, the | |
| 2354 approximate equivalent of 300 dpi (<code>dpi = dpmm * 25.4</code>), | |
| 2355 specify a scale of 2, since <code>0.33 * 12 = 3.96</code> pixels, or 4 | |
| 2356 pixels rounding to the nearest pixel:</p> | |
| 2357 <div class="sourceCode" id="cb39"><pre | |
| 2358 class="sourceCode bash"><code class="sourceCode bash"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX <span class="at">-d</span> <span class="st">"501234567890"</span> <span class="at">--compliantheight</span> <span class="at">--scale</span><span class="op">=</span>2</span></code></pre></div> | |
| 2359 <p>This will result in output of 37.29mm x 25.56mm (WxH) at 12 dpmm. The | |
| 2360 same result can be achieved using the <code>--scalexdimdp</code> option | |
| 2361 with</p> | |
| 2362 <div class="sourceCode" id="cb40"><pre | |
| 2363 class="sourceCode bash"><code class="sourceCode bash"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX <span class="at">-d</span> <span class="st">"501234567890"</span> <span class="at">--compliantheight</span> <span class="at">--scalexdimdp</span><span class="op">=</span>0</span></code></pre></div> | |
| 2364 <p>as 0.33mm is the default X-dimension for EAN, and 12 dpmm the default | |
| 2365 resolution.</p> | |
| 2366 <h3 id="maxicode-raster-scaling">4.9.3 MaxiCode Raster Scaling</h3> | |
| 2367 <p>For MaxiCode symbols, which use hexagons, the scale for raster output | |
| 2368 is multiplied by 10 before being applied. The 0.5 increment recommended | |
| 2369 for normal raster output does not apply.</p> | |
| 2370 <p>The minimum scale is 0.2, so the minimum X-dimension is 2 pixels. | |
| 2371 However scales below 0.5 are not recommended and may produce symbols | |
| 2372 that are not within the following size ranges.</p> | |
| 2373 <p>MaxiCode symbols have fixed size ranges of 24.82mm to 27.93mm in | |
| 2374 width, and 23.71mm to 26.69mm in height, excluding quiet zones. The | |
| 2375 default X-dimension is 0.88mm. For example, to output at the default | |
| 2376 X-dimension at 600 dpi specify:</p> | |
| 2377 <div class="sourceCode" id="cb41"><pre | |
| 2378 class="sourceCode bash"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> MAXICODE <span class="at">-d</span> <span class="st">"MaxiCode (19 chars)"</span> <span class="at">--scalexdimdp</span><span class="op">=</span>0,600dpi</span></code></pre></div> | |
| 2379 <h2 id="human-readable-text-hrt-options">4.10 Human Readable Text (HRT) | |
| 2380 Options</h2> | |
| 2381 <p>For linear barcodes the text present in the output image can be | |
| 2382 removed by using the <code>--notext</code> option. Note also that for | |
| 2383 raster output text will not be printed for scales less than 1 (see <a | |
| 2384 href="#adjusting-image-size-x-dimension">4.9 Adjusting Image Size | |
| 2385 (X-dimension)</a>).</p> | |
| 2386 <p>Text can be set to bold using the <code>--bold</code> option, or a | |
| 2387 smaller font can be substituted using the <code>--small</code> option. | |
| 2388 The <code>--bold</code> and <code>--small</code> options can be used | |
| 2389 together if required, but only for vector output.</p> | |
| 2390 <figure> | |
| 2391 <img src="images/code128_small_bold.svg" title="fig:" class="lin" | |
| 2392 alt="zint --bold -d "This Text" --small" /> | |
| 2393 <figcaption | |
| 2394 aria-hidden="true"><code>zint --bold -d "This Text" --small</code></figcaption> | |
| 2395 </figure> | |
| 2396 <p>The gap between the barcode and the text can be adjusted using the | |
| 2397 <code>--textgap</code> option, where the gap is given in X-dimensions, | |
| 2398 and may be negative (minimum -5.0X, maximum 10.0X). The default gap is | |
| 2399 1X. Note that a very small gap may cause accented texts to overlap with | |
| 2400 the barcode:</p> | |
| 2401 <figure> | |
| 2402 <img src="images/code128_textgap.svg" title="fig:" class="lin" | |
| 2403 alt="zint -d "Áccent" --textgap=0.1" /> | |
| 2404 <figcaption | |
| 2405 aria-hidden="true"><code>zint -d "Áccent" --textgap=0.1</code></figcaption> | |
| 2406 </figure> | |
| 2407 <p>For SVG output, the font preferred by Zint (monospaced “OCR-B” for | |
| 2408 EAN/UPC, “Arimo” - a proportional sans-serif font metrically compatible | |
| 2409 with “Arial” - for all others) can be embedded in the file for | |
| 2410 portability using the <code>--embedfont</code> option:</p> | |
| 2411 <figure> | |
| 2412 <img src="images/code128_embedfont.svg" title="fig:" class="lin" | |
| 2413 alt="zint -d "Áccent" --embedfont" /> | |
| 2414 <figcaption | |
| 2415 aria-hidden="true"><code>zint -d "Áccent" --embedfont</code></figcaption> | |
| 2416 </figure> | |
| 2417 <h2 id="input-modes">4.11 Input Modes</h2> | |
| 2418 <h3 id="unicode-data-and-gs1-modes">4.11.1 Unicode, Data, and GS1 | |
| 2419 Modes</h3> | |
| 2420 <p>By default all CLI input data is assumed to be encoded in UTF-8 | |
| 2421 format. Many barcode symbologies encode data using the Latin-1 (ISO/IEC | |
| 2422 8859-1 plus ASCII) character set, so input is converted from UTF-8 to | |
| 2423 Latin-1 before being put in the symbol. In addition QR Code and its | |
| 2424 variants and Han Xin Code can by default encode Japanese (Kanji) or | |
| 2425 Chinese (Hanzi) characters which are also converted from UTF-8.</p> | |
| 2426 <p>There are two exceptions to the Latin-1 default: Grid Matrix, whose | |
| 2427 default character set is GB 2312 (Chinese); and UPNQR, whose default | |
| 2428 character set is Latin-2 (ISO/IEC 8859-2 plus ASCII).</p> | |
| 2429 <div id="tbl:default_character_sets" class="tablenos"> | |
| 2430 <table id="tbl:default_character_sets" | |
| 2431 data-tag=": Default Character Sets"> | |
| 2432 <caption><span>Table : Default Character Sets</span> </caption> | |
| 2433 <thead> | |
| 2434 <tr> | |
| 2435 <th style="text-align: left;">Symbology</th> | |
| 2436 <th style="text-align: left;">Default character sets</th> | |
| 2437 <th>Alternate if input not Latin-1</th> | |
| 2438 </tr> | |
| 2439 </thead> | |
| 2440 <tbody> | |
| 2441 <tr> | |
| 2442 <td style="text-align: left;">Aztec Code</td> | |
| 2443 <td style="text-align: left;">Latin-1</td> | |
| 2444 <td>None</td> | |
| 2445 </tr> | |
| 2446 <tr> | |
| 2447 <td style="text-align: left;">Codablock-F</td> | |
| 2448 <td style="text-align: left;">Latin-1</td> | |
| 2449 <td>None</td> | |
| 2450 </tr> | |
| 2451 <tr> | |
| 2452 <td style="text-align: left;">Code 128</td> | |
| 2453 <td style="text-align: left;">Latin-1</td> | |
| 2454 <td>None</td> | |
| 2455 </tr> | |
| 2456 <tr> | |
| 2457 <td style="text-align: left;">Code 16K</td> | |
| 2458 <td style="text-align: left;">Latin-1</td> | |
| 2459 <td>None</td> | |
| 2460 </tr> | |
| 2461 <tr> | |
| 2462 <td style="text-align: left;">Code One</td> | |
| 2463 <td style="text-align: left;">Latin-1</td> | |
| 2464 <td>None</td> | |
| 2465 </tr> | |
| 2466 <tr> | |
| 2467 <td style="text-align: left;">Data Matrix</td> | |
| 2468 <td style="text-align: left;">Latin-1</td> | |
| 2469 <td>None</td> | |
| 2470 </tr> | |
| 2471 <tr> | |
| 2472 <td style="text-align: left;">DotCode</td> | |
| 2473 <td style="text-align: left;">Latin-1</td> | |
| 2474 <td>None</td> | |
| 2475 </tr> | |
| 2476 <tr> | |
| 2477 <td style="text-align: left;">Grid Matrix</td> | |
| 2478 <td style="text-align: left;">GB 2312 (includes ASCII)</td> | |
| 2479 <td>N/A</td> | |
| 2480 </tr> | |
| 2481 <tr> | |
| 2482 <td style="text-align: left;">Han Xin</td> | |
| 2483 <td style="text-align: left;">Latin-1</td> | |
| 2484 <td>GB 18030 (includes ASCII)</td> | |
| 2485 </tr> | |
| 2486 <tr> | |
| 2487 <td style="text-align: left;">MaxiCode</td> | |
| 2488 <td style="text-align: left;">Latin-1</td> | |
| 2489 <td>None</td> | |
| 2490 </tr> | |
| 2491 <tr> | |
| 2492 <td style="text-align: left;">MicroPDF417</td> | |
| 2493 <td style="text-align: left;">Latin-1</td> | |
| 2494 <td>None</td> | |
| 2495 </tr> | |
| 2496 <tr> | |
| 2497 <td style="text-align: left;">Micro QR Code</td> | |
| 2498 <td style="text-align: left;">Latin-1</td> | |
| 2499 <td>Shift JIS (includes ASCII<a href="#fn5" class="footnote-ref" | |
| 2500 id="fnref5" role="doc-noteref"><sup>5</sup></a>)</td> | |
| 2501 </tr> | |
| 2502 <tr> | |
| 2503 <td style="text-align: left;">PDF417</td> | |
| 2504 <td style="text-align: left;">Latin-1</td> | |
| 2505 <td>None</td> | |
| 2506 </tr> | |
| 2507 <tr> | |
| 2508 <td style="text-align: left;">QR Code</td> | |
| 2509 <td style="text-align: left;">Latin-1</td> | |
| 2510 <td>Shift JIS (see above)</td> | |
| 2511 </tr> | |
| 2512 <tr> | |
| 2513 <td style="text-align: left;">rMQR</td> | |
| 2514 <td style="text-align: left;">Latin-1</td> | |
| 2515 <td>Shift JIS (see above)</td> | |
| 2516 </tr> | |
| 2517 <tr> | |
| 2518 <td style="text-align: left;">Ultracode</td> | |
| 2519 <td style="text-align: left;">Latin-1</td> | |
| 2520 <td>None</td> | |
| 2521 </tr> | |
| 2522 <tr> | |
| 2523 <td style="text-align: left;">UPNQR</td> | |
| 2524 <td style="text-align: left;">Latin-2</td> | |
| 2525 <td>N/A</td> | |
| 2526 </tr> | |
| 2527 <tr> | |
| 2528 <td style="text-align: left;">All others</td> | |
| 2529 <td style="text-align: left;">ASCII</td> | |
| 2530 <td>N/A</td> | |
| 2531 </tr> | |
| 2532 </tbody> | |
| 2533 </table> | |
| 2534 </div> | |
| 2535 <p>If Zint encounters characters which can not be encoded using the | |
| 2536 default character encoding then it will take advantage of the ECI | |
| 2537 (Extended Channel Interpretations) mechanism to encode the data if the | |
| 2538 symbology supports it - see <a href="#input-modes-and-eci">4.11.2 Input | |
| 2539 Modes and ECI</a> below.</p> | |
| 2540 <p>GS1 data can be encoded in a number of symbologies. Application | |
| 2541 Identifiers (AIs) should be enclosed in <code>[square brackets]</code> | |
| 2542 followed by the data to be encoded (see <a href="#gs1-128">6.1.10.3 | |
| 2543 GS1-128</a>). To encode GS1 data use the <code>--gs1</code> option. GS1 | |
| 2544 mode is assumed (and doesn’t need to be set) for GS1-128, EAN-14, GS1 | |
| 2545 DataBar and GS1 Composite symbologies but is also available for Aztec | |
| 2546 Code, Code 16K, Code 49, Code One, Data Matrix, DotCode, QR Code and | |
| 2547 Ultracode.</p> | |
| 2548 <p>Health Industry Barcode (HIBC) data may also be encoded in the | |
| 2549 symbologies Aztec Code, Codablock-F, Code 128, Code 39, Data Matrix, | |
| 2550 MicroPDF417, PDF417 and QR Code. Within this mode, the leading | |
| 2551 <code>'+'</code> and the check character are automatically added by | |
| 2552 Zint, conforming to HIBC Labeler Identification Code (HIBC LIC). For | |
| 2553 HIBC Provider Applications Standard (HIBC PAS), preface the data with a | |
| 2554 slash <code>'/'</code>.</p> | |
| 2555 <p>The <code>--binary</code> option encodes the input data as given. | |
| 2556 Automatic code page translation to an ECI page is disabled, and no | |
| 2557 validation of the data’s encoding takes place. This may be used for raw | |
| 2558 binary or binary encrypted data. This switch plays together with the | |
| 2559 built-in ECI logic and examples may be found below.</p> | |
| 2560 <p>The <code>--fullmultibyte</code> option uses the multibyte modes of | |
| 2561 QR Code, Micro QR Code, Rectangular Micro QR Code, Han Xin Code and Grid | |
| 2562 Matrix for non-ASCII data, maximizing density. This is achieved by using | |
| 2563 compression designed for Kanji/Hanzi characters; however some decoders | |
| 2564 take blocks which are encoded this way and interpret them as Kanji/Hanzi | |
| 2565 characters, thus causing data corruption. Symbols encoded with this | |
| 2566 option should be checked against decoders before they are used. The | |
| 2567 popular open-source ZXing decoder is known to exhibit this | |
| 2568 behaviour.</p> | |
| 2569 <h3 id="input-modes-and-eci">4.11.2 Input Modes and ECI</h3> | |
| 2570 <p>If your data contains characters that are not in the default | |
| 2571 character set, you may encode it using an ECI-aware symbology and an ECI | |
| 2572 value from Table <a href="#tbl:eci_codes">: ECI Codes</a> below. The ECI | |
| 2573 information is added to your code symbol as prefix data. The symbologies | |
| 2574 that support ECI are</p> | |
| 2575 <div id="tbl:eci_aware_symbologies" class="tablenos"> | |
| 2576 <table id="tbl:eci_aware_symbologies" | |
| 2577 data-tag=": ECI-Aware Symbologies"> | |
| 2578 <caption><span>Table : ECI-Aware Symbologies</span> </caption> | |
| 2579 <tbody> | |
| 2580 <tr> | |
| 2581 <td style="text-align: left;">Aztec Code</td> | |
| 2582 <td style="text-align: left;">Grid Matrix</td> | |
| 2583 <td style="text-align: left;">PDF417</td> | |
| 2584 </tr> | |
| 2585 <tr> | |
| 2586 <td style="text-align: left;">Code One</td> | |
| 2587 <td style="text-align: left;">Han Xin Code</td> | |
| 2588 <td style="text-align: left;">QR Code</td> | |
| 2589 </tr> | |
| 2590 <tr> | |
| 2591 <td style="text-align: left;">Data Matrix</td> | |
| 2592 <td style="text-align: left;">MaxiCode</td> | |
| 2593 <td style="text-align: left;">rMQR</td> | |
| 2594 </tr> | |
| 2595 <tr> | |
| 2596 <td style="text-align: left;">DotCode</td> | |
| 2597 <td style="text-align: left;">MicroPDF417</td> | |
| 2598 <td style="text-align: left;">Ultracode</td> | |
| 2599 </tr> | |
| 2600 </tbody> | |
| 2601 </table> | |
| 2602 </div> | |
| 2603 <p>Be aware that not all barcode readers support ECI mode, so this can | |
| 2604 sometimes lead to unreadable barcodes. If you are using characters | |
| 2605 beyond those supported by the default character set then you should | |
| 2606 check that the resulting barcode can be understood by your target | |
| 2607 barcode reader.</p> | |
| 2608 <p>The ECI value may be specified with the <code>--eci</code> switch, | |
| 2609 followed by the value in the column <code>"ECI Code"</code> in the table | |
| 2610 below. The input data should be UTF-8 formatted. Zint automatically | |
| 2611 translates the data into the target encoding.</p> | |
| 2612 <div id="tbl:eci_codes" class="tablenos"> | |
| 2613 <table id="tbl:eci_codes" data-tag=": ECI Codes"> | |
| 2614 <caption><span>Table : ECI Codes</span> </caption> | |
| 2615 <thead> | |
| 2616 <tr> | |
| 2617 <th>ECI Code</th> | |
| 2618 <th>Character Encoding Scheme (ISO/IEC 8859 schemes include ASCII)</th> | |
| 2619 </tr> | |
| 2620 </thead> | |
| 2621 <tbody> | |
| 2622 <tr> | |
| 2623 <td>3</td> | |
| 2624 <td>ISO/IEC 8859-1 - Latin alphabet No. 1</td> | |
| 2625 </tr> | |
| 2626 <tr> | |
| 2627 <td>4</td> | |
| 2628 <td>ISO/IEC 8859-2 - Latin alphabet No. 2</td> | |
| 2629 </tr> | |
| 2630 <tr> | |
| 2631 <td>5</td> | |
| 2632 <td>ISO/IEC 8859-3 - Latin alphabet No. 3</td> | |
| 2633 </tr> | |
| 2634 <tr> | |
| 2635 <td>6</td> | |
| 2636 <td>ISO/IEC 8859-4 - Latin alphabet No. 4</td> | |
| 2637 </tr> | |
| 2638 <tr> | |
| 2639 <td>7</td> | |
| 2640 <td>ISO/IEC 8859-5 - Latin/Cyrillic alphabet</td> | |
| 2641 </tr> | |
| 2642 <tr> | |
| 2643 <td>8</td> | |
| 2644 <td>ISO/IEC 8859-6 - Latin/Arabic alphabet</td> | |
| 2645 </tr> | |
| 2646 <tr> | |
| 2647 <td>9</td> | |
| 2648 <td>ISO/IEC 8859-7 - Latin/Greek alphabet</td> | |
| 2649 </tr> | |
| 2650 <tr> | |
| 2651 <td>10</td> | |
| 2652 <td>ISO/IEC 8859-8 - Latin/Hebrew alphabet</td> | |
| 2653 </tr> | |
| 2654 <tr> | |
| 2655 <td>11</td> | |
| 2656 <td>ISO/IEC 8859-9 - Latin alphabet No. 5 (Turkish)</td> | |
| 2657 </tr> | |
| 2658 <tr> | |
| 2659 <td>12</td> | |
| 2660 <td>ISO/IEC 8859-10 - Latin alphabet No. 6 (Nordic)</td> | |
| 2661 </tr> | |
| 2662 <tr> | |
| 2663 <td>13</td> | |
| 2664 <td>ISO/IEC 8859-11 - Latin/Thai alphabet</td> | |
| 2665 </tr> | |
| 2666 <tr> | |
| 2667 <td>15</td> | |
| 2668 <td>ISO/IEC 8859-13 - Latin alphabet No. 7 (Baltic)</td> | |
| 2669 </tr> | |
| 2670 <tr> | |
| 2671 <td>16</td> | |
| 2672 <td>ISO/IEC 8859-14 - Latin alphabet No. 8 (Celtic)</td> | |
| 2673 </tr> | |
| 2674 <tr> | |
| 2675 <td>17</td> | |
| 2676 <td>ISO/IEC 8859-15 - Latin alphabet No. 9</td> | |
| 2677 </tr> | |
| 2678 <tr> | |
| 2679 <td>18</td> | |
| 2680 <td>ISO/IEC 8859-16 - Latin alphabet No. 10</td> | |
| 2681 </tr> | |
| 2682 <tr> | |
| 2683 <td>20</td> | |
| 2684 <td>Shift JIS (JIS X 0208 and JIS X 0201)</td> | |
| 2685 </tr> | |
| 2686 <tr> | |
| 2687 <td>21</td> | |
| 2688 <td>Windows 1250 - Latin 2 (Central Europe)</td> | |
| 2689 </tr> | |
| 2690 <tr> | |
| 2691 <td>22</td> | |
| 2692 <td>Windows 1251 - Cyrillic</td> | |
| 2693 </tr> | |
| 2694 <tr> | |
| 2695 <td>23</td> | |
| 2696 <td>Windows 1252 - Latin 1</td> | |
| 2697 </tr> | |
| 2698 <tr> | |
| 2699 <td>24</td> | |
| 2700 <td>Windows 1256 - Arabic</td> | |
| 2701 </tr> | |
| 2702 <tr> | |
| 2703 <td>25</td> | |
| 2704 <td>UTF-16BE (High order byte first)</td> | |
| 2705 </tr> | |
| 2706 <tr> | |
| 2707 <td>26</td> | |
| 2708 <td>UTF-8</td> | |
| 2709 </tr> | |
| 2710 <tr> | |
| 2711 <td>27</td> | |
| 2712 <td>ASCII (ISO/IEC 646 IRV)</td> | |
| 2713 </tr> | |
| 2714 <tr> | |
| 2715 <td>28</td> | |
| 2716 <td>Big5 (Taiwan) Chinese Character Set</td> | |
| 2717 </tr> | |
| 2718 <tr> | |
| 2719 <td>29</td> | |
| 2720 <td>GB 2312 (PRC) Chinese Character Set</td> | |
| 2721 </tr> | |
| 2722 <tr> | |
| 2723 <td>30</td> | |
| 2724 <td>Korean Character Set EUC-KR (KS X 1001:2002)</td> | |
| 2725 </tr> | |
| 2726 <tr> | |
| 2727 <td>31</td> | |
| 2728 <td>GBK Chinese Character Set</td> | |
| 2729 </tr> | |
| 2730 <tr> | |
| 2731 <td>32</td> | |
| 2732 <td>GB 18030 Chinese Character Set</td> | |
| 2733 </tr> | |
| 2734 <tr> | |
| 2735 <td>33</td> | |
| 2736 <td>UTF-16LE (Low order byte first)</td> | |
| 2737 </tr> | |
| 2738 <tr> | |
| 2739 <td>34</td> | |
| 2740 <td>UTF-32BE (High order bytes first)</td> | |
| 2741 </tr> | |
| 2742 <tr> | |
| 2743 <td>35</td> | |
| 2744 <td>UTF-32LE (Low order bytes first)</td> | |
| 2745 </tr> | |
| 2746 <tr> | |
| 2747 <td>170</td> | |
| 2748 <td>ISO/IEC 646 Invariant<a href="#fn6" class="footnote-ref" id="fnref6" | |
| 2749 role="doc-noteref"><sup>6</sup></a></td> | |
| 2750 </tr> | |
| 2751 <tr> | |
| 2752 <td>899</td> | |
| 2753 <td>8-bit binary data</td> | |
| 2754 </tr> | |
| 2755 </tbody> | |
| 2756 </table> | |
| 2757 </div> | |
| 2758 <p>An ECI value of 0 does not encode any ECI information in the code | |
| 2759 symbol (unless the data contains non-default character set characters). | |
| 2760 In this case, the default character set applies (see Table <a | |
| 2761 href="#tbl:default_character_sets">: Default Character Sets</a> | |
| 2762 above).</p> | |
| 2763 <p>If no ECI is specified or a value of 0 is given, and the data does | |
| 2764 contain characters other than in the default character set, then Zint | |
| 2765 will automatically insert the appropriate single-byte ECI if possible | |
| 2766 (ECIs 3 to 24, excluding ECI 20), or failing that ECI 26 (UTF-8). A | |
| 2767 warning will be generated. This mechanism is not applied if the | |
| 2768 <code>--binary</code> option is given.</p> | |
| 2769 <p>Multiple ECIs can be specified using the <code>--segN</code> options | |
| 2770 - see <a href="#multiple-segments">4.16 Multiple Segments</a>.</p> | |
| 2771 <p>Note: the <code>--eci=3</code> specification should only be used for | |
| 2772 special purposes. Using this parameter, the ECI information is | |
| 2773 explicitly added to the symbol. Nevertheless, for ECI Code 3, this is | |
| 2774 not usually required, as this is the default encoding for most barcodes, | |
| 2775 which is also active without any ECI information.</p> | |
| 2776 <h4 id="input-modes-and-eci-example-1">4.11.2.1 Input Modes and ECI | |
| 2777 Example 1</h4> | |
| 2778 <p>The Euro sign U+20AC can be encoded in ISO/IEC 8859-15. The Euro sign | |
| 2779 has the ISO/IEC 8859-15 codepoint hex <code>"A4"</code>. It is encoded | |
| 2780 in UTF-8 as the hex sequence: <code>"E2 82 AC"</code>. Those 3 bytes are | |
| 2781 contained in the file <code>"utf8euro.txt"</code>. This command will | |
| 2782 generate the corresponding code:</p> | |
| 2783 <div class="sourceCode" id="cb42"><pre | |
| 2784 class="sourceCode bash"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>17 <span class="at">-i</span> utf8euro.txt</span></code></pre></div> | |
| 2785 <p>This is equivalent to the commands (using the <code>--esc</code> | |
| 2786 switch):</p> | |
| 2787 <div class="sourceCode" id="cb43"><pre | |
| 2788 class="sourceCode bash"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>17 <span class="at">--esc</span> <span class="at">-d</span> <span class="st">"\xE2\x82\xAC"</span></span> | |
| 2789 <span id="cb43-2"><a href="#cb43-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 2790 <span id="cb43-3"><a href="#cb43-3" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>17 <span class="at">--esc</span> <span class="at">-d</span> <span class="st">"\u20AC"</span></span></code></pre></div> | |
| 2791 <p>and to the command:</p> | |
| 2792 <div class="sourceCode" id="cb44"><pre | |
| 2793 class="sourceCode bash"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>17 <span class="at">-d</span> <span class="st">"€"</span></span></code></pre></div> | |
| 2794 <figure> | |
| 2795 <img src="images/datamatrix_euro.svg" title="fig:" class="i2d" | |
| 2796 alt="zint -b DATAMATRIX --eci=17 -d "€"" /> | |
| 2797 <figcaption | |
| 2798 aria-hidden="true"><code>zint -b DATAMATRIX --eci=17 -d "€"</code></figcaption> | |
| 2799 </figure> | |
| 2800 <h4 id="input-modes-and-eci-example-2">4.11.2.2 Input Modes and ECI | |
| 2801 Example 2</h4> | |
| 2802 <p>The Chinese character with the Unicode codepoint U+5E38 can be | |
| 2803 encoded in Big5 encoding. The Big5 representation of this character is | |
| 2804 the two hex bytes: <code>"B1 60"</code> (contained in the file | |
| 2805 <code>"big5char.txt"</code>). The generation command for Data Matrix | |
| 2806 is:</p> | |
| 2807 <div class="sourceCode" id="cb45"><pre | |
| 2808 class="sourceCode bash"><code class="sourceCode bash"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>28 <span class="at">--binary</span> <span class="at">-i</span> big5char.txt</span></code></pre></div> | |
| 2809 <p>This is equivalent to the command (using the <code>--esc</code> | |
| 2810 switch):</p> | |
| 2811 <div class="sourceCode" id="cb46"><pre | |
| 2812 class="sourceCode bash"><code class="sourceCode bash"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>28 <span class="at">--binary</span> <span class="at">--esc</span> <span class="at">-d</span> <span class="st">"\xB1\x60"</span></span></code></pre></div> | |
| 2813 <p>and to the commands (no <code>--binary</code> switch so conversion | |
| 2814 occurs):</p> | |
| 2815 <div class="sourceCode" id="cb47"><pre | |
| 2816 class="sourceCode bash"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>28 <span class="at">--esc</span> <span class="at">-d</span> <span class="st">"\xE5\xB8\xB8"</span></span> | |
| 2817 <span id="cb47-2"><a href="#cb47-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 2818 <span id="cb47-3"><a href="#cb47-3" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>28 <span class="at">--esc</span> <span class="at">-d</span> <span class="st">"\u5E38"</span></span> | |
| 2819 <span id="cb47-4"><a href="#cb47-4" aria-hidden="true" tabindex="-1"></a></span> | |
| 2820 <span id="cb47-5"><a href="#cb47-5" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 71 <span class="at">--scale</span><span class="op">=</span>10 <span class="at">--eci</span><span class="op">=</span>28 <span class="at">-d</span> <span class="st">"常"</span></span></code></pre></div> | |
| 2821 <figure> | |
| 2822 <img src="images/datamatrix_big5.svg" title="fig:" class="i2d" | |
| 2823 alt="zint -b DATAMATRIX --eci=28 -d "\u5E38" --esc" /> | |
| 2824 <figcaption | |
| 2825 aria-hidden="true"><code>zint -b DATAMATRIX --eci=28 -d "\u5E38" --esc</code></figcaption> | |
| 2826 </figure> | |
| 2827 <h4 id="input-modes-and-eci-example-3">4.11.2.3 Input Modes and ECI | |
| 2828 Example 3</h4> | |
| 2829 <p>Some decoders (in particular mobile app ones) for QR Code assume | |
| 2830 UTF-8 encoding by default and do not support ECI. In this case supply | |
| 2831 UTF-8 data and use the <code>--binary</code> switch so that the data | |
| 2832 will be encoded as UTF-8 without conversion:</p> | |
| 2833 <div class="sourceCode" id="cb48"><pre | |
| 2834 class="sourceCode bash"><code class="sourceCode bash"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 58 <span class="at">--binary</span> <span class="at">-d</span> <span class="st">"UTF-8 data"</span></span></code></pre></div> | |
| 2835 <figure> | |
| 2836 <img src="images/qrcode_binary_utf8.svg" title="fig:" class="i2d" | |
| 2837 alt="zint -b QRCODE --binary -d "\xE2\x82\xAC\xE5\xB8\xB8" --esc" /> | |
| 2838 <figcaption | |
| 2839 aria-hidden="true"><code>zint -b QRCODE --binary -d "\xE2\x82\xAC\xE5\xB8\xB8" --esc</code></figcaption> | |
| 2840 </figure> | |
| 2841 <h2 id="batch-processing">4.12 Batch Processing</h2> | |
| 2842 <p>Data can be batch processed by reading from a text file and producing | |
| 2843 a separate barcode image for each line of text in that file. To do this | |
| 2844 use the <code>--batch</code> switch together with <code>-i</code> to | |
| 2845 select the input file from which to read data. For example</p> | |
| 2846 <div class="sourceCode" id="cb49"><pre | |
| 2847 class="sourceCode bash"><code class="sourceCode bash"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX <span class="at">--batch</span> <span class="at">-i</span> ean13nos.txt</span></code></pre></div> | |
| 2848 <p>where <code>"ean13nos.txt"</code> contains a list of EAN-13 numbers | |
| 2849 (GTINs), each on its own line. Zint will automatically detect the end of | |
| 2850 a line of text (in either Unix or Windows formatted text files) and | |
| 2851 produce a symbol each time it finds this.</p> | |
| 2852 <p>Input files should end with a line feed character - if this is not | |
| 2853 present then Zint will not encode the last line of text, and will warn | |
| 2854 you that there is a problem.</p> | |
| 2855 <p>By default Zint will output numbered filenames starting with | |
| 2856 <code>00001.png</code>, <code>00002.png</code> etc. To change this | |
| 2857 behaviour specify the <code>-o</code> option using special characters in | |
| 2858 the output filename as shown in the table below:</p> | |
| 2859 <div id="tbl:batch_filename_formatting" class="tablenos"> | |
| 2860 <table id="tbl:batch_filename_formatting" | |
| 2861 data-tag=": Batch Filename Formatting"> | |
| 2862 <caption><span>Table : Batch Filename Formatting</span> </caption> | |
| 2863 <thead> | |
| 2864 <tr> | |
| 2865 <th>Input Character</th> | |
| 2866 <th style="text-align: left;">Interpretation</th> | |
| 2867 </tr> | |
| 2868 </thead> | |
| 2869 <tbody> | |
| 2870 <tr> | |
| 2871 <td><code>~</code></td> | |
| 2872 <td style="text-align: left;">Insert a number or 0</td> | |
| 2873 </tr> | |
| 2874 <tr> | |
| 2875 <td><code>#</code></td> | |
| 2876 <td style="text-align: left;">Insert a number or space</td> | |
| 2877 </tr> | |
| 2878 <tr> | |
| 2879 <td><code>@</code></td> | |
| 2880 <td style="text-align: left;">Insert a number or <code>*</code> (or | |
| 2881 <code>+</code> on Windows)</td> | |
| 2882 </tr> | |
| 2883 <tr> | |
| 2884 <td>Any other</td> | |
| 2885 <td style="text-align: left;">Insert literally</td> | |
| 2886 </tr> | |
| 2887 </tbody> | |
| 2888 </table> | |
| 2889 </div> | |
| 2890 <p>For instance</p> | |
| 2891 <div class="sourceCode" id="cb50"><pre | |
| 2892 class="sourceCode bash"><code class="sourceCode bash"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX <span class="at">--batch</span> <span class="at">-i</span> ean13nos.txt <span class="at">-o</span> file~~~.svg</span></code></pre></div> | |
| 2893 <p>The following table shows some examples to clarify this method:</p> | |
| 2894 <div id="tbl:batch_filename_examples" class="tablenos"> | |
| 2895 <table id="tbl:batch_filename_examples" | |
| 2896 data-tag=": Batch Filename Examples"> | |
| 2897 <caption><span>Table : Batch Filename Examples</span> </caption> | |
| 2898 <thead> | |
| 2899 <tr> | |
| 2900 <th style="text-align: left;">Input</th> | |
| 2901 <th style="text-align: left;">Filenames Generated</th> | |
| 2902 </tr> | |
| 2903 </thead> | |
| 2904 <tbody> | |
| 2905 <tr> | |
| 2906 <td style="text-align: left;"><code>-o file~~~.svg</code></td> | |
| 2907 <td style="text-align: left;"><code>"file001.svg"</code>, | |
| 2908 <code>"file002.svg"</code>, <code>"file003.svg"</code></td> | |
| 2909 </tr> | |
| 2910 <tr> | |
| 2911 <td style="text-align: left;"><code>-o @@@@bar.png</code></td> | |
| 2912 <td style="text-align: left;"><code>"***1.png"</code>, | |
| 2913 <code>"***2.png"</code>, <code>"***3.png"</code> (except Windows)</td> | |
| 2914 </tr> | |
| 2915 <tr> | |
| 2916 <td style="text-align: left;"><code>-o @@@@bar.png</code></td> | |
| 2917 <td style="text-align: left;"><code>"+++1.png"</code>, | |
| 2918 <code>"+++2.png"</code>, <code>"+++3.png"</code> (on Windows)</td> | |
| 2919 </tr> | |
| 2920 <tr> | |
| 2921 <td style="text-align: left;"><code>-o my~~~bar.eps</code></td> | |
| 2922 <td style="text-align: left;"><code>"my001bar.eps"</code>, | |
| 2923 <code>"my002bar.eps"</code>, <code>"my003bar.eps"</code></td> | |
| 2924 </tr> | |
| 2925 <tr> | |
| 2926 <td style="text-align: left;"><code>-o t#es~t~.png</code></td> | |
| 2927 <td style="text-align: left;"><code>"t es0t1.png"</code>, | |
| 2928 <code>"t es0t2.png"</code>, <code>"t es0t3.png"</code></td> | |
| 2929 </tr> | |
| 2930 </tbody> | |
| 2931 </table> | |
| 2932 </div> | |
| 2933 <p>The special characters can span directories also, which is useful | |
| 2934 when creating a large number of barcodes:</p> | |
| 2935 <div id="tbl:batch_dir_examples" class="tablenos"> | |
| 2936 <table id="tbl:batch_dir_examples" | |
| 2937 data-tag=": Batch Directory Examples"> | |
| 2938 <caption><span>Table : Batch Directory Examples</span> </caption> | |
| 2939 <thead> | |
| 2940 <tr> | |
| 2941 <th style="text-align: left;">Input</th> | |
| 2942 <th style="text-align: left;">Filenames Generated</th> | |
| 2943 </tr> | |
| 2944 </thead> | |
| 2945 <tbody> | |
| 2946 <tr> | |
| 2947 <td style="text-align: left;"><code>-o dir~/file~~~.svg</code></td> | |
| 2948 <td style="text-align: left;"><code>"dir0/file001.svg"</code>, | |
| 2949 <code>"dir0/file002.svg"</code>, …</td> | |
| 2950 </tr> | |
| 2951 <tr> | |
| 2952 <td style="text-align: left;"></td> | |
| 2953 <td style="text-align: left;">, <code>"dir0/file999.svg"</code>, | |
| 2954 <code>"dir1/file000.svg"</code>, …</td> | |
| 2955 </tr> | |
| 2956 </tbody> | |
| 2957 </table> | |
| 2958 </div> | |
| 2959 <p>For an alternative method of naming output files see the | |
| 2960 <code>--mirror</code> option in <a href="#automatic-filenames">4.14 | |
| 2961 Automatic Filenames</a> below.</p> | |
| 2962 <h2 id="direct-output-to-stdout">4.13 Direct Output to stdout</h2> | |
| 2963 <p>The finished image files can be output directly to stdout for use as | |
| 2964 part of a pipe by using the <code>--direct</code> option. By default | |
| 2965 <code>--direct</code> will output data as a PNG image (or GIF image if | |
| 2966 <code>libpng</code> is not present), but this can be altered by | |
| 2967 supplementing the <code>--direct</code> option with a | |
| 2968 <code>--filetype</code> option followed by the suffix of the file type | |
| 2969 required. For example:</p> | |
| 2970 <div class="sourceCode" id="cb51"><pre | |
| 2971 class="sourceCode bash"><code class="sourceCode bash"><span id="cb51-1"><a href="#cb51-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 84 <span class="at">--direct</span> <span class="at">--filetype</span><span class="op">=</span>pcx <span class="at">-d</span> <span class="st">"Data to encode"</span></span></code></pre></div> | |
| 2972 <p>This command will output the symbol as a PCX file to stdout. For the | |
| 2973 supported output file formats see Table <a | |
| 2974 href="#tbl:output_file_formats">: Output File Formats</a>.</p> | |
| 2975 <hr /> | |
| 2976 <p>CAUTION: Outputting binary files to the command shell without | |
| 2977 catching that data in a pipe can have unpredictable results. Use with | |
| 2978 care!</p> | |
| 2979 <hr /> | |
| 2980 <h2 id="automatic-filenames">4.14 Automatic Filenames</h2> | |
| 2981 <p>The <code>--mirror</code> option instructs Zint to use the data to be | |
| 2982 encoded as an indicator of the filename to be used. This is particularly | |
| 2983 useful if you are processing batch data. For example the input data | |
| 2984 <code>"1234567"</code> will result in a file named | |
| 2985 <code>"1234567.png"</code>.</p> | |
| 2986 <p>There are restrictions, however, on what characters can be stored in | |
| 2987 a filename, so the filename may vary from the data if the data includes | |
| 2988 non-printable characters, for example, and may be shortened if the data | |
| 2989 input is long.</p> | |
| 2990 <p>To set the output file format use the <code>--filetype</code> option | |
| 2991 as detailed above in <a href="#direct-output-to-stdout">4.13 Direct | |
| 2992 Output to stdout</a>. To output to a specific directory use the | |
| 2993 <code>-o</code> option giving the name of the directory (any filename | |
| 2994 will be ignored, unless <code>--filetype</code> is not specified, in | |
| 2995 which case the filename’s extension will be used).</p> | |
| 2996 <h2 id="working-with-dots">4.15 Working with Dots</h2> | |
| 2997 <p>Matrix codes can be rendered as a series of dots or circles rather | |
| 2998 than the normal squares by using the <code>--dotty</code> option. This | |
| 2999 option is only available for matrix symbologies, and is automatically | |
| 3000 selected for DotCode. The size of the dots can be adjusted using the | |
| 3001 <code>--dotsize</code> option followed by the diameter of the dot, where | |
| 3002 that diameter is in X-dimensions. The minimum dot size is 0.01, the | |
| 3003 maximum is 20. The default size is 0.8.</p> | |
| 3004 <p>The default and minimum scale for raster output in dotty mode is | |
| 3005 1.</p> | |
| 3006 <figure> | |
| 3007 <img src="images/codeone_s_dotty.svg" title="fig:" class="dotty" | |
| 3008 alt="zint -b CODEONE -d "123456789012345678" --dotty --vers=9" /> | |
| 3009 <figcaption | |
| 3010 aria-hidden="true"><code>zint -b CODEONE -d "123456789012345678" --dotty --vers=9</code></figcaption> | |
| 3011 </figure> | |
| 3012 <h2 id="multiple-segments">4.16 Multiple Segments</h2> | |
| 3013 <p>If you need to specify different ECIs for different sections of the | |
| 3014 input data, the <code>--seg1</code> to <code>--seg9</code> options can | |
| 3015 be used. Each option is of the form <code>--segN=ECI,data</code> where | |
| 3016 <code>ECI</code> is the ECI code (see Table <a href="#tbl:eci_codes">: | |
| 3017 ECI Codes</a>) and <code>data</code> is the data to which this applies. | |
| 3018 This is in addition to the ECI and data specified using the | |
| 3019 <code>--eci</code> and <code>-d</code> options which must still be | |
| 3020 present and which in effect constitute segment 0. For instance</p> | |
| 3021 <div class="sourceCode" id="cb52"><pre | |
| 3022 class="sourceCode bash"><code class="sourceCode bash"><span id="cb52-1"><a href="#cb52-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> AZTEC_CODE <span class="at">--eci</span><span class="op">=</span>9 <span class="at">-d</span> <span class="st">"Κείμενο"</span> <span class="at">--seg1</span><span class="op">=</span>7,<span class="st">"Текст"</span> <span class="at">--seg2</span><span class="op">=</span>20,<span class="st">"文章"</span></span></code></pre></div> | |
| 3023 <p>specifies 3 segments: segment 0 with ECI 9 (Greek), segment 1 with | |
| 3024 ECI 7 (Cyrillic), and segment 2 with ECI 20 (Shift JIS). Segments must | |
| 3025 be consecutive.</p> | |
| 3026 <p>Naturally the symbology must be ECI-aware (see Table <a | |
| 3027 href="#tbl:eci_aware_symbologies">: ECI-Aware Symbologies</a>).</p> | |
| 3028 <figure> | |
| 3029 <img src="images/aztec_segs.svg" title="fig:" class="i2d" | |
| 3030 alt="zint -b AZTEC --eci=9 -d "Κείμενο" --seg1=7,"Текст" --seg2=20,"文章"" /> | |
| 3031 <figcaption | |
| 3032 aria-hidden="true"><code>zint -b AZTEC --eci=9 -d "Κείμενο" --seg1=7,"Текст" --seg2=20,"文章"</code></figcaption> | |
| 3033 </figure> | |
| 3034 <p>ECIs of zero may be given, in which case Zint will automatically | |
| 3035 determine an ECI if necessary, as described in section <a | |
| 3036 href="#input-modes-and-eci">4.11.2 Input Modes and ECI</a>.</p> | |
| 3037 <p>Multiple segments are not currently supported for use with GS1 | |
| 3038 data.</p> | |
| 3039 <h2 id="structured-append">4.17 Structured Append</h2> | |
| 3040 <p>Structured Append is a method of splitting data among several symbols | |
| 3041 so that they form a sequence that can be scanned and re-assembled in the | |
| 3042 correct order on reading, and is available for Aztec Code, Code One, | |
| 3043 Data Matrix, DotCode, Grid Matrix, MaxiCode, MicroPDF417, PDF417, QR | |
| 3044 Code and Ultracode.</p> | |
| 3045 <p>The <code>--structapp</code> option marks a symbol as part of a | |
| 3046 Structured Append sequence, and has the format</p> | |
| 3047 <pre><code>--structapp=I,C[,ID]</code></pre> | |
| 3048 <figure> | |
| 3049 <img src="images/datamatrix_structapp.svg" title="fig:" class="i2d" | |
| 3050 alt="zint -b DATAMATRIX -d "2nd of 3" --structapp="2,3,5006"" /> | |
| 3051 <figcaption | |
| 3052 aria-hidden="true"><code>zint -b DATAMATRIX -d "2nd of 3" --structapp="2,3,5006"</code></figcaption> | |
| 3053 </figure> | |
| 3054 <p>where <code>I</code> is the index (position) of the symbol in the | |
| 3055 Structured Append sequence, <code>C</code> is the count or total number | |
| 3056 of symbols in the sequence, and <code>ID</code> is an optional | |
| 3057 identifier (not available for Code One, DotCode or MaxiCode) that is the | |
| 3058 same for all symbols belonging to the same sequence. The index is | |
| 3059 1-based and goes from 1 to count. Count must be 2 or more. See the | |
| 3060 individual symbologies for further details.</p> | |
| 3061 <h2 id="help-options">4.18 Help Options</h2> | |
| 3062 <p>There are three help options which give information about how to use | |
| 3063 the command line. The <code>-h</code> or <code>--help</code> option will | |
| 3064 display a list of all of the valid options available, and also gives the | |
| 3065 exact version of the software (the version by itself can be displayed | |
| 3066 with <code>-v</code> or <code>--version</code>).</p> | |
| 3067 <p>The <code>-t</code> or <code>--types</code> option gives the table of | |
| 3068 symbologies along with the symbol ID numbers and names.</p> | |
| 3069 <p>The <code>-e</code> or <code>--ecinos</code> option gives a list of | |
| 3070 the ECI codes.</p> | |
| 3071 <h2 id="other-options">4.19 Other Options</h2> | |
| 3072 <p>Zint can output a representation of the symbol data as a set of | |
| 3073 hexadecimal values if asked to output to a text file | |
| 3074 (<code>"*.txt"</code>) or if given the option | |
| 3075 <code>--filetype=txt</code>. This can be used for test and diagnostic | |
| 3076 purposes.</p> | |
| 3077 <p>Additional options are available which are specific to certain | |
| 3078 symbologies. These may, for example, control the amount of error | |
| 3079 correction data or the size of the symbol. These options are discussed | |
| 3080 in section <a href="#types-of-symbology">6. Types of Symbology</a> of | |
| 3081 this guide.</p> | |
| 3082 <h1 id="using-the-api">5. Using the API</h1> | |
| 3083 <p>Zint has been written using the C language and has an API for use | |
| 3084 with C/C++ language programs. A Qt interface (see <a | |
| 3085 href="#annex-b.-qt-backend-qzint">Annex B. Qt Backend QZint</a>) is | |
| 3086 available in the <code>"backend_qt"</code> sub-directory, and a Tcl | |
| 3087 interface is available in the <code>"backend_tcl"</code> sub-directory | |
| 3088 (see <a href="#annex-c.-tcl-backend-binding">Annex C. Tcl Backend | |
| 3089 Binding</a>).</p> | |
| 3090 <p>The <code>libzint</code> API has been designed to be very similar to | |
| 3091 that used by the GNU Barcode package. This allows easy migration from | |
| 3092 GNU Barcode to Zint. Zint, however, uses none of the same function names | |
| 3093 or option names as GNU Barcode. This allows you to use both packages in | |
| 3094 your application without conflict if you wish.</p> | |
| 3095 <h2 id="creating-and-deleting-symbols">5.1 Creating and Deleting | |
| 3096 Symbols</h2> | |
| 3097 <p>The symbols manipulated by Zint are held in a | |
| 3098 <code>zint_symbol</code> structure defined in <code>"zint.h"</code>. | |
| 3099 These symbol structures are created with the | |
| 3100 <code>ZBarcode_Create()</code> function and deleted using the | |
| 3101 <code>ZBarcode_Delete()</code> function. For example the following code | |
| 3102 creates and then deletes a symbol:</p> | |
| 3103 <div class="sourceCode" id="cb54"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb54-1"><a href="#cb54-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><zint.h></span></span> | |
| 3104 <span id="cb54-2"><a href="#cb54-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><stdio.h></span></span> | |
| 3105 <span id="cb54-3"><a href="#cb54-3" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">()</span></span> | |
| 3106 <span id="cb54-4"><a href="#cb54-4" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> | |
| 3107 <span id="cb54-5"><a href="#cb54-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">struct</span> zint_symbol <span class="op">*</span>my_symbol<span class="op">;</span></span> | |
| 3108 <span id="cb54-6"><a href="#cb54-6" aria-hidden="true" tabindex="-1"></a> my_symbol <span class="op">=</span> ZBarcode_Create<span class="op">();</span></span> | |
| 3109 <span id="cb54-7"><a href="#cb54-7" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>my_symbol <span class="op">!=</span> NULL<span class="op">)</span> <span class="op">{</span></span> | |
| 3110 <span id="cb54-8"><a href="#cb54-8" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"Symbol successfully created!</span><span class="sc">\n</span><span class="st">"</span><span class="op">);</span></span> | |
| 3111 <span id="cb54-9"><a href="#cb54-9" aria-hidden="true" tabindex="-1"></a> ZBarcode_Delete<span class="op">(</span>my_symbol<span class="op">);</span></span> | |
| 3112 <span id="cb54-10"><a href="#cb54-10" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span> | |
| 3113 <span id="cb54-11"><a href="#cb54-11" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 3114 <span id="cb54-12"><a href="#cb54-12" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3115 <p>When compiling this code it will need to be linked with the | |
| 3116 <code>libzint</code> library using the <code>-lzint</code> option:</p> | |
| 3117 <div class="sourceCode" id="cb55"><pre | |
| 3118 class="sourceCode bash"><code class="sourceCode bash"><span id="cb55-1"><a href="#cb55-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-o</span> simple simple.c <span class="at">-lzint</span></span></code></pre></div> | |
| 3119 <h2 id="encoding-and-saving-to-file">5.2 Encoding and Saving to | |
| 3120 File</h2> | |
| 3121 <p>To encode data in a barcode use the <code>ZBarcode_Encode()</code> | |
| 3122 function. To write the symbol to a file use the | |
| 3123 <code>ZBarcode_Print()</code> function. For example the following code | |
| 3124 takes a string from the command line and outputs a Code 128 symbol to a | |
| 3125 PNG file named <code>"out.png"</code> (or a GIF file | |
| 3126 <code>"out.gif"</code> if <code>libpng</code> is not present) in the | |
| 3127 current working directory:</p> | |
| 3128 <div class="sourceCode" id="cb56"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb56-1"><a href="#cb56-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><zint.h></span></span> | |
| 3129 <span id="cb56-2"><a href="#cb56-2" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">(</span><span class="dt">int</span> argc<span class="op">,</span> <span class="dt">char</span> <span class="op">**</span>argv<span class="op">)</span></span> | |
| 3130 <span id="cb56-3"><a href="#cb56-3" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> | |
| 3131 <span id="cb56-4"><a href="#cb56-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">struct</span> zint_symbol <span class="op">*</span>my_symbol<span class="op">;</span></span> | |
| 3132 <span id="cb56-5"><a href="#cb56-5" aria-hidden="true" tabindex="-1"></a> my_symbol <span class="op">=</span> ZBarcode_Create<span class="op">();</span></span> | |
| 3133 <span id="cb56-6"><a href="#cb56-6" aria-hidden="true" tabindex="-1"></a> ZBarcode_Encode<span class="op">(</span>my_symbol<span class="op">,</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">],</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 3134 <span id="cb56-7"><a href="#cb56-7" aria-hidden="true" tabindex="-1"></a> ZBarcode_Print<span class="op">(</span>my_symbol<span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 3135 <span id="cb56-8"><a href="#cb56-8" aria-hidden="true" tabindex="-1"></a> ZBarcode_Delete<span class="op">(</span>my_symbol<span class="op">);</span></span> | |
| 3136 <span id="cb56-9"><a href="#cb56-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 3137 <span id="cb56-10"><a href="#cb56-10" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3138 <p>This can also be done in one stage using the | |
| 3139 <code>ZBarcode_Encode_and_Print()</code> function as shown in the next | |
| 3140 example:</p> | |
| 3141 <div class="sourceCode" id="cb57"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb57-1"><a href="#cb57-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><zint.h></span></span> | |
| 3142 <span id="cb57-2"><a href="#cb57-2" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">(</span><span class="dt">int</span> argc<span class="op">,</span> <span class="dt">char</span> <span class="op">**</span>argv<span class="op">)</span></span> | |
| 3143 <span id="cb57-3"><a href="#cb57-3" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> | |
| 3144 <span id="cb57-4"><a href="#cb57-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">struct</span> zint_symbol <span class="op">*</span>my_symbol<span class="op">;</span></span> | |
| 3145 <span id="cb57-5"><a href="#cb57-5" aria-hidden="true" tabindex="-1"></a> my_symbol <span class="op">=</span> ZBarcode_Create<span class="op">();</span></span> | |
| 3146 <span id="cb57-6"><a href="#cb57-6" aria-hidden="true" tabindex="-1"></a> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">],</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 3147 <span id="cb57-7"><a href="#cb57-7" aria-hidden="true" tabindex="-1"></a> ZBarcode_Delete<span class="op">(</span>my_symbol<span class="op">);</span></span> | |
| 3148 <span id="cb57-8"><a href="#cb57-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 3149 <span id="cb57-9"><a href="#cb57-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3150 <p>Note that when using the API, the input data is assumed to be 8-bit | |
| 3151 binary unless the <code>input_mode</code> member of the | |
| 3152 <code>zint_symbol</code> structure is set - see <a | |
| 3153 href="#setting-the-input-mode">5.11 Setting the Input Mode</a> for | |
| 3154 details.</p> | |
| 3155 <h2 id="encoding-and-printing-functions-in-depth">5.3 Encoding and | |
| 3156 Printing Functions in Depth</h2> | |
| 3157 <p>The functions for encoding and printing barcodes are defined as:</p> | |
| 3158 <div class="sourceCode" id="cb58"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb58-1"><a href="#cb58-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 3159 <span id="cb58-2"><a href="#cb58-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">unsigned</span> <span class="dt">char</span> <span class="op">*</span>source<span class="op">,</span> <span class="dt">int</span> length<span class="op">);</span></span> | |
| 3160 <span id="cb58-3"><a href="#cb58-3" aria-hidden="true" tabindex="-1"></a></span> | |
| 3161 <span id="cb58-4"><a href="#cb58-4" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_File<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 3162 <span id="cb58-5"><a href="#cb58-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">char</span> <span class="op">*</span>filename<span class="op">);</span></span> | |
| 3163 <span id="cb58-6"><a href="#cb58-6" aria-hidden="true" tabindex="-1"></a></span> | |
| 3164 <span id="cb58-7"><a href="#cb58-7" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Print<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span> | |
| 3165 <span id="cb58-8"><a href="#cb58-8" aria-hidden="true" tabindex="-1"></a></span> | |
| 3166 <span id="cb58-9"><a href="#cb58-9" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_and_Print<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 3167 <span id="cb58-10"><a href="#cb58-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">unsigned</span> <span class="dt">char</span> <span class="op">*</span>source<span class="op">,</span> <span class="dt">int</span> length<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span> | |
| 3168 <span id="cb58-11"><a href="#cb58-11" aria-hidden="true" tabindex="-1"></a></span> | |
| 3169 <span id="cb58-12"><a href="#cb58-12" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_File_and_Print<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 3170 <span id="cb58-13"><a href="#cb58-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">char</span> <span class="op">*</span>filename<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span></code></pre></div> | |
| 3171 <p>In these definitions <code>length</code> can be used to set the | |
| 3172 length of the input string. This allows the encoding of <code>NUL</code> | |
| 3173 (ASCII 0) characters in those symbologies which allow this. A value of 0 | |
| 3174 (or less than 0) will disable this usage and Zint will encode data up to | |
| 3175 the first <code>NUL</code> character in the input string, which must be | |
| 3176 present.</p> | |
| 3177 <p>The <code>rotate_angle</code> value can be used to rotate the image | |
| 3178 when outputting. Valid values are 0, 90, 180 and 270.</p> | |
| 3179 <p>The <code>ZBarcode_Encode_File()</code> and | |
| 3180 <code>ZBarcode_Encode_File_and_Print()</code> functions can be used to | |
| 3181 encode data read directly from a text file where the filename is given | |
| 3182 in the <code>NUL</code>-terminated <code>filename</code> string. The | |
| 3183 special filename <code>"-"</code> (single hyphen) can be used to read | |
| 3184 from stdin. Note that on Windows, filenames are assumed to be UTF-8 | |
| 3185 encoded.</p> | |
| 3186 <p>If printing more than one barcode, the <code>zint_symbol</code> | |
| 3187 structure may be re-used by calling the <code>ZBarcode_Clear()</code> | |
| 3188 function after each barcode to free any output buffers allocated. The | |
| 3189 <code>zint_symbol</code> input members must be reset. To fully restore | |
| 3190 <code>zint_symbol</code> to its default state, call | |
| 3191 <code>ZBarcode_Reset()</code> instead.</p> | |
| 3192 <h2 id="buffering-symbols-in-memory-raster">5.4 Buffering Symbols in | |
| 3193 Memory (raster)</h2> | |
| 3194 <p>In addition to saving barcode images to file Zint allows you to | |
| 3195 access a representation of the resulting bitmap image in memory. The | |
| 3196 following functions allow you to do this:</p> | |
| 3197 <div class="sourceCode" id="cb59"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb59-1"><a href="#cb59-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Buffer<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span> | |
| 3198 <span id="cb59-2"><a href="#cb59-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 3199 <span id="cb59-3"><a href="#cb59-3" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_and_Buffer<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 3200 <span id="cb59-4"><a href="#cb59-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">unsigned</span> <span class="dt">char</span> <span class="op">*</span>source<span class="op">,</span> <span class="dt">int</span> length<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span> | |
| 3201 <span id="cb59-5"><a href="#cb59-5" aria-hidden="true" tabindex="-1"></a></span> | |
| 3202 <span id="cb59-6"><a href="#cb59-6" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_File_and_Buffer<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 3203 <span id="cb59-7"><a href="#cb59-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">char</span> <span class="op">*</span>filename<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span></code></pre></div> | |
| 3204 <p>The arguments here are the same as above, and rotation and colour | |
| 3205 options can be used with the buffer functions in the same way as when | |
| 3206 saving to a file. The difference is that instead of saving the image to | |
| 3207 a file it is placed in a byte (<code>unsigned char</code>) array pointed | |
| 3208 to by the <code>bitmap</code> member, with <code>bitmap_width</code> set | |
| 3209 to the number of columns and <code>bitmap_height</code> set to the | |
| 3210 number of rows.</p> | |
| 3211 <p>The RGB channels are split into 3 consecutive red, green, blue bytes | |
| 3212 per pixel, and there are <code>bitmap_width</code> pixels per row and | |
| 3213 <code>bitmap_height</code> rows, so the total size of the | |
| 3214 <code>bitmap</code> array is | |
| 3215 <code>3 * bitmap_width * bitmap_height</code>.</p> | |
| 3216 <p>If the background and/or foreground are RGBA then the byte array | |
| 3217 <code>alphamap</code> will also be set, with a single alpha value for | |
| 3218 each pixel. Its total size will be | |
| 3219 <code>bitmap_width * bitmap_height</code>.</p> | |
| 3220 <p>The pixel data can be extracted from the array (or arrays) by the | |
| 3221 method shown in the example below, where <code>render_rgb()</code> and | |
| 3222 <code>render_rgba()</code> are assumed to be functions for drawing an | |
| 3223 RGB and RGBA pixel on the screen implemented by the client | |
| 3224 application:</p> | |
| 3225 <div class="sourceCode" id="cb60"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb60-1"><a href="#cb60-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> row<span class="op">,</span> col<span class="op">,</span> i <span class="op">=</span> <span class="dv">0</span><span class="op">,</span> j <span class="op">=</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 3226 <span id="cb60-2"><a href="#cb60-2" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> red<span class="op">,</span> blue<span class="op">,</span> green<span class="op">,</span> alpha<span class="op">;</span></span> | |
| 3227 <span id="cb60-3"><a href="#cb60-3" aria-hidden="true" tabindex="-1"></a></span> | |
| 3228 <span id="cb60-4"><a href="#cb60-4" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> <span class="op">(</span>row <span class="op">=</span> <span class="dv">0</span><span class="op">;</span> row <span class="op"><</span> my_symbol<span class="op">-></span>bitmap_height<span class="op">;</span> row<span class="op">++)</span> <span class="op">{</span></span> | |
| 3229 <span id="cb60-5"><a href="#cb60-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> <span class="op">(</span>col <span class="op">=</span> <span class="dv">0</span><span class="op">;</span> col <span class="op"><</span> my_symbol<span class="op">-></span>bitmap_width<span class="op">;</span> col<span class="op">++)</span> <span class="op">{</span></span> | |
| 3230 <span id="cb60-6"><a href="#cb60-6" aria-hidden="true" tabindex="-1"></a> red <span class="op">=</span> <span class="op">(</span><span class="dt">int</span><span class="op">)</span> my_symbol<span class="op">-></span>bitmap<span class="op">[</span>i<span class="op">];</span></span> | |
| 3231 <span id="cb60-7"><a href="#cb60-7" aria-hidden="true" tabindex="-1"></a> green <span class="op">=</span> <span class="op">(</span><span class="dt">int</span><span class="op">)</span> my_symbol<span class="op">-></span>bitmap<span class="op">[</span>i <span class="op">+</span> <span class="dv">1</span><span class="op">];</span></span> | |
| 3232 <span id="cb60-8"><a href="#cb60-8" aria-hidden="true" tabindex="-1"></a> blue <span class="op">=</span> <span class="op">(</span><span class="dt">int</span><span class="op">)</span> my_symbol<span class="op">-></span>bitmap<span class="op">[</span>i <span class="op">+</span> <span class="dv">2</span><span class="op">];</span></span> | |
| 3233 <span id="cb60-9"><a href="#cb60-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>my_symbol<span class="op">-></span>alphamap<span class="op">)</span> <span class="op">{</span></span> | |
| 3234 <span id="cb60-10"><a href="#cb60-10" aria-hidden="true" tabindex="-1"></a> alpha <span class="op">=</span> <span class="op">(</span><span class="dt">int</span><span class="op">)</span> my_symbol<span class="op">-></span>alphamap<span class="op">[</span>j<span class="op">];</span></span> | |
| 3235 <span id="cb60-11"><a href="#cb60-11" aria-hidden="true" tabindex="-1"></a> render_rgba<span class="op">(</span>row<span class="op">,</span> col<span class="op">,</span> red<span class="op">,</span> green<span class="op">,</span> blue<span class="op">,</span> alpha<span class="op">);</span></span> | |
| 3236 <span id="cb60-12"><a href="#cb60-12" aria-hidden="true" tabindex="-1"></a> j<span class="op">++;</span></span> | |
| 3237 <span id="cb60-13"><a href="#cb60-13" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span> <span class="cf">else</span> <span class="op">{</span></span> | |
| 3238 <span id="cb60-14"><a href="#cb60-14" aria-hidden="true" tabindex="-1"></a> render_rgb<span class="op">(</span>row<span class="op">,</span> col<span class="op">,</span> red<span class="op">,</span> green<span class="op">,</span> blue<span class="op">);</span></span> | |
| 3239 <span id="cb60-15"><a href="#cb60-15" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span> | |
| 3240 <span id="cb60-16"><a href="#cb60-16" aria-hidden="true" tabindex="-1"></a> i <span class="op">+=</span> <span class="dv">3</span><span class="op">;</span></span> | |
| 3241 <span id="cb60-17"><a href="#cb60-17" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span> | |
| 3242 <span id="cb60-18"><a href="#cb60-18" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3243 <p>Where speed is important, the buffer can be returned instead in a | |
| 3244 more compact intermediate form using the output option | |
| 3245 <code>OUT_BUFFER_INTERMEDIATE</code>. Here each byte is an ASCII value: | |
| 3246 <code>'1'</code> for foreground colour and <code>'0'</code> for | |
| 3247 background colour, except for Ultracode, which also uses colour codes: | |
| 3248 <code>'W'</code> for white, <code>'C'</code> for cyan, <code>'B'</code> | |
| 3249 for blue, <code>'M'</code> for magenta, <code>'R'</code> for red, | |
| 3250 <code>'Y'</code> for yellow, <code>'G'</code> for green, and | |
| 3251 <code>'K'</code> for black. Alpha values are not reported | |
| 3252 (<code>alphamap</code> will always be <code>NULL</code>). The loop for | |
| 3253 accessing the data is then:</p> | |
| 3254 <div class="sourceCode" id="cb61"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb61-1"><a href="#cb61-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> row<span class="op">,</span> col<span class="op">,</span> i <span class="op">=</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 3255 <span id="cb61-2"><a href="#cb61-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 3256 <span id="cb61-3"><a href="#cb61-3" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> <span class="op">(</span>row <span class="op">=</span> <span class="dv">0</span><span class="op">;</span> row <span class="op"><</span> my_symbol<span class="op">-></span>bitmap_height<span class="op">;</span> row<span class="op">++)</span> <span class="op">{</span></span> | |
| 3257 <span id="cb61-4"><a href="#cb61-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> <span class="op">(</span>col <span class="op">=</span> <span class="dv">0</span><span class="op">;</span> col <span class="op"><</span> my_symbol<span class="op">-></span>bitmap_width<span class="op">;</span> col<span class="op">++)</span> <span class="op">{</span></span> | |
| 3258 <span id="cb61-5"><a href="#cb61-5" aria-hidden="true" tabindex="-1"></a> render_pixel<span class="op">(</span>row<span class="op">,</span> col<span class="op">,</span> my_symbol<span class="op">-></span>bitmap<span class="op">[</span>i<span class="op">]);</span></span> | |
| 3259 <span id="cb61-6"><a href="#cb61-6" aria-hidden="true" tabindex="-1"></a> i<span class="op">++;</span></span> | |
| 3260 <span id="cb61-7"><a href="#cb61-7" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span> | |
| 3261 <span id="cb61-8"><a href="#cb61-8" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3262 <h2 id="buffering-symbols-in-memory-vector">5.5 Buffering Symbols in | |
| 3263 Memory (vector)</h2> | |
| 3264 <p>Symbols can also be saved to memory in a vector representation as | |
| 3265 well as a bitmap one. The following functions, exactly analogous to the | |
| 3266 ones above, allow you to do this:</p> | |
| 3267 <div class="sourceCode" id="cb62"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb62-1"><a href="#cb62-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Buffer_Vector<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span> | |
| 3268 <span id="cb62-2"><a href="#cb62-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 3269 <span id="cb62-3"><a href="#cb62-3" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_and_Buffer_Vector<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 3270 <span id="cb62-4"><a href="#cb62-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">unsigned</span> <span class="dt">char</span> <span class="op">*</span>source<span class="op">,</span> <span class="dt">int</span> length<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span> | |
| 3271 <span id="cb62-5"><a href="#cb62-5" aria-hidden="true" tabindex="-1"></a></span> | |
| 3272 <span id="cb62-6"><a href="#cb62-6" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_File_and_Buffer_Vector<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 3273 <span id="cb62-7"><a href="#cb62-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">char</span> <span class="op">*</span>filename<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span></code></pre></div> | |
| 3274 <p>Here the <code>vector</code> member is set to point to a | |
| 3275 <code>zint_vector</code> header structure which contains pointers to | |
| 3276 lists of structures representing the various elements of the barcode: | |
| 3277 rectangles, hexagons, strings and circles. To draw the barcode, each of | |
| 3278 the element types is iterated in turn, and using the information stored | |
| 3279 is drawn by a rendering system. For instance, to draw a barcode using a | |
| 3280 rendering system with <code>prepare_canvas()</code>, | |
| 3281 <code>draw_rect()</code>, <code>draw_hexagon()</code>, | |
| 3282 <code>draw_string()</code>, and <code>draw_circle()</code> routines | |
| 3283 available:</p> | |
| 3284 <div class="sourceCode" id="cb63"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb63-1"><a href="#cb63-1" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> zint_vector_rect <span class="op">*</span>rect<span class="op">;</span></span> | |
| 3285 <span id="cb63-2"><a href="#cb63-2" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> zint_vector_hexagon <span class="op">*</span>hex<span class="op">;</span></span> | |
| 3286 <span id="cb63-3"><a href="#cb63-3" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> zint_vector_string <span class="op">*</span>string<span class="op">;</span></span> | |
| 3287 <span id="cb63-4"><a href="#cb63-4" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> zint_vector_circle <span class="op">*</span>circle<span class="op">;</span></span> | |
| 3288 <span id="cb63-5"><a href="#cb63-5" aria-hidden="true" tabindex="-1"></a></span> | |
| 3289 <span id="cb63-6"><a href="#cb63-6" aria-hidden="true" tabindex="-1"></a>prepare_canvas<span class="op">(</span>my_symbol<span class="op">-></span>vector<span class="op">-></span>width<span class="op">,</span> my_symbol<span class="op">-></span>vector<span class="op">-></span>height<span class="op">,</span></span> | |
| 3290 <span id="cb63-7"><a href="#cb63-7" aria-hidden="true" tabindex="-1"></a> my_symbol<span class="op">-></span>scale<span class="op">,</span> my_symbol<span class="op">-></span>fgcolour<span class="op">,</span> my_symbol<span class="op">-></span>bgcolour<span class="op">,</span></span> | |
| 3291 <span id="cb63-8"><a href="#cb63-8" aria-hidden="true" tabindex="-1"></a> rotate_angle<span class="op">);</span></span> | |
| 3292 <span id="cb63-9"><a href="#cb63-9" aria-hidden="true" tabindex="-1"></a></span> | |
| 3293 <span id="cb63-10"><a href="#cb63-10" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> <span class="op">(</span>rect <span class="op">=</span> my_symbol<span class="op">-></span>vector<span class="op">-></span>rectangles<span class="op">;</span> rect<span class="op">;</span> rect <span class="op">=</span> rect<span class="op">-></span>next<span class="op">)</span> <span class="op">{</span></span> | |
| 3294 <span id="cb63-11"><a href="#cb63-11" aria-hidden="true" tabindex="-1"></a> draw_rect<span class="op">(</span>rect<span class="op">-></span>x<span class="op">,</span> rect<span class="op">-></span>y<span class="op">,</span> rect<span class="op">-></span>width<span class="op">,</span> rect<span class="op">-></span>height<span class="op">,</span></span> | |
| 3295 <span id="cb63-12"><a href="#cb63-12" aria-hidden="true" tabindex="-1"></a> rect<span class="op">-></span>colour<span class="op">);</span></span> | |
| 3296 <span id="cb63-13"><a href="#cb63-13" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span> | |
| 3297 <span id="cb63-14"><a href="#cb63-14" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> <span class="op">(</span>hex <span class="op">=</span> my_symbol<span class="op">-></span>vector<span class="op">-></span>hexagons<span class="op">;</span> hex<span class="op">;</span> hex <span class="op">=</span> hex<span class="op">-></span>next<span class="op">)</span> <span class="op">{</span></span> | |
| 3298 <span id="cb63-15"><a href="#cb63-15" aria-hidden="true" tabindex="-1"></a> draw_hexagon<span class="op">(</span>hex<span class="op">-></span>x<span class="op">,</span> hex<span class="op">-></span>y<span class="op">,</span> hex<span class="op">-></span>diameter<span class="op">,</span> hex<span class="op">-></span>rotation<span class="op">);</span></span> | |
| 3299 <span id="cb63-16"><a href="#cb63-16" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span> | |
| 3300 <span id="cb63-17"><a href="#cb63-17" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> <span class="op">(</span>string <span class="op">=</span> my_symbol<span class="op">-></span>vector<span class="op">-></span>strings<span class="op">;</span> string<span class="op">;</span> string <span class="op">=</span> string<span class="op">-></span>next<span class="op">)</span> <span class="op">{</span></span> | |
| 3301 <span id="cb63-18"><a href="#cb63-18" aria-hidden="true" tabindex="-1"></a> draw_string<span class="op">(</span>string<span class="op">-></span>x<span class="op">,</span> string<span class="op">-></span>y<span class="op">,</span> string<span class="op">-></span>fsize<span class="op">,</span></span> | |
| 3302 <span id="cb63-19"><a href="#cb63-19" aria-hidden="true" tabindex="-1"></a> string<span class="op">-></span>rotation<span class="op">,</span> string<span class="op">-></span>halign<span class="op">,</span></span> | |
| 3303 <span id="cb63-20"><a href="#cb63-20" aria-hidden="true" tabindex="-1"></a> string<span class="op">-></span>text<span class="op">,</span> string<span class="op">-></span>length<span class="op">);</span></span> | |
| 3304 <span id="cb63-21"><a href="#cb63-21" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span> | |
| 3305 <span id="cb63-22"><a href="#cb63-22" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> <span class="op">(</span>circle <span class="op">=</span> my_symbol<span class="op">-></span>vector<span class="op">-></span>circles<span class="op">;</span> circle<span class="op">;</span> circle <span class="op">=</span> circle<span class="op">-></span>next<span class="op">)</span> <span class="op">{</span></span> | |
| 3306 <span id="cb63-23"><a href="#cb63-23" aria-hidden="true" tabindex="-1"></a> draw_circle<span class="op">(</span>circle<span class="op">-></span>x<span class="op">,</span> circle<span class="op">-></span>y<span class="op">,</span> circle<span class="op">-></span>diameter<span class="op">,</span> circle<span class="op">-></span>width<span class="op">);</span></span> | |
| 3307 <span id="cb63-24"><a href="#cb63-24" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3308 <h2 id="buffering-symbols-in-memory-memfile">5.6 Buffering Symbols in | |
| 3309 Memory (memfile)</h2> | |
| 3310 <p>Symbols can also be stored as “in-memory” file buffers by giving the | |
| 3311 <code>BARCODE_MEMORY_FILE</code> option to the | |
| 3312 <code>output_options</code> member, which saves the print output to | |
| 3313 member <code>memfile</code> instead of to the output file | |
| 3314 <code>outfile</code>. The length of the buffer is given in | |
| 3315 <code>memfile_size</code>. For instance:</p> | |
| 3316 <div class="sourceCode" id="cb64"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb64-1"><a href="#cb64-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><zint.h></span></span> | |
| 3317 <span id="cb64-2"><a href="#cb64-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><stdio.h></span></span> | |
| 3318 <span id="cb64-3"><a href="#cb64-3" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><string.h></span></span> | |
| 3319 <span id="cb64-4"><a href="#cb64-4" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">(</span><span class="dt">int</span> argc<span class="op">,</span> <span class="dt">char</span> <span class="op">**</span>argv<span class="op">)</span></span> | |
| 3320 <span id="cb64-5"><a href="#cb64-5" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> | |
| 3321 <span id="cb64-6"><a href="#cb64-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">struct</span> zint_symbol <span class="op">*</span>my_symbol<span class="op">;</span></span> | |
| 3322 <span id="cb64-7"><a href="#cb64-7" aria-hidden="true" tabindex="-1"></a> my_symbol <span class="op">=</span> ZBarcode_Create<span class="op">();</span></span> | |
| 3323 <span id="cb64-8"><a href="#cb64-8" aria-hidden="true" tabindex="-1"></a> my_symbol<span class="op">-></span>output_options <span class="op">|=</span> BARCODE_MEMORY_FILE<span class="op">;</span></span> | |
| 3324 <span id="cb64-9"><a href="#cb64-9" aria-hidden="true" tabindex="-1"></a> <span class="co">/* Only the extension is used, to determine output format */</span></span> | |
| 3325 <span id="cb64-10"><a href="#cb64-10" aria-hidden="true" tabindex="-1"></a> strcpy<span class="op">(</span>my_symbol<span class="op">-></span>outfile<span class="op">,</span> <span class="st">"mem.svg"</span><span class="op">);</span></span> | |
| 3326 <span id="cb64-11"><a href="#cb64-11" aria-hidden="true" tabindex="-1"></a> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">],</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 3327 <span id="cb64-12"><a href="#cb64-12" aria-hidden="true" tabindex="-1"></a> <span class="co">/* `my_symbol->memfile` now contains the SVG output */</span></span> | |
| 3328 <span id="cb64-13"><a href="#cb64-13" aria-hidden="true" tabindex="-1"></a> fwrite<span class="op">(</span>my_symbol<span class="op">-></span>memfile<span class="op">,</span> <span class="dv">1</span><span class="op">,</span> my_symbol<span class="op">-></span>memfile_size<span class="op">,</span> stdout<span class="op">);</span></span> | |
| 3329 <span id="cb64-14"><a href="#cb64-14" aria-hidden="true" tabindex="-1"></a> ZBarcode_Delete<span class="op">(</span>my_symbol<span class="op">);</span></span> | |
| 3330 <span id="cb64-15"><a href="#cb64-15" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 3331 <span id="cb64-16"><a href="#cb64-16" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3332 <p>will print the SVG output to <code>stdout</code> (the file “mem.svg” | |
| 3333 is not created). This is particularly useful for the textual formats EPS | |
| 3334 and SVG,<a href="#fn7" class="footnote-ref" id="fnref7" | |
| 3335 role="doc-noteref"><sup>7</sup></a> allowing the output to be | |
| 3336 manipulated and processed by the client.</p> | |
| 3337 <h2 id="setting-options">5.7 Setting Options</h2> | |
| 3338 <p>So far our application is not very useful unless we plan to only make | |
| 3339 Code 128 symbols and we don’t mind that they only save to | |
| 3340 <code>"out.png"</code> (or to memory, as above). As with the CLI | |
| 3341 program, of course, these options can be altered. The way this is done | |
| 3342 is by altering the contents of the <code>zint_symbol</code> structure | |
| 3343 between the creation and encoding stages. The <code>zint_symbol</code> | |
| 3344 structure consists of the following members:</p> | |
| 3345 <div id="tbl:api_structure_zint_symbol" class="tablenos"> | |
| 3346 <table id="tbl:api_structure_zint_symbol" data-tag="$ $"> | |
| 3347 <caption><span>Table <span class="math inline"> </span>:</span> API | |
| 3348 Structure <code>zint_symbol</code> </caption> | |
| 3349 <colgroup> | |
| 3350 <col style="width: 26%" /> | |
| 3351 <col style="width: 15%" /> | |
| 3352 <col style="width: 34%" /> | |
| 3353 <col style="width: 23%" /> | |
| 3354 </colgroup> | |
| 3355 <thead> | |
| 3356 <tr> | |
| 3357 <th style="text-align: left;">Member Name</th> | |
| 3358 <th style="text-align: left;">Type</th> | |
| 3359 <th style="text-align: left;">Meaning</th> | |
| 3360 <th style="text-align: left;">Default Value</th> | |
| 3361 </tr> | |
| 3362 </thead> | |
| 3363 <tbody> | |
| 3364 <tr> | |
| 3365 <td style="text-align: left;"><code>symbology</code></td> | |
| 3366 <td style="text-align: left;">integer</td> | |
| 3367 <td style="text-align: left;">Symbol to use - see <a | |
| 3368 href="#specifying-a-symbology">5.9 Specifying a Symbology</a>.</td> | |
| 3369 <td style="text-align: left;"><code>BARCODE_CODE128</code></td> | |
| 3370 </tr> | |
| 3371 <tr> | |
| 3372 <td style="text-align: left;"><code>height</code></td> | |
| 3373 <td style="text-align: left;">float</td> | |
| 3374 <td style="text-align: left;">Symbol height in X-dimensions, excluding | |
| 3375 fixed width-to-height symbols.<a href="#fn8" class="footnote-ref" | |
| 3376 id="fnref8" role="doc-noteref"><sup>8</sup></a></td> | |
| 3377 <td style="text-align: left;">Symbol dependent</td> | |
| 3378 </tr> | |
| 3379 <tr> | |
| 3380 <td style="text-align: left;"><code>scale</code></td> | |
| 3381 <td style="text-align: left;">float</td> | |
| 3382 <td style="text-align: left;">Scale factor for adjusting size of image | |
| 3383 (sets X-dimension).</td> | |
| 3384 <td style="text-align: left;">1.0</td> | |
| 3385 </tr> | |
| 3386 <tr> | |
| 3387 <td style="text-align: left;"><code>whitespace_width</code></td> | |
| 3388 <td style="text-align: left;">integer</td> | |
| 3389 <td style="text-align: left;">Horizontal whitespace width in | |
| 3390 X-dimensions.</td> | |
| 3391 <td style="text-align: left;">0</td> | |
| 3392 </tr> | |
| 3393 <tr> | |
| 3394 <td style="text-align: left;"><code>whitespace_height</code></td> | |
| 3395 <td style="text-align: left;">integer</td> | |
| 3396 <td style="text-align: left;">Vertical whitespace height in | |
| 3397 X-dimensions.</td> | |
| 3398 <td style="text-align: left;">0</td> | |
| 3399 </tr> | |
| 3400 <tr> | |
| 3401 <td style="text-align: left;"><code>border_width</code></td> | |
| 3402 <td style="text-align: left;">integer</td> | |
| 3403 <td style="text-align: left;">Border width in X-dimensions.</td> | |
| 3404 <td style="text-align: left;">0</td> | |
| 3405 </tr> | |
| 3406 <tr> | |
| 3407 <td style="text-align: left;"><code>output_options</code></td> | |
| 3408 <td style="text-align: left;">integer</td> | |
| 3409 <td style="text-align: left;">Set various output parameters - see <a | |
| 3410 href="#adjusting-output-options">5.10 Adjusting Output Options</a>.</td> | |
| 3411 <td style="text-align: left;">0 (none)</td> | |
| 3412 </tr> | |
| 3413 <tr> | |
| 3414 <td style="text-align: left;"><code>fgcolour</code></td> | |
| 3415 <td style="text-align: left;">character string</td> | |
| 3416 <td style="text-align: left;">Foreground (ink) colour as RGB/RGBA | |
| 3417 hexadecimal string or <code>"C,M,Y,K"</code> decimal percentages string, | |
| 3418 with a terminating <code>NUL</code>.</td> | |
| 3419 <td style="text-align: left;"><code>"000000"</code></td> | |
| 3420 </tr> | |
| 3421 <tr> | |
| 3422 <td style="text-align: left;"><code>bgcolour</code></td> | |
| 3423 <td style="text-align: left;">character string</td> | |
| 3424 <td style="text-align: left;">Background (paper) colour as RGB/RGBA | |
| 3425 hexadecimal string or <code>"C,M,Y,K"</code> decimal percentages string, | |
| 3426 with a terminating <code>NUL</code>.</td> | |
| 3427 <td style="text-align: left;"><code>"ffffff"</code></td> | |
| 3428 </tr> | |
| 3429 <tr> | |
| 3430 <td style="text-align: left;"><code>fgcolor</code></td> | |
| 3431 <td style="text-align: left;">pointer</td> | |
| 3432 <td style="text-align: left;">Points to fgcolour allowing alternate | |
| 3433 spelling.</td> | |
| 3434 <td style="text-align: left;"></td> | |
| 3435 </tr> | |
| 3436 <tr> | |
| 3437 <td style="text-align: left;"><code>bgcolor</code></td> | |
| 3438 <td style="text-align: left;">pointer</td> | |
| 3439 <td style="text-align: left;">Points to bgcolour allowing alternate | |
| 3440 spelling.</td> | |
| 3441 <td style="text-align: left;"></td> | |
| 3442 </tr> | |
| 3443 <tr> | |
| 3444 <td style="text-align: left;"><code>outfile</code></td> | |
| 3445 <td style="text-align: left;">character string</td> | |
| 3446 <td style="text-align: left;">Contains the name of the file to output a | |
| 3447 resulting barcode symbol to. Must end in <code>.png</code>, | |
| 3448 <code>.gif</code>, <code>.bmp</code>, <code>.emf</code>, | |
| 3449 <code>.eps</code>, <code>.pcx</code>, <code>.svg</code>, | |
| 3450 <code>.tif</code> or <code>.txt</code> followed by a terminating | |
| 3451 <code>NUL</code>.<a href="#fn9" class="footnote-ref" id="fnref9" | |
| 3452 role="doc-noteref"><sup>9</sup></a></td> | |
| 3453 <td style="text-align: left;"><code>"out.png"</code></td> | |
| 3454 </tr> | |
| 3455 <tr> | |
| 3456 <td style="text-align: left;"><code>primary</code></td> | |
| 3457 <td style="text-align: left;">character string</td> | |
| 3458 <td style="text-align: left;">Primary message data for more complex | |
| 3459 symbols, with a terminating <code>NUL</code>.</td> | |
| 3460 <td style="text-align: left;"><code>""</code> (empty)</td> | |
| 3461 </tr> | |
| 3462 <tr> | |
| 3463 <td style="text-align: left;"><code>option_1</code></td> | |
| 3464 <td style="text-align: left;">integer</td> | |
| 3465 <td style="text-align: left;">Symbol specific options.</td> | |
| 3466 <td style="text-align: left;">-1</td> | |
| 3467 </tr> | |
| 3468 <tr> | |
| 3469 <td style="text-align: left;"><code>option_2</code></td> | |
| 3470 <td style="text-align: left;">integer</td> | |
| 3471 <td style="text-align: left;">Symbol specific options.</td> | |
| 3472 <td style="text-align: left;">0</td> | |
| 3473 </tr> | |
| 3474 <tr> | |
| 3475 <td style="text-align: left;"><code>option_3</code></td> | |
| 3476 <td style="text-align: left;">integer</td> | |
| 3477 <td style="text-align: left;">Symbol specific options.</td> | |
| 3478 <td style="text-align: left;">0</td> | |
| 3479 </tr> | |
| 3480 <tr> | |
| 3481 <td style="text-align: left;"><code>show_hrt</code></td> | |
| 3482 <td style="text-align: left;">integer</td> | |
| 3483 <td style="text-align: left;">Set to 0 to hide Human Readable Text | |
| 3484 (HRT).</td> | |
| 3485 <td style="text-align: left;">1</td> | |
| 3486 </tr> | |
| 3487 <tr> | |
| 3488 <td style="text-align: left;"><code>input_mode</code></td> | |
| 3489 <td style="text-align: left;">integer</td> | |
| 3490 <td style="text-align: left;">Set encoding of input data - see <a | |
| 3491 href="#setting-the-input-mode">5.11 Setting the Input Mode</a>.</td> | |
| 3492 <td style="text-align: left;"><code>DATA_MODE</code></td> | |
| 3493 </tr> | |
| 3494 <tr> | |
| 3495 <td style="text-align: left;"><code>eci</code></td> | |
| 3496 <td style="text-align: left;">integer</td> | |
| 3497 <td style="text-align: left;">Extended Channel Interpretation code.</td> | |
| 3498 <td style="text-align: left;">0 (none)</td> | |
| 3499 </tr> | |
| 3500 <tr> | |
| 3501 <td style="text-align: left;"><code>dpmm</code></td> | |
| 3502 <td style="text-align: left;">float</td> | |
| 3503 <td style="text-align: left;">Resolution of output in dots per mm (BMP, | |
| 3504 EMF, PCX, PNG and TIF only).</td> | |
| 3505 <td style="text-align: left;">0 (none)</td> | |
| 3506 </tr> | |
| 3507 <tr> | |
| 3508 <td style="text-align: left;"><code>dot_size</code></td> | |
| 3509 <td style="text-align: left;">float</td> | |
| 3510 <td style="text-align: left;">Diameter of dots used in dotty mode (in | |
| 3511 X-dimensions).</td> | |
| 3512 <td style="text-align: left;">0.8</td> | |
| 3513 </tr> | |
| 3514 <tr> | |
| 3515 <td style="text-align: left;"><code>text_gap</code></td> | |
| 3516 <td style="text-align: left;">float</td> | |
| 3517 <td style="text-align: left;">Gap between barcode and text (HRT) in | |
| 3518 X-dimensions.</td> | |
| 3519 <td style="text-align: left;">1.0</td> | |
| 3520 </tr> | |
| 3521 <tr> | |
| 3522 <td style="text-align: left;"><code>guard_descent</code></td> | |
| 3523 <td style="text-align: left;">float</td> | |
| 3524 <td style="text-align: left;">Height of guard bar descent (EAN/UPC only) | |
| 3525 in X-dimensions.</td> | |
| 3526 <td style="text-align: left;">5.0</td> | |
| 3527 </tr> | |
| 3528 <tr> | |
| 3529 <td style="text-align: left;"><code>structapp</code></td> | |
| 3530 <td style="text-align: left;">Structured Append structure</td> | |
| 3531 <td style="text-align: left;">Mark a symbol as part of a sequence of | |
| 3532 symbols.</td> | |
| 3533 <td style="text-align: left;">count 0 (disabled)</td> | |
| 3534 </tr> | |
| 3535 <tr> | |
| 3536 <td style="text-align: left;"><code>debug</code></td> | |
| 3537 <td style="text-align: left;">integer</td> | |
| 3538 <td style="text-align: left;">Debugging flags.</td> | |
| 3539 <td style="text-align: left;">0</td> | |
| 3540 </tr> | |
| 3541 <tr> | |
| 3542 <td style="text-align: left;"><code>warn_level</code></td> | |
| 3543 <td style="text-align: left;">integer</td> | |
| 3544 <td style="text-align: left;">Affects error/warning value returned by | |
| 3545 Zint API - see <a href="#handling-errors">5.8 Handling Errors</a>.</td> | |
| 3546 <td style="text-align: left;"><code>WARN_DEFAULT</code></td> | |
| 3547 </tr> | |
| 3548 <tr> | |
| 3549 <td style="text-align: left;"><code>text</code></td> | |
| 3550 <td style="text-align: left;">unsigned character string</td> | |
| 3551 <td style="text-align: left;">Human Readable Text, which usually | |
| 3552 consists of input data plus one more check digit. Uses UTF-8 formatting, | |
| 3553 with a terminating <code>NUL</code>.</td> | |
| 3554 <td style="text-align: left;"><code>""</code> (empty) (output only)</td> | |
| 3555 </tr> | |
| 3556 <tr> | |
| 3557 <td style="text-align: left;"><code>rows</code></td> | |
| 3558 <td style="text-align: left;">integer</td> | |
| 3559 <td style="text-align: left;">Number of rows used by the symbol.</td> | |
| 3560 <td style="text-align: left;">(output only)</td> | |
| 3561 </tr> | |
| 3562 <tr> | |
| 3563 <td style="text-align: left;"><code>width</code></td> | |
| 3564 <td style="text-align: left;">integer</td> | |
| 3565 <td style="text-align: left;">Width of the generated symbol.</td> | |
| 3566 <td style="text-align: left;">(output only)</td> | |
| 3567 </tr> | |
| 3568 <tr> | |
| 3569 <td style="text-align: left;"><code>encoded_data</code></td> | |
| 3570 <td style="text-align: left;">array of unsigned character arrays</td> | |
| 3571 <td style="text-align: left;">Representation of the encoded data.</td> | |
| 3572 <td style="text-align: left;">(output only)</td> | |
| 3573 </tr> | |
| 3574 <tr> | |
| 3575 <td style="text-align: left;"><code>row_height</code></td> | |
| 3576 <td style="text-align: left;">array of floats</td> | |
| 3577 <td style="text-align: left;">Heights of each row.</td> | |
| 3578 <td style="text-align: left;">(output only)</td> | |
| 3579 </tr> | |
| 3580 <tr> | |
| 3581 <td style="text-align: left;"><code>errtxt</code></td> | |
| 3582 <td style="text-align: left;">character string</td> | |
| 3583 <td style="text-align: left;">Error message in the event that an error | |
| 3584 occurred, with a terminating <code>NUL</code> - see <a | |
| 3585 href="#handling-errors">5.8 Handling Errors</a>.</td> | |
| 3586 <td style="text-align: left;">(output only)</td> | |
| 3587 </tr> | |
| 3588 <tr> | |
| 3589 <td style="text-align: left;"><code>bitmap</code></td> | |
| 3590 <td style="text-align: left;">pointer to unsigned character array</td> | |
| 3591 <td style="text-align: left;">Pointer to stored bitmap image - see <a | |
| 3592 href="#buffering-symbols-in-memory-raster">5.4 Buffering Symbols in | |
| 3593 Memory (raster)</a>.</td> | |
| 3594 <td style="text-align: left;">(output only)</td> | |
| 3595 </tr> | |
| 3596 <tr> | |
| 3597 <td style="text-align: left;"><code>bitmap_width</code></td> | |
| 3598 <td style="text-align: left;">integer</td> | |
| 3599 <td style="text-align: left;">Width of stored bitmap image (in pixels) - | |
| 3600 see <code>bitmap</code> member.</td> | |
| 3601 <td style="text-align: left;">(output only)</td> | |
| 3602 </tr> | |
| 3603 <tr> | |
| 3604 <td style="text-align: left;"><code>bitmap_height</code></td> | |
| 3605 <td style="text-align: left;">integer</td> | |
| 3606 <td style="text-align: left;">Height of stored bitmap image (in pixels) | |
| 3607 - see <code>bitmap</code> member.</td> | |
| 3608 <td style="text-align: left;">(output only)</td> | |
| 3609 </tr> | |
| 3610 <tr> | |
| 3611 <td style="text-align: left;"><code>alphamap</code></td> | |
| 3612 <td style="text-align: left;">pointer to unsigned character array</td> | |
| 3613 <td style="text-align: left;">Pointer to array representing alpha | |
| 3614 channel of stored bitmap image (or <code>NULL</code> if no alpha channel | |
| 3615 used) - see <code>bitmap</code> member.</td> | |
| 3616 <td style="text-align: left;">(output only)</td> | |
| 3617 </tr> | |
| 3618 <tr> | |
| 3619 <td style="text-align: left;"><code>vector</code></td> | |
| 3620 <td style="text-align: left;">pointer to vector structure</td> | |
| 3621 <td style="text-align: left;">Pointer to vector header containing | |
| 3622 pointers to vector elements - see <a | |
| 3623 href="#buffering-symbols-in-memory-vector">5.5 Buffering Symbols in | |
| 3624 Memory (vector)</a>.</td> | |
| 3625 <td style="text-align: left;">(output only)</td> | |
| 3626 </tr> | |
| 3627 <tr> | |
| 3628 <td style="text-align: left;"><code>memfile</code></td> | |
| 3629 <td style="text-align: left;">pointer to unsigned character array</td> | |
| 3630 <td style="text-align: left;">Pointer to in-memory file buffer if | |
| 3631 <code>BARCODE_MEMORY_FILE</code> set in <code>output_options</code> - | |
| 3632 see <a href="#buffering-symbols-in-memory-memfile">5.6 Buffering Symbols | |
| 3633 in Memory (memfile)</a>.</td> | |
| 3634 <td style="text-align: left;">(output only)</td> | |
| 3635 </tr> | |
| 3636 <tr> | |
| 3637 <td style="text-align: left;"><code>memfile_size</code></td> | |
| 3638 <td style="text-align: left;">integer</td> | |
| 3639 <td style="text-align: left;">Length of in-memory file buffer.</td> | |
| 3640 <td style="text-align: left;">(output only)</td> | |
| 3641 </tr> | |
| 3642 </tbody> | |
| 3643 </table> | |
| 3644 </div> | |
| 3645 <p>To alter these values use the syntax shown in the example below. This | |
| 3646 code has the same result as the previous example except the output is | |
| 3647 now taller and plotted in green.</p> | |
| 3648 <div class="sourceCode" id="cb65"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb65-1"><a href="#cb65-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><zint.h></span></span> | |
| 3649 <span id="cb65-2"><a href="#cb65-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><string.h></span></span> | |
| 3650 <span id="cb65-3"><a href="#cb65-3" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">(</span><span class="dt">int</span> argc<span class="op">,</span> <span class="dt">char</span> <span class="op">**</span>argv<span class="op">)</span></span> | |
| 3651 <span id="cb65-4"><a href="#cb65-4" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> | |
| 3652 <span id="cb65-5"><a href="#cb65-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">struct</span> zint_symbol <span class="op">*</span>my_symbol<span class="op">;</span></span> | |
| 3653 <span id="cb65-6"><a href="#cb65-6" aria-hidden="true" tabindex="-1"></a> my_symbol <span class="op">=</span> ZBarcode_Create<span class="op">();</span></span> | |
| 3654 <span id="cb65-7"><a href="#cb65-7" aria-hidden="true" tabindex="-1"></a> strcpy<span class="op">(</span>my_symbol<span class="op">-></span>fgcolour<span class="op">,</span> <span class="st">"00ff00"</span><span class="op">);</span></span> | |
| 3655 <span id="cb65-8"><a href="#cb65-8" aria-hidden="true" tabindex="-1"></a> my_symbol<span class="op">-></span>height <span class="op">=</span> <span class="fl">400.0</span><span class="bu">f</span><span class="op">;</span></span> | |
| 3656 <span id="cb65-9"><a href="#cb65-9" aria-hidden="true" tabindex="-1"></a> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">],</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 3657 <span id="cb65-10"><a href="#cb65-10" aria-hidden="true" tabindex="-1"></a> ZBarcode_Delete<span class="op">(</span>my_symbol<span class="op">);</span></span> | |
| 3658 <span id="cb65-11"><a href="#cb65-11" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 3659 <span id="cb65-12"><a href="#cb65-12" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3660 <p>Note that background removal for all outputs except BMP can be | |
| 3661 achieved by setting the background alpha to <code>"00"</code> where the | |
| 3662 values for R, G and B will be ignored:</p> | |
| 3663 <div class="sourceCode" id="cb66"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb66-1"><a href="#cb66-1" aria-hidden="true" tabindex="-1"></a> strcpy<span class="op">(</span>my_symbol<span class="op">-></span>bgcolour<span class="op">,</span> <span class="st">"55555500"</span><span class="op">);</span></span></code></pre></div> | |
| 3664 <p>This is what the CLI option <code>--nobackground</code> does - see <a | |
| 3665 href="#using-colour">4.7 Using Colour</a>.</p> | |
| 3666 <h2 id="handling-errors">5.8 Handling Errors</h2> | |
| 3667 <p>If errors occur during encoding a non-zero integer value is passed | |
| 3668 back to the calling application. In addition the <code>errtxt</code> | |
| 3669 member is set to a message detailing the nature of the error. The errors | |
| 3670 generated by Zint are:</p> | |
| 3671 <div id="tbl:api_warnings_errors" class="tablenos"> | |
| 3672 <table id="tbl:api_warnings_errors" | |
| 3673 data-tag=": API Warning and Error Return Values"> | |
| 3674 <caption><span>Table : API Warning and Error Return Values</span> | |
| 3675 </caption> | |
| 3676 <colgroup> | |
| 3677 <col style="width: 39%" /> | |
| 3678 <col style="width: 60%" /> | |
| 3679 </colgroup> | |
| 3680 <thead> | |
| 3681 <tr> | |
| 3682 <th style="text-align: left;">Return Value</th> | |
| 3683 <th style="text-align: left;">Meaning</th> | |
| 3684 </tr> | |
| 3685 </thead> | |
| 3686 <tbody> | |
| 3687 <tr> | |
| 3688 <td style="text-align: left;"><code>ZINT_WARN_HRT_TRUNCATED</code></td> | |
| 3689 <td style="text-align: left;">The Human Readable Text returned in | |
| 3690 <code>text</code> was truncated (maximum 255 bytes).</td> | |
| 3691 </tr> | |
| 3692 <tr> | |
| 3693 <td style="text-align: left;"><code>ZINT_WARN_INVALID_OPTION</code></td> | |
| 3694 <td style="text-align: left;">One of the values in | |
| 3695 <code>zint_struct</code> was set incorrectly but Zint has made a guess | |
| 3696 at what it should have been and generated a barcode accordingly.</td> | |
| 3697 </tr> | |
| 3698 <tr> | |
| 3699 <td style="text-align: left;"><code>ZINT_WARN_USES_ECI</code></td> | |
| 3700 <td style="text-align: left;">Zint has automatically inserted an ECI | |
| 3701 character. The symbol may not be readable with some readers.</td> | |
| 3702 </tr> | |
| 3703 <tr> | |
| 3704 <td style="text-align: left;"><code>ZINT_WARN_NONCOMPLIANT</code></td> | |
| 3705 <td style="text-align: left;">The symbol was created but is not | |
| 3706 compliant with certain standards set in its specification (e.g. height, | |
| 3707 GS1 AI data lengths).</td> | |
| 3708 </tr> | |
| 3709 <tr> | |
| 3710 <td style="text-align: left;"><code>ZINT_ERROR</code></td> | |
| 3711 <td style="text-align: left;">Marks the divide between warnings and | |
| 3712 errors. For return values greater than or equal to this no symbol (or | |
| 3713 only an incomplete symbol) is generated.</td> | |
| 3714 </tr> | |
| 3715 <tr> | |
| 3716 <td style="text-align: left;"><code>ZINT_ERROR_TOO_LONG</code></td> | |
| 3717 <td style="text-align: left;">The input data is too long or too short | |
| 3718 for the selected symbology. No symbol has been generated.</td> | |
| 3719 </tr> | |
| 3720 <tr> | |
| 3721 <td style="text-align: left;"><code>ZINT_ERROR_INVALID_DATA</code></td> | |
| 3722 <td style="text-align: left;">The data to be encoded includes characters | |
| 3723 which are not permitted by the selected symbology (e.g. alphabetic | |
| 3724 characters in an EAN symbol). No symbol has been generated.</td> | |
| 3725 </tr> | |
| 3726 <tr> | |
| 3727 <td style="text-align: left;"><code>ZINT_ERROR_INVALID_CHECK</code></td> | |
| 3728 <td style="text-align: left;">Data with an incorrect check digit has | |
| 3729 been entered. No symbol has been generated.</td> | |
| 3730 </tr> | |
| 3731 <tr> | |
| 3732 <td | |
| 3733 style="text-align: left;"><code>ZINT_ERROR_INVALID_OPTION</code></td> | |
| 3734 <td style="text-align: left;">One of the values in | |
| 3735 <code>zint_struct</code> was set incorrectly and Zint was unable (or | |
| 3736 unwilling) to guess what it should have been. No symbol has been | |
| 3737 generated.</td> | |
| 3738 </tr> | |
| 3739 <tr> | |
| 3740 <td | |
| 3741 style="text-align: left;"><code>ZINT_ERROR_ENCODING_PROBLEM</code></td> | |
| 3742 <td style="text-align: left;">A problem has occurred during encoding of | |
| 3743 the data. This should never happen. Please contact the developer if you | |
| 3744 encounter this error.</td> | |
| 3745 </tr> | |
| 3746 <tr> | |
| 3747 <td style="text-align: left;"><code>ZINT_ERROR_FILE_ACCESS</code></td> | |
| 3748 <td style="text-align: left;">Zint was unable to open the requested | |
| 3749 output file. This is usually a file permissions problem.</td> | |
| 3750 </tr> | |
| 3751 <tr> | |
| 3752 <td style="text-align: left;"><code>ZINT_ERROR_MEMORY</code></td> | |
| 3753 <td style="text-align: left;">Zint ran out of memory. This should only | |
| 3754 be a problem with legacy systems.</td> | |
| 3755 </tr> | |
| 3756 <tr> | |
| 3757 <td style="text-align: left;"><code>ZINT_ERROR_FILE_WRITE</code></td> | |
| 3758 <td style="text-align: left;">Zint failed to write all contents to the | |
| 3759 requested output file. This should only occur if the output device | |
| 3760 becomes full.</td> | |
| 3761 </tr> | |
| 3762 <tr> | |
| 3763 <td style="text-align: left;"><code>ZINT_ERROR_USES_ECI</code></td> | |
| 3764 <td style="text-align: left;">Returned if <code>warn_level</code> set to | |
| 3765 <code>WARN_FAIL_ALL</code> and <code>ZINT_WARN_USES_ECI</code> | |
| 3766 occurs.</td> | |
| 3767 </tr> | |
| 3768 <tr> | |
| 3769 <td style="text-align: left;"><code>ZINT_ERROR_NONCOMPLIANT</code></td> | |
| 3770 <td style="text-align: left;">Returned if <code>warn_level</code> set to | |
| 3771 <code>WARN_FAIL_ALL</code> and <code>ZINT_WARN_NONCOMPLIANT</code> | |
| 3772 occurs.</td> | |
| 3773 </tr> | |
| 3774 <tr> | |
| 3775 <td style="text-align: left;"><code>ZINT_ERROR_HRT_TRUNCATED</code></td> | |
| 3776 <td style="text-align: left;">Returned if <code>warn_level</code> set to | |
| 3777 <code>WARN_FAIL_ALL</code> and <code>ZINT_WARN_HRT_TRUNCATED</code> | |
| 3778 occurs.</td> | |
| 3779 </tr> | |
| 3780 </tbody> | |
| 3781 </table> | |
| 3782 </div> | |
| 3783 <p>To catch errors use an integer variable as shown in the code | |
| 3784 below:</p> | |
| 3785 <div class="sourceCode" id="cb67"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb67-1"><a href="#cb67-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><zint.h></span></span> | |
| 3786 <span id="cb67-2"><a href="#cb67-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><stdio.h></span></span> | |
| 3787 <span id="cb67-3"><a href="#cb67-3" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><string.h></span></span> | |
| 3788 <span id="cb67-4"><a href="#cb67-4" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">(</span><span class="dt">int</span> argc<span class="op">,</span> <span class="dt">char</span> <span class="op">**</span>argv<span class="op">)</span></span> | |
| 3789 <span id="cb67-5"><a href="#cb67-5" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> | |
| 3790 <span id="cb67-6"><a href="#cb67-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">struct</span> zint_symbol <span class="op">*</span>my_symbol<span class="op">;</span></span> | |
| 3791 <span id="cb67-7"><a href="#cb67-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">int</span> error<span class="op">;</span></span> | |
| 3792 <span id="cb67-8"><a href="#cb67-8" aria-hidden="true" tabindex="-1"></a> my_symbol <span class="op">=</span> ZBarcode_Create<span class="op">();</span></span> | |
| 3793 <span id="cb67-9"><a href="#cb67-9" aria-hidden="true" tabindex="-1"></a> <span class="co">/* Set invalid foreground colour */</span></span> | |
| 3794 <span id="cb67-10"><a href="#cb67-10" aria-hidden="true" tabindex="-1"></a> strcpy<span class="op">(</span>my_symbol<span class="op">-></span>fgcolour<span class="op">,</span> <span class="st">"nonsense"</span><span class="op">);</span></span> | |
| 3795 <span id="cb67-11"><a href="#cb67-11" aria-hidden="true" tabindex="-1"></a> error <span class="op">=</span> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">],</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 3796 <span id="cb67-12"><a href="#cb67-12" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>error <span class="op">!=</span> <span class="dv">0</span><span class="op">)</span> <span class="op">{</span></span> | |
| 3797 <span id="cb67-13"><a href="#cb67-13" aria-hidden="true" tabindex="-1"></a> <span class="co">/* Some warning or error occurred */</span></span> | |
| 3798 <span id="cb67-14"><a href="#cb67-14" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"</span><span class="sc">%s\n</span><span class="st">"</span><span class="op">,</span> my_symbol<span class="op">-></span>errtxt<span class="op">);</span></span> | |
| 3799 <span id="cb67-15"><a href="#cb67-15" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="op">(</span>error <span class="op">>=</span> ZINT_ERROR<span class="op">)</span> <span class="op">{</span></span> | |
| 3800 <span id="cb67-16"><a href="#cb67-16" aria-hidden="true" tabindex="-1"></a> <span class="co">/* Stop now */</span></span> | |
| 3801 <span id="cb67-17"><a href="#cb67-17" aria-hidden="true" tabindex="-1"></a> ZBarcode_Delete<span class="op">(</span>my_symbol<span class="op">);</span></span> | |
| 3802 <span id="cb67-18"><a href="#cb67-18" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">1</span><span class="op">;</span></span> | |
| 3803 <span id="cb67-19"><a href="#cb67-19" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span> | |
| 3804 <span id="cb67-20"><a href="#cb67-20" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span> | |
| 3805 <span id="cb67-21"><a href="#cb67-21" aria-hidden="true" tabindex="-1"></a> <span class="co">/* Otherwise carry on with the rest of the application */</span></span> | |
| 3806 <span id="cb67-22"><a href="#cb67-22" aria-hidden="true" tabindex="-1"></a> ZBarcode_Delete<span class="op">(</span>my_symbol<span class="op">);</span></span> | |
| 3807 <span id="cb67-23"><a href="#cb67-23" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 3808 <span id="cb67-24"><a href="#cb67-24" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 3809 <p>This code will exit with the appropriate message:</p> | |
| 3810 <pre><code>Error 881: Malformed foreground RGB colour 'nonsense' (hexadecimal only)</code></pre> | |
| 3811 <p>To treat all warnings as errors, set | |
| 3812 <code>symbol->warn_level</code> to <code>WARN_FAIL_ALL</code>.</p> | |
| 3813 <h2 id="specifying-a-symbology">5.9 Specifying a Symbology</h2> | |
| 3814 <p>Symbologies can be specified by number or by name as shown in the | |
| 3815 Table <a href="#tbl:barcode_types">: Barcode Types (Symbologies)</a>. | |
| 3816 For example</p> | |
| 3817 <div class="sourceCode" id="cb69"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb69-1"><a href="#cb69-1" aria-hidden="true" tabindex="-1"></a>symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_LOGMARS<span class="op">;</span></span></code></pre></div> | |
| 3818 <p>means the same as</p> | |
| 3819 <div class="sourceCode" id="cb70"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb70-1"><a href="#cb70-1" aria-hidden="true" tabindex="-1"></a>symbol<span class="op">-></span>symbology <span class="op">=</span> <span class="dv">50</span><span class="op">;</span></span></code></pre></div> | |
| 3820 <h2 id="adjusting-output-options">5.10 Adjusting Output Options</h2> | |
| 3821 <p>The <code>output_options</code> member can be used to adjust various | |
| 3822 aspects of the output file. To select more than one option from the | |
| 3823 table below simply <code>OR</code> them together when adjusting this | |
| 3824 value:</p> | |
| 3825 <div class="sourceCode" id="cb71"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb71-1"><a href="#cb71-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>output_options <span class="op">|=</span> BARCODE_BIND <span class="op">|</span> READER_INIT<span class="op">;</span></span></code></pre></div> | |
| 3826 <div id="tbl:api_output_options" class="tablenos"> | |
| 3827 <table id="tbl:api_output_options" data-tag="$ $"> | |
| 3828 <caption><span>Table <span class="math inline"> </span>:</span> API | |
| 3829 <code>output_options</code> Values </caption> | |
| 3830 <colgroup> | |
| 3831 <col style="width: 34%" /> | |
| 3832 <col style="width: 65%" /> | |
| 3833 </colgroup> | |
| 3834 <thead> | |
| 3835 <tr> | |
| 3836 <th style="text-align: left;">Value</th> | |
| 3837 <th style="text-align: left;">Effect</th> | |
| 3838 </tr> | |
| 3839 </thead> | |
| 3840 <tbody> | |
| 3841 <tr> | |
| 3842 <td style="text-align: left;">0</td> | |
| 3843 <td style="text-align: left;">No options selected.</td> | |
| 3844 </tr> | |
| 3845 <tr> | |
| 3846 <td style="text-align: left;"><code>BARCODE_BIND_TOP</code></td> | |
| 3847 <td style="text-align: left;">Boundary bar above the symbol only.<a | |
| 3848 href="#fn10" class="footnote-ref" id="fnref10" | |
| 3849 role="doc-noteref"><sup>10</sup></a></td> | |
| 3850 </tr> | |
| 3851 <tr> | |
| 3852 <td style="text-align: left;"><code>BARCODE_BIND</code></td> | |
| 3853 <td style="text-align: left;">Boundary bars above and below the symbol | |
| 3854 and between rows if stacking multiple symbols.<a href="#fn11" | |
| 3855 class="footnote-ref" id="fnref11" | |
| 3856 role="doc-noteref"><sup>11</sup></a></td> | |
| 3857 </tr> | |
| 3858 <tr> | |
| 3859 <td style="text-align: left;"><code>BARCODE_BOX</code></td> | |
| 3860 <td style="text-align: left;">Add a box surrounding the symbol and | |
| 3861 whitespace.</td> | |
| 3862 </tr> | |
| 3863 <tr> | |
| 3864 <td style="text-align: left;"><code>BARCODE_STDOUT</code></td> | |
| 3865 <td style="text-align: left;">Output the file to stdout.</td> | |
| 3866 </tr> | |
| 3867 <tr> | |
| 3868 <td style="text-align: left;"><code>READER_INIT</code></td> | |
| 3869 <td style="text-align: left;">Create as a Reader Initialisation | |
| 3870 (Programming) symbol.</td> | |
| 3871 </tr> | |
| 3872 <tr> | |
| 3873 <td style="text-align: left;"><code>SMALL_TEXT</code></td> | |
| 3874 <td style="text-align: left;">Use a smaller font for the Human Readable | |
| 3875 Text.</td> | |
| 3876 </tr> | |
| 3877 <tr> | |
| 3878 <td style="text-align: left;"><code>BOLD_TEXT</code></td> | |
| 3879 <td style="text-align: left;">Embolden the Human Readable Text.</td> | |
| 3880 </tr> | |
| 3881 <tr> | |
| 3882 <td style="text-align: left;"><code>CMYK_COLOUR</code></td> | |
| 3883 <td style="text-align: left;">Select the CMYK colour space option for | |
| 3884 Encapsulated PostScript and TIF files.</td> | |
| 3885 </tr> | |
| 3886 <tr> | |
| 3887 <td style="text-align: left;"><code>BARCODE_DOTTY_MODE</code></td> | |
| 3888 <td style="text-align: left;">Plot a matrix symbol using dots rather | |
| 3889 than squares.</td> | |
| 3890 </tr> | |
| 3891 <tr> | |
| 3892 <td style="text-align: left;"><code>GS1_GS_SEPARATOR</code></td> | |
| 3893 <td style="text-align: left;">Use GS (Group Separator) instead of FNC1 | |
| 3894 as GS1 separator (Data Matrix only).</td> | |
| 3895 </tr> | |
| 3896 <tr> | |
| 3897 <td style="text-align: left;"><code>OUT_BUFFER_INTERMEDIATE</code></td> | |
| 3898 <td style="text-align: left;">Return the bitmap buffer as ASCII values | |
| 3899 instead of separate colour channels - see <a | |
| 3900 href="#buffering-symbols-in-memory-raster">5.4 Buffering Symbols in | |
| 3901 Memory (raster)</a>.</td> | |
| 3902 </tr> | |
| 3903 <tr> | |
| 3904 <td style="text-align: left;"><code>BARCODE_QUIET_ZONES</code></td> | |
| 3905 <td style="text-align: left;">Add compliant quiet zones (additional to | |
| 3906 any specified whitespace).<a href="#fn12" class="footnote-ref" | |
| 3907 id="fnref12" role="doc-noteref"><sup>12</sup></a></td> | |
| 3908 </tr> | |
| 3909 <tr> | |
| 3910 <td style="text-align: left;"><code>BARCODE_NO_QUIET_ZONES</code></td> | |
| 3911 <td style="text-align: left;">Disable quiet zones, notably those with | |
| 3912 defaults.</td> | |
| 3913 </tr> | |
| 3914 <tr> | |
| 3915 <td style="text-align: left;"><code>COMPLIANT_HEIGHT</code></td> | |
| 3916 <td style="text-align: left;">Warn if height specified not compliant, or | |
| 3917 use standard height (if any) as default.</td> | |
| 3918 </tr> | |
| 3919 <tr> | |
| 3920 <td style="text-align: left;"><code>EANUPC_GUARD_WHITESPACE</code></td> | |
| 3921 <td style="text-align: left;">Add quiet zone indicators (“<” and/or | |
| 3922 “>”) to HRT whitespace (EAN/UPC).</td> | |
| 3923 </tr> | |
| 3924 <tr> | |
| 3925 <td style="text-align: left;"><code>EMBED_VECTOR_FONT</code></td> | |
| 3926 <td style="text-align: left;">Embed font in vector output - currently | |
| 3927 available for SVG output only.</td> | |
| 3928 </tr> | |
| 3929 <tr> | |
| 3930 <td style="text-align: left;"><code>BARCODE_MEMORY_FILE</code></td> | |
| 3931 <td style="text-align: left;">Write output to in-memory buffer | |
| 3932 <code>symbol->memfile</code> instead of to <code>outfile</code> | |
| 3933 file.</td> | |
| 3934 </tr> | |
| 3935 </tbody> | |
| 3936 </table> | |
| 3937 </div> | |
| 3938 <h2 id="setting-the-input-mode">5.11 Setting the Input Mode</h2> | |
| 3939 <p>The way in which the input data is encoded can be set using the | |
| 3940 <code>input_mode</code> member. Valid values are shown in the table | |
| 3941 below.</p> | |
| 3942 <div id="tbl:api_input_mode" class="tablenos"> | |
| 3943 <table id="tbl:api_input_mode" data-tag="$ $"> | |
| 3944 <caption><span>Table <span class="math inline"> </span>:</span> API | |
| 3945 <code>input_mode</code> Values </caption> | |
| 3946 <colgroup> | |
| 3947 <col style="width: 25%" /> | |
| 3948 <col style="width: 74%" /> | |
| 3949 </colgroup> | |
| 3950 <thead> | |
| 3951 <tr> | |
| 3952 <th style="text-align: left;">Value</th> | |
| 3953 <th style="text-align: left;">Effect</th> | |
| 3954 </tr> | |
| 3955 </thead> | |
| 3956 <tbody> | |
| 3957 <tr> | |
| 3958 <td style="text-align: left;"><code>DATA_MODE</code></td> | |
| 3959 <td style="text-align: left;">Uses full 8-bit range interpreted as | |
| 3960 binary data.</td> | |
| 3961 </tr> | |
| 3962 <tr> | |
| 3963 <td style="text-align: left;"><code>UNICODE_MODE</code></td> | |
| 3964 <td style="text-align: left;">Uses UTF-8 input.</td> | |
| 3965 </tr> | |
| 3966 <tr> | |
| 3967 <td style="text-align: left;"><code>GS1_MODE</code></td> | |
| 3968 <td style="text-align: left;">Encodes GS1 data using FNC1 | |
| 3969 characters.</td> | |
| 3970 </tr> | |
| 3971 <tr> | |
| 3972 <td style="text-align: left;"></td> | |
| 3973 <td style="text-align: left;"><em>The above are exclusive, the following | |
| 3974 optional and OR-ed.</em></td> | |
| 3975 </tr> | |
| 3976 <tr> | |
| 3977 <td style="text-align: left;"><code>ESCAPE_MODE</code></td> | |
| 3978 <td style="text-align: left;">Process input data for escape | |
| 3979 sequences.</td> | |
| 3980 </tr> | |
| 3981 <tr> | |
| 3982 <td style="text-align: left;"><code>GS1PARENS_MODE</code></td> | |
| 3983 <td style="text-align: left;">Parentheses (round brackets) used in GS1 | |
| 3984 data instead of square brackets to delimit Application Identifiers | |
| 3985 (parentheses must not otherwise occur in the data).</td> | |
| 3986 </tr> | |
| 3987 <tr> | |
| 3988 <td style="text-align: left;"><code>GS1NOCHECK_MODE</code></td> | |
| 3989 <td style="text-align: left;">Do not check GS1 data for validity, | |
| 3990 i.e. suppress checks for valid AIs and data lengths. Invalid characters | |
| 3991 (e.g. control characters, extended ASCII characters) are still checked | |
| 3992 for.</td> | |
| 3993 </tr> | |
| 3994 <tr> | |
| 3995 <td style="text-align: left;"><code>HEIGHTPERROW_MODE</code></td> | |
| 3996 <td style="text-align: left;">Interpret the <code>height</code> member | |
| 3997 as per-row rather than as overall height.</td> | |
| 3998 </tr> | |
| 3999 <tr> | |
| 4000 <td style="text-align: left;"><code>FAST_MODE</code></td> | |
| 4001 <td style="text-align: left;">Use faster if less optimal encodation or | |
| 4002 other shortcuts if available (affects <code>DATAMATRIX</code>, | |
| 4003 <code>MICROPDF417</code>, <code>PDF417</code>, <code>QRCODE</code> and | |
| 4004 <code>UPNQR</code> only).</td> | |
| 4005 </tr> | |
| 4006 <tr> | |
| 4007 <td style="text-align: left;"><code>EXTRA_ESCAPE_MODE</code></td> | |
| 4008 <td style="text-align: left;">Process special symbology-specific escape | |
| 4009 sequences (<code>CODE128</code> only).</td> | |
| 4010 </tr> | |
| 4011 </tbody> | |
| 4012 </table> | |
| 4013 </div> | |
| 4014 <p>The default mode is <code>DATA_MODE</code>. (Note that this differs | |
| 4015 from the default for the CLI and GUI, which is | |
| 4016 <code>UNICODE_MODE</code>.)</p> | |
| 4017 <p><code>DATA_MODE</code>, <code>UNICODE_MODE</code> and | |
| 4018 <code>GS1_MODE</code> are mutually exclusive, whereas | |
| 4019 <code>ESCAPE_MODE</code>, <code>GS1PARENS_MODE</code>, | |
| 4020 <code>GS1NOCHECK_MODE</code>, <code>HEIGHTPERROW_MODE</code>, | |
| 4021 <code>FAST_MODE</code> and <code>EXTRA_ESCAPE_MODE</code> are optional. | |
| 4022 So, for example, you can set</p> | |
| 4023 <div class="sourceCode" id="cb72"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb72-1"><a href="#cb72-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>input_mode <span class="op">=</span> UNICODE_MODE <span class="op">|</span> ESCAPE_MODE<span class="op">;</span></span></code></pre></div> | |
| 4024 <p>or</p> | |
| 4025 <div class="sourceCode" id="cb73"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb73-1"><a href="#cb73-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>input_mode <span class="op">=</span> GS1_MODE <span class="op">|</span> GS1PARENS_MODE <span class="op">|</span> GS1NOCHECK_MODE<span class="op">;</span></span></code></pre></div> | |
| 4026 <p>whereas</p> | |
| 4027 <div class="sourceCode" id="cb74"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb74-1"><a href="#cb74-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>input_mode <span class="op">=</span> DATA_MODE <span class="op">|</span> GS1_MODE<span class="op">;</span></span></code></pre></div> | |
| 4028 <p>is not valid.</p> | |
| 4029 <p>Permissible escape sequences (<code>ESCAPE_MODE</code>) are listed in | |
| 4030 Table <a href="#tbl:escape_sequences">: Escape Sequences</a>, and the | |
| 4031 special Code 128-only <code>EXTRA_ESCAPE_MODE</code> escape sequences | |
| 4032 are given in <a href="#standard-code-128-iso-15417">6.1.10.1 Standard | |
| 4033 Code 128 (ISO 15417)</a>. An example of <code>GS1PARENS_MODE</code> | |
| 4034 usage is given in section <a href="#gs1-128">6.1.10.3 GS1-128</a>.</p> | |
| 4035 <p><code>GS1NOCHECK_MODE</code> is for use with legacy systems that have | |
| 4036 data that does not conform to the current GS1 standard. Printable ASCII | |
| 4037 input is still checked for, as is the validity of GS1 data specified | |
| 4038 without AIs (e.g. linear data for GS1 DataBar | |
| 4039 Omnidirectional/Limited/etc.). Also checked is GS1 DataBar Expanded and | |
| 4040 GS1 Composite input that is not in the GS1 encodable character set 82 | |
| 4041 (see GS1 General Specifications Figure 7.11.1 ‘GS1 AI encodable | |
| 4042 character set 82’), otherwise encodation would fail.</p> | |
| 4043 <p>For <code>HEIGHTPERROW_MODE</code>, see <code>--heightperrow</code> | |
| 4044 in section <a href="#adjusting-height">4.4 Adjusting Height</a>. The | |
| 4045 <code>height</code> member should be set to the desired per-row value on | |
| 4046 input (it will be set to the overall height on output).</p> | |
| 4047 <p><code>FAST_MODE</code> causes a less optimal encodation scheme to be | |
| 4048 used for Data Matrix, MicroPDF417 and PDF417. For QR Code and UPNQR, it | |
| 4049 affects Zint’s automatic mask selection - see <a | |
| 4050 href="#qr-code-iso-18004">6.6.3 QR Code (ISO 18004)</a> for details.</p> | |
| 4051 <h2 id="multiple-segments-1">5.12 Multiple Segments</h2> | |
| 4052 <p>For input data requiring multiple ECIs, the following functions may | |
| 4053 be used:</p> | |
| 4054 <div class="sourceCode" id="cb75"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb75-1"><a href="#cb75-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_Segs<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 4055 <span id="cb75-2"><a href="#cb75-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="kw">struct</span> zint_seg segs<span class="op">[],</span> <span class="dt">const</span> <span class="dt">int</span> seg_count<span class="op">);</span></span> | |
| 4056 <span id="cb75-3"><a href="#cb75-3" aria-hidden="true" tabindex="-1"></a></span> | |
| 4057 <span id="cb75-4"><a href="#cb75-4" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_Segs_and_Print<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 4058 <span id="cb75-5"><a href="#cb75-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="kw">struct</span> zint_seg segs<span class="op">[],</span> <span class="dt">const</span> <span class="dt">int</span> seg_count<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span> | |
| 4059 <span id="cb75-6"><a href="#cb75-6" aria-hidden="true" tabindex="-1"></a></span> | |
| 4060 <span id="cb75-7"><a href="#cb75-7" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_Segs_and_Buffer<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 4061 <span id="cb75-8"><a href="#cb75-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="kw">struct</span> zint_seg segs<span class="op">[],</span> <span class="dt">const</span> <span class="dt">int</span> seg_count<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span> | |
| 4062 <span id="cb75-9"><a href="#cb75-9" aria-hidden="true" tabindex="-1"></a></span> | |
| 4063 <span id="cb75-10"><a href="#cb75-10" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Encode_Segs_and_Buffer_Vector<span class="op">(</span><span class="kw">struct</span> zint_symbol <span class="op">*</span>symbol<span class="op">,</span></span> | |
| 4064 <span id="cb75-11"><a href="#cb75-11" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="kw">struct</span> zint_seg segs<span class="op">[],</span> <span class="dt">const</span> <span class="dt">int</span> seg_count<span class="op">,</span> <span class="dt">int</span> rotate_angle<span class="op">);</span></span></code></pre></div> | |
| 4065 <p>These are direct analogues of the previously mentioned | |
| 4066 <code>ZBarcode_Encode()</code>, | |
| 4067 <code>ZBarcode_Encode_and_Print()</code>, | |
| 4068 <code>ZBarcode_Encode_and_Buffer()</code> and | |
| 4069 <code>ZBarcode_Encode_and_Buffer_Vector()</code> respectively, where | |
| 4070 instead of a pair consisting of <code>"source, length"</code>, a pair | |
| 4071 consisting of <code>"segs, seg_count"</code> is given, with | |
| 4072 <code>segs</code> being an array of <code>struct zint_seg</code> | |
| 4073 segments and <code>seg_count</code> being the number of elements it | |
| 4074 contains. The zint_seg structure is of the form:</p> | |
| 4075 <div class="sourceCode" id="cb76"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb76-1"><a href="#cb76-1" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> zint_seg <span class="op">{</span></span> | |
| 4076 <span id="cb76-2"><a href="#cb76-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">unsigned</span> <span class="dt">char</span> <span class="op">*</span>source<span class="op">;</span> <span class="co">/* Data to encode */</span></span> | |
| 4077 <span id="cb76-3"><a href="#cb76-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">int</span> length<span class="op">;</span> <span class="co">/* Length of `source`. If 0, `source` must be</span></span> | |
| 4078 <span id="cb76-4"><a href="#cb76-4" aria-hidden="true" tabindex="-1"></a><span class="co"> NUL-terminated */</span></span> | |
| 4079 <span id="cb76-5"><a href="#cb76-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">int</span> eci<span class="op">;</span> <span class="co">/* Extended Channel Interpretation */</span></span> | |
| 4080 <span id="cb76-6"><a href="#cb76-6" aria-hidden="true" tabindex="-1"></a><span class="op">};</span></span></code></pre></div> | |
| 4081 <p>The symbology must support ECIs (see Table <a | |
| 4082 href="#tbl:eci_aware_symbologies">: ECI-Aware Symbologies</a>). For | |
| 4083 example:</p> | |
| 4084 <div class="sourceCode" id="cb77"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb77-1"><a href="#cb77-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><zint.h></span></span> | |
| 4085 <span id="cb77-2"><a href="#cb77-2" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> main<span class="op">(</span><span class="dt">int</span> argc<span class="op">,</span> <span class="dt">char</span> <span class="op">**</span>argv<span class="op">)</span></span> | |
| 4086 <span id="cb77-3"><a href="#cb77-3" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> | |
| 4087 <span id="cb77-4"><a href="#cb77-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">struct</span> zint_seg segs<span class="op">[]</span> <span class="op">=</span> <span class="op">{</span></span> | |
| 4088 <span id="cb77-5"><a href="#cb77-5" aria-hidden="true" tabindex="-1"></a> <span class="op">{</span> <span class="st">"Κείμενο"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">9</span> <span class="op">},</span></span> | |
| 4089 <span id="cb77-6"><a href="#cb77-6" aria-hidden="true" tabindex="-1"></a> <span class="op">{</span> <span class="st">"Текст"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">7</span> <span class="op">},</span></span> | |
| 4090 <span id="cb77-7"><a href="#cb77-7" aria-hidden="true" tabindex="-1"></a> <span class="op">{</span> <span class="st">"文章"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">20</span> <span class="op">}</span></span> | |
| 4091 <span id="cb77-8"><a href="#cb77-8" aria-hidden="true" tabindex="-1"></a> <span class="op">};</span></span> | |
| 4092 <span id="cb77-9"><a href="#cb77-9" aria-hidden="true" tabindex="-1"></a> <span class="kw">struct</span> zint_symbol <span class="op">*</span>my_symbol<span class="op">;</span></span> | |
| 4093 <span id="cb77-10"><a href="#cb77-10" aria-hidden="true" tabindex="-1"></a> my_symbol <span class="op">=</span> ZBarcode_Create<span class="op">();</span></span> | |
| 4094 <span id="cb77-11"><a href="#cb77-11" aria-hidden="true" tabindex="-1"></a> my_symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_AZTEC<span class="op">;</span></span> | |
| 4095 <span id="cb77-12"><a href="#cb77-12" aria-hidden="true" tabindex="-1"></a> my_symbol<span class="op">-></span>input_mode <span class="op">=</span> UNICODE_MODE<span class="op">;</span></span> | |
| 4096 <span id="cb77-13"><a href="#cb77-13" aria-hidden="true" tabindex="-1"></a> ZBarcode_Encode_Segs<span class="op">(</span>my_symbol<span class="op">,</span> segs<span class="op">,</span> <span class="dv">3</span><span class="op">);</span></span> | |
| 4097 <span id="cb77-14"><a href="#cb77-14" aria-hidden="true" tabindex="-1"></a> ZBarcode_Print<span class="op">(</span>my_symbol<span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 4098 <span id="cb77-15"><a href="#cb77-15" aria-hidden="true" tabindex="-1"></a> ZBarcode_Delete<span class="op">(</span>my_symbol<span class="op">);</span></span> | |
| 4099 <span id="cb77-16"><a href="#cb77-16" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="dv">0</span><span class="op">;</span></span> | |
| 4100 <span id="cb77-17"><a href="#cb77-17" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 4101 <p>A maximum of 256 segments may be specified. Use of multiple segments | |
| 4102 with GS1 data is not currently supported.</p> | |
| 4103 <h2 id="scaling-helpers">5.13 Scaling Helpers</h2> | |
| 4104 <p>To help with scaling the output, the following three function are | |
| 4105 available:</p> | |
| 4106 <div class="sourceCode" id="cb78"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb78-1"><a href="#cb78-1" aria-hidden="true" tabindex="-1"></a><span class="dt">float</span> ZBarcode_Default_Xdim<span class="op">(</span><span class="dt">int</span> symbol_id<span class="op">);</span></span> | |
| 4107 <span id="cb78-2"><a href="#cb78-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 4108 <span id="cb78-3"><a href="#cb78-3" aria-hidden="true" tabindex="-1"></a><span class="dt">float</span> ZBarcode_Scale_From_XdimDp<span class="op">(</span><span class="dt">int</span> symbol_id<span class="op">,</span> <span class="dt">float</span> x_dim_mm<span class="op">,</span> <span class="dt">float</span> dpmm<span class="op">,</span></span> | |
| 4109 <span id="cb78-4"><a href="#cb78-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">const</span> <span class="dt">char</span> <span class="op">*</span>filetype<span class="op">)</span> <span class="op">{</span></span> | |
| 4110 <span id="cb78-5"><a href="#cb78-5" aria-hidden="true" tabindex="-1"></a></span> | |
| 4111 <span id="cb78-6"><a href="#cb78-6" aria-hidden="true" tabindex="-1"></a><span class="dt">float</span> ZBarcode_XdimDP_From_Scale<span class="op">(</span><span class="dt">int</span> symbol_id<span class="op">,</span> <span class="dt">float</span> scale<span class="op">,</span></span> | |
| 4112 <span id="cb78-7"><a href="#cb78-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">float</span> x_dim_mm_or_dpmm<span class="op">,</span> <span class="dt">const</span> <span class="dt">char</span> <span class="op">*</span>filetype<span class="op">);</span></span></code></pre></div> | |
| 4113 <p>The first <code>ZBarcode_Default_Xdim()</code> returns the default | |
| 4114 X-dimension suggested by Zint for symbology <code>symbol_id</code>.</p> | |
| 4115 <p>The second <code>ZBarcode_Scale_From_XdimDp()</code> returns the | |
| 4116 scale to use to output to a file of type <code>filetype</code> with | |
| 4117 X-dimension <code>x_dim_mm</code> at <code>dpmm</code> dots per mm. The | |
| 4118 given X-dimension must be non-zero and less than or equal to 10mm, | |
| 4119 however <code>dpmm</code> may be zero and defaults to 12 dpmm, and | |
| 4120 <code>filetype</code> may be NULL or empty in which case a GIF filetype | |
| 4121 is assumed. For raster output (BMP/GIF/PCX/PNG/TIF) the scale is rounded | |
| 4122 to half-integer increments.</p> | |
| 4123 <p>For example:</p> | |
| 4124 <div class="sourceCode" id="cb79"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb79-1"><a href="#cb79-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* Royal Mail 4-State Customer Code */</span></span> | |
| 4125 <span id="cb79-2"><a href="#cb79-2" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_RM4SCC<span class="op">;</span></span> | |
| 4126 <span id="cb79-3"><a href="#cb79-3" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>dpmm <span class="op">=</span> <span class="fl">600.0</span><span class="bu">f</span> <span class="op">/</span> <span class="fl">25.4</span><span class="bu">f</span><span class="op">;</span> <span class="co">/* 600 dpi */</span></span> | |
| 4127 <span id="cb79-4"><a href="#cb79-4" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>scale <span class="op">=</span> ZBarcode_Scale_From_XdimDp<span class="op">(</span></span> | |
| 4128 <span id="cb79-5"><a href="#cb79-5" aria-hidden="true" tabindex="-1"></a> my_symbol<span class="op">-></span>symbology<span class="op">,</span></span> | |
| 4129 <span id="cb79-6"><a href="#cb79-6" aria-hidden="true" tabindex="-1"></a> ZBarcode_Default_Xdim<span class="op">(</span>my_symbol<span class="op">-></span>symbology<span class="op">),</span></span> | |
| 4130 <span id="cb79-7"><a href="#cb79-7" aria-hidden="true" tabindex="-1"></a> my_symbol<span class="op">-></span>dpmm<span class="op">,</span> <span class="st">"PNG"</span><span class="op">);</span> <span class="co">/* Returns 7.5 */</span></span></code></pre></div> | |
| 4131 <p>The third function <code>ZBarcode_XdimDP_From_Scale()</code> is the | |
| 4132 “reverse” of <code>ZBarcode_Scale_From_XdimDp()</code>, returning the | |
| 4133 X-dimension (in mm) or the dot density (in dpmm) given a scale | |
| 4134 <code>scale</code>. Both <code>scale</code> and | |
| 4135 <code>x_dim_mm_or_dpmm</code> must be non-zero. The returned value is | |
| 4136 bound to the maximum value of dpmm (1000), so must be further bound to | |
| 4137 10 on return if the X-dimension is sought.</p> | |
| 4138 <p>Note that the X-dimension to use is application dependent, and varies | |
| 4139 not only due to the symbology, resolution and filetype but also due to | |
| 4140 the type of scanner used, the intended scanning distance, and what media | |
| 4141 (“substrates”) the barcode appears on.</p> | |
| 4142 <h2 id="verifying-symbology-availability">5.14 Verifying Symbology | |
| 4143 Availability</h2> | |
| 4144 <p>An additional function available in the API is:</p> | |
| 4145 <div class="sourceCode" id="cb80"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb80-1"><a href="#cb80-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_ValidID<span class="op">(</span><span class="dt">int</span> symbol_id<span class="op">);</span></span></code></pre></div> | |
| 4146 <p>which allows you to check whether a given symbology is available, | |
| 4147 returning a non-zero value if so. For example:</p> | |
| 4148 <div class="sourceCode" id="cb81"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb81-1"><a href="#cb81-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(</span>ZBarcode_ValidID<span class="op">(</span>BARCODE_PDF417<span class="op">)</span> <span class="op">!=</span> <span class="dv">0</span><span class="op">)</span> <span class="op">{</span></span> | |
| 4149 <span id="cb81-2"><a href="#cb81-2" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"PDF417 available</span><span class="sc">\n</span><span class="st">"</span><span class="op">);</span></span> | |
| 4150 <span id="cb81-3"><a href="#cb81-3" aria-hidden="true" tabindex="-1"></a><span class="op">}</span> <span class="cf">else</span> <span class="op">{</span></span> | |
| 4151 <span id="cb81-4"><a href="#cb81-4" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"PDF417 not available</span><span class="sc">\n</span><span class="st">"</span><span class="op">);</span></span> | |
| 4152 <span id="cb81-5"><a href="#cb81-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 4153 <p>Another function that may be useful is:</p> | |
| 4154 <div class="sourceCode" id="cb82"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb82-1"><a href="#cb82-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_BarcodeName<span class="op">(</span><span class="dt">int</span> symbol_id<span class="op">,</span> <span class="dt">char</span> name<span class="op">[</span><span class="dv">32</span><span class="op">]);</span></span></code></pre></div> | |
| 4155 <p>which copies the name of a symbology into the supplied | |
| 4156 <code>name</code> buffer, which should be 32 characters in length. The | |
| 4157 name is <code>NUL</code>-terminated, and zero is returned on success. | |
| 4158 For instance:</p> | |
| 4159 <div class="sourceCode" id="cb83"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb83-1"><a href="#cb83-1" aria-hidden="true" tabindex="-1"></a><span class="dt">char</span> name<span class="op">[</span><span class="dv">32</span><span class="op">];</span></span> | |
| 4160 <span id="cb83-2"><a href="#cb83-2" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(</span>ZBarcode_BarcodeName<span class="op">(</span>BARCODE_PDF417<span class="op">,</span> name<span class="op">)</span> <span class="op">==</span> <span class="dv">0</span><span class="op">)</span> <span class="op">{</span></span> | |
| 4161 <span id="cb83-3"><a href="#cb83-3" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"</span><span class="sc">%s\n</span><span class="st">"</span><span class="op">,</span> name<span class="op">);</span></span> | |
| 4162 <span id="cb83-4"><a href="#cb83-4" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 4163 <p>will print <code>BARCODE_PDF417</code>.</p> | |
| 4164 <h2 id="checking-symbology-capabilities">5.15 Checking Symbology | |
| 4165 Capabilities</h2> | |
| 4166 <p>It can be useful for frontend programs to know the capabilities of a | |
| 4167 symbology. This can be determined using another additional function:</p> | |
| 4168 <div class="sourceCode" id="cb84"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb84-1"><a href="#cb84-1" aria-hidden="true" tabindex="-1"></a><span class="dt">unsigned</span> <span class="dt">int</span> ZBarcode_Cap<span class="op">(</span><span class="dt">int</span> symbol_id<span class="op">,</span> <span class="dt">unsigned</span> <span class="dt">int</span> cap_flag<span class="op">);</span></span></code></pre></div> | |
| 4169 <p>by <code>OR</code>-ing the flags below in the <code>cap_flag</code> | |
| 4170 argument and checking the return to see which are set.</p> | |
| 4171 <div id="tbl:api_cap" class="tablenos"> | |
| 4172 <table id="tbl:api_cap" data-tag=": API Capability Flags"> | |
| 4173 <caption><span>Table : API Capability Flags</span> </caption> | |
| 4174 <colgroup> | |
| 4175 <col style="width: 35%" /> | |
| 4176 <col style="width: 64%" /> | |
| 4177 </colgroup> | |
| 4178 <thead> | |
| 4179 <tr> | |
| 4180 <th style="text-align: left;">Value</th> | |
| 4181 <th style="text-align: left;">Meaning</th> | |
| 4182 </tr> | |
| 4183 </thead> | |
| 4184 <tbody> | |
| 4185 <tr> | |
| 4186 <td style="text-align: left;"><code>ZINT_CAP_HRT</code></td> | |
| 4187 <td style="text-align: left;">Can the symbology print Human Readable | |
| 4188 Text?</td> | |
| 4189 </tr> | |
| 4190 <tr> | |
| 4191 <td style="text-align: left;"><code>ZINT_CAP_STACKABLE</code></td> | |
| 4192 <td style="text-align: left;">Is the symbology stackable?</td> | |
| 4193 </tr> | |
| 4194 <tr> | |
| 4195 <td style="text-align: left;"><code>ZINT_CAP_EANUPC</code><a | |
| 4196 href="#fn13" class="footnote-ref" id="fnref13" | |
| 4197 role="doc-noteref"><sup>13</sup></a></td> | |
| 4198 <td style="text-align: left;">Is the symbology EAN/UPC?</td> | |
| 4199 </tr> | |
| 4200 <tr> | |
| 4201 <td style="text-align: left;"><code>ZINT_CAP_COMPOSITE</code></td> | |
| 4202 <td style="text-align: left;">Does the symbology support composite data? | |
| 4203 (see <a href="#gs1-composite-symbols-iso-24723">6.3 GS1 Composite | |
| 4204 Symbols (ISO 24723)</a> below)</td> | |
| 4205 </tr> | |
| 4206 <tr> | |
| 4207 <td style="text-align: left;"><code>ZINT_CAP_ECI</code></td> | |
| 4208 <td style="text-align: left;">Does the symbology support Extended | |
| 4209 Channel Interpretations?</td> | |
| 4210 </tr> | |
| 4211 <tr> | |
| 4212 <td style="text-align: left;"><code>ZINT_CAP_GS1</code></td> | |
| 4213 <td style="text-align: left;">Does the symbology support GS1 data?</td> | |
| 4214 </tr> | |
| 4215 <tr> | |
| 4216 <td style="text-align: left;"><code>ZINT_CAP_DOTTY</code></td> | |
| 4217 <td style="text-align: left;">Can the symbology be outputted as | |
| 4218 dots?</td> | |
| 4219 </tr> | |
| 4220 <tr> | |
| 4221 <td style="text-align: left;"><code>ZINT_CAP_QUIET_ZONES</code></td> | |
| 4222 <td style="text-align: left;">Does the symbology have default quiet | |
| 4223 zones?</td> | |
| 4224 </tr> | |
| 4225 <tr> | |
| 4226 <td style="text-align: left;"><code>ZINT_CAP_FIXED_RATIO</code></td> | |
| 4227 <td style="text-align: left;">Does the symbology have a fixed | |
| 4228 width-to-height (aspect) ratio?</td> | |
| 4229 </tr> | |
| 4230 <tr> | |
| 4231 <td style="text-align: left;"><code>ZINT_CAP_READER_INIT</code></td> | |
| 4232 <td style="text-align: left;">Does the symbology support Reader | |
| 4233 Initialisation?</td> | |
| 4234 </tr> | |
| 4235 <tr> | |
| 4236 <td style="text-align: left;"><code>ZINT_CAP_FULL_MULTIBYTE</code></td> | |
| 4237 <td style="text-align: left;">Is the <code>ZINT_FULL_MULTIBYTE</code> | |
| 4238 option applicable?</td> | |
| 4239 </tr> | |
| 4240 <tr> | |
| 4241 <td style="text-align: left;"><code>ZINT_CAP_MASK</code></td> | |
| 4242 <td style="text-align: left;">Is mask selection applicable?</td> | |
| 4243 </tr> | |
| 4244 <tr> | |
| 4245 <td style="text-align: left;"><code>ZINT_CAP_STRUCTAPP</code></td> | |
| 4246 <td style="text-align: left;">Does the symbology support Structured | |
| 4247 Append?</td> | |
| 4248 </tr> | |
| 4249 <tr> | |
| 4250 <td | |
| 4251 style="text-align: left;"><code>ZINT_CAP_COMPLIANT_HEIGHT</code></td> | |
| 4252 <td style="text-align: left;">Does the symbology have a compliant height | |
| 4253 defined?</td> | |
| 4254 </tr> | |
| 4255 </tbody> | |
| 4256 </table> | |
| 4257 </div> | |
| 4258 <p>For example:</p> | |
| 4259 <div class="sourceCode" id="cb85"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb85-1"><a href="#cb85-1" aria-hidden="true" tabindex="-1"></a><span class="dt">unsigned</span> <span class="dt">int</span> cap<span class="op">;</span></span> | |
| 4260 <span id="cb85-2"><a href="#cb85-2" aria-hidden="true" tabindex="-1"></a>cap <span class="op">=</span> ZBarcode_Cap<span class="op">(</span>BARCODE_PDF417<span class="op">,</span> ZINT_CAP_HRT <span class="op">|</span> ZINT_CAP_ECI<span class="op">);</span></span> | |
| 4261 <span id="cb85-3"><a href="#cb85-3" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(</span>cap <span class="op">&</span> ZINT_CAP_HRT<span class="op">)</span> <span class="op">{</span></span> | |
| 4262 <span id="cb85-4"><a href="#cb85-4" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"PDF417 supports HRT</span><span class="sc">\n</span><span class="st">"</span><span class="op">);</span></span> | |
| 4263 <span id="cb85-5"><a href="#cb85-5" aria-hidden="true" tabindex="-1"></a><span class="op">}</span> <span class="cf">else</span> <span class="op">{</span></span> | |
| 4264 <span id="cb85-6"><a href="#cb85-6" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"PDF417 does not support HRT</span><span class="sc">\n</span><span class="st">"</span><span class="op">);</span></span> | |
| 4265 <span id="cb85-7"><a href="#cb85-7" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span> | |
| 4266 <span id="cb85-8"><a href="#cb85-8" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">(</span>cap <span class="op">&</span> ZINT_CAP_ECI<span class="op">)</span> <span class="op">{</span></span> | |
| 4267 <span id="cb85-9"><a href="#cb85-9" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"PDF417 supports ECI</span><span class="sc">\n</span><span class="st">"</span><span class="op">);</span></span> | |
| 4268 <span id="cb85-10"><a href="#cb85-10" aria-hidden="true" tabindex="-1"></a><span class="op">}</span> <span class="cf">else</span> <span class="op">{</span></span> | |
| 4269 <span id="cb85-11"><a href="#cb85-11" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"PDF417 does not support ECI</span><span class="sc">\n</span><span class="st">"</span><span class="op">);</span></span> | |
| 4270 <span id="cb85-12"><a href="#cb85-12" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div> | |
| 4271 <h2 id="zint-version">5.16 Zint Version</h2> | |
| 4272 <p>Whether the Zint library linked to was built with PNG support may be | |
| 4273 determined with:</p> | |
| 4274 <div class="sourceCode" id="cb86"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb86-1"><a href="#cb86-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_NoPng<span class="op">();</span></span></code></pre></div> | |
| 4275 <p>which returns 1 if no PNG support is available, else zero.</p> | |
| 4276 <p>Lastly, the version of the Zint library linked to is returned by:</p> | |
| 4277 <div class="sourceCode" id="cb87"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb87-1"><a href="#cb87-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> ZBarcode_Version<span class="op">();</span></span></code></pre></div> | |
| 4278 <p>The version parts are separated by hundreds. For instance, version | |
| 4279 <code>"2.9.1"</code> is returned as <code>"20901"</code>.</p> | |
| 4280 <h1 id="types-of-symbology">6. Types of Symbology</h1> | |
| 4281 <h2 id="one-dimensional-symbols">6.1 One-Dimensional Symbols</h2> | |
| 4282 <p>One-dimensional or linear symbols are what most people associate with | |
| 4283 the term barcode. They consist of a number of bars and a number of | |
| 4284 spaces of differing widths.</p> | |
| 4285 <h3 id="code-11">6.1.1 Code 11</h3> | |
| 4286 <figure> | |
| 4287 <img src="images/code11.svg" title="fig:" class="lin" | |
| 4288 alt="zint -b CODE11 -d "9212320967"" /> | |
| 4289 <figcaption | |
| 4290 aria-hidden="true"><code>zint -b CODE11 -d "9212320967"</code></figcaption> | |
| 4291 </figure> | |
| 4292 <p>Developed by Intermec in 1977, Code 11 is similar to Code 2 of 5 | |
| 4293 Matrix and is primarily used in telecommunications. The symbol can | |
| 4294 encode data consisting of the digits 0-9 and the dash character | |
| 4295 (<code>-</code>) up to a maximum of 140 characters. Two modulo-11 check | |
| 4296 digits are added by default. To add just one check digit, set | |
| 4297 <code>--vers=1</code> (API <code>option_2 = 1</code>). To add no check | |
| 4298 digits, set <code>--vers=2</code> (API <code>option_2 = 2</code>).</p> | |
| 4299 <h3 id="code-2-of-5">6.1.2 Code 2 of 5</h3> | |
| 4300 <p>Code 2 of 5 is a family of one-dimensional symbols, 8 of which are | |
| 4301 supported by Zint. Note that the names given to these standards alters | |
| 4302 from one source to another so you should take care to ensure that you | |
| 4303 have the right barcode type before using these standards.</p> | |
| 4304 <h4 id="standard-code-2-of-5">6.1.2.1 Standard Code 2 of 5</h4> | |
| 4305 <figure> | |
| 4306 <img src="images/c25standard.svg" title="fig:" class="lin" | |
| 4307 alt="zint -b C25STANDARD -d "9212320967"" /> | |
| 4308 <figcaption | |
| 4309 aria-hidden="true"><code>zint -b C25STANDARD -d "9212320967"</code></figcaption> | |
| 4310 </figure> | |
| 4311 <p>Also known as Code 2 of 5 Matrix, this is a self-checking code used | |
| 4312 in industrial applications and photo development. Standard Code 2 of 5 | |
| 4313 will encode numeric input (digits 0-9) up to a maximum of 112 digits. No | |
| 4314 check digit is added by default. To add a check digit, set | |
| 4315 <code>--vers=1</code> (API <code>option_2 = 1</code>). To add a check | |
| 4316 digit but not show it in the Human Readable Text, set | |
| 4317 <code>--vers=2</code> (API <code>option_2 = 2</code>).</p> | |
| 4318 <h4 id="iata-code-2-of-5">6.1.2.2 IATA Code 2 of 5</h4> | |
| 4319 <figure> | |
| 4320 <img src="images/c25iata.svg" title="fig:" class="lin" | |
| 4321 alt="zint -b C25IATA -d "9212320967"" /> | |
| 4322 <figcaption | |
| 4323 aria-hidden="true"><code>zint -b C25IATA -d "9212320967"</code></figcaption> | |
| 4324 </figure> | |
| 4325 <p>Used for baggage handling in the air-transport industry by the | |
| 4326 International Air Transport Agency, this self-checking code will encode | |
| 4327 numeric input (digits 0-9) up to a maximum of 80 digits. No check digit | |
| 4328 is added by default, but can be set the same as for <a | |
| 4329 href="#standard-code-2-of-5">6.1.2.1 Standard Code 2 of 5</a>.</p> | |
| 4330 <h4 id="industrial-code-2-of-5">6.1.2.3 Industrial Code 2 of 5</h4> | |
| 4331 <figure> | |
| 4332 <img src="images/c25ind.svg" title="fig:" class="lin" | |
| 4333 alt="zint -b C25IND -d "9212320967"" /> | |
| 4334 <figcaption | |
| 4335 aria-hidden="true"><code>zint -b C25IND -d "9212320967"</code></figcaption> | |
| 4336 </figure> | |
| 4337 <p>Industrial Code 2 of 5 can encode numeric input (digits 0-9) up to a | |
| 4338 maximum of 79 digits. No check digit is added by default, but can be set | |
| 4339 the same as for <a href="#standard-code-2-of-5">6.1.2.1 Standard Code 2 | |
| 4340 of 5</a>.</p> | |
| 4341 <h4 id="interleaved-code-2-of-5-iso-16390">6.1.2.4 Interleaved Code 2 of | |
| 4342 5 (ISO 16390)</h4> | |
| 4343 <figure> | |
| 4344 <img src="images/c25inter.svg" title="fig:" class="lin" | |
| 4345 alt="zint -b C25INTER --compliantheight -d "9212320967"" /> | |
| 4346 <figcaption | |
| 4347 aria-hidden="true"><code>zint -b C25INTER --compliantheight -d "9212320967"</code></figcaption> | |
| 4348 </figure> | |
| 4349 <p>This self-checking symbology encodes pairs of numbers, and so can | |
| 4350 only encode an even number of digits (0-9). If an odd number of digits | |
| 4351 is entered a leading zero is added by Zint. A maximum of 62 pairs (124 | |
| 4352 digits) can be encoded. No check digit is added by default, but can be | |
| 4353 set the same as for <a href="#standard-code-2-of-5">6.1.2.1 Standard | |
| 4354 Code 2 of 5</a>.</p> | |
| 4355 <h4 id="code-2-of-5-data-logic">6.1.2.5 Code 2 of 5 Data Logic</h4> | |
| 4356 <figure> | |
| 4357 <img src="images/c25logic.svg" title="fig:" class="lin" | |
| 4358 alt="zint -b C25LOGIC -d "9212320967"" /> | |
| 4359 <figcaption | |
| 4360 aria-hidden="true"><code>zint -b C25LOGIC -d "9212320967"</code></figcaption> | |
| 4361 </figure> | |
| 4362 <p>Data Logic does not include a check digit by default and can encode | |
| 4363 numeric input (digits 0-9) up to a maximum of 113 digits. Check digit | |
| 4364 options are the same as for <a href="#standard-code-2-of-5">6.1.2.1 | |
| 4365 Standard Code 2 of 5</a>.</p> | |
| 4366 <h4 id="itf-14">6.1.2.6 ITF-14</h4> | |
| 4367 <figure> | |
| 4368 <img src="images/itf14.svg" title="fig:" class="lin" | |
| 4369 alt="zint -b ITF14 --compliantheight -d "9212320967145"" /> | |
| 4370 <figcaption | |
| 4371 aria-hidden="true"><code>zint -b ITF14 --compliantheight -d "9212320967145"</code></figcaption> | |
| 4372 </figure> | |
| 4373 <p>ITF-14, also known as UPC Shipping Container Symbol or Case Code, is | |
| 4374 based on Interleaved Code 2 of 5 and requires a 13-digit numeric input | |
| 4375 (digits 0-9). One modulo-10 check digit is added by Zint.</p> | |
| 4376 <p>If no border option is specified Zint defaults to adding a bounding | |
| 4377 box with a border width of 5. This behaviour can be overridden by using | |
| 4378 the <code>--bind</code> option (API | |
| 4379 <code>output_options |= BARCODE_BIND</code>). Similarly the border width | |
| 4380 can be overridden using <code>--border</code> (API | |
| 4381 <code>border_width</code>). If a symbol with no border is required this | |
| 4382 can be achieved by explicitly setting the border type to box (or bind or | |
| 4383 bindtop) and leaving the border width 0.</p> | |
| 4384 <figure> | |
| 4385 <img src="images/itf14_border0.svg" title="fig:" class="lin" | |
| 4386 alt="zint -b ITF14 --box --compliantheight -d "9212320967145"" /> | |
| 4387 <figcaption | |
| 4388 aria-hidden="true"><code>zint -b ITF14 --box --compliantheight -d "9212320967145"</code></figcaption> | |
| 4389 </figure> | |
| 4390 <h4 id="deutsche-post-leitcode">6.1.2.7 Deutsche Post Leitcode</h4> | |
| 4391 <figure> | |
| 4392 <img src="images/dpleit.svg" title="fig:" class="lin" | |
| 4393 alt="zint -b DPLEIT -d "9212320967145"" /> | |
| 4394 <figcaption | |
| 4395 aria-hidden="true"><code>zint -b DPLEIT -d "9212320967145"</code></figcaption> | |
| 4396 </figure> | |
| 4397 <p>Leitcode is based on Interleaved Code 2 of 5 and is used by Deutsche | |
| 4398 Post for routing purposes. Leitcode requires a 13-digit numerical input | |
| 4399 to which Zint adds a check digit.</p> | |
| 4400 <h4 id="deutsche-post-identcode">6.1.2.8 Deutsche Post Identcode</h4> | |
| 4401 <figure> | |
| 4402 <img src="images/dpident.svg" title="fig:" class="lin" | |
| 4403 alt="zint -b DPIDENT -d "91232096712"" /> | |
| 4404 <figcaption | |
| 4405 aria-hidden="true"><code>zint -b DPIDENT -d "91232096712"</code></figcaption> | |
| 4406 </figure> | |
| 4407 <p>Identcode is based on Interleaved Code 2 of 5 and is used by Deutsche | |
| 4408 Post for identification purposes. Identcode requires an 11-digit | |
| 4409 numerical input to which Zint adds a check digit.</p> | |
| 4410 <h3 id="upc-universal-product-code-iso-15420">6.1.3 UPC (Universal | |
| 4411 Product Code) (ISO 15420)</h3> | |
| 4412 <h4 id="upc-version-a">6.1.3.1 UPC Version A</h4> | |
| 4413 <figure> | |
| 4414 <img src="images/upca.svg" title="fig:" class="upcean" | |
| 4415 alt="zint -b UPCA --compliantheight -d "72527270270"" /> | |
| 4416 <figcaption | |
| 4417 aria-hidden="true"><code>zint -b UPCA --compliantheight -d "72527270270"</code></figcaption> | |
| 4418 </figure> | |
| 4419 <p>UPC-A is used in the United States for retail applications. The | |
| 4420 symbol requires an 11-digit article number. The check digit is | |
| 4421 calculated by Zint. In addition EAN-2 and EAN-5 add-on symbols can be | |
| 4422 added using the + character. For example, to draw a UPC-A symbol with | |
| 4423 the data 72527270270 with an EAN-5 add-on showing the data 12345 use the | |
| 4424 command:</p> | |
| 4425 <div class="sourceCode" id="cb88"><pre | |
| 4426 class="sourceCode bash"><code class="sourceCode bash"><span id="cb88-1"><a href="#cb88-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> UPCA <span class="at">-d</span> <span class="st">"72527270270+12345"</span></span></code></pre></div> | |
| 4427 <p>or using the API encode a data string with the + character | |
| 4428 included:</p> | |
| 4429 <div class="sourceCode" id="cb89"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb89-1"><a href="#cb89-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_UPCA<span class="op">;</span></span> | |
| 4430 <span id="cb89-2"><a href="#cb89-2" aria-hidden="true" tabindex="-1"></a>error <span class="op">=</span> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> <span class="st">"72527270270+12345"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span></code></pre></div> | |
| 4431 <figure> | |
| 4432 <img src="images/upca_5.svg" title="fig:" class="upcean" | |
| 4433 alt="zint -b UPCA --compliantheight -d "72527270270+12345"" /> | |
| 4434 <figcaption | |
| 4435 aria-hidden="true"><code>zint -b UPCA --compliantheight -d "72527270270+12345"</code></figcaption> | |
| 4436 </figure> | |
| 4437 <p>If your input data already includes the check digit symbology | |
| 4438 <code>BARCODE_UPCA_CHK</code> (35) can be used which takes a 12-digit | |
| 4439 input and validates the check digit before encoding.</p> | |
| 4440 <p>A quiet zone indicator can be added to the HRT by setting | |
| 4441 <code>--guardwhitespace</code> (API | |
| 4442 <code>output_options |= EANUPC_GUARD_WHITESPACE</code>). For UPC, this | |
| 4443 is only relevant when there is add-on:</p> | |
| 4444 <div class="sourceCode" id="cb90"><pre | |
| 4445 class="sourceCode bash"><code class="sourceCode bash"><span id="cb90-1"><a href="#cb90-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> UPCA <span class="at">-d</span> <span class="st">"72527270270+12345"</span> <span class="at">--guardwhitespace</span></span></code></pre></div> | |
| 4446 <p>or using the API:</p> | |
| 4447 <div class="sourceCode" id="cb91"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb91-1"><a href="#cb91-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_UPCA<span class="op">;</span></span> | |
| 4448 <span id="cb91-2"><a href="#cb91-2" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>output_options <span class="op">|=</span> EANUPC_GUARD_WHITESPACE<span class="op">;</span></span> | |
| 4449 <span id="cb91-3"><a href="#cb91-3" aria-hidden="true" tabindex="-1"></a>error <span class="op">=</span> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> <span class="st">"72527270270+12345"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span></code></pre></div> | |
| 4450 <figure> | |
| 4451 <img src="images/upca_5_gws.svg" title="fig:" class="upcean" | |
| 4452 alt="zint -b UPCA --compliantheight -d "72527270270+12345" --guardwhitespace" /> | |
| 4453 <figcaption | |
| 4454 aria-hidden="true"><code>zint -b UPCA --compliantheight -d "72527270270+12345" --guardwhitespace</code></figcaption> | |
| 4455 </figure> | |
| 4456 <p>You can adjust the gap between the main symbol and an add-on in | |
| 4457 integral multiples of the X-dimension by setting <code>--addongap</code> | |
| 4458 (API <code>option_2</code>) to a value between 9 (default) and 12. The | |
| 4459 height in X-dimensions that the guard bars descend below the main bars | |
| 4460 can be adjusted by setting <code>--guarddescent</code> (API | |
| 4461 <code>guard_descent</code>) to a value between 0.0 and 20.0 (default | |
| 4462 5.0).</p> | |
| 4463 <h4 id="upc-version-e">6.1.3.2 UPC Version E</h4> | |
| 4464 <figure> | |
| 4465 <img src="images/upce.svg" title="fig:" class="upcean" | |
| 4466 alt="zint -b UPCE --compliantheight -d "1123456"" /> | |
| 4467 <figcaption | |
| 4468 aria-hidden="true"><code>zint -b UPCE --compliantheight -d "1123456"</code></figcaption> | |
| 4469 </figure> | |
| 4470 <p>UPC-E is a zero-compressed version of UPC-A developed for smaller | |
| 4471 packages. The code requires a 6-digit article number (digits 0-9). The | |
| 4472 check digit is calculated by Zint. EAN-2 and EAN-5 add-on symbols can be | |
| 4473 added using the + character as with UPC-A. In addition Zint also | |
| 4474 supports Number System 1 encoding by entering a 7-digit article number | |
| 4475 starting with the digit 1. For example:</p> | |
| 4476 <div class="sourceCode" id="cb92"><pre | |
| 4477 class="sourceCode bash"><code class="sourceCode bash"><span id="cb92-1"><a href="#cb92-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> UPCE <span class="at">-d</span> <span class="st">"1123456"</span></span></code></pre></div> | |
| 4478 <p>or</p> | |
| 4479 <div class="sourceCode" id="cb93"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb93-1"><a href="#cb93-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_UPCE<span class="op">;</span></span> | |
| 4480 <span id="cb93-2"><a href="#cb93-2" aria-hidden="true" tabindex="-1"></a>error <span class="op">=</span> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> <span class="st">"1123456"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span></code></pre></div> | |
| 4481 <p>If your input data already includes the check digit symbology | |
| 4482 <code>BARCODE_UPCE_CHK</code> (38) can be used which takes a 7 or | |
| 4483 8-digit input and validates the check digit before encoding.</p> | |
| 4484 <p>As with UPC-A, a quiet zone indicator can be added when there is an | |
| 4485 add-on by setting <code>--guardwhitespace</code> (API | |
| 4486 <code>output_options |= EANUPC_GUARD_WHITESPACE</code>):</p> | |
| 4487 <div class="sourceCode" id="cb94"><pre | |
| 4488 class="sourceCode bash"><code class="sourceCode bash"><span id="cb94-1"><a href="#cb94-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> UPCE <span class="at">-d</span> <span class="st">"1123456+12"</span> <span class="at">--guardwhitespace</span></span></code></pre></div> | |
| 4489 <figure> | |
| 4490 <img src="images/upce_2_gws.svg" title="fig:" class="upcean" | |
| 4491 alt="zint -b UPCE --compliantheight -d "1123456+12" --guardwhitespace" /> | |
| 4492 <figcaption | |
| 4493 aria-hidden="true"><code>zint -b UPCE --compliantheight -d "1123456+12" --guardwhitespace</code></figcaption> | |
| 4494 </figure> | |
| 4495 <p>You can adjust the gap between the main symbol and an add-on in | |
| 4496 integral multiples of the X-dimension by setting <code>--addongap</code> | |
| 4497 (API <code>option_2</code>) to a value between 7 (default) and 12. The | |
| 4498 height in X-dimensions that the guard bars descend below the main bars | |
| 4499 can be adjusted by setting <code>--guarddescent</code> (API | |
| 4500 <code>guard_descent</code>) to a value between 0.0 and 20.0 (default | |
| 4501 5.0).</p> | |
| 4502 <h3 id="ean-european-article-number-iso-15420">6.1.4 EAN (European | |
| 4503 Article Number) (ISO 15420)</h3> | |
| 4504 <h4 id="ean-2-ean-5-ean-8-and-ean-13">6.1.4.1 EAN-2, EAN-5, EAN-8 and | |
| 4505 EAN-13</h4> | |
| 4506 <figure> | |
| 4507 <img src="images/eanx13.svg" title="fig:" class="upcean" | |
| 4508 alt="zint -b EANX --compliantheight -d "4512345678906"" /> | |
| 4509 <figcaption | |
| 4510 aria-hidden="true"><code>zint -b EANX --compliantheight -d "4512345678906"</code></figcaption> | |
| 4511 </figure> | |
| 4512 <p>The EAN system is used in retail across Europe and includes standards | |
| 4513 for EAN-2, EAN-5, EAN-8 and EAN-13 which encode 2, 5, 7 or 12-digit | |
| 4514 numbers respectively. Zint will decide which symbology to use depending | |
| 4515 on the length of the input data. In addition EAN-2 and EAN-5 add-on | |
| 4516 symbols can be added to EAN-8 and EAN-13 symbols using the + character | |
| 4517 as with UPC symbols. For example:</p> | |
| 4518 <div class="sourceCode" id="cb95"><pre | |
| 4519 class="sourceCode bash"><code class="sourceCode bash"><span id="cb95-1"><a href="#cb95-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX <span class="at">-d</span> <span class="st">"54321"</span></span></code></pre></div> | |
| 4520 <figure> | |
| 4521 <img src="images/eanx5.svg" title="fig:" class="upcean" | |
| 4522 alt="zint -b EANX --compliantheight -d "54321"" /> | |
| 4523 <figcaption | |
| 4524 aria-hidden="true"><code>zint -b EANX --compliantheight -d "54321"</code></figcaption> | |
| 4525 </figure> | |
| 4526 <p>will encode a stand-alone EAN-5, whereas</p> | |
| 4527 <div class="sourceCode" id="cb96"><pre | |
| 4528 class="sourceCode bash"><code class="sourceCode bash"><span id="cb96-1"><a href="#cb96-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX <span class="at">-d</span> <span class="st">"7432365+54321"</span></span></code></pre></div> | |
| 4529 <p>will encode an EAN-8 symbol with an EAN-5 add-on. As before these | |
| 4530 results can be achieved using the API:</p> | |
| 4531 <div class="sourceCode" id="cb97"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb97-1"><a href="#cb97-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_EANX<span class="op">;</span></span> | |
| 4532 <span id="cb97-2"><a href="#cb97-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 4533 <span id="cb97-3"><a href="#cb97-3" aria-hidden="true" tabindex="-1"></a>error <span class="op">=</span> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> <span class="st">"54321"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 4534 <span id="cb97-4"><a href="#cb97-4" aria-hidden="true" tabindex="-1"></a></span> | |
| 4535 <span id="cb97-5"><a href="#cb97-5" aria-hidden="true" tabindex="-1"></a>error <span class="op">=</span> ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> <span class="st">"7432365+54321"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span></code></pre></div> | |
| 4536 <figure> | |
| 4537 <img src="images/eanx8_5.svg" title="fig:" class="upcean" | |
| 4538 alt="zint -b EANX --compliantheight -d "7432365+54321"" /> | |
| 4539 <figcaption | |
| 4540 aria-hidden="true"><code>zint -b EANX --compliantheight -d "7432365+54321"</code></figcaption> | |
| 4541 </figure> | |
| 4542 <p>All of the EAN symbols include check digits which are added by | |
| 4543 Zint.</p> | |
| 4544 <p>If you are encoding an EAN-8 or EAN-13 symbol and your data already | |
| 4545 includes the check digit then you can use symbology | |
| 4546 <code>BARCODE_EANX_CHK</code> (14) which takes an 8 or 13-digit input | |
| 4547 and validates the check digit before encoding.</p> | |
| 4548 <p>Options to add quiet zone indicators and to adjust the add-on gap and | |
| 4549 the guard bar descent height are the same as for <a | |
| 4550 href="#upc-version-e">6.1.3.2 UPC Version E</a>. For instance:</p> | |
| 4551 <div class="sourceCode" id="cb98"><pre | |
| 4552 class="sourceCode bash"><code class="sourceCode bash"><span id="cb98-1"><a href="#cb98-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX_CHK <span class="at">-d</span> <span class="st">"74323654"</span> <span class="at">--guardwhitespace</span></span></code></pre></div> | |
| 4553 <figure> | |
| 4554 <img src="images/eanx8_gws.svg" title="fig:" class="upcean" | |
| 4555 alt="zint -b EANX_CHK --compliantheight -d "74323654" –guardwhitespace" /> | |
| 4556 <figcaption | |
| 4557 aria-hidden="true"><code>zint -b EANX_CHK --compliantheight -d "74323654"</code> | |
| 4558 –guardwhitespace</figcaption> | |
| 4559 </figure> | |
| 4560 <h4 id="sbn-isbn-and-isbn-13">6.1.4.2 SBN, ISBN and ISBN-13</h4> | |
| 4561 <figure> | |
| 4562 <img src="images/isbnx.svg" title="fig:" class="upcean" | |
| 4563 alt="zint -b ISBNX --compliantheight -d "9789295055124"" /> | |
| 4564 <figcaption | |
| 4565 aria-hidden="true"><code>zint -b ISBNX --compliantheight -d "9789295055124"</code></figcaption> | |
| 4566 </figure> | |
| 4567 <p>EAN-13 symbols (also known as Bookland EAN-13) can also be produced | |
| 4568 from 9-digit SBN, 10-digit ISBN or 13-digit ISBN-13 data. The relevant | |
| 4569 check digit needs to be present in the input data and will be verified | |
| 4570 before the symbol is generated.</p> | |
| 4571 <p>As with EAN-13, a quiet zone indicator can be added using | |
| 4572 <code>--guardwhitespace</code>:</p> | |
| 4573 <figure> | |
| 4574 <img src="images/isbnx_gws.svg" title="fig:" class="upcean" | |
| 4575 alt="zint -b ISBNX --compliantheight -d "9789295055124" --guardwhitespace" /> | |
| 4576 <figcaption | |
| 4577 aria-hidden="true"><code>zint -b ISBNX --compliantheight -d "9789295055124" --guardwhitespace</code></figcaption> | |
| 4578 </figure> | |
| 4579 <p>EAN-2 and EAN-5 add-on symbols can be added using the + character, | |
| 4580 and there are options to adjust the add-on gap and the guard bar descent | |
| 4581 height - see <a href="#upc-version-e">6.1.3.2 UPC Version E</a>.</p> | |
| 4582 <h3 id="plessey">6.1.5 Plessey</h3> | |
| 4583 <h4 id="uk-plessey">6.1.5.1 UK Plessey</h4> | |
| 4584 <figure> | |
| 4585 <img src="images/plessey.svg" title="fig:" class="lin" | |
| 4586 alt="zint -b PLESSEY -d "C64"" /> | |
| 4587 <figcaption | |
| 4588 aria-hidden="true"><code>zint -b PLESSEY -d "C64"</code></figcaption> | |
| 4589 </figure> | |
| 4590 <p>Also known as Plessey Code, this symbology was developed by the | |
| 4591 Plessey Company Ltd. in the UK. The symbol can encode data consisting of | |
| 4592 digits (0-9) or letters A-F up to a maximum of 67 characters and | |
| 4593 includes a hidden CRC check digit.</p> | |
| 4594 <h4 id="msi-plessey">6.1.5.2 MSI Plessey</h4> | |
| 4595 <figure> | |
| 4596 <img src="images/msi_plessey.svg" title="fig:" class="lin" | |
| 4597 alt="zint -b MSI_PLESSEY -d "6502" --vers=2" /> | |
| 4598 <figcaption | |
| 4599 aria-hidden="true"><code>zint -b MSI_PLESSEY -d "6502" --vers=2</code></figcaption> | |
| 4600 </figure> | |
| 4601 <p>Based on Plessey and developed by MSI Data Corporation, MSI Plessey | |
| 4602 can encode numeric (digits 0-9) input of up to 92 digits. It has a range | |
| 4603 of check digit options that are selectable by setting | |
| 4604 <code>--vers</code> (API <code>option_2</code>), shown in the table | |
| 4605 below:</p> | |
| 4606 <div id="tbl:msi_plessey_check_digits" class="tablenos"> | |
| 4607 <table id="tbl:msi_plessey_check_digits" | |
| 4608 data-tag=": MSI Plessey Check Digit Options"> | |
| 4609 <caption><span>Table : MSI Plessey Check Digit Options</span> | |
| 4610 </caption> | |
| 4611 <thead> | |
| 4612 <tr> | |
| 4613 <th>Value</th> | |
| 4614 <th style="text-align: left;">Check Digits</th> | |
| 4615 </tr> | |
| 4616 </thead> | |
| 4617 <tbody> | |
| 4618 <tr> | |
| 4619 <td>0</td> | |
| 4620 <td style="text-align: left;">None</td> | |
| 4621 </tr> | |
| 4622 <tr> | |
| 4623 <td>1</td> | |
| 4624 <td style="text-align: left;">Modulo-10 (Luhn)</td> | |
| 4625 </tr> | |
| 4626 <tr> | |
| 4627 <td>2</td> | |
| 4628 <td style="text-align: left;">Modulo-10 & Modulo-10</td> | |
| 4629 </tr> | |
| 4630 <tr> | |
| 4631 <td>3</td> | |
| 4632 <td style="text-align: left;">Modulo-11 (IBM)</td> | |
| 4633 </tr> | |
| 4634 <tr> | |
| 4635 <td>4</td> | |
| 4636 <td style="text-align: left;">Modulo-11 (IBM) & Modulo-10</td> | |
| 4637 </tr> | |
| 4638 <tr> | |
| 4639 <td>5</td> | |
| 4640 <td style="text-align: left;">Modulo-11 (NCR)</td> | |
| 4641 </tr> | |
| 4642 <tr> | |
| 4643 <td>6</td> | |
| 4644 <td style="text-align: left;">Modulo-11 (NCR) & Modulo-10</td> | |
| 4645 </tr> | |
| 4646 </tbody> | |
| 4647 </table> | |
| 4648 </div> | |
| 4649 <p>To not show the check digit or digits in the Human Readable Text, add | |
| 4650 10 to the <code>--vers</code> value. For example <code>--vers=12</code> | |
| 4651 (API <code>option_2 = 12</code>) will add two hidden modulo-10 check | |
| 4652 digits.</p> | |
| 4653 <h3 id="telepen">6.1.6 Telepen</h3> | |
| 4654 <h4 id="telepen-alpha">6.1.6.1 Telepen Alpha</h4> | |
| 4655 <figure> | |
| 4656 <img src="images/telepen.svg" title="fig:" class="lin" | |
| 4657 alt="zint -b TELEPEN --compliantheight -d "Z80"" /> | |
| 4658 <figcaption | |
| 4659 aria-hidden="true"><code>zint -b TELEPEN --compliantheight -d "Z80"</code></figcaption> | |
| 4660 </figure> | |
| 4661 <p>Telepen Alpha was developed by SB Electronic Systems Limited and can | |
| 4662 encode ASCII text input, up to a maximum of 69 characters. Telepen | |
| 4663 includes a hidden modulo-127 check digit, added by Zint.</p> | |
| 4664 <h4 id="telepen-numeric">6.1.6.2 Telepen Numeric</h4> | |
| 4665 <figure> | |
| 4666 <img src="images/telepen_num.svg" title="fig:" class="lin" | |
| 4667 alt="zint -b TELEPEN_NUM --compliantheight -d "466X33"" /> | |
| 4668 <figcaption | |
| 4669 aria-hidden="true"><code>zint -b TELEPEN_NUM --compliantheight -d "466X33"</code></figcaption> | |
| 4670 </figure> | |
| 4671 <p>Telepen Numeric allows compression of numeric data into a Telepen | |
| 4672 symbol. Data can consist of pairs of numbers or pairs consisting of a | |
| 4673 numerical digit followed an X character. For example: 466333 and 466X33 | |
| 4674 are valid codes whereas 46X333 is not (the digit pair <code>"X3"</code> | |
| 4675 is not valid). Up to 136 digits can be encoded. Telepen Numeric includes | |
| 4676 a hidden modulo-127 check digit which is added by Zint.</p> | |
| 4677 <h3 id="code-39">6.1.7 Code 39</h3> | |
| 4678 <h4 id="standard-code-39-iso-16388">6.1.7.1 Standard Code 39 (ISO | |
| 4679 16388)</h4> | |
| 4680 <figure> | |
| 4681 <img src="images/code39.svg" title="fig:" class="lin" | |
| 4682 alt="zint -b CODE39 --compliantheight -d "1A" --vers=1" /> | |
| 4683 <figcaption | |
| 4684 aria-hidden="true"><code>zint -b CODE39 --compliantheight -d "1A" --vers=1</code></figcaption> | |
| 4685 </figure> | |
| 4686 <p>Standard Code 39 was developed in 1974 by Intermec. Input data can be | |
| 4687 up to 86 characters in length and can include the characters 0-9, A-Z, | |
| 4688 dash (<code>-</code>), full stop (<code>.</code>), space, asterisk | |
| 4689 (<code>*</code>), dollar (<code>$</code>), slash (<code>/</code>), plus | |
| 4690 (<code>+</code>) and percent (<code>%</code>). The standard does not | |
| 4691 require a check digit but a modulo-43 check digit can be added if | |
| 4692 desired by setting <code>--vers=1</code> (API | |
| 4693 <code>option_2 = 1</code>). To add a check digit but not show it in the | |
| 4694 Human Readable Text, set <code>--vers=2</code> (API | |
| 4695 <code>option_2 = 2</code>).</p> | |
| 4696 <h4 id="extended-code-39">6.1.7.2 Extended Code 39</h4> | |
| 4697 <figure> | |
| 4698 <img src="images/excode39.svg" title="fig:" class="lin" | |
| 4699 alt="zint -b EXCODE39 --compliantheight -d "123.45$@fd"" /> | |
| 4700 <figcaption | |
| 4701 aria-hidden="true"><code>zint -b EXCODE39 --compliantheight -d "123.45$@fd"</code></figcaption> | |
| 4702 </figure> | |
| 4703 <p>Also known as Code 39e and Code39+, this symbology expands on | |
| 4704 Standard Code 39 to provide support for the full 7-bit ASCII character | |
| 4705 set. The check digit options are the same as for <a | |
| 4706 href="#standard-code-39-iso-16388">6.1.7.1 Standard Code 39 (ISO | |
| 4707 16388)</a>.</p> | |
| 4708 <h4 id="code-93">6.1.7.3 Code 93</h4> | |
| 4709 <figure> | |
| 4710 <img src="images/code93.svg" title="fig:" class="lin" | |
| 4711 alt="zint -b CODE93 --compliantheight -d "C93"" /> | |
| 4712 <figcaption | |
| 4713 aria-hidden="true"><code>zint -b CODE93 --compliantheight -d "C93"</code></figcaption> | |
| 4714 </figure> | |
| 4715 <p>A variation of Extended Code 39, Code 93 also supports full ASCII | |
| 4716 text, accepting up to 123 characters. Two check characters are added by | |
| 4717 Zint. By default these check characters are not shown in the Human | |
| 4718 Readable Text, but may be shown by setting <code>--vers=1</code> (API | |
| 4719 <code>option_2 = 1</code>).</p> | |
| 4720 <h4 id="pzn-pharmazentralnummer">6.1.7.4 PZN (Pharmazentralnummer)</h4> | |
| 4721 <figure> | |
| 4722 <img src="images/pzn.svg" title="fig:" class="lin" | |
| 4723 alt="zint -b PZN --compliantheight -d "2758089"" /> | |
| 4724 <figcaption | |
| 4725 aria-hidden="true"><code>zint -b PZN --compliantheight -d "2758089"</code></figcaption> | |
| 4726 </figure> | |
| 4727 <p>PZN is a Code 39 based symbology used by the pharmaceutical industry | |
| 4728 in Germany. PZN encodes a 7-digit number to which Zint will add a | |
| 4729 modulo-11 check digit (PZN8). Input less than 7 digits will be | |
| 4730 zero-filled. An 8-digit input can be supplied in which case Zint will | |
| 4731 validate the check digit.</p> | |
| 4732 <p>To encode a PZN7 (obsolete since 2013) instead set | |
| 4733 <code>--vers=1</code> (API <code>option_2 = 1</code>) and supply up to 7 | |
| 4734 digits. As with PZN8, a modulo-11 check digit will be added or if 7 | |
| 4735 digits supplied the check digit validated.</p> | |
| 4736 <h4 id="logmars">6.1.7.5 LOGMARS</h4> | |
| 4737 <figure> | |
| 4738 <img src="images/logmars.svg" title="fig:" class="lin" | |
| 4739 alt="zint -b LOGMARS --compliantheight -d "12345/ABCDE" --vers=1" /> | |
| 4740 <figcaption | |
| 4741 aria-hidden="true"><code>zint -b LOGMARS --compliantheight -d "12345/ABCDE" --vers=1</code></figcaption> | |
| 4742 </figure> | |
| 4743 <p>LOGMARS (Logistics Applications of Automated Marking and Reading | |
| 4744 Symbols) is a variation of the Code 39 symbology used by the U.S. | |
| 4745 Department of Defense. LOGMARS encodes the same character set as <a | |
| 4746 href="#standard-code-39-iso-16388">6.1.7.1 Standard Code 39 (ISO | |
| 4747 16388)</a>, and the check digit options are also the same. Input is | |
| 4748 restricted to a maximum of 30 characters.</p> | |
| 4749 <h4 id="code-32">6.1.7.6 Code 32</h4> | |
| 4750 <figure> | |
| 4751 <img src="images/code32.svg" title="fig:" class="lin" | |
| 4752 alt="zint -b CODE32 --compliantheight -d "14352312"" /> | |
| 4753 <figcaption | |
| 4754 aria-hidden="true"><code>zint -b CODE32 --compliantheight -d "14352312"</code></figcaption> | |
| 4755 </figure> | |
| 4756 <p>A variation of Code 39 used by the Italian Ministry of Health | |
| 4757 (“Ministero della Sanità”) for encoding identifiers on pharmaceutical | |
| 4758 products. This symbology requires a numeric input up to 8 digits in | |
| 4759 length. A check digit is added by Zint.</p> | |
| 4760 <h4 id="hibc-code-39">6.1.7.7 HIBC Code 39</h4> | |
| 4761 <figure> | |
| 4762 <img src="images/hibc_39.svg" title="fig:" class="lin" | |
| 4763 alt="zint -b HIBC_39 --compliantheight -d "14352312"" /> | |
| 4764 <figcaption | |
| 4765 aria-hidden="true"><code>zint -b HIBC_39 --compliantheight -d "14352312"</code></figcaption> | |
| 4766 </figure> | |
| 4767 <p>This variant adds a leading <code>'+'</code> character and a trailing | |
| 4768 modulo-49 check digit to a standard Code 39 symbol as required by the | |
| 4769 Health Industry Barcode standards.</p> | |
| 4770 <h4 id="vehicle-identification-number-vin">6.1.7.8 Vehicle | |
| 4771 Identification Number (VIN)</h4> | |
| 4772 <figure> | |
| 4773 <img src="images/vin.svg" title="fig:" class="lin" | |
| 4774 alt="zint -b VIN -d "2FTPX28L0XCA15511" --vers=1" /> | |
| 4775 <figcaption | |
| 4776 aria-hidden="true"><code>zint -b VIN -d "2FTPX28L0XCA15511" --vers=1</code></figcaption> | |
| 4777 </figure> | |
| 4778 <p>A variation of Code 39 that for vehicle identification numbers used | |
| 4779 in North America (first character <code>'1'</code> to <code>'5'</code>) | |
| 4780 has a check character verification stage. A 17 character input (0-9, and | |
| 4781 A-Z excluding <code>'I'</code>, <code>'O'</code> and <code>'Q'</code>) | |
| 4782 is required. An invisible Import character prefix <code>'I'</code> can | |
| 4783 be added by setting <code>--vers=1</code> (API | |
| 4784 <code>option_2 = 1</code>).</p> | |
| 4785 <h3 id="codabar-en-798">6.1.8 Codabar (EN 798)</h3> | |
| 4786 <figure> | |
| 4787 <img src="images/codabar.svg" title="fig:" class="lin" | |
| 4788 alt="zint -b CODABAR --compliantheight -d "A37859B"" /> | |
| 4789 <figcaption | |
| 4790 aria-hidden="true"><code>zint -b CODABAR --compliantheight -d "A37859B"</code></figcaption> | |
| 4791 </figure> | |
| 4792 <p>Also known as NW-7, Monarch, ABC Codabar, USD-4, Ames Code and Code | |
| 4793 27, this symbology was developed in 1972 by Monarch Marketing Systems | |
| 4794 for retail purposes. The American Blood Commission adopted Codabar in | |
| 4795 1977 as the standard symbology for blood identification. Codabar can | |
| 4796 encode up to 103 characters starting and ending with the letters A-D and | |
| 4797 containing between these letters the numbers 0-9, dash (<code>-</code>), | |
| 4798 dollar (<code>$</code>), colon (<code>:</code>), slash (<code>/</code>), | |
| 4799 full stop (<code>.</code>) or plus (<code>+</code>). No check character | |
| 4800 is generated by default, but a modulo-16 one can be added by setting | |
| 4801 <code>--vers=1</code> (API <code>option_2 = 1</code>). To have the check | |
| 4802 character appear in the Human Readable Text, set <code>--vers=2</code> | |
| 4803 (API <code>option_2 = 2</code>).</p> | |
| 4804 <h3 id="pharmacode">6.1.9 Pharmacode</h3> | |
| 4805 <figure> | |
| 4806 <img src="images/pharma.svg" title="fig:" class="lin" | |
| 4807 alt="zint -b PHARMA --compliantheight -d "130170"" /> | |
| 4808 <figcaption | |
| 4809 aria-hidden="true"><code>zint -b PHARMA --compliantheight -d "130170"</code></figcaption> | |
| 4810 </figure> | |
| 4811 <p>Developed by Laetus, Pharmacode is used for the identification of | |
| 4812 pharmaceuticals. The symbology is able to encode whole numbers between 3 | |
| 4813 and 131070.</p> | |
| 4814 <h3 id="code-128">6.1.10 Code 128</h3> | |
| 4815 <h4 id="standard-code-128-iso-15417">6.1.10.1 Standard Code 128 (ISO | |
| 4816 15417)</h4> | |
| 4817 <figure> | |
| 4818 <img src="images/code128.svg" title="fig:" class="lin" | |
| 4819 alt="zint -b CODE128 --bind -d "130170X178"" /> | |
| 4820 <figcaption | |
| 4821 aria-hidden="true"><code>zint -b CODE128 --bind -d "130170X178"</code></figcaption> | |
| 4822 </figure> | |
| 4823 <p>One of the most ubiquitous one-dimensional barcode symbologies, Code | |
| 4824 128 was developed in 1981 by Computer Identics. This symbology supports | |
| 4825 full ASCII text and uses a three-Code Set system to compress the data | |
| 4826 into a smaller symbol. Zint automatically switches between Code Sets A, | |
| 4827 B and C (but see below) and adds a hidden modulo-103 check digit.</p> | |
| 4828 <p>Code 128 is the default barcode symbology used by Zint. In addition | |
| 4829 Zint supports the encoding of ISO/IEC 8859-1 (non-English) characters in | |
| 4830 Code 128 symbols. The ISO/IEC 8859-1 character set is shown in Annex <a | |
| 4831 href="#a.2-latin-alphabet-no.-1-isoiec-8859-1">A.2 Latin Alphabet No. 1 | |
| 4832 (ISO/IEC 8859-1)</a>.</p> | |
| 4833 <p>Manual switching of Code Sets is possible using the | |
| 4834 <code>--extraesc</code> option (API | |
| 4835 <code>input_mode |= EXTRA_ESCAPE_MODE</code>), which apart from | |
| 4836 processing normal escape sequences also processes the Code 128-specific | |
| 4837 escapes <code>\^A</code>, <code>\^B</code>, <code>\^C</code> and | |
| 4838 <code>\^@</code> (the latter turns off manual Code Set selection). For | |
| 4839 instance the following will force switching to Code Set B for the data | |
| 4840 <code>"5678"</code> (normally Code Set C would be used throughout):</p> | |
| 4841 <div class="sourceCode" id="cb99"><pre | |
| 4842 class="sourceCode bash"><code class="sourceCode bash"><span id="cb99-1"><a href="#cb99-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> CODE128 <span class="at">-d</span> <span class="st">"1234\^B5678"</span> <span class="at">--extraesc</span></span></code></pre></div> | |
| 4843 <p>The manually selected Code Set will apply until the next Code Set | |
| 4844 escape sequence or until a <code>\^@</code>, with the exception that | |
| 4845 data that cannot be represented in that Code Set will be switched as | |
| 4846 appropriate. If the data contains an extra escape sequence, it can be | |
| 4847 escaped by doubling the caret (<code>^</code>). For instance</p> | |
| 4848 <div class="sourceCode" id="cb100"><pre | |
| 4849 class="sourceCode bash"><code class="sourceCode bash"><span id="cb100-1"><a href="#cb100-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> CODE128 <span class="at">-d</span> <span class="st">"\^AABC\^^BDEF"</span> <span class="at">--extraesc</span></span></code></pre></div> | |
| 4850 <p>will encode the data <code>"ABC\^BDEF"</code> in Code Set A.</p> | |
| 4851 <p>There is also the extra escape <code>\^1</code>, which will encode a | |
| 4852 special Function Code 1 character (FNC1) anywhere you chose in the data, | |
| 4853 for instance</p> | |
| 4854 <div class="sourceCode" id="cb101"><pre | |
| 4855 class="sourceCode bash"><code class="sourceCode bash"><span id="cb101-1"><a href="#cb101-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> CODE128 <span class="at">-d</span> <span class="st">"A\^1BC\^1DEF"</span> <span class="at">--extraesc</span></span></code></pre></div> | |
| 4856 <p>Zint can encode a maximum of 102 symbol characters, which allows for | |
| 4857 e.g. 202 all-numeric or 101 all-uppercase characters. Sizes above 120 | |
| 4858 digits (60 alphanumerics) are not recommended.</p> | |
| 4859 <h4 id="code-128-suppress-code-set-c-code-sets-a-and-b-only">6.1.10.2 | |
| 4860 Code 128 Suppress Code Set C (Code Sets A and B only)</h4> | |
| 4861 <figure> | |
| 4862 <img src="images/code128ab.svg" title="fig:" class="lin" | |
| 4863 alt="zint -b CODE128AB -d "130170X178"" /> | |
| 4864 <figcaption | |
| 4865 aria-hidden="true"><code>zint -b CODE128AB -d "130170X178"</code></figcaption> | |
| 4866 </figure> | |
| 4867 <p>It is sometimes advantageous to stop Code 128 from using Code Set C | |
| 4868 which compresses numerical data. The <code>BARCODE_CODE128AB</code><a | |
| 4869 href="#fn14" class="footnote-ref" id="fnref14" | |
| 4870 role="doc-noteref"><sup>14</sup></a> variant (symbology 60) suppresses | |
| 4871 Code Set C in favour of Code Sets A and B.</p> | |
| 4872 <p>Note that the special extra escapes mentioned above are not available | |
| 4873 for this variant (nor for any other).</p> | |
| 4874 <h4 id="gs1-128">6.1.10.3 GS1-128</h4> | |
| 4875 <figure> | |
| 4876 <img src="images/gs1_128.svg" title="fig:" class="lin" | |
| 4877 alt="zint -b GS1_128 --compliantheight -d "[01]98898765432106[3202]012345[15]991231"" /> | |
| 4878 <figcaption | |
| 4879 aria-hidden="true"><code>zint -b GS1_128 --compliantheight -d "[01]98898765432106[3202]012345[15]991231"</code></figcaption> | |
| 4880 </figure> | |
| 4881 <p>A variation of Code 128 previously known as UCC/EAN-128, this | |
| 4882 symbology is defined by the GS1 General Specifications. Application | |
| 4883 Identifiers (AIs) should be entered using [square bracket] notation. | |
| 4884 These will be converted to parentheses (round brackets) for the Human | |
| 4885 Readable Text. This will allow round brackets to be used in the data | |
| 4886 strings to be encoded.</p> | |
| 4887 <p>For compatibility with data entry in other systems, if the data does | |
| 4888 not include round brackets, the option <code>--gs1parens</code> (API | |
| 4889 <code>input_mode |= GS1PARENS_MODE</code>) may be used to signal that | |
| 4890 AIs are encased in round brackets instead of square ones.</p> | |
| 4891 <p>Fixed length data should be entered at the appropriate length for | |
| 4892 correct encoding. GS1-128 does not support extended ASCII (ISO/IEC | |
| 4893 8859-1) characters. Check digits for GTIN data AI (01) are not generated | |
| 4894 and need to be included in the input data. The following is an example | |
| 4895 of a valid GS1-128 input:</p> | |
| 4896 <div class="sourceCode" id="cb102"><pre | |
| 4897 class="sourceCode bash"><code class="sourceCode bash"><span id="cb102-1"><a href="#cb102-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 16 <span class="at">-d</span> <span class="st">"[01]98898765432106[3202]012345[15]991231"</span></span></code></pre></div> | |
| 4898 <p>or using the <code>--gs1parens</code> option:</p> | |
| 4899 <div class="sourceCode" id="cb103"><pre | |
| 4900 class="sourceCode bash"><code class="sourceCode bash"><span id="cb103-1"><a href="#cb103-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 16 <span class="at">--gs1parens</span> <span class="at">-d</span> <span class="st">"(01)98898765432106(3202)012345(15)991231"</span></span></code></pre></div> | |
| 4901 <h4 id="ean-14">6.1.10.4 EAN-14</h4> | |
| 4902 <figure> | |
| 4903 <img src="images/ean14.svg" title="fig:" class="lin" | |
| 4904 alt="zint -b EAN14 --compliantheight -d "9889876543210"" /> | |
| 4905 <figcaption | |
| 4906 aria-hidden="true"><code>zint -b EAN14 --compliantheight -d "9889876543210"</code></figcaption> | |
| 4907 </figure> | |
| 4908 <p>A shorter version of GS1-128 which encodes GTIN data only. A 13-digit | |
| 4909 number is required. The GTIN check digit and HRT-only AI “(01)” are | |
| 4910 added by Zint.</p> | |
| 4911 <h4 id="nve-18-sscc-18">6.1.10.5 NVE-18 (SSCC-18)</h4> | |
| 4912 <figure> | |
| 4913 <img src="images/nve18.svg" title="fig:" class="lin" | |
| 4914 alt="zint -b NVE18 --compliantheight -d "37612345000001003"" /> | |
| 4915 <figcaption | |
| 4916 aria-hidden="true"><code>zint -b NVE18 --compliantheight -d "37612345000001003"</code></figcaption> | |
| 4917 </figure> | |
| 4918 <p>A variation of Code 128 the ‘Nummer der Versandeinheit’ standard, | |
| 4919 also known as SSCC-18 (Serial Shipping Container Code), includes both a | |
| 4920 visible modulo-10 and a hidden modulo-103 check digit. NVE-18 requires a | |
| 4921 17-digit numerical input. Check digits and HRT-only AI “(00)” are added | |
| 4922 by Zint.</p> | |
| 4923 <h4 id="hibc-code-128">6.1.10.6 HIBC Code 128</h4> | |
| 4924 <figure> | |
| 4925 <img src="images/hibc_128.svg" title="fig:" class="lin" | |
| 4926 alt="zint -b HIBC_128 -d "A123BJC5D6E71"" /> | |
| 4927 <figcaption | |
| 4928 aria-hidden="true"><code>zint -b HIBC_128 -d "A123BJC5D6E71"</code></figcaption> | |
| 4929 </figure> | |
| 4930 <p>This option adds a leading <code>'+'</code> character and a trailing | |
| 4931 modulo-49 check digit to a standard Code 128 symbol as required by the | |
| 4932 Health Industry Barcode standards.</p> | |
| 4933 <h4 id="dpd-code">6.1.10.7 DPD Code</h4> | |
| 4934 <figure> | |
| 4935 <img src="images/dpd.svg" title="fig:" class="lin" | |
| 4936 alt="zint -b DPD --compliantheight -d "000393206219912345678101040"" /> | |
| 4937 <figcaption | |
| 4938 aria-hidden="true"><code>zint -b DPD --compliantheight -d "000393206219912345678101040"</code></figcaption> | |
| 4939 </figure> | |
| 4940 <p>Another variation of Code 128 as used by DPD (Deutscher Paketdienst). | |
| 4941 Requires a 27 or 28 character input. For 28 character input, the first | |
| 4942 character is an identification tag (Barcode ID), which should usually be | |
| 4943 <code>"%"</code> (ASCII 37). If 27 characters are supplied, | |
| 4944 <code>"%"</code> will be prefixed by Zint (except if marked as a | |
| 4945 “relabel”, see below). The rest of the 27-character input must be | |
| 4946 alphanumeric, and is of the form:</p> | |
| 4947 <div id="tbl:dpd_input_fields" class="tablenos"> | |
| 4948 <table id="tbl:dpd_input_fields" data-tag=": DPD Input Fields"> | |
| 4949 <caption><span>Table : DPD Input Fields</span> </caption> | |
| 4950 <colgroup> | |
| 4951 <col style="width: 26%" /> | |
| 4952 <col style="width: 27%" /> | |
| 4953 <col style="width: 16%" /> | |
| 4954 <col style="width: 29%" /> | |
| 4955 </colgroup> | |
| 4956 <thead> | |
| 4957 <tr> | |
| 4958 <th style="text-align: left;">Destination Post Code</th> | |
| 4959 <th style="text-align: left;">Tracking Number</th> | |
| 4960 <th style="text-align: left;">Service Code</th> | |
| 4961 <th style="text-align: left;">Destination Country Code</th> | |
| 4962 </tr> | |
| 4963 </thead> | |
| 4964 <tbody> | |
| 4965 <tr> | |
| 4966 <td style="text-align: left;">PPPPPPP (7 alphanumerics)</td> | |
| 4967 <td style="text-align: left;">TTTTTTTTTTTTTT (14 alphanumerics)</td> | |
| 4968 <td style="text-align: left;">SSS (3 digits)</td> | |
| 4969 <td style="text-align: left;">CCC (3-digit ISO 3166-1)</td> | |
| 4970 </tr> | |
| 4971 </tbody> | |
| 4972 </table> | |
| 4973 </div> | |
| 4974 <p>A warning will be generated if the Service Code, the Destination | |
| 4975 Country Code, or the last 10 characters of the Tracking Number are | |
| 4976 non-numeric.</p> | |
| 4977 <p>Zint formats the Human Readable Text as specified by DPD, leaving out | |
| 4978 the identication tag, and adds a modulo-36 check character to the text | |
| 4979 (not to the barcode itself), thus:</p> | |
| 4980 <p><code>PPPP PPP TTTT TTTT TTTT TT SSS CCC D</code></p> | |
| 4981 <p>By default a top boundary bar is added, with default width 3X. The | |
| 4982 width can be overridden using <code>--border</code> (API | |
| 4983 <code>border_width</code>). For a symbol with no top boundary bar, | |
| 4984 explicitly set the border type to bindtop (or bind or box) and leave the | |
| 4985 border width 0.</p> | |
| 4986 <p>A DPD Code can be marked as a “relabel” by specifying | |
| 4987 <code>--vers=1</code> (API <code>option_2 = 1</code>), which omits the | |
| 4988 identification tag and prints the barcode at half height. In this case, | |
| 4989 an input of 27 alphanumeric characters is required.</p> | |
| 4990 <h4 id="upu-s10">6.1.10.8 UPU S10</h4> | |
| 4991 <figure> | |
| 4992 <img src="images/upu_s10.svg" title="fig:" class="lin" | |
| 4993 alt="zint -b UPU_S10 --compliantheight -d "EE876543216CA"" /> | |
| 4994 <figcaption | |
| 4995 aria-hidden="true"><code>zint -b UPU_S10 --compliantheight -d "EE876543216CA"</code></figcaption> | |
| 4996 </figure> | |
| 4997 <p>The Universal Postal Union S10 variant of Code 128 encodes 13 | |
| 4998 characters in the format <code>"SSNNNNNNNNXCC"</code>, where | |
| 4999 <code>"SS"</code> is a two-character alphabetic service indicator, | |
| 5000 <code>"NNNNNNNN"</code> is an 8-digit serial number, <code>"X"</code> is | |
| 5001 a modulo-11 check digit, and <code>"CC"</code> is a two-character ISO | |
| 5002 3166-1 country code.</p> | |
| 5003 <p>The check digit may be omitted in which case Zint will add it. | |
| 5004 Warnings will be generated if the service indicator is non-standard or | |
| 5005 the country code is not ISO 3361-1.</p> | |
| 5006 <h3 id="gs1-databar-iso-24724">6.1.11 GS1 DataBar (ISO 24724)</h3> | |
| 5007 <p>Previously known as RSS (Reduced Spaced Symbology), these symbols are | |
| 5008 due to replace GS1-128 symbols in accordance with the GS1 General | |
| 5009 Specifications. If a GS1 DataBar symbol is to be printed with a 2D | |
| 5010 component as specified in ISO/IEC 24723 set <code>--mode=2</code> (API | |
| 5011 <code>option_1 = 2</code>). See <a | |
| 5012 href="#gs1-composite-symbols-iso-24723">6.3 GS1 Composite Symbols (ISO | |
| 5013 24723)</a> to find out how to generate DataBar symbols with 2D | |
| 5014 components.</p> | |
| 5015 <h4 id="gs1-databar-omnidirectional-and-gs1-databar-truncated">6.1.11.1 | |
| 5016 GS1 DataBar Omnidirectional and GS1 DataBar Truncated</h4> | |
| 5017 <figure> | |
| 5018 <img src="images/dbar_omn.svg" title="fig:" class="lin" | |
| 5019 alt="zint -b DBAR_OMN --compliantheight -d "0950110153001"" /> | |
| 5020 <figcaption | |
| 5021 aria-hidden="true"><code>zint -b DBAR_OMN --compliantheight -d "0950110153001"</code></figcaption> | |
| 5022 </figure> | |
| 5023 <p>Previously known as RSS-14 this standard encodes a 13-digit item | |
| 5024 code. A check digit and HRT-only Application Identifier of “(01)” are | |
| 5025 added by Zint. (A 14-digit code that appends the check digit may be | |
| 5026 given, in which case the check digit will be verified.)</p> | |
| 5027 <p>GS1 DataBar Omnidirectional symbols should have a height of 33 or | |
| 5028 greater. To produce a GS1 DataBar Truncated symbol set the symbol height | |
| 5029 to a value between 13 and 32. Truncated symbols may not be scannable by | |
| 5030 omnidirectional scanners.</p> | |
| 5031 <figure> | |
| 5032 <img src="images/dbar_truncated.svg" title="fig:" class="lin" | |
| 5033 alt="zint -b DBAR_OMN -d "0950110153001" --height=13" /> | |
| 5034 <figcaption | |
| 5035 aria-hidden="true"><code>zint -b DBAR_OMN -d "0950110153001" --height=13</code></figcaption> | |
| 5036 </figure> | |
| 5037 <h4 id="gs1-databar-limited">6.1.11.2 GS1 DataBar Limited</h4> | |
| 5038 <figure> | |
| 5039 <img src="images/dbar_ltd.svg" title="fig:" class="lin" | |
| 5040 alt="zint -b DBAR_LTD --compliantheight -d "0950110153001"" /> | |
| 5041 <figcaption | |
| 5042 aria-hidden="true"><code>zint -b DBAR_LTD --compliantheight -d "0950110153001"</code></figcaption> | |
| 5043 </figure> | |
| 5044 <p>Previously known as RSS Limited this standard encodes a 13-digit item | |
| 5045 code and can be used in the same way as GS1 DataBar Omnidirectional | |
| 5046 above. GS1 DataBar Limited, however, is limited to data starting with | |
| 5047 digits 0 and 1 (i.e. numbers in the range 0 to 1999999999999). As with | |
| 5048 GS1 DataBar Omnidirectional a check digit and HRT-only Application | |
| 5049 Identifier of “(01)” are added by Zint, and a 14-digit code may be given | |
| 5050 in which case the check digit will be verified.</p> | |
| 5051 <h4 id="gs1-databar-expanded">6.1.11.3 GS1 DataBar Expanded</h4> | |
| 5052 <figure> | |
| 5053 <img src="images/dbar_exp.svg" title="fig:" class="lin" | |
| 5054 alt="zint -b DBAR_EXP --compliantheight -d "[01]98898765432106[3202]012345[15]991231"" /> | |
| 5055 <figcaption | |
| 5056 aria-hidden="true"><code>zint -b DBAR_EXP --compliantheight -d "[01]98898765432106[3202]012345[15]991231"</code></figcaption> | |
| 5057 </figure> | |
| 5058 <p>Previously known as RSS Expanded this is a variable length symbology | |
| 5059 capable of encoding data from a number of AIs in a single symbol. AIs | |
| 5060 should be encased in [square brackets] in the input data, which will be | |
| 5061 converted to parentheses (round brackets) before being included in the | |
| 5062 Human Readable Text attached to the symbol. This method allows the | |
| 5063 inclusion of parentheses in the data to be encoded. If the data does not | |
| 5064 include parentheses, the AIs may alternatively be encased in parentheses | |
| 5065 using the <code>--gs1parens</code> switch. See <a | |
| 5066 href="#gs1-128">6.1.10.3 GS1-128</a>.</p> | |
| 5067 <p>GTIN data AI (01) should also include the check digit data as this is | |
| 5068 not calculated by Zint when this symbology is encoded. Fixed length data | |
| 5069 should be entered at the appropriate length for correct encoding. The | |
| 5070 following is an example of a valid GS1 DataBar Expanded input:</p> | |
| 5071 <div class="sourceCode" id="cb104"><pre | |
| 5072 class="sourceCode bash"><code class="sourceCode bash"><span id="cb104-1"><a href="#cb104-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 31 <span class="at">-d</span> <span class="st">"[01]98898765432106[3202]012345[15]991231"</span></span></code></pre></div> | |
| 5073 <h3 id="korea-post-barcode">6.1.12 Korea Post Barcode</h3> | |
| 5074 <figure> | |
| 5075 <img src="images/koreapost.svg" title="fig:" class="lin" | |
| 5076 alt="zint -b KOREAPOST -d "923457"" /> | |
| 5077 <figcaption | |
| 5078 aria-hidden="true"><code>zint -b KOREAPOST -d "923457"</code></figcaption> | |
| 5079 </figure> | |
| 5080 <p>The Korean Postal Barcode is used to encode a 6-digit number and | |
| 5081 includes one check digit.</p> | |
| 5082 <h3 id="channel-code">6.1.13 Channel Code</h3> | |
| 5083 <figure> | |
| 5084 <img src="images/channel.svg" title="fig:" class="lin" | |
| 5085 alt="zint -b CHANNEL -d "453678" --compliantheight" /> | |
| 5086 <figcaption | |
| 5087 aria-hidden="true"><code>zint -b CHANNEL -d "453678" --compliantheight</code></figcaption> | |
| 5088 </figure> | |
| 5089 <p>A highly compressed symbol for numeric data. The number of channels | |
| 5090 in the symbol can be between 3 and 8 and this can be specified by | |
| 5091 setting the value of the <code>--vers</code> option (API | |
| 5092 <code>option_2</code>). It can also be determined by the length of the | |
| 5093 input data: e.g. a three character input string generates a 4 channel | |
| 5094 code by default.</p> | |
| 5095 <p>The maximum values permitted depend on the number of channels used as | |
| 5096 shown in the table below:</p> | |
| 5097 <div id="tbl:channel_maxima" class="tablenos"> | |
| 5098 <table id="tbl:channel_maxima" data-tag=": Channel Value Ranges"> | |
| 5099 <caption><span>Table : Channel Value Ranges</span> </caption> | |
| 5100 <thead> | |
| 5101 <tr> | |
| 5102 <th style="text-align: left;">Channels</th> | |
| 5103 <th style="text-align: left;">Minimum Value</th> | |
| 5104 <th style="text-align: left;">Maximum Value</th> | |
| 5105 </tr> | |
| 5106 </thead> | |
| 5107 <tbody> | |
| 5108 <tr> | |
| 5109 <td style="text-align: left;">3</td> | |
| 5110 <td style="text-align: left;">00</td> | |
| 5111 <td style="text-align: left;">26</td> | |
| 5112 </tr> | |
| 5113 <tr> | |
| 5114 <td style="text-align: left;">4</td> | |
| 5115 <td style="text-align: left;">000</td> | |
| 5116 <td style="text-align: left;">292</td> | |
| 5117 </tr> | |
| 5118 <tr> | |
| 5119 <td style="text-align: left;">5</td> | |
| 5120 <td style="text-align: left;">0000</td> | |
| 5121 <td style="text-align: left;">3493</td> | |
| 5122 </tr> | |
| 5123 <tr> | |
| 5124 <td style="text-align: left;">6</td> | |
| 5125 <td style="text-align: left;">00000</td> | |
| 5126 <td style="text-align: left;">44072</td> | |
| 5127 </tr> | |
| 5128 <tr> | |
| 5129 <td style="text-align: left;">7</td> | |
| 5130 <td style="text-align: left;">000000</td> | |
| 5131 <td style="text-align: left;">576688</td> | |
| 5132 </tr> | |
| 5133 <tr> | |
| 5134 <td style="text-align: left;">8</td> | |
| 5135 <td style="text-align: left;">0000000</td> | |
| 5136 <td style="text-align: left;">7742862</td> | |
| 5137 </tr> | |
| 5138 </tbody> | |
| 5139 </table> | |
| 5140 </div> | |
| 5141 <h3 id="bc412-semi-t1-95">6.1.14 BC412 (SEMI T1-95)</h3> | |
| 5142 <figure> | |
| 5143 <img src="images/bc412.svg" title="fig:" class="lin" | |
| 5144 alt="zint -b BC412 -d "AQ45670" --compliantheight" /> | |
| 5145 <figcaption | |
| 5146 aria-hidden="true"><code>zint -b BC412 -d "AQ45670" --compliantheight</code></figcaption> | |
| 5147 </figure> | |
| 5148 <p>Designed by IBM for marking silicon wafers, each BC412 character is | |
| 5149 represented by 4 bars of a single size, interleaved with 4 spaces of | |
| 5150 varying sizes that total 8 (hence 4 bars in 12). Zint implements the | |
| 5151 SEMI T1-95 standard, where input must be alphanumeric, excluding the | |
| 5152 letter <code>O</code>, and must be from 7 to 18 characters in length. A | |
| 5153 single check character is added by Zint, appearing in the 2nd character | |
| 5154 position. Lowercase input is automatically made uppercase.</p> | |
| 5155 <h2 id="stacked-symbologies">6.2 Stacked Symbologies</h2> | |
| 5156 <h3 id="basic-symbol-stacking">6.2.1 Basic Symbol Stacking</h3> | |
| 5157 <p>An early innovation to get more information into a symbol, used | |
| 5158 primarily in the vehicle industry, is to simply stack one-dimensional | |
| 5159 codes on top of each other. This can be achieved at the command prompt | |
| 5160 by giving more than one set of input data. For example</p> | |
| 5161 <div class="sourceCode" id="cb105"><pre | |
| 5162 class="sourceCode bash"><code class="sourceCode bash"><span id="cb105-1"><a href="#cb105-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-d</span> <span class="st">"This"</span> <span class="at">-d</span> <span class="st">"That"</span></span></code></pre></div> | |
| 5163 <p>will draw two Code 128 symbols, one on top of the other. The same | |
| 5164 result can be achieved using the API by executing the | |
| 5165 <code>ZBarcode_Encode()</code> function more than once on a symbol. For | |
| 5166 example:</p> | |
| 5167 <div class="sourceCode" id="cb106"><pre | |
| 5168 class="sourceCode c"><code class="sourceCode c"><span id="cb106-1"><a href="#cb106-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_CODE128<span class="op">;</span></span> | |
| 5169 <span id="cb106-2"><a href="#cb106-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 5170 <span id="cb106-3"><a href="#cb106-3" aria-hidden="true" tabindex="-1"></a>error <span class="op">=</span> ZBarcode_Encode<span class="op">(</span>my_symbol<span class="op">,</span> <span class="st">"This"</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 5171 <span id="cb106-4"><a href="#cb106-4" aria-hidden="true" tabindex="-1"></a></span> | |
| 5172 <span id="cb106-5"><a href="#cb106-5" aria-hidden="true" tabindex="-1"></a>error <span class="op">=</span> ZBarcode_Encode<span class="op">(</span>my_symbol<span class="op">,</span> <span class="st">"That"</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span> | |
| 5173 <span id="cb106-6"><a href="#cb106-6" aria-hidden="true" tabindex="-1"></a></span> | |
| 5174 <span id="cb106-7"><a href="#cb106-7" aria-hidden="true" tabindex="-1"></a>error <span class="op">=</span> ZBarcode_Print<span class="op">(</span>my_symbol<span class="op">);</span></span></code></pre></div> | |
| 5175 <figure> | |
| 5176 <img src="images/code128_stacked.svg" title="fig:" class="lin" | |
| 5177 alt="zint -d "This" -d "That"" /> | |
| 5178 <figcaption | |
| 5179 aria-hidden="true"><code>zint -d "This" -d "That"</code></figcaption> | |
| 5180 </figure> | |
| 5181 <p>Note that the Human Readable Text will be that of the last data, so | |
| 5182 it’s best to use the option <code>--notext</code> (API | |
| 5183 <code>show_hrt = 0</code>).</p> | |
| 5184 <p>The stacked barcode rows can be separated by row separator bars by | |
| 5185 specifying <code>--bind</code> (API | |
| 5186 <code>output_options |= BARCODE_BIND</code>). The height of the row | |
| 5187 separator bars in integral multiples of the X-dimension (minimum and | |
| 5188 default 1, maximum 4) can be set by <code>--separator</code> (API | |
| 5189 <code>option_3</code>):</p> | |
| 5190 <div class="sourceCode" id="cb107"><pre | |
| 5191 class="sourceCode bash"><code class="sourceCode bash"><span id="cb107-1"><a href="#cb107-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">--bind</span> <span class="at">--notext</span> <span class="at">--separator</span><span class="op">=</span>2 <span class="at">-d</span> <span class="st">"This"</span> <span class="at">-d</span> <span class="st">"That"</span></span></code></pre></div> | |
| 5192 <figure> | |
| 5193 <img src="images/code128_stacked_sep2.svg" title="fig:" class="lin" | |
| 5194 alt="zint --notext --bind --separator=2 -d "This" -d "That"" /> | |
| 5195 <figcaption | |
| 5196 aria-hidden="true"><code>zint --notext --bind --separator=2 -d "This" -d "That"</code></figcaption> | |
| 5197 </figure> | |
| 5198 <p>A more sophisticated method is to use some type of line indexing | |
| 5199 which indicates to the barcode reader which order the stacked symbols | |
| 5200 should be read in. This is demonstrated by the symbologies below.</p> | |
| 5201 <h3 id="codablock-f">6.2.2 Codablock-F</h3> | |
| 5202 <figure> | |
| 5203 <img src="images/codablockf.svg" title="fig:" class="lin" | |
| 5204 alt="zint -b CODABLOCKF -d "CODABLOCK F Symbology" --rows=3" /> | |
| 5205 <figcaption | |
| 5206 aria-hidden="true"><code>zint -b CODABLOCKF -d "CODABLOCK F Symbology" --rows=3</code></figcaption> | |
| 5207 </figure> | |
| 5208 <p>This is a stacked symbology based on Code 128 which can encode | |
| 5209 Latin-1 data up to a maximum length of 2726 symbol characters, meaning | |
| 5210 for instance up to 2726 all ASCII characters, or 5452 all numeric, or up | |
| 5211 to 1363 all extended ASCII (ISO/IEC 8859-1).</p> | |
| 5212 <p>The width of the Codablock-F symbol can be set using the | |
| 5213 <code>--cols</code> option (API <code>option_2</code>), to a value | |
| 5214 between 9 and 67. The height (number of rows) can be set using the | |
| 5215 <code>--rows</code> option (API <code>option_1</code>), with a maximum | |
| 5216 of 44. Zint does not currently support encoding of GS1 data in | |
| 5217 Codablock-F symbols.</p> | |
| 5218 <p>A separate symbology ID (<code>BARCODE_HIBC_BLOCKF</code>) can be | |
| 5219 used to encode Health Industry Barcode (HIBC) data which adds a leading | |
| 5220 <code>'+'</code> character and a modulo-49 check digit to the encoded | |
| 5221 data.</p> | |
| 5222 <h3 id="code-16k-en-12323">6.2.3 Code 16K (EN 12323)</h3> | |
| 5223 <figure> | |
| 5224 <img src="images/code16k.svg" title="fig:" class="lin" | |
| 5225 alt="zint -b CODE16K --compliantheight -d "ab0123456789"" /> | |
| 5226 <figcaption | |
| 5227 aria-hidden="true"><code>zint -b CODE16K --compliantheight -d "ab0123456789"</code></figcaption> | |
| 5228 </figure> | |
| 5229 <p>Code 16K uses a Code 128 based system which can stack up to 16 rows | |
| 5230 in a block. This gives a maximum data capacity of 77 characters or 154 | |
| 5231 numerical digits and includes two modulo-107 check digits. Code 16K also | |
| 5232 supports ISO/IEC 8859-1 character encoding in the same manner as Code | |
| 5233 128. GS1 data encoding is also supported. The minimum number of rows to | |
| 5234 use can be set using the <code>--rows</code> option (API | |
| 5235 <code>option_1</code>), with values from 2 to 16.</p> | |
| 5236 <h3 id="pdf417-iso-15438">6.2.4 PDF417 (ISO 15438)</h3> | |
| 5237 <figure> | |
| 5238 <img src="images/pdf417.svg" title="fig:" class="lin" | |
| 5239 alt="zint -b PDF417 -d "PDF417"" /> | |
| 5240 <figcaption | |
| 5241 aria-hidden="true"><code>zint -b PDF417 -d "PDF417"</code></figcaption> | |
| 5242 </figure> | |
| 5243 <p>Heavily used in the parcel industry, the PDF417 symbology can encode | |
| 5244 a vast amount of data into a small space. Zint supports encoding up to | |
| 5245 the ISO standard maximum symbol size of 925 codewords which (at error | |
| 5246 correction level 0) allows a maximum data size of 1850 text characters, | |
| 5247 or 2710 digits.</p> | |
| 5248 <p>The width of the generated PDF417 symbol can be specified at the | |
| 5249 command line using the <code>--cols</code> switch (API | |
| 5250 <code>option_2</code>) followed by a number between 1 and 30, the number | |
| 5251 of rows using the <code>--rows</code> switch (API <code>option_3</code>) | |
| 5252 followed by a number between 3 and 90, and the amount of error | |
| 5253 correction information can be specified by using the | |
| 5254 <code>--secure</code> switch (API <code>option_1</code>) followed by a | |
| 5255 number between 0 and 8 where the number of codewords used for error | |
| 5256 correction is determined by <code>2^(value + 1)</code>. The default | |
| 5257 level of error correction is determined by the amount of data being | |
| 5258 encoded.</p> | |
| 5259 <p>This symbology uses Latin-1 character encoding by default but also | |
| 5260 supports the ECI encoding mechanism. A separate symbology ID | |
| 5261 (<code>BARCODE_HIBC_PDF</code>) can be used to encode Health Industry | |
| 5262 Barcode (HIBC) data.</p> | |
| 5263 <p>For a faster but less optimal encoding, the <code>--fast</code> | |
| 5264 option (API <code>input_mode |= FAST_MODE</code>) may be used.</p> | |
| 5265 <p>PDF417 supports Structured Append of up to 99,999 symbols and an | |
| 5266 optional numeric ID of up to 30 digits, which can be set by using the | |
| 5267 <code>--structapp</code> option (see <a href="#structured-append">4.17 | |
| 5268 Structured Append</a>) (API <code>structapp</code>). The ID consists of | |
| 5269 up to 10 triplets, each ranging from <code>"000"</code> to | |
| 5270 <code>"899"</code>. For instance <code>"123456789"</code> would be a | |
| 5271 valid ID of 3 triplets. However <code>"123456900"</code> would not, as | |
| 5272 the last triplet <code>"900"</code> exceeds <code>"899"</code>. The | |
| 5273 triplets are 0-filled, for instance <code>"1234"</code> becomes | |
| 5274 <code>"123004"</code>. If an ID is not given, no ID is encoded.</p> | |
| 5275 <h3 id="compact-pdf417-iso-15438">6.2.5 Compact PDF417 (ISO 15438)</h3> | |
| 5276 <figure> | |
| 5277 <img src="images/pdf417comp.svg" title="fig:" class="lin" | |
| 5278 alt="zint -b PDF417COMP -d "PDF417"" /> | |
| 5279 <figcaption | |
| 5280 aria-hidden="true"><code>zint -b PDF417COMP -d "PDF417"</code></figcaption> | |
| 5281 </figure> | |
| 5282 <p>Previously known as Truncated PDF417, Compact PDF417 omits some | |
| 5283 per-row overhead to produce a narrower but less robust symbol. Options | |
| 5284 are the same as for PDF417 above.</p> | |
| 5285 <h3 id="micropdf417-iso-24728">6.2.6 MicroPDF417 (ISO 24728)</h3> | |
| 5286 <figure> | |
| 5287 <img src="images/micropdf417.svg" title="fig:" class="lin" | |
| 5288 alt="zint -b MICROPDF417 -d "12345678"" /> | |
| 5289 <figcaption | |
| 5290 aria-hidden="true"><code>zint -b MICROPDF417 -d "12345678"</code></figcaption> | |
| 5291 </figure> | |
| 5292 <p>A variation of the PDF417 standard, MicroPDF417 is intended for | |
| 5293 applications where symbol size needs to be kept to a minimum. 34 | |
| 5294 predefined symbol sizes are available with 1 - 4 columns and 4 - 44 | |
| 5295 rows. The maximum amount a MicroPDF417 symbol can hold is 250 | |
| 5296 alphanumeric characters or 366 digits. The amount of error correction | |
| 5297 used is dependent on symbol size. The number of columns used can be | |
| 5298 determined using the <code>--cols</code> switch (API | |
| 5299 <code>option_2</code>) as with PDF417.</p> | |
| 5300 <p>This symbology uses Latin-1 character encoding by default but also | |
| 5301 supports the ECI encoding mechanism. A separate symbology ID | |
| 5302 (<code>BARCODE_HIBC_MICPDF</code>) can be used to encode Health Industry | |
| 5303 Barcode (HIBC) data. MicroPDF417 supports <code>FAST_MODE</code> and | |
| 5304 Structured Append the same as PDF417, for which see details.</p> | |
| 5305 <h3 id="gs1-databar-stacked-iso-24724">6.2.7 GS1 DataBar Stacked (ISO | |
| 5306 24724)</h3> | |
| 5307 <h4 id="gs1-databar-stacked">6.2.7.1 GS1 DataBar Stacked</h4> | |
| 5308 <figure> | |
| 5309 <img src="images/dbar_stk.svg" title="fig:" class="lin" | |
| 5310 alt="zint -b DBAR_STK --compliantheight -d "9889876543210"" /> | |
| 5311 <figcaption | |
| 5312 aria-hidden="true"><code>zint -b DBAR_STK --compliantheight -d "9889876543210"</code></figcaption> | |
| 5313 </figure> | |
| 5314 <p>A stacked variation of the GS1 DataBar Truncated symbol requiring the | |
| 5315 same input (see <a | |
| 5316 href="#gs1-databar-omnidirectional-and-gs1-databar-truncated">6.1.11.1 | |
| 5317 GS1 DataBar Omnidirectional and GS1 DataBar Truncated</a>), this symbol | |
| 5318 is the same as the following GS1 DataBar Stacked Omnidirectional symbol | |
| 5319 except that its height is reduced and its central separator is a single | |
| 5320 row, making it suitable for small items when omnidirectional scanning is | |
| 5321 not required. It can be generated with a two-dimensional component to | |
| 5322 make a composite symbol.</p> | |
| 5323 <h4 id="gs1-databar-stacked-omnidirectional">6.2.7.2 GS1 DataBar Stacked | |
| 5324 Omnidirectional</h4> | |
| 5325 <figure> | |
| 5326 <img src="images/dbar_omnstk.svg" title="fig:" class="lin" | |
| 5327 alt="zint -b DBAR_OMNSTK --compliantheight -d "9889876543210"" /> | |
| 5328 <figcaption | |
| 5329 aria-hidden="true"><code>zint -b DBAR_OMNSTK --compliantheight -d "9889876543210"</code></figcaption> | |
| 5330 </figure> | |
| 5331 <p>A stacked variation of the GS1 DataBar Omnidirectional symbol | |
| 5332 requiring the same input (see <a | |
| 5333 href="#gs1-databar-omnidirectional-and-gs1-databar-truncated">6.1.11.1 | |
| 5334 GS1 DataBar Omnidirectional and GS1 DataBar Truncated</a>). The data is | |
| 5335 encoded in two rows of bars with a central 3-row separator. This symbol | |
| 5336 can be generated with a two-dimensional component to make a composite | |
| 5337 symbol.</p> | |
| 5338 <h4 id="gs1-databar-expanded-stacked">6.2.7.3 GS1 DataBar Expanded | |
| 5339 Stacked</h4> | |
| 5340 <figure> | |
| 5341 <img src="images/dbar_expstk.svg" title="fig:" class="lin" | |
| 5342 alt="zint -b DBAR_EXPSTK --compliantheight -d "[01]98898765432106[3202]012345[15]991231"" /> | |
| 5343 <figcaption | |
| 5344 aria-hidden="true"><code>zint -b DBAR_EXPSTK --compliantheight -d "[01]98898765432106[3202]012345[15]991231"</code></figcaption> | |
| 5345 </figure> | |
| 5346 <p>A stacked variation of the GS1 DataBar Expanded symbol for smaller | |
| 5347 packages. Input is the same as for GS1 DataBar Expanded (see <a | |
| 5348 href="#gs1-databar-expanded">6.1.11.3 GS1 DataBar Expanded</a>). In | |
| 5349 addition the width of the symbol can be altered using the | |
| 5350 <code>--cols</code> switch (API <code>option_2</code>). In this case the | |
| 5351 number of columns (values 1 to 11) relates to the number of character | |
| 5352 pairs on each row of the symbol. Alternatively the <code>--rows</code> | |
| 5353 switch (API <code>option_3</code>) can be used to specify the maximum | |
| 5354 number of rows (values 2 to 11), and the number of columns will be | |
| 5355 adjusted accordingly. This symbol can be generated with a | |
| 5356 two-dimensional component to make a composite symbol. For symbols with a | |
| 5357 2D component the number of columns must be at least 2.</p> | |
| 5358 <h3 id="code-49">6.2.8 Code 49</h3> | |
| 5359 <figure> | |
| 5360 <img src="images/code49.svg" title="fig:" class="lin" | |
| 5361 alt="zint -b CODE49 --compliantheight -d "MULTIPLE ROWS IN CODE 49"" /> | |
| 5362 <figcaption | |
| 5363 aria-hidden="true"><code>zint -b CODE49 --compliantheight -d "MULTIPLE ROWS IN CODE 49"</code></figcaption> | |
| 5364 </figure> | |
| 5365 <p>Developed in 1987 at Intermec, Code 49 is a cross between UPC and | |
| 5366 Code 39. It is one of the earliest stacked symbologies and influenced | |
| 5367 the design of Code 16K a few years later. It supports full 7-bit ASCII | |
| 5368 input up to a maximum of 49 characters or 81 numeric digits. GS1 data | |
| 5369 encoding is also supported. The minimum number of rows to use can be set | |
| 5370 using the <code>--rows</code> option (API <code>option_1</code>), with | |
| 5371 values from 2 to 8.</p> | |
| 5372 <h2 id="gs1-composite-symbols-iso-24723">6.3 GS1 Composite Symbols (ISO | |
| 5373 24723)</h2> | |
| 5374 <p>GS1 Composite symbols employ a mixture of components to give more | |
| 5375 comprehensive information about a product. The permissible contents of a | |
| 5376 composite symbol is determined by the terms of the GS1 General | |
| 5377 Specifications. Composite symbols consist of a linear component which | |
| 5378 can be an EAN, UPC, GS1-128 or GS1 DataBar symbol, a two-dimensional | |
| 5379 (2D) component which is based on PDF417 or MicroPDF417, and a separator | |
| 5380 pattern. The type of linear component to be used is determined using the | |
| 5381 <code>-b</code> or <code>--barcode</code> switch (API | |
| 5382 <code>symbology</code>) as with other encoding methods. Valid values are | |
| 5383 shown below.</p> | |
| 5384 <div id="tbl:composite_symbologies" class="tablenos"> | |
| 5385 <table id="tbl:composite_symbologies" | |
| 5386 data-tag=": GS1 Composite Symbology Values"> | |
| 5387 <caption><span>Table : GS1 Composite Symbology Values</span> </caption> | |
| 5388 <colgroup> | |
| 5389 <col style="width: 11%" /> | |
| 5390 <col style="width: 34%" /> | |
| 5391 <col style="width: 53%" /> | |
| 5392 </colgroup> | |
| 5393 <thead> | |
| 5394 <tr> | |
| 5395 <th style="text-align: left;">Numeric Value</th> | |
| 5396 <th style="text-align: left;">Name</th> | |
| 5397 <th style="text-align: left;">Barcode Name</th> | |
| 5398 </tr> | |
| 5399 </thead> | |
| 5400 <tbody> | |
| 5401 <tr> | |
| 5402 <td style="text-align: left;">130</td> | |
| 5403 <td style="text-align: left;"><code>BARCODE_EANX_CC</code></td> | |
| 5404 <td style="text-align: left;">GS1 Composite Symbol with EAN linear | |
| 5405 component</td> | |
| 5406 </tr> | |
| 5407 <tr> | |
| 5408 <td style="text-align: left;">131</td> | |
| 5409 <td style="text-align: left;"><code>BARCODE_GS1_128_CC</code></td> | |
| 5410 <td style="text-align: left;">GS1 Composite Symbol with GS1-128 linear | |
| 5411 component</td> | |
| 5412 </tr> | |
| 5413 <tr> | |
| 5414 <td style="text-align: left;">132</td> | |
| 5415 <td style="text-align: left;"><code>BARCODE_DBAR_OMN_CC</code></td> | |
| 5416 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 5417 Omnidirectional linear component</td> | |
| 5418 </tr> | |
| 5419 <tr> | |
| 5420 <td style="text-align: left;">133</td> | |
| 5421 <td style="text-align: left;"><code>BARCODE_DBAR_LTD_CC</code></td> | |
| 5422 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 5423 Limited linear component</td> | |
| 5424 </tr> | |
| 5425 <tr> | |
| 5426 <td style="text-align: left;">134</td> | |
| 5427 <td style="text-align: left;"><code>BARCODE_DBAR_EXP_CC</code></td> | |
| 5428 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 5429 Expanded linear component</td> | |
| 5430 </tr> | |
| 5431 <tr> | |
| 5432 <td style="text-align: left;">135</td> | |
| 5433 <td style="text-align: left;"><code>BARCODE_UPCA_CC</code></td> | |
| 5434 <td style="text-align: left;">GS1 Composite Symbol with UPC-A linear | |
| 5435 component</td> | |
| 5436 </tr> | |
| 5437 <tr> | |
| 5438 <td style="text-align: left;">136</td> | |
| 5439 <td style="text-align: left;"><code>BARCODE_UPCE_CC</code></td> | |
| 5440 <td style="text-align: left;">GS1 Composite Symbol with UPC-E linear | |
| 5441 component</td> | |
| 5442 </tr> | |
| 5443 <tr> | |
| 5444 <td style="text-align: left;">137</td> | |
| 5445 <td style="text-align: left;"><code>BARCODE_DBAR_STK_CC</code></td> | |
| 5446 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 5447 Stacked component</td> | |
| 5448 </tr> | |
| 5449 <tr> | |
| 5450 <td style="text-align: left;">138</td> | |
| 5451 <td style="text-align: left;"><code>BARCODE_DBAR_OMNSTK_CC</code></td> | |
| 5452 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 5453 Stacked Omnidirectional component</td> | |
| 5454 </tr> | |
| 5455 <tr> | |
| 5456 <td style="text-align: left;">139</td> | |
| 5457 <td style="text-align: left;"><code>BARCODE_DBAR_EXPSTK_CC</code></td> | |
| 5458 <td style="text-align: left;">GS1 Composite Symbol with GS1 DataBar | |
| 5459 Expanded Stacked component</td> | |
| 5460 </tr> | |
| 5461 </tbody> | |
| 5462 </table> | |
| 5463 </div> | |
| 5464 <p>The data to be encoded in the linear component of a composite symbol | |
| 5465 should be entered into a primary string with the data for the 2D | |
| 5466 component being entered in the normal way. To do this at the command | |
| 5467 prompt use the <code>--primary</code> switch (API <code>primary</code>). | |
| 5468 For example:</p> | |
| 5469 <div class="sourceCode" id="cb108"><pre | |
| 5470 class="sourceCode bash"><code class="sourceCode bash"><span id="cb108-1"><a href="#cb108-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX_CC <span class="at">--mode</span><span class="op">=</span>1 <span class="at">--primary</span><span class="op">=</span>331234567890 <span class="at">-d</span> <span class="st">"[99]1234-abcd"</span></span></code></pre></div> | |
| 5471 <p>This creates an EAN-13 linear component with the data | |
| 5472 <code>"331234567890"</code> and a 2D CC-A (see <a | |
| 5473 href="#cc-a">below</a>) component with the data | |
| 5474 <code>"(99)1234-abcd"</code>. The same results can be achieved using the | |
| 5475 API as shown below:</p> | |
| 5476 <div class="sourceCode" id="cb109"><pre | |
| 5477 class="sourceCode c"><code class="sourceCode c"><span id="cb109-1"><a href="#cb109-1" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>symbology <span class="op">=</span> BARCODE_EANX_CC<span class="op">;</span></span> | |
| 5478 <span id="cb109-2"><a href="#cb109-2" aria-hidden="true" tabindex="-1"></a></span> | |
| 5479 <span id="cb109-3"><a href="#cb109-3" aria-hidden="true" tabindex="-1"></a>my_symbol<span class="op">-></span>option_1 <span class="op">=</span> <span class="dv">1</span><span class="op">;</span></span> | |
| 5480 <span id="cb109-4"><a href="#cb109-4" aria-hidden="true" tabindex="-1"></a></span> | |
| 5481 <span id="cb109-5"><a href="#cb109-5" aria-hidden="true" tabindex="-1"></a>strcpy<span class="op">(</span>my_symbol<span class="op">-></span>primary<span class="op">,</span> <span class="st">"331234567890"</span><span class="op">);</span></span> | |
| 5482 <span id="cb109-6"><a href="#cb109-6" aria-hidden="true" tabindex="-1"></a></span> | |
| 5483 <span id="cb109-7"><a href="#cb109-7" aria-hidden="true" tabindex="-1"></a>ZBarcode_Encode_and_Print<span class="op">(</span>my_symbol<span class="op">,</span> <span class="st">"[99]1234-abcd"</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">);</span></span></code></pre></div> | |
| 5484 <p>EAN-2 and EAN-5 add-on data can be used with EAN and UPC symbols | |
| 5485 using the + symbol as described in sections <a | |
| 5486 href="#upc-universal-product-code-iso-15420">6.1.3 UPC (Universal | |
| 5487 Product Code) (ISO 15420)</a> and <a | |
| 5488 href="#ean-european-article-number-iso-15420">6.1.4 EAN (European | |
| 5489 Article Number) (ISO 15420)</a>.</p> | |
| 5490 <p>The 2D component of a composite symbol can use one of three systems: | |
| 5491 CC-A, CC-B and CC-C, as described below. The 2D component type can be | |
| 5492 selected automatically by Zint dependent on the length of the input | |
| 5493 string. Alternatively the three methods can be accessed using the | |
| 5494 <code>--mode</code> prompt (API <code>option_1</code>) followed by 1, 2 | |
| 5495 or 3 for CC-A, CC-B or CC-C respectively.</p> | |
| 5496 <h3 id="cc-a">6.3.1 CC-A</h3> | |
| 5497 <figure> | |
| 5498 <img src="images/eanx_cc_a.svg" title="fig:" class="upcean" | |
| 5499 alt="zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234567890" /> | |
| 5500 <figcaption | |
| 5501 aria-hidden="true"><code>zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234567890</code></figcaption> | |
| 5502 </figure> | |
| 5503 <p>This system uses a variation of MicroPDF417 which is optimised to fit | |
| 5504 into a small space. The size of the 2D component and the amount of error | |
| 5505 correction is determined by the amount of data to be encoded and the | |
| 5506 type of linear component which is being used. CC-A can encode up to 56 | |
| 5507 numeric digits or an alphanumeric string of shorter length. To select | |
| 5508 CC-A use <code>--mode=1</code> (API <code>option_1 = 1</code>).</p> | |
| 5509 <h3 id="cc-b">6.3.2 CC-B</h3> | |
| 5510 <figure> | |
| 5511 <img src="images/eanx_cc_b.svg" title="fig:" class="upcean" | |
| 5512 alt="zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=331234567890" /> | |
| 5513 <figcaption | |
| 5514 aria-hidden="true"><code>zint -b EANX_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=331234567890</code></figcaption> | |
| 5515 </figure> | |
| 5516 <p>This system uses MicroPDF417 to encode the 2D component. The size of | |
| 5517 the 2D component and the amount of error correction is determined by the | |
| 5518 amount of data to be encoded and the type of linear component which is | |
| 5519 being used. CC-B can encode up to 338 numeric digits or an alphanumeric | |
| 5520 string of shorter length. To select CC-B use <code>--mode=2</code> (API | |
| 5521 <code>option_1 = 2</code>).</p> | |
| 5522 <h3 id="cc-c">6.3.3 CC-C</h3> | |
| 5523 <figure> | |
| 5524 <img src="images/gs1_128_cc_c.svg" title="fig:" class="upcean" | |
| 5525 alt="zint -b GS1_128_CC --compliantheight -d "[99]1234-abcd" --mode=3 --primary="[01]03312345678903"" /> | |
| 5526 <figcaption | |
| 5527 aria-hidden="true"><code>zint -b GS1_128_CC --compliantheight -d "[99]1234-abcd" --mode=3 --primary="[01]03312345678903"</code></figcaption> | |
| 5528 </figure> | |
| 5529 <p>This system uses PDF417 and can only be used in conjunction with a | |
| 5530 GS1-128 linear component. CC-C can encode up to 2361 numeric digits or | |
| 5531 an alphanumeric string of shorter length. To select CC-C use | |
| 5532 <code>--mode=3</code> (API <code>option_1 = 3</code>).</p> | |
| 5533 <h2 id="two-track-symbols">6.4 Two-Track Symbols</h2> | |
| 5534 <h3 id="two-track-pharmacode">6.4.1 Two-Track Pharmacode</h3> | |
| 5535 <figure> | |
| 5536 <img src="images/pharma_two.svg" title="fig:" class="trk" | |
| 5537 alt="zint -b PHARMA_TWO --compliantheight -d "29876543"" /> | |
| 5538 <figcaption | |
| 5539 aria-hidden="true"><code>zint -b PHARMA_TWO --compliantheight -d "29876543"</code></figcaption> | |
| 5540 </figure> | |
| 5541 <p>Developed by Laetus, Pharmacode Two-Track is an alternative system to | |
| 5542 Pharmacode One-Track (see <a href="#pharmacode">6.1.9 Pharmacode</a>) | |
| 5543 used for the identification of pharmaceuticals. The symbology is able to | |
| 5544 encode whole numbers between 4 and 64570080.</p> | |
| 5545 <h3 id="postnet">6.4.2 POSTNET</h3> | |
| 5546 <figure> | |
| 5547 <img src="images/postnet.svg" title="fig:" class="trk" | |
| 5548 alt="zint -b POSTNET --compliantheight -d "12345678901"" /> | |
| 5549 <figcaption | |
| 5550 aria-hidden="true"><code>zint -b POSTNET --compliantheight -d "12345678901"</code></figcaption> | |
| 5551 </figure> | |
| 5552 <p>Used by the United States Postal Service until 2009, the POSTNET | |
| 5553 barcode was used for encoding zip-codes on mail items. POSTNET uses | |
| 5554 numerical input data and includes a modulo-10 check digit. While Zint | |
| 5555 will encode POSTNET symbols of up to 38 digits in length, standard | |
| 5556 lengths as used by USPS were <code>PostNet6</code> (5-digit ZIP input), | |
| 5557 <code>PostNet10</code> (5-digit ZIP + 4-digit user data) and | |
| 5558 <code>PostNet12</code> (5-digit ZIP + 6-digit user data), and a warning | |
| 5559 will be issued if the input length is not one of these.</p> | |
| 5560 <h3 id="planet">6.4.3 PLANET</h3> | |
| 5561 <figure> | |
| 5562 <img src="images/planet.svg" title="fig:" class="trk" | |
| 5563 alt="zint -b PLANET --compliantheight -d "4012345235636"" /> | |
| 5564 <figcaption | |
| 5565 aria-hidden="true"><code>zint -b PLANET --compliantheight -d "4012345235636"</code></figcaption> | |
| 5566 </figure> | |
| 5567 <p>Used by the United States Postal Service until 2009, the PLANET | |
| 5568 (Postal Alpha Numeric Encoding Technique) barcode was used for encoding | |
| 5569 routing data on mail items. PLANET uses numerical input data and | |
| 5570 includes a modulo-10 check digit. While Zint will encode PLANET symbols | |
| 5571 of up to 38 digits in length, standard lengths used by USPS were | |
| 5572 <code>Planet12</code> (11-digit input) and <code>Planet14</code> | |
| 5573 (13-digit input), and as with POSTNET a warning will be issued if the | |
| 5574 length is not one of these.</p> | |
| 5575 <h3 id="brazilian-cepnet">6.4.4 Brazilian CEPNet</h3> | |
| 5576 <figure> | |
| 5577 <img src="images/cepnet.svg" title="fig:" class="trk" | |
| 5578 alt="zint -b CEPNET --compliantheight -d "12345678"" /> | |
| 5579 <figcaption | |
| 5580 aria-hidden="true"><code>zint -b CEPNET --compliantheight -d "12345678"</code></figcaption> | |
| 5581 </figure> | |
| 5582 <p>Based on POSTNET, the CEPNet symbol is used by Correios, the | |
| 5583 Brazilian postal service, to encode CEP (Código de Endereçamento Postal) | |
| 5584 numbers on mail items. Input should consist of eight digits with the | |
| 5585 check digit being automatically added by Zint.</p> | |
| 5586 <h3 id="dx-film-edge-barcode">6.4.5 DX Film Edge Barcode</h3> | |
| 5587 <figure> | |
| 5588 <img src="images/dxfilmedge.svg" title="fig:" class="trk" | |
| 5589 alt="zint -b DXFILMEDGE --compliantheight -d "112-1/10A"" /> | |
| 5590 <figcaption | |
| 5591 aria-hidden="true"><code>zint -b DXFILMEDGE --compliantheight -d "112-1/10A"</code></figcaption> | |
| 5592 </figure> | |
| 5593 <p>Introduced by Kodak in the 1980s, the DX (Digital Index) barcode is | |
| 5594 printed on the bottom edge of 35mm film to aid in the reordering and | |
| 5595 post-processing of prints.</p> | |
| 5596 <p>The data can be in two parts. The first part (required) is the “DX | |
| 5597 number”, identifying the manufacturer and film type - the National | |
| 5598 Association of Photographic Manufacturers (NAPM) number. The second | |
| 5599 part, which is optional and if present is separated from the first by a | |
| 5600 slash (<code>/</code>), gives the frame number.</p> | |
| 5601 <p>The DX number is in either of two formats. The first format is a | |
| 5602 number of 1 to 4 digits (“DX Extract”) or 6 digits (“DX Full”), but for | |
| 5603 the 6-digit version the first and last digit are ignored, leaving a | |
| 5604 4-digit DX Extract number in any case, which must be in the range 16 to | |
| 5605 2047. The second format “NNN-NN” represents the DX Extract as two | |
| 5606 numbers separated by a dash (<code>-</code>), the first number being 1 | |
| 5607 to 3 digits (range 1 to 127) and the second 1 to 2 digits (range 0 to | |
| 5608 15).<a href="#fn15" class="footnote-ref" id="fnref15" | |
| 5609 role="doc-noteref"><sup>15</sup></a></p> | |
| 5610 <p>The optional frame number is a number in the range 0 to 63, and may | |
| 5611 have a half frame indicator “A” appended. Special character sequences | |
| 5612 (with or without a half frame indicator appended) may also be used: “S” | |
| 5613 or “X” means frame number 62, “K” or “00” means frame number 63, and “F” | |
| 5614 means frame number 0.</p> | |
| 5615 <p>A parity bit is automatically added by Zint.</p> | |
| 5616 <h2 id="state-postal-codes">6.5 4-State Postal Codes</h2> | |
| 5617 <h3 id="australia-post-4-state-symbols">6.5.1 Australia Post 4-State | |
| 5618 Symbols</h3> | |
| 5619 <h4 id="customer-barcodes">6.5.1.1 Customer Barcodes</h4> | |
| 5620 <figure> | |
| 5621 <img src="images/auspost.svg" title="fig:" class="trk" | |
| 5622 alt="zint -b AUSPOST --compliantheight -d "96184209"" /> | |
| 5623 <figcaption | |
| 5624 aria-hidden="true"><code>zint -b AUSPOST --compliantheight -d "96184209"</code></figcaption> | |
| 5625 </figure> | |
| 5626 <p>Australia Post Standard Customer Barcode, Customer Barcode 2 and | |
| 5627 Customer Barcode 3 are 37-bar, 52-bar and 67-bar specifications | |
| 5628 respectively, developed by Australia Post for printing Delivery Point ID | |
| 5629 (DPID) and customer information on mail items. Valid data characters are | |
| 5630 0-9, A-Z, a-z, space and hash (#). A Format Control Code (FCC) is added | |
| 5631 by Zint and should not be included in the input data. Reed-Solomon error | |
| 5632 correction data is generated by Zint. Encoding behaviour is determined | |
| 5633 by the length of the input data according to the formula shown in the | |
| 5634 following table.</p> | |
| 5635 <div id="tbl:auspost_input_formats" class="tablenos"> | |
| 5636 <table id="tbl:auspost_input_formats" style="width:86%;" | |
| 5637 data-tag=": Australia Post Input Formats"> | |
| 5638 <caption><span>Table : Australia Post Input Formats</span> </caption> | |
| 5639 <colgroup> | |
| 5640 <col style="width: 13%" /> | |
| 5641 <col style="width: 38%" /> | |
| 5642 <col style="width: 12%" /> | |
| 5643 <col style="width: 8%" /> | |
| 5644 <col style="width: 12%" /> | |
| 5645 </colgroup> | |
| 5646 <thead> | |
| 5647 <tr> | |
| 5648 <th style="text-align: left;">Input Length</th> | |
| 5649 <th style="text-align: left;">Required Input Format</th> | |
| 5650 <th>Symbol Length</th> | |
| 5651 <th>FCC</th> | |
| 5652 <th style="text-align: left;">Encoding Table</th> | |
| 5653 </tr> | |
| 5654 </thead> | |
| 5655 <tbody> | |
| 5656 <tr> | |
| 5657 <td style="text-align: left;">8</td> | |
| 5658 <td style="text-align: left;"><code>99999999</code></td> | |
| 5659 <td>37-bar</td> | |
| 5660 <td>11</td> | |
| 5661 <td style="text-align: left;">None</td> | |
| 5662 </tr> | |
| 5663 <tr> | |
| 5664 <td style="text-align: left;">13</td> | |
| 5665 <td style="text-align: left;"><code>99999999AAAAA</code></td> | |
| 5666 <td>52-bar</td> | |
| 5667 <td>59</td> | |
| 5668 <td style="text-align: left;">C</td> | |
| 5669 </tr> | |
| 5670 <tr> | |
| 5671 <td style="text-align: left;">16</td> | |
| 5672 <td style="text-align: left;"><code>9999999999999999</code></td> | |
| 5673 <td>52-bar</td> | |
| 5674 <td>59</td> | |
| 5675 <td style="text-align: left;">N</td> | |
| 5676 </tr> | |
| 5677 <tr> | |
| 5678 <td style="text-align: left;">18</td> | |
| 5679 <td style="text-align: left;"><code>99999999AAAAAAAAAA</code></td> | |
| 5680 <td>67-bar</td> | |
| 5681 <td>62</td> | |
| 5682 <td style="text-align: left;">C</td> | |
| 5683 </tr> | |
| 5684 <tr> | |
| 5685 <td style="text-align: left;">23</td> | |
| 5686 <td style="text-align: left;"><code>99999999999999999999999</code></td> | |
| 5687 <td>67-bar</td> | |
| 5688 <td>62</td> | |
| 5689 <td style="text-align: left;">N</td> | |
| 5690 </tr> | |
| 5691 </tbody> | |
| 5692 </table> | |
| 5693 </div> | |
| 5694 <h4 id="reply-paid-barcode">6.5.1.2 Reply Paid Barcode</h4> | |
| 5695 <figure> | |
| 5696 <img src="images/ausreply.svg" title="fig:" class="trk" | |
| 5697 alt="zint -b AUSREPLY --compliantheight -d "12345678"" /> | |
| 5698 <figcaption | |
| 5699 aria-hidden="true"><code>zint -b AUSREPLY --compliantheight -d "12345678"</code></figcaption> | |
| 5700 </figure> | |
| 5701 <p>A Reply Paid version of the Australia Post 4-State Barcode (FCC 45) | |
| 5702 which requires an 8-digit DPID input.</p> | |
| 5703 <h4 id="routing-barcode">6.5.1.3 Routing Barcode</h4> | |
| 5704 <figure> | |
| 5705 <img src="images/ausroute.svg" title="fig:" class="trk" | |
| 5706 alt="zint -b AUSROUTE --compliantheight -d "34567890"" /> | |
| 5707 <figcaption | |
| 5708 aria-hidden="true"><code>zint -b AUSROUTE --compliantheight -d "34567890"</code></figcaption> | |
| 5709 </figure> | |
| 5710 <p>A Routing version of the Australia Post 4-State Barcode (FCC 87) | |
| 5711 which requires an 8-digit DPID input.</p> | |
| 5712 <h4 id="redirect-barcode">6.5.1.4 Redirect Barcode</h4> | |
| 5713 <figure> | |
| 5714 <img src="images/ausredirect.svg" title="fig:" class="trk" | |
| 5715 alt="zint -b AUSREDIRECT --compliantheight -d "98765432"" /> | |
| 5716 <figcaption | |
| 5717 aria-hidden="true"><code>zint -b AUSREDIRECT --compliantheight -d "98765432"</code></figcaption> | |
| 5718 </figure> | |
| 5719 <p>A Redirection version of the Australia Post 4-State Barcode (FCC 92) | |
| 5720 which requires an 8-digit DPID input.</p> | |
| 5721 <h3 id="dutch-post-kix-code">6.5.2 Dutch Post KIX Code</h3> | |
| 5722 <figure> | |
| 5723 <img src="images/kix.svg" title="fig:" class="trk" | |
| 5724 alt="zint -b KIX --compliantheight -d "2500GG30250"" /> | |
| 5725 <figcaption | |
| 5726 aria-hidden="true"><code>zint -b KIX --compliantheight -d "2500GG30250"</code></figcaption> | |
| 5727 </figure> | |
| 5728 <p>This symbology is used by Royal Dutch TPG Post (Netherlands) for | |
| 5729 Postal code and automatic mail sorting. Data input can consist of | |
| 5730 numbers 0-9 and letters A-Z and needs to be 11 characters in length. No | |
| 5731 check digit is included.</p> | |
| 5732 <h3 id="royal-mail-4-state-customer-code-rm4scc">6.5.3 Royal Mail | |
| 5733 4-State Customer Code (RM4SCC)</h3> | |
| 5734 <figure> | |
| 5735 <img src="images/rm4scc.svg" title="fig:" class="trk" | |
| 5736 alt="zint -b RM4SCC --compliantheight -d "W1J0TR01"" /> | |
| 5737 <figcaption | |
| 5738 aria-hidden="true"><code>zint -b RM4SCC --compliantheight -d "W1J0TR01"</code></figcaption> | |
| 5739 </figure> | |
| 5740 <p>The RM4SCC standard is used by the Royal Mail in the UK to encode | |
| 5741 postcode and customer data on mail items. Data input can consist of | |
| 5742 numbers 0-9 and letters A-Z and usually includes delivery postcode | |
| 5743 followed by house number. For example <code>"W1J0TR01"</code> for 1 | |
| 5744 Piccadilly Circus in London. Check digit data is generated by Zint.</p> | |
| 5745 <h3 id="royal-mail-4-state-mailmark">6.5.4 Royal Mail 4-State | |
| 5746 Mailmark</h3> | |
| 5747 <figure> | |
| 5748 <img src="images/mailmark_4s.svg" title="fig:" class="trk" | |
| 5749 alt="zint -b MAILMARK_4S --compliantheight -d "1100000000000XY11"" /> | |
| 5750 <figcaption | |
| 5751 aria-hidden="true"><code>zint -b MAILMARK_4S --compliantheight -d "1100000000000XY11"</code></figcaption> | |
| 5752 </figure> | |
| 5753 <p>Developed in 2014 as a replacement for RM4SCC this 4-state symbol | |
| 5754 includes Reed- Solomon error correction. Input is a pre-formatted | |
| 5755 alphanumeric string of 22 (for Barcode C) or 26 (for Barcode L) | |
| 5756 characters, producing a symbol with 66 or 78 bars respectively. The | |
| 5757 rules for the input data are complex, as summarized in the following | |
| 5758 table.</p> | |
| 5759 <div id="tbl:mailmark_4s_input_fields" class="tablenos"> | |
| 5760 <table id="tbl:mailmark_4s_input_fields" style="width:100%;" | |
| 5761 data-tag=": Royal Mail 4-State Mailmark Input Fields"> | |
| 5762 <caption><span>Table : Royal Mail 4-State Mailmark Input Fields</span> | |
| 5763 </caption> | |
| 5764 <colgroup> | |
| 5765 <col style="width: 11%" /> | |
| 5766 <col style="width: 11%" /> | |
| 5767 <col style="width: 17%" /> | |
| 5768 <col style="width: 22%" /> | |
| 5769 <col style="width: 13%" /> | |
| 5770 <col style="width: 23%" /> | |
| 5771 </colgroup> | |
| 5772 <thead> | |
| 5773 <tr> | |
| 5774 <th style="text-align: left;">Format</th> | |
| 5775 <th style="text-align: left;">Version ID</th> | |
| 5776 <th style="text-align: left;">Class</th> | |
| 5777 <th>Supply Chain ID</th> | |
| 5778 <th style="text-align: left;">Item ID</th> | |
| 5779 <th style="text-align: left;">Destination+DPS</th> | |
| 5780 </tr> | |
| 5781 </thead> | |
| 5782 <tbody> | |
| 5783 <tr> | |
| 5784 <td style="text-align: left;">1 digit (0-4)</td> | |
| 5785 <td style="text-align: left;">1 digit (0-3)</td> | |
| 5786 <td style="text-align: left;">1 alphanum. (0-9A-E)</td> | |
| 5787 <td>2 digits (C) or 6 digits (L)</td> | |
| 5788 <td style="text-align: left;">8 digits</td> | |
| 5789 <td style="text-align: left;">9 alphanumerics (1 of 6 patterns)</td> | |
| 5790 </tr> | |
| 5791 </tbody> | |
| 5792 </table> | |
| 5793 </div> | |
| 5794 <p>The 6 Destination+DPS (Destination Post Code plus Delivery Point | |
| 5795 Suffix) patterns are:</p> | |
| 5796 <div id="tbl:mailmark_destination_dps" class="tablenos"> | |
| 5797 <table id="tbl:mailmark_destination_dps" | |
| 5798 data-tag=": Royal Mail Mailmark Destination+DPS Patterns"> | |
| 5799 <caption><span>Table : Royal Mail Mailmark Destination+DPS | |
| 5800 Patterns:</span> </caption> | |
| 5801 <tbody> | |
| 5802 <tr> | |
| 5803 <td><code>FNFNLLNLS</code></td> | |
| 5804 <td><code>FFNNLLNLS</code></td> | |
| 5805 <td><code>FFNNNLLNL</code></td> | |
| 5806 </tr> | |
| 5807 <tr> | |
| 5808 <td><code>FFNFNLLNL</code></td> | |
| 5809 <td><code>FNNLLNLSS</code></td> | |
| 5810 <td><code>FNNNLLNLS</code></td> | |
| 5811 </tr> | |
| 5812 </tbody> | |
| 5813 </table> | |
| 5814 </div> | |
| 5815 <p>where <code>'F'</code> stands for full alphabetic (A-Z), | |
| 5816 <code>'L'</code> for limited alphabetic (A-Z less | |
| 5817 <code>'CIKMOV'</code>), <code>'N'</code> for numeric (0-9), and | |
| 5818 <code>'S'</code> for space.</p> | |
| 5819 <p>Four of the permitted patterns include a number of trailing space | |
| 5820 characters - these will be appended by Zint if not included in the input | |
| 5821 data.</p> | |
| 5822 <p>For the two-dimensional Data Matrix-based version, see <a | |
| 5823 href="#royal-mail-2d-mailmark-cmdm-data-matrix">6.6.2 Royal Mail 2D | |
| 5824 Mailmark (CMDM) (Data Matrix)</a>.</p> | |
| 5825 <h3 id="usps-intelligent-mail">6.5.5 USPS Intelligent Mail</h3> | |
| 5826 <figure> | |
| 5827 <img src="images/usps_imail.svg" title="fig:" class="trk" | |
| 5828 alt="zint -b USPS_IMAIL --compliantheight -d "01234567094987654321-01234"" /> | |
| 5829 <figcaption | |
| 5830 aria-hidden="true"><code>zint -b USPS_IMAIL --compliantheight -d "01234567094987654321-01234"</code></figcaption> | |
| 5831 </figure> | |
| 5832 <p>Also known as the OneCode barcode and used in the U.S. by the United | |
| 5833 States Postal Service (USPS), the Intelligent Mail system replaced the | |
| 5834 POSTNET and PLANET symbologies in 2009. Intelligent Mail is a fixed | |
| 5835 length (65-bar) symbol which combines routing and customer information | |
| 5836 in a single symbol. Input data consists of a 20-digit tracking code, | |
| 5837 followed by a dash (<code>-</code>), followed by a delivery point | |
| 5838 zip-code which can be 0, 5, 9 or 11 digits in length. For example all of | |
| 5839 the following inputs are valid data entries:</p> | |
| 5840 <ul> | |
| 5841 <li><code>"01234567094987654321"</code></li> | |
| 5842 <li><code>"01234567094987654321-01234"</code></li> | |
| 5843 <li><code>"01234567094987654321-012345678"</code></li> | |
| 5844 <li><code>"01234567094987654321-01234567891"</code></li> | |
| 5845 </ul> | |
| 5846 <h3 id="japanese-postal-code">6.5.6 Japanese Postal Code</h3> | |
| 5847 <figure> | |
| 5848 <img src="images/japanpost.svg" title="fig:" class="trk" | |
| 5849 alt="zint -b JAPANPOST --compliantheight -d "15400233-16-4-205"" /> | |
| 5850 <figcaption | |
| 5851 aria-hidden="true"><code>zint -b JAPANPOST --compliantheight -d "15400233-16-4-205"</code></figcaption> | |
| 5852 </figure> | |
| 5853 <p>Used for address data on mail items for Japan Post. Accepted values | |
| 5854 are 0-9, A-Z and dash (<code>-</code>). A modulo 19 check digit is added | |
| 5855 by Zint.</p> | |
| 5856 <h3 id="daft-code">6.5.7 DAFT Code</h3> | |
| 5857 <figure> | |
| 5858 <img src="images/daft_rm4scc.svg" title="fig:" class="trk" | |
| 5859 alt="zint -b DAFT -d "AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF" --height=8.494 --vers=256" /> | |
| 5860 <figcaption | |
| 5861 aria-hidden="true"><code>zint -b DAFT -d "AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF" --height=8.494 --vers=256</code></figcaption> | |
| 5862 </figure> | |
| 5863 <p>This is a method for creating 4-state codes where the data encoding | |
| 5864 is provided by an external program. Input data should consist of the | |
| 5865 letters <code>'D'</code>, <code>'A'</code>, <code>'F'</code> and | |
| 5866 <code>'T'</code> where these refer to descender, ascender, full | |
| 5867 (ascender and descender) and tracker (neither ascender nor descender) | |
| 5868 respectively. All other characters are invalid. The ratio of the tracker | |
| 5869 size to full height can be given in thousandths (permille) using the | |
| 5870 <code>--vers</code> option (API <code>option_2</code>). The default | |
| 5871 value is 250 (25%).</p> | |
| 5872 <p>For example the following</p> | |
| 5873 <div class="sourceCode" id="cb110"><pre | |
| 5874 class="sourceCode bash"><code class="sourceCode bash"><span id="cb110-1"><a href="#cb110-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> DAFT <span class="at">-d</span> AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF <span class="at">--height</span><span class="op">=</span>8.494 <span class="at">--vers</span><span class="op">=</span>256</span></code></pre></div> | |
| 5875 <p>produces the same barcode (see <a | |
| 5876 href="#royal-mail-4-state-customer-code-rm4scc">6.5.3 Royal Mail 4-State | |
| 5877 Customer Code (RM4SCC)</a>) as</p> | |
| 5878 <div class="sourceCode" id="cb111"><pre | |
| 5879 class="sourceCode bash"><code class="sourceCode bash"><span id="cb111-1"><a href="#cb111-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> RM4SCC <span class="at">--compliantheight</span> <span class="at">-d</span> <span class="st">"W1J0TR01"</span></span></code></pre></div> | |
| 5880 <h2 id="matrix-symbols">6.6 Matrix Symbols</h2> | |
| 5881 <h3 id="data-matrix-iso-16022">6.6.1 Data Matrix (ISO 16022)</h3> | |
| 5882 <figure> | |
| 5883 <img src="images/hibc_dm.svg" title="fig:" class="i2dbig" | |
| 5884 alt="zint -b HIBC_DM -d "/ACMRN123456/V200912190833" --fast --square" /> | |
| 5885 <figcaption | |
| 5886 aria-hidden="true"><code>zint -b HIBC_DM -d "/ACMRN123456/V200912190833" --fast --square</code></figcaption> | |
| 5887 </figure> | |
| 5888 <p>Also known as Semacode this symbology was developed in 1989 by Acuity | |
| 5889 CiMatrix in partnership with the U.S. DoD and NASA. The symbol can | |
| 5890 encode a large amount of data in a small area. Data Matrix encodes | |
| 5891 characters in the Latin-1 set by default but also supports encoding in | |
| 5892 other character sets using the ECI mechanism. It can also encode GS1 | |
| 5893 data. The size of the generated symbol can be adjusted using the | |
| 5894 <code>--vers</code> option (API <code>option_2</code>) as shown in the | |
| 5895 table below. A separate symbology ID (<code>BARCODE_HIBC_DM</code>) can | |
| 5896 be used to encode Health Industry Barcode (HIBC) data. Note that only | |
| 5897 ECC200 encoding is supported, the older standards have now been removed | |
| 5898 from Zint.</p> | |
| 5899 <div id="tbl:datamatrix_sizes" class="tablenos"> | |
| 5900 <table id="tbl:datamatrix_sizes" data-tag=": Data Matrix Sizes"> | |
| 5901 <caption><span>Table : Data Matrix Sizes</span> </caption> | |
| 5902 <thead> | |
| 5903 <tr> | |
| 5904 <th>Input</th> | |
| 5905 <th>Symbol Size</th> | |
| 5906 <th></th> | |
| 5907 <th>Input</th> | |
| 5908 <th>Symbol Size</th> | |
| 5909 <th></th> | |
| 5910 <th>Input</th> | |
| 5911 <th>Symbol Size</th> | |
| 5912 </tr> | |
| 5913 </thead> | |
| 5914 <tbody> | |
| 5915 <tr> | |
| 5916 <td>1</td> | |
| 5917 <td>10 x 10</td> | |
| 5918 <td></td> | |
| 5919 <td>11</td> | |
| 5920 <td>36 x 36</td> | |
| 5921 <td></td> | |
| 5922 <td>21</td> | |
| 5923 <td>104 x 104</td> | |
| 5924 </tr> | |
| 5925 <tr> | |
| 5926 <td>2</td> | |
| 5927 <td>12 x 12</td> | |
| 5928 <td></td> | |
| 5929 <td>12</td> | |
| 5930 <td>40 x 40</td> | |
| 5931 <td></td> | |
| 5932 <td>22</td> | |
| 5933 <td>120 x 120</td> | |
| 5934 </tr> | |
| 5935 <tr> | |
| 5936 <td>3</td> | |
| 5937 <td>14 x 14</td> | |
| 5938 <td></td> | |
| 5939 <td>13</td> | |
| 5940 <td>44 x 44</td> | |
| 5941 <td></td> | |
| 5942 <td>23</td> | |
| 5943 <td>132 x 132</td> | |
| 5944 </tr> | |
| 5945 <tr> | |
| 5946 <td>4</td> | |
| 5947 <td>16 x 16</td> | |
| 5948 <td></td> | |
| 5949 <td>14</td> | |
| 5950 <td>48 x 48</td> | |
| 5951 <td></td> | |
| 5952 <td>24</td> | |
| 5953 <td>144 x 144</td> | |
| 5954 </tr> | |
| 5955 <tr> | |
| 5956 <td>5</td> | |
| 5957 <td>18 x 18</td> | |
| 5958 <td></td> | |
| 5959 <td>15</td> | |
| 5960 <td>52 x 52</td> | |
| 5961 <td></td> | |
| 5962 <td>25</td> | |
| 5963 <td>8 x 18</td> | |
| 5964 </tr> | |
| 5965 <tr> | |
| 5966 <td>6</td> | |
| 5967 <td>20 x 20</td> | |
| 5968 <td></td> | |
| 5969 <td>16</td> | |
| 5970 <td>64 x 64</td> | |
| 5971 <td></td> | |
| 5972 <td>26</td> | |
| 5973 <td>8 x 32</td> | |
| 5974 </tr> | |
| 5975 <tr> | |
| 5976 <td>7</td> | |
| 5977 <td>22 x 22</td> | |
| 5978 <td></td> | |
| 5979 <td>17</td> | |
| 5980 <td>72 x 72</td> | |
| 5981 <td></td> | |
| 5982 <td>28</td> | |
| 5983 <td>12 x 26</td> | |
| 5984 </tr> | |
| 5985 <tr> | |
| 5986 <td>8</td> | |
| 5987 <td>24 x 24</td> | |
| 5988 <td></td> | |
| 5989 <td>18</td> | |
| 5990 <td>80 x 80</td> | |
| 5991 <td></td> | |
| 5992 <td>28</td> | |
| 5993 <td>12 x 36</td> | |
| 5994 </tr> | |
| 5995 <tr> | |
| 5996 <td>9</td> | |
| 5997 <td>26 x 26</td> | |
| 5998 <td></td> | |
| 5999 <td>19</td> | |
| 6000 <td>88 x 88</td> | |
| 6001 <td></td> | |
| 6002 <td>29</td> | |
| 6003 <td>16 x 36</td> | |
| 6004 </tr> | |
| 6005 <tr> | |
| 6006 <td>10</td> | |
| 6007 <td>32 x 32</td> | |
| 6008 <td></td> | |
| 6009 <td>20</td> | |
| 6010 <td>96 x 96</td> | |
| 6011 <td></td> | |
| 6012 <td>30</td> | |
| 6013 <td>16 x 48</td> | |
| 6014 </tr> | |
| 6015 </tbody> | |
| 6016 </table> | |
| 6017 </div> | |
| 6018 <p>The largest version 24 (144 x 144) can encode 3116 digits, around | |
| 6019 2335 alphanumeric characters, or 1555 bytes of data.</p> | |
| 6020 <p>When using automatic symbol sizes you can force Zint to use square | |
| 6021 symbols (versions 1-24) at the command line by using the option | |
| 6022 <code>--square</code> (API <code>option_3 = DM_SQUARE</code>).</p> | |
| 6023 <p>Data Matrix Rectangular Extension (ISO/IEC 21471) codes may be | |
| 6024 generated with the following values as before:</p> | |
| 6025 <div id="tbl:dmre_sizes" class="tablenos"> | |
| 6026 <table id="tbl:dmre_sizes" data-tag=": DMRE Sizes"> | |
| 6027 <caption><span>Table : DMRE Sizes</span> </caption> | |
| 6028 <thead> | |
| 6029 <tr> | |
| 6030 <th>Input</th> | |
| 6031 <th>Symbol Size</th> | |
| 6032 <th></th> | |
| 6033 <th>Input</th> | |
| 6034 <th>Symbol Size</th> | |
| 6035 </tr> | |
| 6036 </thead> | |
| 6037 <tbody> | |
| 6038 <tr> | |
| 6039 <td>31</td> | |
| 6040 <td>8 x 48</td> | |
| 6041 <td></td> | |
| 6042 <td>40</td> | |
| 6043 <td>20 x 36</td> | |
| 6044 </tr> | |
| 6045 <tr> | |
| 6046 <td>32</td> | |
| 6047 <td>8 x 64</td> | |
| 6048 <td></td> | |
| 6049 <td>41</td> | |
| 6050 <td>20 x 44</td> | |
| 6051 </tr> | |
| 6052 <tr> | |
| 6053 <td>33</td> | |
| 6054 <td>8 x 80</td> | |
| 6055 <td></td> | |
| 6056 <td>42</td> | |
| 6057 <td>20 x 64</td> | |
| 6058 </tr> | |
| 6059 <tr> | |
| 6060 <td>34</td> | |
| 6061 <td>8 x 96</td> | |
| 6062 <td></td> | |
| 6063 <td>43</td> | |
| 6064 <td>22 x 48</td> | |
| 6065 </tr> | |
| 6066 <tr> | |
| 6067 <td>35</td> | |
| 6068 <td>8 x 120</td> | |
| 6069 <td></td> | |
| 6070 <td>44</td> | |
| 6071 <td>24 x 48</td> | |
| 6072 </tr> | |
| 6073 <tr> | |
| 6074 <td>36</td> | |
| 6075 <td>8 x 144</td> | |
| 6076 <td></td> | |
| 6077 <td>45</td> | |
| 6078 <td>24 x 64</td> | |
| 6079 </tr> | |
| 6080 <tr> | |
| 6081 <td>37</td> | |
| 6082 <td>12 x 64</td> | |
| 6083 <td></td> | |
| 6084 <td>46</td> | |
| 6085 <td>26 x 40</td> | |
| 6086 </tr> | |
| 6087 <tr> | |
| 6088 <td>38</td> | |
| 6089 <td>12 x 88</td> | |
| 6090 <td></td> | |
| 6091 <td>47</td> | |
| 6092 <td>26 x 48</td> | |
| 6093 </tr> | |
| 6094 <tr> | |
| 6095 <td>39</td> | |
| 6096 <td>16 x 64</td> | |
| 6097 <td></td> | |
| 6098 <td>48</td> | |
| 6099 <td>26 x 64</td> | |
| 6100 </tr> | |
| 6101 </tbody> | |
| 6102 </table> | |
| 6103 </div> | |
| 6104 <p>DMRE symbol sizes may be activated in automatic size mode using the | |
| 6105 option <code>--dmre</code> (API <code>option_3 = DM_DMRE</code>).</p> | |
| 6106 <p>GS1 data may be encoded using FNC1 (default) or GS (Group Separator, | |
| 6107 ASCII 29) as separator. Use the option <code>--gssep</code> to change to | |
| 6108 GS (API <code>output_options |= GS1_GS_SEPARATOR</code>).</p> | |
| 6109 <p>By default Zint uses a “de facto” codeword placement for symbols of | |
| 6110 size 144 x 144 (version 24). To override this and use the now clarified | |
| 6111 ISO/IEC standard placement, use option <code>--dmiso144</code> (API | |
| 6112 <code>option_3 |= DM_ISO_144</code>).</p> | |
| 6113 <p>For a faster but less optimal encoding, the <code>--fast</code> | |
| 6114 option (API <code>input_mode |= FAST_MODE</code>) may be used.</p> | |
| 6115 <p>Data Matrix supports Structured Append of up to 16 symbols and a | |
| 6116 numeric ID (file identifications), which can be set by using the | |
| 6117 <code>--structapp</code> option (see <a href="#structured-append">4.17 | |
| 6118 Structured Append</a>) (API <code>structapp</code>). The ID consists of | |
| 6119 2 numbers <code>ID1</code> and <code>ID2</code>, each of which can range | |
| 6120 from 1 to 254, and is specified as the single number | |
| 6121 <code>ID1 * 1000 + ID2</code>, so for instance <code>ID1</code> | |
| 6122 <code>"123"</code> and <code>ID2</code> <code>"234"</code> would be | |
| 6123 given as <code>"123234"</code>. Note that both <code>ID1</code> and | |
| 6124 <code>ID2</code> must be non-zero, so e.g. <code>"123000"</code> or | |
| 6125 <code>"000123"</code> would be invalid IDs. If an ID is not given it | |
| 6126 defaults to <code>"001001"</code>.</p> | |
| 6127 <h3 id="royal-mail-2d-mailmark-cmdm-data-matrix">6.6.2 Royal Mail 2D | |
| 6128 Mailmark (CMDM) (Data Matrix)</h3> | |
| 6129 <figure> | |
| 6130 <img src="images/mailmark_2d.svg" title="fig:" class="i2dbig" | |
| 6131 alt="zint -b MAILMARK_2D -d "JGB 01Z999999900000001EC1A1AA1A0SN35TQ" --vers=30" /> | |
| 6132 <figcaption | |
| 6133 aria-hidden="true"><code>zint -b MAILMARK_2D -d "JGB 01Z999999900000001EC1A1AA1A0SN35TQ" --vers=30</code></figcaption> | |
| 6134 </figure> | |
| 6135 <p>This variant of Data Matrix, also known as “Complex Mail Data Mark” | |
| 6136 (CMDM), was introduced by Royal Mail along with <a | |
| 6137 href="#royal-mail-4-state-mailmark">6.5.4 Royal Mail 4-State | |
| 6138 Mailmark</a>, and offers space for customer data following an initial | |
| 6139 pre-formatted 45 character section, as summarized below.</p> | |
| 6140 <div id="tbl:mailmark_2d_input_fields" class="tablenos"> | |
| 6141 <table id="tbl:mailmark_2d_input_fields" | |
| 6142 data-tag=": Royal Mail 2D Mailmark Input Fields"> | |
| 6143 <caption><span>Table : Royal Mail 2D Mailmark Input Fields</span> | |
| 6144 </caption> | |
| 6145 <thead> | |
| 6146 <tr> | |
| 6147 <th style="text-align: left;">Field Name</th> | |
| 6148 <th style="text-align: left;">Length</th> | |
| 6149 <th style="text-align: left;">Values</th> | |
| 6150 </tr> | |
| 6151 </thead> | |
| 6152 <tbody> | |
| 6153 <tr> | |
| 6154 <td style="text-align: left;">UPU Country ID</td> | |
| 6155 <td style="text-align: left;">4</td> | |
| 6156 <td style="text-align: left;"><code>"JGB "</code></td> | |
| 6157 </tr> | |
| 6158 <tr> | |
| 6159 <td style="text-align: left;">Information Type</td> | |
| 6160 <td style="text-align: left;">1</td> | |
| 6161 <td style="text-align: left;">Alphanumeric</td> | |
| 6162 </tr> | |
| 6163 <tr> | |
| 6164 <td style="text-align: left;">Version ID</td> | |
| 6165 <td style="text-align: left;">1</td> | |
| 6166 <td style="text-align: left;"><code>"1"</code></td> | |
| 6167 </tr> | |
| 6168 <tr> | |
| 6169 <td style="text-align: left;">Class</td> | |
| 6170 <td style="text-align: left;">1</td> | |
| 6171 <td style="text-align: left;">Alphanumeric</td> | |
| 6172 </tr> | |
| 6173 <tr> | |
| 6174 <td style="text-align: left;">Supply Chain ID</td> | |
| 6175 <td style="text-align: left;">7</td> | |
| 6176 <td style="text-align: left;">Numeric</td> | |
| 6177 </tr> | |
| 6178 <tr> | |
| 6179 <td style="text-align: left;">Item ID</td> | |
| 6180 <td style="text-align: left;">8</td> | |
| 6181 <td style="text-align: left;">Numeric</td> | |
| 6182 </tr> | |
| 6183 <tr> | |
| 6184 <td style="text-align: left;">Destination+DPS</td> | |
| 6185 <td style="text-align: left;">9</td> | |
| 6186 <td style="text-align: left;">Alphanumeric (1 of 6 patterns)</td> | |
| 6187 </tr> | |
| 6188 <tr> | |
| 6189 <td style="text-align: left;">Service Type</td> | |
| 6190 <td style="text-align: left;">1</td> | |
| 6191 <td style="text-align: left;">Numeric</td> | |
| 6192 </tr> | |
| 6193 <tr> | |
| 6194 <td style="text-align: left;">RTS Post Code</td> | |
| 6195 <td style="text-align: left;">7</td> | |
| 6196 <td style="text-align: left;">Alphanumeric (1 of 6 patterns)</td> | |
| 6197 </tr> | |
| 6198 <tr> | |
| 6199 <td style="text-align: left;">Reserved</td> | |
| 6200 <td style="text-align: left;">6</td> | |
| 6201 <td style="text-align: left;">Spaces</td> | |
| 6202 </tr> | |
| 6203 <tr> | |
| 6204 <td style="text-align: left;">Customer Data</td> | |
| 6205 <td style="text-align: left;">6, 45 or 29</td> | |
| 6206 <td style="text-align: left;">Anything (Latin-1)</td> | |
| 6207 </tr> | |
| 6208 </tbody> | |
| 6209 </table> | |
| 6210 </div> | |
| 6211 <p>The 6 Destination+DPS (Destination Post Code plus Delivery Point | |
| 6212 Suffix) patterns are the same as for the 4-state - see Table <a | |
| 6213 href="#tbl:mailmark_destination_dps">: Royal Mail Mailmark | |
| 6214 Destination+DPS Patterns</a>. The 6 RTS (Return to Sender) Post Code | |
| 6215 patterns are the same also except without the additional DPS | |
| 6216 <code>'NL'</code>, i.e.</p> | |
| 6217 <div id="tbl:mailmark_2d_rts" class="tablenos"> | |
| 6218 <table id="tbl:mailmark_2d_rts" | |
| 6219 data-tag=": Royal Mail 2D Mailmark RTS Patterns"> | |
| 6220 <caption><span>Table : Royal Mail 2D Mailmark RTS Patterns</span> | |
| 6221 </caption> | |
| 6222 <tbody> | |
| 6223 <tr> | |
| 6224 <td><code>FNFNLLS</code></td> | |
| 6225 <td><code>FFNNLLS</code></td> | |
| 6226 <td><code>FFNNNLL</code></td> | |
| 6227 </tr> | |
| 6228 <tr> | |
| 6229 <td><code>FFNFNLL</code></td> | |
| 6230 <td><code>FNNLLSS</code></td> | |
| 6231 <td><code>FNNNLLS</code></td> | |
| 6232 </tr> | |
| 6233 </tbody> | |
| 6234 </table> | |
| 6235 </div> | |
| 6236 <p>where <code>'F'</code> is full alphabetic (A-Z), <code>'L'</code> | |
| 6237 limited alphabetic (A-Z less <code>'CIKMOV'</code>), <code>'N'</code> | |
| 6238 numeric (0-9), and <code>'S'</code> space.</p> | |
| 6239 <p>Three sizes are defined, one rectangular, with varying maximum | |
| 6240 amounts of optional customer data:</p> | |
| 6241 <div id="tbl:mailmark_2d_sizes" class="tablenos"> | |
| 6242 <table id="tbl:mailmark_2d_sizes" | |
| 6243 data-tag=": Royal Mail 2D Mailmark Sizes"> | |
| 6244 <caption><span>Table : Royal Mail 2D Mailmark Sizes</span> </caption> | |
| 6245 <thead> | |
| 6246 <tr> | |
| 6247 <th style="text-align: left;">Name</th> | |
| 6248 <th style="text-align: left;">Size</th> | |
| 6249 <th>Customer Data</th> | |
| 6250 <th>Zint Version</th> | |
| 6251 </tr> | |
| 6252 </thead> | |
| 6253 <tbody> | |
| 6254 <tr> | |
| 6255 <td style="text-align: left;">Type 7</td> | |
| 6256 <td style="text-align: left;">24 x 24</td> | |
| 6257 <td>6 characters</td> | |
| 6258 <td>8</td> | |
| 6259 </tr> | |
| 6260 <tr> | |
| 6261 <td style="text-align: left;">Type 9</td> | |
| 6262 <td style="text-align: left;">32 x 32</td> | |
| 6263 <td>45 characters</td> | |
| 6264 <td>10</td> | |
| 6265 </tr> | |
| 6266 <tr> | |
| 6267 <td style="text-align: left;">Type 29</td> | |
| 6268 <td style="text-align: left;">16 x 48</td> | |
| 6269 <td>29 characters</td> | |
| 6270 <td>30</td> | |
| 6271 </tr> | |
| 6272 </tbody> | |
| 6273 </table> | |
| 6274 </div> | |
| 6275 <p>Zint will automatically select a size based on the amount of customer | |
| 6276 data, or it can be specified using the <code>--vers</code> option (API | |
| 6277 <code>option_2</code>), which takes the Zint version number (one more | |
| 6278 than the Royal Mail Type number). Zint will prefix the input data with | |
| 6279 <code>"JGB "</code> if it’s missing, and also space-pad the input if the | |
| 6280 customer data is absent or falls short. As with Data Matrix, the | |
| 6281 rectangular symbol Type 29 can be excluded from automatic size selection | |
| 6282 by using the option <code>--square</code> (API | |
| 6283 <code>option_3 = DM_SQUARE</code>).</p> | |
| 6284 <p>GS1 data, the ECI mechanism, and Structured Append are not | |
| 6285 supported.</p> | |
| 6286 <h3 id="qr-code-iso-18004">6.6.3 QR Code (ISO 18004)</h3> | |
| 6287 <figure> | |
| 6288 <img src="images/qrcode.svg" title="fig:" class="i2dbig" | |
| 6289 alt="zint -b QRCODE -d "QR Code Symbol" --mask=5" /> | |
| 6290 <figcaption | |
| 6291 aria-hidden="true"><code>zint -b QRCODE -d "QR Code Symbol" --mask=5</code></figcaption> | |
| 6292 </figure> | |
| 6293 <p>Also known as Quick Response Code this symbology was developed by | |
| 6294 Denso. Four levels of error correction are available using the | |
| 6295 <code>--secure</code> option (API <code>option_1</code>) as shown in the | |
| 6296 following table.</p> | |
| 6297 <div id="tbl:qrcode_eccs" class="tablenos"> | |
| 6298 <table id="tbl:qrcode_eccs" data-tag=": QR Code ECC Levels"> | |
| 6299 <caption><span>Table : QR Code ECC Levels</span> </caption> | |
| 6300 <thead> | |
| 6301 <tr> | |
| 6302 <th>Input</th> | |
| 6303 <th>ECC Level</th> | |
| 6304 <th>Error Correction Capacity</th> | |
| 6305 <th>Recovery Capacity</th> | |
| 6306 </tr> | |
| 6307 </thead> | |
| 6308 <tbody> | |
| 6309 <tr> | |
| 6310 <td>1</td> | |
| 6311 <td>L</td> | |
| 6312 <td>Approx 20% of symbol</td> | |
| 6313 <td>Approx 7%</td> | |
| 6314 </tr> | |
| 6315 <tr> | |
| 6316 <td>2</td> | |
| 6317 <td>M</td> | |
| 6318 <td>Approx 37% of symbol</td> | |
| 6319 <td>Approx 15%</td> | |
| 6320 </tr> | |
| 6321 <tr> | |
| 6322 <td>3</td> | |
| 6323 <td>Q</td> | |
| 6324 <td>Approx 55% of symbol</td> | |
| 6325 <td>Approx 25%</td> | |
| 6326 </tr> | |
| 6327 <tr> | |
| 6328 <td>4</td> | |
| 6329 <td>H</td> | |
| 6330 <td>Approx 65% of symbol</td> | |
| 6331 <td>Approx 30%</td> | |
| 6332 </tr> | |
| 6333 </tbody> | |
| 6334 </table> | |
| 6335 </div> | |
| 6336 <p>The size of the symbol can be specified by setting the | |
| 6337 <code>--vers</code> option (API <code>option_2</code>) to the QR Code | |
| 6338 version required (1-40). The size of symbol generated is shown in the | |
| 6339 table below.</p> | |
| 6340 <div id="tbl:qrcode_sizes" class="tablenos"> | |
| 6341 <table id="tbl:qrcode_sizes" data-tag=": QR Code Sizes"> | |
| 6342 <caption><span>Table : QR Code Sizes</span> </caption> | |
| 6343 <thead> | |
| 6344 <tr> | |
| 6345 <th>Input</th> | |
| 6346 <th>Symbol Size</th> | |
| 6347 <th></th> | |
| 6348 <th>Input</th> | |
| 6349 <th>Symbol Size</th> | |
| 6350 <th></th> | |
| 6351 <th>Input</th> | |
| 6352 <th>Symbol Size</th> | |
| 6353 </tr> | |
| 6354 </thead> | |
| 6355 <tbody> | |
| 6356 <tr> | |
| 6357 <td>1</td> | |
| 6358 <td>21 x 21</td> | |
| 6359 <td></td> | |
| 6360 <td>15</td> | |
| 6361 <td>77 x 77</td> | |
| 6362 <td></td> | |
| 6363 <td>29</td> | |
| 6364 <td>133 x 133</td> | |
| 6365 </tr> | |
| 6366 <tr> | |
| 6367 <td>2</td> | |
| 6368 <td>25 x 25</td> | |
| 6369 <td></td> | |
| 6370 <td>16</td> | |
| 6371 <td>81 x 81</td> | |
| 6372 <td></td> | |
| 6373 <td>30</td> | |
| 6374 <td>137 x 137</td> | |
| 6375 </tr> | |
| 6376 <tr> | |
| 6377 <td>3</td> | |
| 6378 <td>29 x 29</td> | |
| 6379 <td></td> | |
| 6380 <td>17</td> | |
| 6381 <td>85 x 85</td> | |
| 6382 <td></td> | |
| 6383 <td>31</td> | |
| 6384 <td>141 x 141</td> | |
| 6385 </tr> | |
| 6386 <tr> | |
| 6387 <td>4</td> | |
| 6388 <td>33 x 33</td> | |
| 6389 <td></td> | |
| 6390 <td>18</td> | |
| 6391 <td>89 x 89</td> | |
| 6392 <td></td> | |
| 6393 <td>32</td> | |
| 6394 <td>145 x 145</td> | |
| 6395 </tr> | |
| 6396 <tr> | |
| 6397 <td>5</td> | |
| 6398 <td>37 x 37</td> | |
| 6399 <td></td> | |
| 6400 <td>19</td> | |
| 6401 <td>93 x 93</td> | |
| 6402 <td></td> | |
| 6403 <td>33</td> | |
| 6404 <td>149 x 149</td> | |
| 6405 </tr> | |
| 6406 <tr> | |
| 6407 <td>6</td> | |
| 6408 <td>41 x 41</td> | |
| 6409 <td></td> | |
| 6410 <td>20</td> | |
| 6411 <td>97 x 97</td> | |
| 6412 <td></td> | |
| 6413 <td>34</td> | |
| 6414 <td>153 x 153</td> | |
| 6415 </tr> | |
| 6416 <tr> | |
| 6417 <td>7</td> | |
| 6418 <td>45 x 45</td> | |
| 6419 <td></td> | |
| 6420 <td>21</td> | |
| 6421 <td>101 x 101</td> | |
| 6422 <td></td> | |
| 6423 <td>35</td> | |
| 6424 <td>157 x 157</td> | |
| 6425 </tr> | |
| 6426 <tr> | |
| 6427 <td>8</td> | |
| 6428 <td>49 x 49</td> | |
| 6429 <td></td> | |
| 6430 <td>22</td> | |
| 6431 <td>105 x 105</td> | |
| 6432 <td></td> | |
| 6433 <td>36</td> | |
| 6434 <td>161 x 161</td> | |
| 6435 </tr> | |
| 6436 <tr> | |
| 6437 <td>9</td> | |
| 6438 <td>53 x 53</td> | |
| 6439 <td></td> | |
| 6440 <td>23</td> | |
| 6441 <td>109 x 109</td> | |
| 6442 <td></td> | |
| 6443 <td>37</td> | |
| 6444 <td>165 x 165</td> | |
| 6445 </tr> | |
| 6446 <tr> | |
| 6447 <td>10</td> | |
| 6448 <td>57 x 57</td> | |
| 6449 <td></td> | |
| 6450 <td>24</td> | |
| 6451 <td>113 x 113</td> | |
| 6452 <td></td> | |
| 6453 <td>38</td> | |
| 6454 <td>169 x 169</td> | |
| 6455 </tr> | |
| 6456 <tr> | |
| 6457 <td>11</td> | |
| 6458 <td>61 x 61</td> | |
| 6459 <td></td> | |
| 6460 <td>25</td> | |
| 6461 <td>117 x 117</td> | |
| 6462 <td></td> | |
| 6463 <td>39</td> | |
| 6464 <td>173 x 173</td> | |
| 6465 </tr> | |
| 6466 <tr> | |
| 6467 <td>12</td> | |
| 6468 <td>65 x 65</td> | |
| 6469 <td></td> | |
| 6470 <td>26</td> | |
| 6471 <td>121 x 121</td> | |
| 6472 <td></td> | |
| 6473 <td>40</td> | |
| 6474 <td>177 x 177</td> | |
| 6475 </tr> | |
| 6476 <tr> | |
| 6477 <td>13</td> | |
| 6478 <td>69 x 69</td> | |
| 6479 <td></td> | |
| 6480 <td>27</td> | |
| 6481 <td>125 x 125</td> | |
| 6482 <td></td> | |
| 6483 <td></td> | |
| 6484 <td></td> | |
| 6485 </tr> | |
| 6486 <tr> | |
| 6487 <td>14</td> | |
| 6488 <td>73 x 73</td> | |
| 6489 <td></td> | |
| 6490 <td>28</td> | |
| 6491 <td>129 x 129</td> | |
| 6492 <td></td> | |
| 6493 <td></td> | |
| 6494 <td></td> | |
| 6495 </tr> | |
| 6496 </tbody> | |
| 6497 </table> | |
| 6498 </div> | |
| 6499 <p>The maximum capacity of a QR Code symbol (version 40) is 7089 numeric | |
| 6500 digits, 4296 alphanumeric characters or 2953 bytes of data. QR Code | |
| 6501 symbols can also be used to encode GS1 data. QR Code symbols can by | |
| 6502 default encode either characters in the Latin-1 set or Kanji, Katakana | |
| 6503 and ASCII characters which are members of the Shift JIS encoding scheme. | |
| 6504 In addition QR Code supports other character sets using the ECI | |
| 6505 mechanism. Input should usually be entered as UTF-8 with conversion to | |
| 6506 Latin-1 or Shift JIS being carried out by Zint. A separate symbology ID | |
| 6507 (<code>BARCODE_HIBC_QR</code>) can be used to encode Health Industry | |
| 6508 Barcode (HIBC) data.</p> | |
| 6509 <p>Non-ASCII data density may be maximized by using the | |
| 6510 <code>--fullmultibyte</code> switch (API | |
| 6511 <code>option_3 = ZINT_FULL_MULTIBYTE</code>), but check that your | |
| 6512 barcode reader supports this before using.</p> | |
| 6513 <p>QR Code has eight different masks designed to minimize unwanted | |
| 6514 patterns. The best mask to use is selected automatically by Zint but may | |
| 6515 be manually specified by using the <code>--mask</code> switch with | |
| 6516 values 0-7, or in the API by setting | |
| 6517 <code>option_3 = (N + 1) << 8</code> where N is 0-7. To use with | |
| 6518 <code>ZINT_FULL_MULTIBYTE</code> set</p> | |
| 6519 <div class="sourceCode" id="cb112"><pre | |
| 6520 class="sourceCode c"><code class="sourceCode c"><span id="cb112-1"><a href="#cb112-1" aria-hidden="true" tabindex="-1"></a>option_3 <span class="op">=</span> ZINT_FULL_MULTIBYTE <span class="op">|</span> <span class="op">(</span>N <span class="op">+</span> <span class="dv">1</span><span class="op">)</span> <span class="op"><<</span> <span class="dv">8</span></span></code></pre></div> | |
| 6521 <p>The <code>--fast</code> option (API | |
| 6522 <code>input_mode |= FAST_MODE</code>) may be used when leaving Zint to | |
| 6523 automatically select a mask to reduce the number of masks to try to four | |
| 6524 (0, 2, 4, 7).</p> | |
| 6525 <p>QR Code supports Structured Append of up to 16 symbols and a numeric | |
| 6526 ID (parity), which can be set by using the <code>--structapp</code> | |
| 6527 option (see <a href="#structured-append">4.17 Structured Append</a>) | |
| 6528 (API <code>structapp</code>). The parity ID ranges from 0 (default) to | |
| 6529 255, and for full compliance should be set to the value obtained by | |
| 6530 <code>XOR</code>-ing together each byte of the complete data forming the | |
| 6531 sequence. Currently this calculation must be done outside of Zint.</p> | |
| 6532 <h3 id="micro-qr-code-iso-18004">6.6.4 Micro QR Code (ISO 18004)</h3> | |
| 6533 <figure> | |
| 6534 <img src="images/microqr.svg" title="fig:" class="i2dbig" | |
| 6535 alt="zint -b MICROQR -d "01234567"" /> | |
| 6536 <figcaption | |
| 6537 aria-hidden="true"><code>zint -b MICROQR -d "01234567"</code></figcaption> | |
| 6538 </figure> | |
| 6539 <p>A miniature version of the QR Code symbol for short messages, Micro | |
| 6540 QR Code symbols can encode either Latin-1 characters or Shift JIS | |
| 6541 characters. Input should be entered as a UTF-8 stream with conversion to | |
| 6542 Latin-1 or Shift JIS being carried out automatically by Zint. A | |
| 6543 preferred symbol size can be selected by using the <code>--vers</code> | |
| 6544 option (API <code>option_2</code>), as shown in the table below. Note | |
| 6545 that versions M1 and M2 have restrictions on what characters can be | |
| 6546 encoded.</p> | |
| 6547 <div id="tbl:micrqr_sizes" class="tablenos"> | |
| 6548 <table id="tbl:micrqr_sizes" style="width:93%;" | |
| 6549 data-tag=": Micro QR Code Sizes"> | |
| 6550 <caption><span>Table : Micro QR Code Sizes</span> </caption> | |
| 6551 <colgroup> | |
| 6552 <col style="width: 11%" /> | |
| 6553 <col style="width: 13%" /> | |
| 6554 <col style="width: 19%" /> | |
| 6555 <col style="width: 48%" /> | |
| 6556 </colgroup> | |
| 6557 <thead> | |
| 6558 <tr> | |
| 6559 <th>Input</th> | |
| 6560 <th>Version</th> | |
| 6561 <th>Symbol Size</th> | |
| 6562 <th style="text-align: left;">Allowed Characters</th> | |
| 6563 </tr> | |
| 6564 </thead> | |
| 6565 <tbody> | |
| 6566 <tr> | |
| 6567 <td>1</td> | |
| 6568 <td>M1</td> | |
| 6569 <td>11 x 11</td> | |
| 6570 <td style="text-align: left;">Numeric only</td> | |
| 6571 </tr> | |
| 6572 <tr> | |
| 6573 <td>2</td> | |
| 6574 <td>M2</td> | |
| 6575 <td>13 x 13</td> | |
| 6576 <td style="text-align: left;">Numeric, uppercase letters, space, and the | |
| 6577 characters <code>"$%*+-./:"</code></td> | |
| 6578 </tr> | |
| 6579 <tr> | |
| 6580 <td>3</td> | |
| 6581 <td>M3</td> | |
| 6582 <td>15 x 15</td> | |
| 6583 <td style="text-align: left;">Latin-1 and Shift JIS</td> | |
| 6584 </tr> | |
| 6585 <tr> | |
| 6586 <td>4</td> | |
| 6587 <td>M4</td> | |
| 6588 <td>17 x 17</td> | |
| 6589 <td style="text-align: left;">Latin-1 and Shift JIS</td> | |
| 6590 </tr> | |
| 6591 </tbody> | |
| 6592 </table> | |
| 6593 </div> | |
| 6594 <p>Version M4 can encode up to 35 digits, 21 alphanumerics, 15 bytes or | |
| 6595 9 Kanji characters.</p> | |
| 6596 <p>Except for version M1, which is always ECC level L, the amount of ECC | |
| 6597 codewords can be adjusted using the <code>--secure</code> option (API | |
| 6598 <code>option_1</code>); however ECC level H is not available for any | |
| 6599 version, and ECC level Q is only available for version M4:</p> | |
| 6600 <div id="tbl:micrqr_eccs" class="tablenos"> | |
| 6601 <table id="tbl:micrqr_eccs" style="width:99%;" | |
| 6602 data-tag=": Micro QR ECC Levels"> | |
| 6603 <caption><span>Table : Micro QR ECC Levels</span> </caption> | |
| 6604 <colgroup> | |
| 6605 <col style="width: 12%" /> | |
| 6606 <col style="width: 12%" /> | |
| 6607 <col style="width: 33%" /> | |
| 6608 <col style="width: 19%" /> | |
| 6609 <col style="width: 20%" /> | |
| 6610 </colgroup> | |
| 6611 <thead> | |
| 6612 <tr> | |
| 6613 <th>Input</th> | |
| 6614 <th style="text-align: left;">ECC Level</th> | |
| 6615 <th style="text-align: left;">Error Correction Capacity</th> | |
| 6616 <th style="text-align: left;">Recovery Capacity</th> | |
| 6617 <th style="text-align: left;">Available for Versions</th> | |
| 6618 </tr> | |
| 6619 </thead> | |
| 6620 <tbody> | |
| 6621 <tr> | |
| 6622 <td>1</td> | |
| 6623 <td style="text-align: left;">L</td> | |
| 6624 <td style="text-align: left;">Approx 20% of symbol</td> | |
| 6625 <td style="text-align: left;">Approx 7%</td> | |
| 6626 <td style="text-align: left;">M1, M2, M3, M4</td> | |
| 6627 </tr> | |
| 6628 <tr> | |
| 6629 <td>2</td> | |
| 6630 <td style="text-align: left;">M</td> | |
| 6631 <td style="text-align: left;">Approx 37% of symbol</td> | |
| 6632 <td style="text-align: left;">Approx 15%</td> | |
| 6633 <td style="text-align: left;">M2, M3, M4</td> | |
| 6634 </tr> | |
| 6635 <tr> | |
| 6636 <td>3</td> | |
| 6637 <td style="text-align: left;">Q</td> | |
| 6638 <td style="text-align: left;">Approx 55% of symbol</td> | |
| 6639 <td style="text-align: left;">Approx 25%</td> | |
| 6640 <td style="text-align: left;">M4</td> | |
| 6641 </tr> | |
| 6642 </tbody> | |
| 6643 </table> | |
| 6644 </div> | |
| 6645 <p>The defaults for symbol size and ECC level depend on the input and | |
| 6646 whether either of them is specified.</p> | |
| 6647 <p>For barcode readers that support it, non-ASCII data density may be | |
| 6648 maximized by using the <code>--fullmultibyte</code> switch (API | |
| 6649 <code>option_3 = ZINT_FULL_MULTIBYTE</code>).</p> | |
| 6650 <p>Micro QR Code has four different masks designed to minimize unwanted | |
| 6651 patterns. The best mask to use is selected automatically by Zint but may | |
| 6652 be manually specified by using the <code>--mask</code> switch with | |
| 6653 values 0-3, or in the API by setting | |
| 6654 <code>option_3 = (N + 1) << 8</code> where N is 0-3. To use with | |
| 6655 <code>ZINT_FULL_MULTIBYTE</code> set</p> | |
| 6656 <div class="sourceCode" id="cb113"><pre | |
| 6657 class="sourceCode c"><code class="sourceCode c"><span id="cb113-1"><a href="#cb113-1" aria-hidden="true" tabindex="-1"></a>option_3 <span class="op">=</span> ZINT_FULL_MULTIBYTE <span class="op">|</span> <span class="op">(</span>N <span class="op">+</span> <span class="dv">1</span><span class="op">)</span> <span class="op"><<</span> <span class="dv">8</span></span></code></pre></div> | |
| 6658 <h3 id="rectangular-micro-qr-code-rmqr-iso-23941">6.6.5 Rectangular | |
| 6659 Micro QR Code (rMQR) (ISO 23941)</h3> | |
| 6660 <figure> | |
| 6661 <img src="images/rmqr.svg" title="fig:" class="i2dbig" | |
| 6662 alt="zint -b RMQR -d "0123456"" /> | |
| 6663 <figcaption | |
| 6664 aria-hidden="true"><code>zint -b RMQR -d "0123456"</code></figcaption> | |
| 6665 </figure> | |
| 6666 <p>A rectangular version of QR Code, rMQR supports encoding of GS1 data, | |
| 6667 and either Latin-1 characters or Shift JIS characters, and other | |
| 6668 encodings using the ECI mechanism. As with other symbologies data should | |
| 6669 be entered as UTF-8 with conversion being handled by Zint. The amount of | |
| 6670 ECC codewords can be adjusted using the <code>--secure</code> option | |
| 6671 (API <code>option_1</code>), however only ECC levels M and H are valid | |
| 6672 for this type of symbol.</p> | |
| 6673 <div id="tbl:rmqr_eccs" class="tablenos"> | |
| 6674 <table id="tbl:rmqr_eccs" data-tag=": rMQR ECC Levels"> | |
| 6675 <caption><span>Table : rMQR ECC Levels</span> </caption> | |
| 6676 <thead> | |
| 6677 <tr> | |
| 6678 <th>Input</th> | |
| 6679 <th>ECC Level</th> | |
| 6680 <th>Error Correction Capacity</th> | |
| 6681 <th>Recovery Capacity</th> | |
| 6682 </tr> | |
| 6683 </thead> | |
| 6684 <tbody> | |
| 6685 <tr> | |
| 6686 <td>2</td> | |
| 6687 <td>M</td> | |
| 6688 <td>Approx 37% of symbol</td> | |
| 6689 <td>Approx 15%</td> | |
| 6690 </tr> | |
| 6691 <tr> | |
| 6692 <td>4</td> | |
| 6693 <td>H</td> | |
| 6694 <td>Approx 65% of symbol</td> | |
| 6695 <td>Approx 30%</td> | |
| 6696 </tr> | |
| 6697 </tbody> | |
| 6698 </table> | |
| 6699 </div> | |
| 6700 <p>The preferred symbol sizes can be selected using the | |
| 6701 <code>--vers</code> option (API <code>option_2</code>) as shown in the | |
| 6702 table below. Input values between 33 and 38 fix the height of the symbol | |
| 6703 while allowing Zint to determine the minimum symbol width.</p> | |
| 6704 <div id="tbl:rmqr_sizes" class="tablenos"> | |
| 6705 <table id="tbl:rmqr_sizes" data-tag=": rMQR Sizes"> | |
| 6706 <caption><span>Table : rMQR Sizes</span> </caption> | |
| 6707 <colgroup> | |
| 6708 <col style="width: 9%" /> | |
| 6709 <col style="width: 12%" /> | |
| 6710 <col style="width: 25%" /> | |
| 6711 <col style="width: 4%" /> | |
| 6712 <col style="width: 9%" /> | |
| 6713 <col style="width: 12%" /> | |
| 6714 <col style="width: 28%" /> | |
| 6715 </colgroup> | |
| 6716 <thead> | |
| 6717 <tr> | |
| 6718 <th>Input</th> | |
| 6719 <th>Version</th> | |
| 6720 <th>Symbol Size (HxW)</th> | |
| 6721 <th></th> | |
| 6722 <th>Input</th> | |
| 6723 <th>Version</th> | |
| 6724 <th style="text-align: left;">Symbol Size (HxW)</th> | |
| 6725 </tr> | |
| 6726 </thead> | |
| 6727 <tbody> | |
| 6728 <tr> | |
| 6729 <td>1</td> | |
| 6730 <td>R7x43</td> | |
| 6731 <td>7 x 43</td> | |
| 6732 <td></td> | |
| 6733 <td>20</td> | |
| 6734 <td>R13x77</td> | |
| 6735 <td style="text-align: left;">13 x 77</td> | |
| 6736 </tr> | |
| 6737 <tr> | |
| 6738 <td>2</td> | |
| 6739 <td>R7x59</td> | |
| 6740 <td>7 x 59</td> | |
| 6741 <td></td> | |
| 6742 <td>21</td> | |
| 6743 <td>R13x99</td> | |
| 6744 <td style="text-align: left;">13 x 99</td> | |
| 6745 </tr> | |
| 6746 <tr> | |
| 6747 <td>3</td> | |
| 6748 <td>R7x77</td> | |
| 6749 <td>7 x 77</td> | |
| 6750 <td></td> | |
| 6751 <td>22</td> | |
| 6752 <td>R13x139</td> | |
| 6753 <td style="text-align: left;">13 x 139</td> | |
| 6754 </tr> | |
| 6755 <tr> | |
| 6756 <td>4</td> | |
| 6757 <td>R7x99</td> | |
| 6758 <td>7 x 99</td> | |
| 6759 <td></td> | |
| 6760 <td>23</td> | |
| 6761 <td>R15x43</td> | |
| 6762 <td style="text-align: left;">15 x 43</td> | |
| 6763 </tr> | |
| 6764 <tr> | |
| 6765 <td>5</td> | |
| 6766 <td>R7x139</td> | |
| 6767 <td>7 x 139</td> | |
| 6768 <td></td> | |
| 6769 <td>24</td> | |
| 6770 <td>R15x59</td> | |
| 6771 <td style="text-align: left;">15 x 59</td> | |
| 6772 </tr> | |
| 6773 <tr> | |
| 6774 <td>6</td> | |
| 6775 <td>R9x43</td> | |
| 6776 <td>9 x 43</td> | |
| 6777 <td></td> | |
| 6778 <td>25</td> | |
| 6779 <td>R15x77</td> | |
| 6780 <td style="text-align: left;">15 x 77</td> | |
| 6781 </tr> | |
| 6782 <tr> | |
| 6783 <td>7</td> | |
| 6784 <td>R9x59</td> | |
| 6785 <td>9 x 59</td> | |
| 6786 <td></td> | |
| 6787 <td>26</td> | |
| 6788 <td>R15x99</td> | |
| 6789 <td style="text-align: left;">15 x 99</td> | |
| 6790 </tr> | |
| 6791 <tr> | |
| 6792 <td>8</td> | |
| 6793 <td>R9x77</td> | |
| 6794 <td>9 x 77</td> | |
| 6795 <td></td> | |
| 6796 <td>27</td> | |
| 6797 <td>R15x139</td> | |
| 6798 <td style="text-align: left;">15 x 139</td> | |
| 6799 </tr> | |
| 6800 <tr> | |
| 6801 <td>9</td> | |
| 6802 <td>R9x99</td> | |
| 6803 <td>9 x 99</td> | |
| 6804 <td></td> | |
| 6805 <td>28</td> | |
| 6806 <td>R17x43</td> | |
| 6807 <td style="text-align: left;">17 x 43</td> | |
| 6808 </tr> | |
| 6809 <tr> | |
| 6810 <td>10</td> | |
| 6811 <td>R9x139</td> | |
| 6812 <td>9 x 139</td> | |
| 6813 <td></td> | |
| 6814 <td>29</td> | |
| 6815 <td>R17x59</td> | |
| 6816 <td style="text-align: left;">17 x 59</td> | |
| 6817 </tr> | |
| 6818 <tr> | |
| 6819 <td>11</td> | |
| 6820 <td>R11x27</td> | |
| 6821 <td>11 x 27</td> | |
| 6822 <td></td> | |
| 6823 <td>30</td> | |
| 6824 <td>R17x77</td> | |
| 6825 <td style="text-align: left;">17 x 77</td> | |
| 6826 </tr> | |
| 6827 <tr> | |
| 6828 <td>12</td> | |
| 6829 <td>R11x43</td> | |
| 6830 <td>11 x 43</td> | |
| 6831 <td></td> | |
| 6832 <td>31</td> | |
| 6833 <td>R17x99</td> | |
| 6834 <td style="text-align: left;">17 x 99</td> | |
| 6835 </tr> | |
| 6836 <tr> | |
| 6837 <td>13</td> | |
| 6838 <td>R11x59</td> | |
| 6839 <td>11 x 59</td> | |
| 6840 <td></td> | |
| 6841 <td>32</td> | |
| 6842 <td>R17x139</td> | |
| 6843 <td style="text-align: left;">17 x 139</td> | |
| 6844 </tr> | |
| 6845 <tr> | |
| 6846 <td>14</td> | |
| 6847 <td>R11x77</td> | |
| 6848 <td>11 x 77</td> | |
| 6849 <td></td> | |
| 6850 <td>33</td> | |
| 6851 <td>R7xW</td> | |
| 6852 <td style="text-align: left;">7 x automatic width</td> | |
| 6853 </tr> | |
| 6854 <tr> | |
| 6855 <td>15</td> | |
| 6856 <td>R11x99</td> | |
| 6857 <td>11 x 99</td> | |
| 6858 <td></td> | |
| 6859 <td>34</td> | |
| 6860 <td>R9xW</td> | |
| 6861 <td style="text-align: left;">9 x automatic width</td> | |
| 6862 </tr> | |
| 6863 <tr> | |
| 6864 <td>16</td> | |
| 6865 <td>R11x139</td> | |
| 6866 <td>11 x 139</td> | |
| 6867 <td></td> | |
| 6868 <td>35</td> | |
| 6869 <td>R11xW</td> | |
| 6870 <td style="text-align: left;">11 x automatic width</td> | |
| 6871 </tr> | |
| 6872 <tr> | |
| 6873 <td>17</td> | |
| 6874 <td>R13x27</td> | |
| 6875 <td>13 x 27</td> | |
| 6876 <td></td> | |
| 6877 <td>36</td> | |
| 6878 <td>R13xW</td> | |
| 6879 <td style="text-align: left;">13 x automatic width</td> | |
| 6880 </tr> | |
| 6881 <tr> | |
| 6882 <td>18</td> | |
| 6883 <td>R13x43</td> | |
| 6884 <td>13 x 43</td> | |
| 6885 <td></td> | |
| 6886 <td>37</td> | |
| 6887 <td>R15xW</td> | |
| 6888 <td style="text-align: left;">15 x automatic width</td> | |
| 6889 </tr> | |
| 6890 <tr> | |
| 6891 <td>19</td> | |
| 6892 <td>R13x59</td> | |
| 6893 <td>13 x 59</td> | |
| 6894 <td></td> | |
| 6895 <td>38</td> | |
| 6896 <td>R17xW</td> | |
| 6897 <td style="text-align: left;">17 x automatic width</td> | |
| 6898 </tr> | |
| 6899 </tbody> | |
| 6900 </table> | |
| 6901 </div> | |
| 6902 <p>The largest version R17x139 (32) can encode up to 361 digits, 219 | |
| 6903 alphanumerics, 150 bytes, or 92 Kanji characters.</p> | |
| 6904 <p>For barcode readers that support it, non-ASCII data density may be | |
| 6905 maximized by using the <code>--fullmultibyte</code> switch or in the API | |
| 6906 by setting <code>option_3 = ZINT_FULL_MULTIBYTE</code>.</p> | |
| 6907 <h3 id="upnqr-univerzalnega-plačilnega-naloga-qr">6.6.6 UPNQR | |
| 6908 (Univerzalnega Plačilnega Naloga QR)</h3> | |
| 6909 <figure> | |
| 6910 <img src="images/upnqr.svg" title="fig:" class="i2d" | |
| 6911 alt="zint -b UPNQR -i upn_utf8.txt --quietzones" /> | |
| 6912 <figcaption | |
| 6913 aria-hidden="true"><code>zint -b UPNQR -i upn_utf8.txt --quietzones</code></figcaption> | |
| 6914 </figure> | |
| 6915 <p>A variation of QR Code used by Združenje Bank Slovenije (Bank | |
| 6916 Association of Slovenia). The size, error correction level and ECI are | |
| 6917 set by Zint and do not need to be specified. UPNQR is unusual in that it | |
| 6918 uses Latin-2 (ISO/IEC 8859-2 plus ASCII) formatted data. Zint will | |
| 6919 accept UTF-8 data and convert it to Latin-2, or if your data is already | |
| 6920 Latin-2 formatted use the <code>--binary</code> switch (API | |
| 6921 <code>input_mode = DATA_MODE</code>).</p> | |
| 6922 <p>The following example creates a symbol from data saved as a Latin-2 | |
| 6923 file:</p> | |
| 6924 <div class="sourceCode" id="cb114"><pre | |
| 6925 class="sourceCode bash"><code class="sourceCode bash"><span id="cb114-1"><a href="#cb114-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-o</span> upnqr.png <span class="at">-b</span> 143 <span class="at">--scale</span><span class="op">=</span>3 <span class="at">--binary</span> <span class="at">-i</span> upn.txt</span></code></pre></div> | |
| 6926 <p>A mask may be manually specified or the <code>--fast</code> option | |
| 6927 used as with QRCODE.</p> | |
| 6928 <h3 id="maxicode-iso-16023">6.6.7 MaxiCode (ISO 16023)</h3> | |
| 6929 <figure> | |
| 6930 <img src="images/maxicode.svg" title="fig:" class="i2d" | |
| 6931 alt="zint -b MAXICODE -d "1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN ST\GNY\GNY\R\E" --esc --primary="152382802000000" --scmvv=96" /> | |
| 6932 <figcaption | |
| 6933 aria-hidden="true"><code>zint -b MAXICODE -d "1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN ST\GNY\GNY\R\E" --esc --primary="152382802000000" --scmvv=96</code></figcaption> | |
| 6934 </figure> | |
| 6935 <p>Developed by UPS the MaxiCode symbology employs a grid of hexagons | |
| 6936 surrounding a bullseye finder pattern. This symbology is designed for | |
| 6937 the identification of parcels. MaxiCode symbols can be encoded in one of | |
| 6938 five modes. In modes 2 and 3 MaxiCode symbols are composed of two parts | |
| 6939 named the primary and secondary messages. The primary message consists | |
| 6940 of a Structured Carrier Message which includes various data about the | |
| 6941 package being sent and the secondary message usually consists of address | |
| 6942 data in a data structure. The format of the primary message required by | |
| 6943 Zint is given in the following table.</p> | |
| 6944 <div id="tbl:maxicode_scm" class="tablenos"> | |
| 6945 <table id="tbl:maxicode_scm" | |
| 6946 data-tag=": MaxiCode Structured Carrier Message Format"> | |
| 6947 <caption><span>Table : MaxiCode Structured Carrier Message | |
| 6948 Format:</span> </caption> | |
| 6949 <thead> | |
| 6950 <tr> | |
| 6951 <th>Characters</th> | |
| 6952 <th style="text-align: left;">Meaning</th> | |
| 6953 </tr> | |
| 6954 </thead> | |
| 6955 <tbody> | |
| 6956 <tr> | |
| 6957 <td>1 - 9</td> | |
| 6958 <td style="text-align: left;">Postcode data which can consist of up to 9 | |
| 6959 digits (for mode 2)</td> | |
| 6960 </tr> | |
| 6961 <tr> | |
| 6962 <td></td> | |
| 6963 <td style="text-align: left;">or up to 6 alphanumeric characters (for | |
| 6964 mode 3). Remaining</td> | |
| 6965 </tr> | |
| 6966 <tr> | |
| 6967 <td></td> | |
| 6968 <td style="text-align: left;">unused characters for mode 3 can be filled | |
| 6969 with the SPACE</td> | |
| 6970 </tr> | |
| 6971 <tr> | |
| 6972 <td></td> | |
| 6973 <td style="text-align: left;">character (ASCII 32) or omitted.</td> | |
| 6974 </tr> | |
| 6975 <tr> | |
| 6976 <td></td> | |
| 6977 <td style="text-align: left;">(adjust the following character positions | |
| 6978 according to postcode</td> | |
| 6979 </tr> | |
| 6980 <tr> | |
| 6981 <td></td> | |
| 6982 <td style="text-align: left;">length)</td> | |
| 6983 </tr> | |
| 6984 <tr> | |
| 6985 <td>10 - 12</td> | |
| 6986 <td style="text-align: left;">Three-digit country code according to ISO | |
| 6987 3166-1.</td> | |
| 6988 </tr> | |
| 6989 <tr> | |
| 6990 <td>13 - 15</td> | |
| 6991 <td style="text-align: left;">Three-digit service code. This depends on | |
| 6992 your parcel courier.</td> | |
| 6993 </tr> | |
| 6994 </tbody> | |
| 6995 </table> | |
| 6996 </div> | |
| 6997 <p>The primary message can be set at the command prompt using the | |
| 6998 <code>--primary</code> switch (API <code>primary</code>). The secondary | |
| 6999 message uses the normal data entry method. For example:</p> | |
| 7000 <div class="sourceCode" id="cb115"><pre | |
| 7001 class="sourceCode bash"><code class="sourceCode bash"><span id="cb115-1"><a href="#cb115-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-o</span> test.eps <span class="at">-b</span> 57 <span class="at">--primary</span><span class="op">=</span><span class="st">"999999999840012"</span> <span class="dt">\</span></span> | |
| 7002 <span id="cb115-2"><a href="#cb115-2" aria-hidden="true" tabindex="-1"></a> <span class="at">-d</span> <span class="st">"Secondary Message Here"</span></span></code></pre></div> | |
| 7003 <p>When using the API the primary message must be placed in the | |
| 7004 <code>primary</code> string. The secondary is entered in the same way as | |
| 7005 described in <a href="#encoding-and-saving-to-file">5.2 Encoding and | |
| 7006 Saving to File</a>. When either of these modes is selected Zint will | |
| 7007 analyse the primary message and select either mode 2 or mode 3 as | |
| 7008 appropriate.</p> | |
| 7009 <p>As a convenience the secondary message for modes 2 and 3 can be set | |
| 7010 to be prefixed by the ISO/IEC 15434 Format <code>"01"</code> | |
| 7011 (transportation) sequence <code>"[)>\R01\Gvv"</code>, where | |
| 7012 <code>vv</code> is a 2-digit version, by using the <code>--scmvv</code> | |
| 7013 switch (API <code>option_2 = vv + 1</code>). For example to use the | |
| 7014 common version <code>"96"</code> (ASC MH10/SC 8):</p> | |
| 7015 <div class="sourceCode" id="cb116"><pre | |
| 7016 class="sourceCode bash"><code class="sourceCode bash"><span id="cb116-1"><a href="#cb116-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> 57 <span class="at">--primary</span><span class="op">=</span><span class="st">"152382802840001"</span> <span class="at">--scmvv</span><span class="op">=</span>96 <span class="at">--esc</span> <span class="at">-d</span> <span class="dt">\</span></span> | |
| 7017 <span id="cb116-2"><a href="#cb116-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN ST\GNY\GNY\R\E"</span></span></code></pre></div> | |
| 7018 <p>will prefix <code>"[)>\R01\G96"</code> to the secondary message. | |
| 7019 (<code>\R</code>, <code>\G</code> and <code>\E</code> are the escape | |
| 7020 sequences for Record Separator, Group Separator and End of Transmission | |
| 7021 respectively - see Table <a href="#tbl:escape_sequences">: Escape | |
| 7022 Sequences</a>.)</p> | |
| 7023 <p>Modes 4 to 6 can be accessed using the <code>--mode</code> switch | |
| 7024 (API <code>option_1</code>). Modes 4 to 6 do not have a primary message. | |
| 7025 For example:</p> | |
| 7026 <div class="sourceCode" id="cb117"><pre | |
| 7027 class="sourceCode bash"><code class="sourceCode bash"><span id="cb117-1"><a href="#cb117-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-o</span> test.eps <span class="at">-b</span> 57 <span class="at">--mode</span><span class="op">=</span>4 <span class="at">-d</span> <span class="st">"A MaxiCode Message in Mode 4"</span></span></code></pre></div> | |
| 7028 <p>Mode 6 is reserved for the maintenance of scanner hardware and should | |
| 7029 not be used to encode user data.</p> | |
| 7030 <p>This symbology uses Latin-1 character encoding by default but also | |
| 7031 supports the ECI encoding mechanism. The maximum length of text which | |
| 7032 can be placed in a MaxiCode symbol depends on the type of characters | |
| 7033 used in the text.</p> | |
| 7034 <p>Example maximum data lengths are given in the table below:</p> | |
| 7035 <div id="tbl:maxicode_data_length_maxima" class="tablenos"> | |
| 7036 <table id="tbl:maxicode_data_length_maxima" style="width:100%;" | |
| 7037 data-tag=": MaxiCode Data Length Maxima"> | |
| 7038 <caption><span>Table : MaxiCode Data Length Maxima</span> </caption> | |
| 7039 <colgroup> | |
| 7040 <col style="width: 9%" /> | |
| 7041 <col style="width: 30%" /> | |
| 7042 <col style="width: 30%" /> | |
| 7043 <col style="width: 30%" /> | |
| 7044 </colgroup> | |
| 7045 <thead> | |
| 7046 <tr> | |
| 7047 <th>Mode</th> | |
| 7048 <th>Maximum Data Length for Capital Letters</th> | |
| 7049 <th style="text-align: left;">Maximum Data Length for Numeric | |
| 7050 Digits</th> | |
| 7051 <th style="text-align: left;">Number of Error Correction Codewords</th> | |
| 7052 </tr> | |
| 7053 </thead> | |
| 7054 <tbody> | |
| 7055 <tr> | |
| 7056 <td>2<code>*</code></td> | |
| 7057 <td>84</td> | |
| 7058 <td style="text-align: left;">126</td> | |
| 7059 <td style="text-align: left;">50</td> | |
| 7060 </tr> | |
| 7061 <tr> | |
| 7062 <td>3<code>*</code></td> | |
| 7063 <td>84</td> | |
| 7064 <td style="text-align: left;">126</td> | |
| 7065 <td style="text-align: left;">50</td> | |
| 7066 </tr> | |
| 7067 <tr> | |
| 7068 <td>4</td> | |
| 7069 <td>93</td> | |
| 7070 <td style="text-align: left;">138</td> | |
| 7071 <td style="text-align: left;">50</td> | |
| 7072 </tr> | |
| 7073 <tr> | |
| 7074 <td>5</td> | |
| 7075 <td>77</td> | |
| 7076 <td style="text-align: left;">113</td> | |
| 7077 <td style="text-align: left;">66</td> | |
| 7078 </tr> | |
| 7079 <tr> | |
| 7080 <td>6</td> | |
| 7081 <td>93</td> | |
| 7082 <td style="text-align: left;">138</td> | |
| 7083 <td style="text-align: left;">50</td> | |
| 7084 </tr> | |
| 7085 </tbody> | |
| 7086 </table> | |
| 7087 </div> | |
| 7088 <p><code>*</code> - secondary only</p> | |
| 7089 <p>MaxiCode supports Structured Append of up to 8 symbols, which can be | |
| 7090 set by using the <code>--structapp</code> option (see <a | |
| 7091 href="#structured-append">4.17 Structured Append</a>) (API | |
| 7092 <code>structapp</code>). It does not support specifying an ID.</p> | |
| 7093 <p>MaxiCode uses a different scaling than other symbols for raster | |
| 7094 output, see <a href="#maxicode-raster-scaling">4.9.3 MaxiCode Raster | |
| 7095 Scaling</a>, and also for EMF vector output, when the scale is | |
| 7096 multiplied by 20 instead of 2.</p> | |
| 7097 <h3 id="aztec-code-iso-24778">6.6.8 Aztec Code (ISO 24778)</h3> | |
| 7098 <figure> | |
| 7099 <img src="images/aztec.svg" title="fig:" class="i2d" | |
| 7100 alt="zint -b AZTEC -d "123456789012"" /> | |
| 7101 <figcaption | |
| 7102 aria-hidden="true"><code>zint -b AZTEC -d "123456789012"</code></figcaption> | |
| 7103 </figure> | |
| 7104 <p>Invented by Andrew Longacre at Welch Allyn Inc in 1995 the Aztec Code | |
| 7105 symbol is a matrix symbol with a distinctive bullseye finder pattern. | |
| 7106 Zint can generate Compact Aztec Code (sometimes called Small Aztec Code) | |
| 7107 as well as ‘full-range’ Aztec Code symbols and by default will | |
| 7108 automatically select symbol type and size dependent on the length of the | |
| 7109 data to be encoded. Error correction codewords will normally be | |
| 7110 generated to fill at least 23% of the symbol. Two options are available | |
| 7111 to change this behaviour:</p> | |
| 7112 <p>The size of the symbol can be specified using the <code>--vers</code> | |
| 7113 option (API <code>option_2</code>) to a value between 1 and 36 according | |
| 7114 to the following table. The symbols marked with an asterisk | |
| 7115 (<code>*</code>) in the table below are ‘compact’ symbols, meaning they | |
| 7116 have a smaller bullseye pattern at the centre of the symbol.</p> | |
| 7117 <div id="tbl:aztec_sizes" class="tablenos"> | |
| 7118 <table id="tbl:aztec_sizes" data-tag=": Aztec Code Sizes"> | |
| 7119 <caption><span>Table : Aztec Code Sizes</span> </caption> | |
| 7120 <thead> | |
| 7121 <tr> | |
| 7122 <th>Input</th> | |
| 7123 <th>Symbol Size</th> | |
| 7124 <th></th> | |
| 7125 <th>Input</th> | |
| 7126 <th>Symbol Size</th> | |
| 7127 <th></th> | |
| 7128 <th>Input</th> | |
| 7129 <th>Symbol Size</th> | |
| 7130 </tr> | |
| 7131 </thead> | |
| 7132 <tbody> | |
| 7133 <tr> | |
| 7134 <td>1</td> | |
| 7135 <td>15 x 15<code>*</code></td> | |
| 7136 <td></td> | |
| 7137 <td>13</td> | |
| 7138 <td>53 x 53</td> | |
| 7139 <td></td> | |
| 7140 <td>25</td> | |
| 7141 <td>105 x 105</td> | |
| 7142 </tr> | |
| 7143 <tr> | |
| 7144 <td>2</td> | |
| 7145 <td>19 x 19<code>*</code></td> | |
| 7146 <td></td> | |
| 7147 <td>14</td> | |
| 7148 <td>57 x 57</td> | |
| 7149 <td></td> | |
| 7150 <td>26</td> | |
| 7151 <td>109 x 109</td> | |
| 7152 </tr> | |
| 7153 <tr> | |
| 7154 <td>3</td> | |
| 7155 <td>23 x 23<code>*</code></td> | |
| 7156 <td></td> | |
| 7157 <td>15</td> | |
| 7158 <td>61 x 61</td> | |
| 7159 <td></td> | |
| 7160 <td>27</td> | |
| 7161 <td>113 x 113</td> | |
| 7162 </tr> | |
| 7163 <tr> | |
| 7164 <td>4</td> | |
| 7165 <td>27 x 27<code>*</code></td> | |
| 7166 <td></td> | |
| 7167 <td>16</td> | |
| 7168 <td>67 x 67</td> | |
| 7169 <td></td> | |
| 7170 <td>28</td> | |
| 7171 <td>117 x 117</td> | |
| 7172 </tr> | |
| 7173 <tr> | |
| 7174 <td>5</td> | |
| 7175 <td>19 x 19</td> | |
| 7176 <td></td> | |
| 7177 <td>17</td> | |
| 7178 <td>71 x 71</td> | |
| 7179 <td></td> | |
| 7180 <td>29</td> | |
| 7181 <td>121 x 121</td> | |
| 7182 </tr> | |
| 7183 <tr> | |
| 7184 <td>6</td> | |
| 7185 <td>23 x 23</td> | |
| 7186 <td></td> | |
| 7187 <td>18</td> | |
| 7188 <td>75 x 75</td> | |
| 7189 <td></td> | |
| 7190 <td>30</td> | |
| 7191 <td>125 x 125</td> | |
| 7192 </tr> | |
| 7193 <tr> | |
| 7194 <td>7</td> | |
| 7195 <td>27 x 27</td> | |
| 7196 <td></td> | |
| 7197 <td>19</td> | |
| 7198 <td>79 x 79</td> | |
| 7199 <td></td> | |
| 7200 <td>31</td> | |
| 7201 <td>131 x 131</td> | |
| 7202 </tr> | |
| 7203 <tr> | |
| 7204 <td>8</td> | |
| 7205 <td>31 x 31</td> | |
| 7206 <td></td> | |
| 7207 <td>20</td> | |
| 7208 <td>83 x 83</td> | |
| 7209 <td></td> | |
| 7210 <td>32</td> | |
| 7211 <td>135 x 135</td> | |
| 7212 </tr> | |
| 7213 <tr> | |
| 7214 <td>9</td> | |
| 7215 <td>37 x 37</td> | |
| 7216 <td></td> | |
| 7217 <td>21</td> | |
| 7218 <td>87 x 87</td> | |
| 7219 <td></td> | |
| 7220 <td>33</td> | |
| 7221 <td>139 x 139</td> | |
| 7222 </tr> | |
| 7223 <tr> | |
| 7224 <td>10</td> | |
| 7225 <td>41 x 41</td> | |
| 7226 <td></td> | |
| 7227 <td>22</td> | |
| 7228 <td>91 x 91</td> | |
| 7229 <td></td> | |
| 7230 <td>34</td> | |
| 7231 <td>143 x 143</td> | |
| 7232 </tr> | |
| 7233 <tr> | |
| 7234 <td>11</td> | |
| 7235 <td>45 x 45</td> | |
| 7236 <td></td> | |
| 7237 <td>23</td> | |
| 7238 <td>95 x 95</td> | |
| 7239 <td></td> | |
| 7240 <td>35</td> | |
| 7241 <td>147 x 147</td> | |
| 7242 </tr> | |
| 7243 <tr> | |
| 7244 <td>12</td> | |
| 7245 <td>49 x 49</td> | |
| 7246 <td></td> | |
| 7247 <td>24</td> | |
| 7248 <td>101 x 101</td> | |
| 7249 <td></td> | |
| 7250 <td>36</td> | |
| 7251 <td>151 x 151</td> | |
| 7252 </tr> | |
| 7253 </tbody> | |
| 7254 </table> | |
| 7255 </div> | |
| 7256 <p>Note that in symbols which have a specified size the amount of error | |
| 7257 correction is dependent on the length of the data input and Zint will | |
| 7258 allow error correction capacities as low as 3 codewords.</p> | |
| 7259 <p>Alternatively the amount of error correction data can be specified by | |
| 7260 setting the <code>--secure</code> option (API <code>option_1</code>) to | |
| 7261 a value from the following table.</p> | |
| 7262 <div id="tbl:aztec_eccs" class="tablenos"> | |
| 7263 <table id="tbl:aztec_eccs" | |
| 7264 data-tag=": Aztec Code Error Correction Modes"> | |
| 7265 <caption><span>Table : Aztec Code Error Correction Modes</span> | |
| 7266 </caption> | |
| 7267 <thead> | |
| 7268 <tr> | |
| 7269 <th>Mode</th> | |
| 7270 <th>Error Correction Capacity</th> | |
| 7271 </tr> | |
| 7272 </thead> | |
| 7273 <tbody> | |
| 7274 <tr> | |
| 7275 <td>1</td> | |
| 7276 <td>>10% + 3 codewords</td> | |
| 7277 </tr> | |
| 7278 <tr> | |
| 7279 <td>2</td> | |
| 7280 <td>>23% + 3 codewords</td> | |
| 7281 </tr> | |
| 7282 <tr> | |
| 7283 <td>3</td> | |
| 7284 <td>>36% + 3 codewords</td> | |
| 7285 </tr> | |
| 7286 <tr> | |
| 7287 <td>4</td> | |
| 7288 <td>>50% + 3 codewords</td> | |
| 7289 </tr> | |
| 7290 </tbody> | |
| 7291 </table> | |
| 7292 </div> | |
| 7293 <p>It is not possible to select both symbol size and error correction | |
| 7294 capacity for the same symbol. If both options are selected then the | |
| 7295 error correction capacity selection will be ignored.</p> | |
| 7296 <p>Aztec Code supports ECI encoding and can encode up to a maximum | |
| 7297 length of approximately 3823 numeric or 3067 alphabetic characters or | |
| 7298 1914 bytes of data. A separate symbology ID | |
| 7299 (<code>BARCODE_HIBC_AZTEC</code>) can be used to encode Health Industry | |
| 7300 Barcode (HIBC) data.</p> | |
| 7301 <p>Aztec Code supports Structured Append of up to 26 symbols and an | |
| 7302 optional alphanumeric ID of up to 32 characters, which can be set by | |
| 7303 using the <code>--structapp</code> option (see <a | |
| 7304 href="#structured-append">4.17 Structured Append</a>) (API | |
| 7305 <code>structapp</code>). The ID cannot contain spaces. If an ID is not | |
| 7306 given, no ID is encoded.</p> | |
| 7307 <h3 id="aztec-runes-iso-24778">6.6.9 Aztec Runes (ISO 24778)</h3> | |
| 7308 <figure> | |
| 7309 <img src="images/azrune.svg" title="fig:" class="i2d" | |
| 7310 alt="zint -b AZRUNE -d "125"" /> | |
| 7311 <figcaption | |
| 7312 aria-hidden="true"><code>zint -b AZRUNE -d "125"</code></figcaption> | |
| 7313 </figure> | |
| 7314 <p>A truncated version of compact Aztec Code for encoding whole integers | |
| 7315 between 0 and 255, as defined in ISO/IEC 24778 Annex A. Includes | |
| 7316 Reed-Solomon error correction. It does not support Structured | |
| 7317 Append.</p> | |
| 7318 <h3 id="code-one">6.6.10 Code One</h3> | |
| 7319 <figure> | |
| 7320 <img src="images/codeone.svg" title="fig:" class="i2d" | |
| 7321 alt="zint -b CODEONE -d "1234567890123456789012"" /> | |
| 7322 <figcaption | |
| 7323 aria-hidden="true"><code>zint -b CODEONE -d "1234567890123456789012"</code></figcaption> | |
| 7324 </figure> | |
| 7325 <p>A matrix symbology developed by Ted Williams in 1992 which encodes | |
| 7326 data in a way similar to Data Matrix, Code One is able to encode the | |
| 7327 Latin-1 character set or GS1 data, and also supports the ECI mechanism. | |
| 7328 There are two types of Code One symbol - fixed-ratio symbols which are | |
| 7329 roughly square (versions A through to H) and variable-width versions | |
| 7330 (versions S and T). These can be selected by using <code>--vers</code> | |
| 7331 (API <code>option_2</code>) as shown in the table below:</p> | |
| 7332 <div id="tbl:codeone_sizes" class="tablenos"> | |
| 7333 <table id="tbl:codeone_sizes" style="width:88%;" | |
| 7334 data-tag=": Code One Sizes"> | |
| 7335 <caption><span>Table : Code One Sizes</span> </caption> | |
| 7336 <colgroup> | |
| 7337 <col style="width: 11%" /> | |
| 7338 <col style="width: 13%" /> | |
| 7339 <col style="width: 18%" /> | |
| 7340 <col style="width: 22%" /> | |
| 7341 <col style="width: 22%" /> | |
| 7342 </colgroup> | |
| 7343 <thead> | |
| 7344 <tr> | |
| 7345 <th>Input</th> | |
| 7346 <th>Version</th> | |
| 7347 <th style="text-align: left;">Size (W x H)</th> | |
| 7348 <th style="text-align: left;">Numeric Data Capacity</th> | |
| 7349 <th style="text-align: left;">Alphanumeric Data Capacity</th> | |
| 7350 </tr> | |
| 7351 </thead> | |
| 7352 <tbody> | |
| 7353 <tr> | |
| 7354 <td>1</td> | |
| 7355 <td>A</td> | |
| 7356 <td style="text-align: left;">16 x 18</td> | |
| 7357 <td style="text-align: left;">22</td> | |
| 7358 <td style="text-align: left;">13</td> | |
| 7359 </tr> | |
| 7360 <tr> | |
| 7361 <td>2</td> | |
| 7362 <td>B</td> | |
| 7363 <td style="text-align: left;">22 x 22</td> | |
| 7364 <td style="text-align: left;">44</td> | |
| 7365 <td style="text-align: left;">27</td> | |
| 7366 </tr> | |
| 7367 <tr> | |
| 7368 <td>3</td> | |
| 7369 <td>C</td> | |
| 7370 <td style="text-align: left;">28 x 28</td> | |
| 7371 <td style="text-align: left;">104</td> | |
| 7372 <td style="text-align: left;">64</td> | |
| 7373 </tr> | |
| 7374 <tr> | |
| 7375 <td>4</td> | |
| 7376 <td>D</td> | |
| 7377 <td style="text-align: left;">40 x 42</td> | |
| 7378 <td style="text-align: left;">217</td> | |
| 7379 <td style="text-align: left;">135</td> | |
| 7380 </tr> | |
| 7381 <tr> | |
| 7382 <td>5</td> | |
| 7383 <td>E</td> | |
| 7384 <td style="text-align: left;">52 x 54</td> | |
| 7385 <td style="text-align: left;">435</td> | |
| 7386 <td style="text-align: left;">271</td> | |
| 7387 </tr> | |
| 7388 <tr> | |
| 7389 <td>6</td> | |
| 7390 <td>F</td> | |
| 7391 <td style="text-align: left;">70 x 76</td> | |
| 7392 <td style="text-align: left;">886</td> | |
| 7393 <td style="text-align: left;">553</td> | |
| 7394 </tr> | |
| 7395 <tr> | |
| 7396 <td>7</td> | |
| 7397 <td>G</td> | |
| 7398 <td style="text-align: left;">104 x 98</td> | |
| 7399 <td style="text-align: left;">1755</td> | |
| 7400 <td style="text-align: left;">1096</td> | |
| 7401 </tr> | |
| 7402 <tr> | |
| 7403 <td>8</td> | |
| 7404 <td>H</td> | |
| 7405 <td style="text-align: left;">148 x 134</td> | |
| 7406 <td style="text-align: left;">3550</td> | |
| 7407 <td style="text-align: left;">2218</td> | |
| 7408 </tr> | |
| 7409 <tr> | |
| 7410 <td>9</td> | |
| 7411 <td>S</td> | |
| 7412 <td style="text-align: left;">width x 8</td> | |
| 7413 <td style="text-align: left;">18</td> | |
| 7414 <td style="text-align: left;">N/A</td> | |
| 7415 </tr> | |
| 7416 <tr> | |
| 7417 <td>10</td> | |
| 7418 <td>T</td> | |
| 7419 <td style="text-align: left;">width x 16</td> | |
| 7420 <td style="text-align: left;">90</td> | |
| 7421 <td style="text-align: left;">55</td> | |
| 7422 </tr> | |
| 7423 </tbody> | |
| 7424 </table> | |
| 7425 </div> | |
| 7426 <p>Version S symbols can only encode numeric data. The width of version | |
| 7427 S and version T symbols is determined by the length of the input | |
| 7428 data.</p> | |
| 7429 <p>Code One supports Structured Append of up to 128 symbols, which can | |
| 7430 be set by using the <code>--structapp</code> option (see <a | |
| 7431 href="#structured-append">4.17 Structured Append</a>) (API | |
| 7432 <code>structapp</code>). It does not support specifying an ID. | |
| 7433 Structured Append is not supported with GS1 data nor for Version S | |
| 7434 symbols.</p> | |
| 7435 <h3 id="grid-matrix">6.6.11 Grid Matrix</h3> | |
| 7436 <figure> | |
| 7437 <img src="images/gridmatrix.svg" title="fig:" class="i2d" | |
| 7438 alt="zint -b GRIDMATRIX --eci=29 -d "AAT2556 电池充电器+降压转换器 200mA至2A tel:86 019 82512738"" /> | |
| 7439 <figcaption | |
| 7440 aria-hidden="true"><code>zint -b GRIDMATRIX --eci=29 -d "AAT2556 电池充电器+降压转换器 200mA至2A tel:86 019 82512738"</code></figcaption> | |
| 7441 </figure> | |
| 7442 <p>Grid Matrix groups modules in a chequerboard pattern, and by default | |
| 7443 supports the GB 2312 standard set, which includes Hanzi, ASCII and a | |
| 7444 small number of ISO/IEC 8859-1 characters. Input should be entered as | |
| 7445 UTF-8 with conversion to GB 2312 being carried out automatically by | |
| 7446 Zint. Up to around 1529 alphanumeric characters or 2751 digits may be | |
| 7447 encoded. The symbology also supports the ECI mechanism. Support for GS1 | |
| 7448 data has not yet been implemented.</p> | |
| 7449 <p>The size of the symbol and the error correction capacity can be | |
| 7450 specified. If you specify both of these values then Zint will make a | |
| 7451 ‘best-fit’ attempt to satisfy both conditions. The symbol size can be | |
| 7452 specified using the <code>--vers</code> option (API | |
| 7453 <code>option_2</code>), and the error correction capacity can be | |
| 7454 specified by using the <code>--secure</code> option (API | |
| 7455 <code>option_1</code>), according to the following tables.</p> | |
| 7456 <div id="tbl:gridmatrix_sizes" class="tablenos"> | |
| 7457 <table id="tbl:gridmatrix_sizes" data-tag=": Grid Matrix Sizes"> | |
| 7458 <caption><span>Table : Grid Matrix Sizes</span> </caption> | |
| 7459 <thead> | |
| 7460 <tr> | |
| 7461 <th>Input</th> | |
| 7462 <th>Symbol Size</th> | |
| 7463 <th></th> | |
| 7464 <th>Input</th> | |
| 7465 <th>Symbol Size</th> | |
| 7466 </tr> | |
| 7467 </thead> | |
| 7468 <tbody> | |
| 7469 <tr> | |
| 7470 <td>1</td> | |
| 7471 <td>18 x 18</td> | |
| 7472 <td></td> | |
| 7473 <td>8</td> | |
| 7474 <td>102 x 102</td> | |
| 7475 </tr> | |
| 7476 <tr> | |
| 7477 <td>2</td> | |
| 7478 <td>30 x 30</td> | |
| 7479 <td></td> | |
| 7480 <td>9</td> | |
| 7481 <td>114 x 114</td> | |
| 7482 </tr> | |
| 7483 <tr> | |
| 7484 <td>3</td> | |
| 7485 <td>42 x 42</td> | |
| 7486 <td></td> | |
| 7487 <td>10</td> | |
| 7488 <td>126 x 126</td> | |
| 7489 </tr> | |
| 7490 <tr> | |
| 7491 <td>4</td> | |
| 7492 <td>54 x 54</td> | |
| 7493 <td></td> | |
| 7494 <td>11</td> | |
| 7495 <td>138 x 138</td> | |
| 7496 </tr> | |
| 7497 <tr> | |
| 7498 <td>5</td> | |
| 7499 <td>66 x 66</td> | |
| 7500 <td></td> | |
| 7501 <td>12</td> | |
| 7502 <td>150 x 150</td> | |
| 7503 </tr> | |
| 7504 <tr> | |
| 7505 <td>6</td> | |
| 7506 <td>78 x 78</td> | |
| 7507 <td></td> | |
| 7508 <td>13</td> | |
| 7509 <td>162 x 162</td> | |
| 7510 </tr> | |
| 7511 <tr> | |
| 7512 <td>7</td> | |
| 7513 <td>90 x 90</td> | |
| 7514 <td></td> | |
| 7515 <td></td> | |
| 7516 <td></td> | |
| 7517 </tr> | |
| 7518 </tbody> | |
| 7519 </table> | |
| 7520 </div> | |
| 7521 <div id="tbl:gridmatrix_eccs" class="tablenos"> | |
| 7522 <table id="tbl:gridmatrix_eccs" | |
| 7523 data-tag=": Grid Matrix Error Correction Modes"> | |
| 7524 <caption><span>Table : Grid Matrix Error Correction Modes</span> | |
| 7525 </caption> | |
| 7526 <thead> | |
| 7527 <tr> | |
| 7528 <th>Mode</th> | |
| 7529 <th>Error Correction Capacity</th> | |
| 7530 </tr> | |
| 7531 </thead> | |
| 7532 <tbody> | |
| 7533 <tr> | |
| 7534 <td>1</td> | |
| 7535 <td>Approximately 10%</td> | |
| 7536 </tr> | |
| 7537 <tr> | |
| 7538 <td>2</td> | |
| 7539 <td>Approximately 20%</td> | |
| 7540 </tr> | |
| 7541 <tr> | |
| 7542 <td>3</td> | |
| 7543 <td>Approximately 30%</td> | |
| 7544 </tr> | |
| 7545 <tr> | |
| 7546 <td>4</td> | |
| 7547 <td>Approximately 40%</td> | |
| 7548 </tr> | |
| 7549 <tr> | |
| 7550 <td>5</td> | |
| 7551 <td>Approximately 50%</td> | |
| 7552 </tr> | |
| 7553 </tbody> | |
| 7554 </table> | |
| 7555 </div> | |
| 7556 <p>Non-ASCII data density may be maximized by using the | |
| 7557 <code>--fullmultibyte</code> switch (API | |
| 7558 <code>option_3 = ZINT_FULL_MULTIBYTE</code>), but check that your | |
| 7559 barcode reader supports this before using.</p> | |
| 7560 <p>Grid Matrix supports Structured Append of up to 16 symbols and a | |
| 7561 numeric ID (file signature), which can be set by using the | |
| 7562 <code>--structapp</code> option (see <a href="#structured-append">4.17 | |
| 7563 Structured Append</a>) (API <code>structapp</code>). The ID ranges from | |
| 7564 0 (default) to 255.</p> | |
| 7565 <h3 id="dotcode">6.6.12 DotCode</h3> | |
| 7566 <figure> | |
| 7567 <img src="images/dotcode.svg" title="fig:" class="i2d" | |
| 7568 alt="zint -b DOTCODE -d "[01]00012345678905[17]201231[10]ABC123456" --gs1" /> | |
| 7569 <figcaption | |
| 7570 aria-hidden="true"><code>zint -b DOTCODE -d "[01]00012345678905[17]201231[10]ABC123456" --gs1</code></figcaption> | |
| 7571 </figure> | |
| 7572 <p>DotCode uses a grid of dots in a rectangular formation to encode | |
| 7573 characters up to a maximum of approximately 450 characters (or 900 | |
| 7574 numeric digits). The symbology supports ECI encoding and GS1 data | |
| 7575 encoding. By default Zint will produce a symbol which is approximately | |
| 7576 square, however the width of the symbol can be adjusted by using the | |
| 7577 <code>--cols</code> option (API <code>option_2</code>) (maximum 200). | |
| 7578 Outputting DotCode to raster images (BMP, GIF, PCX, PNG, TIF) will | |
| 7579 require setting the scale of the image to a larger value than the | |
| 7580 default (e.g. approximately 10) for the dots to be plotted correctly. | |
| 7581 Approximately 33% of the resulting symbol is comprised of error | |
| 7582 correction codewords.</p> | |
| 7583 <p>DotCode has two sets of 4 masks, designated 0-3 and 0’-3’, the second | |
| 7584 <code>"prime"</code> set being the same as the first with corners lit. | |
| 7585 The best mask to use is selected automatically by Zint but may be | |
| 7586 manually specified by using the <code>--mask</code> switch with values | |
| 7587 0-7, where 4-7 denote 0’-3’, or in the API by setting | |
| 7588 <code>option_3 = (N + 1) << 8</code> where N is 0-7.</p> | |
| 7589 <p>DotCode supports Structured Append of up to 35 symbols, which can be | |
| 7590 set by using the <code>--structapp</code> option (see <a | |
| 7591 href="#structured-append">4.17 Structured Append</a>) (API | |
| 7592 <code>structapp</code>). It does not support specifying an ID.</p> | |
| 7593 <h3 id="han-xin-code-iso-20830">6.6.13 Han Xin Code (ISO 20830)</h3> | |
| 7594 <figure> | |
| 7595 <img src="images/hanxin.svg" title="fig:" class="i2d" | |
| 7596 alt="zint -b HANXIN -d "Hanxin Code symbol"" /> | |
| 7597 <figcaption | |
| 7598 aria-hidden="true"><code>zint -b HANXIN -d "Hanxin Code symbol"</code></figcaption> | |
| 7599 </figure> | |
| 7600 <p>Also known as Chinese Sensible Code, Han Xin is capable of encoding | |
| 7601 characters in either the Latin-1 character set or the GB 18030 character | |
| 7602 set (which is a UTF, i.e. includes all Unicode characters, optimized for | |
| 7603 Chinese characters) and is also able to support the ECI mechanism. | |
| 7604 Support for the encoding of GS1 data has not yet been implemented.</p> | |
| 7605 <p>The size of the symbol can be specified using the <code>--vers</code> | |
| 7606 option (API <code>option_2</code>) to a value between 1 and 84 according | |
| 7607 to the following table.</p> | |
| 7608 <div id="tbl:hanxin_sizes" class="tablenos"> | |
| 7609 <table id="tbl:hanxin_sizes" data-tag=": Han Xin Sizes"> | |
| 7610 <caption><span>Table : Han Xin Sizes</span> </caption> | |
| 7611 <thead> | |
| 7612 <tr> | |
| 7613 <th>Input</th> | |
| 7614 <th>Symbol Size</th> | |
| 7615 <th></th> | |
| 7616 <th>Input</th> | |
| 7617 <th>Symbol Size</th> | |
| 7618 <th></th> | |
| 7619 <th>Input</th> | |
| 7620 <th>Symbol Size</th> | |
| 7621 </tr> | |
| 7622 </thead> | |
| 7623 <tbody> | |
| 7624 <tr> | |
| 7625 <td>1</td> | |
| 7626 <td>23 x 23</td> | |
| 7627 <td></td> | |
| 7628 <td>29</td> | |
| 7629 <td>79 x 79</td> | |
| 7630 <td></td> | |
| 7631 <td>57</td> | |
| 7632 <td>135 x 135</td> | |
| 7633 </tr> | |
| 7634 <tr> | |
| 7635 <td>2</td> | |
| 7636 <td>25 x 25</td> | |
| 7637 <td></td> | |
| 7638 <td>30</td> | |
| 7639 <td>81 x 81</td> | |
| 7640 <td></td> | |
| 7641 <td>58</td> | |
| 7642 <td>137 x 137</td> | |
| 7643 </tr> | |
| 7644 <tr> | |
| 7645 <td>3</td> | |
| 7646 <td>27 x 27</td> | |
| 7647 <td></td> | |
| 7648 <td>31</td> | |
| 7649 <td>83 x 83</td> | |
| 7650 <td></td> | |
| 7651 <td>59</td> | |
| 7652 <td>139 x 139</td> | |
| 7653 </tr> | |
| 7654 <tr> | |
| 7655 <td>4</td> | |
| 7656 <td>29 x 29</td> | |
| 7657 <td></td> | |
| 7658 <td>32</td> | |
| 7659 <td>85 x 85</td> | |
| 7660 <td></td> | |
| 7661 <td>60</td> | |
| 7662 <td>141 x 141</td> | |
| 7663 </tr> | |
| 7664 <tr> | |
| 7665 <td>5</td> | |
| 7666 <td>31 x 31</td> | |
| 7667 <td></td> | |
| 7668 <td>33</td> | |
| 7669 <td>87 x 87</td> | |
| 7670 <td></td> | |
| 7671 <td>61</td> | |
| 7672 <td>143 x 143</td> | |
| 7673 </tr> | |
| 7674 <tr> | |
| 7675 <td>6</td> | |
| 7676 <td>33 x 33</td> | |
| 7677 <td></td> | |
| 7678 <td>34</td> | |
| 7679 <td>89 x 89</td> | |
| 7680 <td></td> | |
| 7681 <td>62</td> | |
| 7682 <td>145 x 145</td> | |
| 7683 </tr> | |
| 7684 <tr> | |
| 7685 <td>7</td> | |
| 7686 <td>35 x 35</td> | |
| 7687 <td></td> | |
| 7688 <td>35</td> | |
| 7689 <td>91 x 91</td> | |
| 7690 <td></td> | |
| 7691 <td>63</td> | |
| 7692 <td>147 x 147</td> | |
| 7693 </tr> | |
| 7694 <tr> | |
| 7695 <td>8</td> | |
| 7696 <td>37 x 37</td> | |
| 7697 <td></td> | |
| 7698 <td>36</td> | |
| 7699 <td>93 x 93</td> | |
| 7700 <td></td> | |
| 7701 <td>64</td> | |
| 7702 <td>149 x 149</td> | |
| 7703 </tr> | |
| 7704 <tr> | |
| 7705 <td>9</td> | |
| 7706 <td>39 x 39</td> | |
| 7707 <td></td> | |
| 7708 <td>37</td> | |
| 7709 <td>95 x 95</td> | |
| 7710 <td></td> | |
| 7711 <td>65</td> | |
| 7712 <td>151 x 151</td> | |
| 7713 </tr> | |
| 7714 <tr> | |
| 7715 <td>10</td> | |
| 7716 <td>41 x 41</td> | |
| 7717 <td></td> | |
| 7718 <td>38</td> | |
| 7719 <td>97 x 97</td> | |
| 7720 <td></td> | |
| 7721 <td>66</td> | |
| 7722 <td>153 x 153</td> | |
| 7723 </tr> | |
| 7724 <tr> | |
| 7725 <td>11</td> | |
| 7726 <td>43 x 43</td> | |
| 7727 <td></td> | |
| 7728 <td>39</td> | |
| 7729 <td>99 x 99</td> | |
| 7730 <td></td> | |
| 7731 <td>67</td> | |
| 7732 <td>155 x 155</td> | |
| 7733 </tr> | |
| 7734 <tr> | |
| 7735 <td>12</td> | |
| 7736 <td>45 x 45</td> | |
| 7737 <td></td> | |
| 7738 <td>40</td> | |
| 7739 <td>101 x 101</td> | |
| 7740 <td></td> | |
| 7741 <td>68</td> | |
| 7742 <td>157 x 157</td> | |
| 7743 </tr> | |
| 7744 <tr> | |
| 7745 <td>13</td> | |
| 7746 <td>47 x 47</td> | |
| 7747 <td></td> | |
| 7748 <td>41</td> | |
| 7749 <td>103 x 103</td> | |
| 7750 <td></td> | |
| 7751 <td>69</td> | |
| 7752 <td>159 x 159</td> | |
| 7753 </tr> | |
| 7754 <tr> | |
| 7755 <td>14</td> | |
| 7756 <td>49 x 49</td> | |
| 7757 <td></td> | |
| 7758 <td>42</td> | |
| 7759 <td>105 x 105</td> | |
| 7760 <td></td> | |
| 7761 <td>70</td> | |
| 7762 <td>161 x 161</td> | |
| 7763 </tr> | |
| 7764 <tr> | |
| 7765 <td>15</td> | |
| 7766 <td>51 x 51</td> | |
| 7767 <td></td> | |
| 7768 <td>43</td> | |
| 7769 <td>107 x 107</td> | |
| 7770 <td></td> | |
| 7771 <td>71</td> | |
| 7772 <td>163 x 163</td> | |
| 7773 </tr> | |
| 7774 <tr> | |
| 7775 <td>16</td> | |
| 7776 <td>53 x 53</td> | |
| 7777 <td></td> | |
| 7778 <td>44</td> | |
| 7779 <td>109 x 109</td> | |
| 7780 <td></td> | |
| 7781 <td>72</td> | |
| 7782 <td>165 x 165</td> | |
| 7783 </tr> | |
| 7784 <tr> | |
| 7785 <td>17</td> | |
| 7786 <td>55 x 55</td> | |
| 7787 <td></td> | |
| 7788 <td>45</td> | |
| 7789 <td>111 x 111</td> | |
| 7790 <td></td> | |
| 7791 <td>73</td> | |
| 7792 <td>167 x 167</td> | |
| 7793 </tr> | |
| 7794 <tr> | |
| 7795 <td>18</td> | |
| 7796 <td>57 x 57</td> | |
| 7797 <td></td> | |
| 7798 <td>46</td> | |
| 7799 <td>113 x 113</td> | |
| 7800 <td></td> | |
| 7801 <td>74</td> | |
| 7802 <td>169 x 169</td> | |
| 7803 </tr> | |
| 7804 <tr> | |
| 7805 <td>19</td> | |
| 7806 <td>59 x 59</td> | |
| 7807 <td></td> | |
| 7808 <td>47</td> | |
| 7809 <td>115 x 115</td> | |
| 7810 <td></td> | |
| 7811 <td>75</td> | |
| 7812 <td>171 x 171</td> | |
| 7813 </tr> | |
| 7814 <tr> | |
| 7815 <td>20</td> | |
| 7816 <td>61 x 61</td> | |
| 7817 <td></td> | |
| 7818 <td>48</td> | |
| 7819 <td>117 x 117</td> | |
| 7820 <td></td> | |
| 7821 <td>76</td> | |
| 7822 <td>173 x 173</td> | |
| 7823 </tr> | |
| 7824 <tr> | |
| 7825 <td>21</td> | |
| 7826 <td>63 x 63</td> | |
| 7827 <td></td> | |
| 7828 <td>49</td> | |
| 7829 <td>119 x 119</td> | |
| 7830 <td></td> | |
| 7831 <td>77</td> | |
| 7832 <td>175 x 175</td> | |
| 7833 </tr> | |
| 7834 <tr> | |
| 7835 <td>22</td> | |
| 7836 <td>65 x 65</td> | |
| 7837 <td></td> | |
| 7838 <td>50</td> | |
| 7839 <td>121 x 121</td> | |
| 7840 <td></td> | |
| 7841 <td>78</td> | |
| 7842 <td>177 x 177</td> | |
| 7843 </tr> | |
| 7844 <tr> | |
| 7845 <td>23</td> | |
| 7846 <td>67 x 67</td> | |
| 7847 <td></td> | |
| 7848 <td>51</td> | |
| 7849 <td>123 x 123</td> | |
| 7850 <td></td> | |
| 7851 <td>79</td> | |
| 7852 <td>179 x 179</td> | |
| 7853 </tr> | |
| 7854 <tr> | |
| 7855 <td>24</td> | |
| 7856 <td>69 x 69</td> | |
| 7857 <td></td> | |
| 7858 <td>52</td> | |
| 7859 <td>125 x 125</td> | |
| 7860 <td></td> | |
| 7861 <td>80</td> | |
| 7862 <td>181 x 181</td> | |
| 7863 </tr> | |
| 7864 <tr> | |
| 7865 <td>25</td> | |
| 7866 <td>71 x 71</td> | |
| 7867 <td></td> | |
| 7868 <td>53</td> | |
| 7869 <td>127 x 127</td> | |
| 7870 <td></td> | |
| 7871 <td>81</td> | |
| 7872 <td>183 x 183</td> | |
| 7873 </tr> | |
| 7874 <tr> | |
| 7875 <td>26</td> | |
| 7876 <td>73 x 73</td> | |
| 7877 <td></td> | |
| 7878 <td>54</td> | |
| 7879 <td>129 x 129</td> | |
| 7880 <td></td> | |
| 7881 <td>82</td> | |
| 7882 <td>185 x 185</td> | |
| 7883 </tr> | |
| 7884 <tr> | |
| 7885 <td>27</td> | |
| 7886 <td>75 x 75</td> | |
| 7887 <td></td> | |
| 7888 <td>55</td> | |
| 7889 <td>131 x 131</td> | |
| 7890 <td></td> | |
| 7891 <td>83</td> | |
| 7892 <td>187 x 187</td> | |
| 7893 </tr> | |
| 7894 <tr> | |
| 7895 <td>28</td> | |
| 7896 <td>77 x 77</td> | |
| 7897 <td></td> | |
| 7898 <td>56</td> | |
| 7899 <td>133 x 133</td> | |
| 7900 <td></td> | |
| 7901 <td>84</td> | |
| 7902 <td>189 x 189</td> | |
| 7903 </tr> | |
| 7904 </tbody> | |
| 7905 </table> | |
| 7906 </div> | |
| 7907 <p>The largest version (84) can encode 7827 digits, 4350 ASCII | |
| 7908 characters, up to 2175 Chinese characters, or 3261 bytes, making it the | |
| 7909 most capacious of all the barcodes supported by Zint.</p> | |
| 7910 <p>There are four levels of error correction capacity available for Han | |
| 7911 Xin Code which can be set by using the <code>--secure</code> option (API | |
| 7912 <code>option_1</code>) to a value from the following table.</p> | |
| 7913 <div id="tbl:hanxin_eccs" class="tablenos"> | |
| 7914 <table id="tbl:hanxin_eccs" data-tag=": Han Xin Error Correction Modes"> | |
| 7915 <caption><span>Table : Han Xin Error Correction Modes</span> </caption> | |
| 7916 <thead> | |
| 7917 <tr> | |
| 7918 <th>Mode</th> | |
| 7919 <th>Recovery Capacity</th> | |
| 7920 </tr> | |
| 7921 </thead> | |
| 7922 <tbody> | |
| 7923 <tr> | |
| 7924 <td>1</td> | |
| 7925 <td>Approx 8%</td> | |
| 7926 </tr> | |
| 7927 <tr> | |
| 7928 <td>2</td> | |
| 7929 <td>Approx 15%</td> | |
| 7930 </tr> | |
| 7931 <tr> | |
| 7932 <td>3</td> | |
| 7933 <td>Approx 23%</td> | |
| 7934 </tr> | |
| 7935 <tr> | |
| 7936 <td>4</td> | |
| 7937 <td>Approx 30%</td> | |
| 7938 </tr> | |
| 7939 </tbody> | |
| 7940 </table> | |
| 7941 </div> | |
| 7942 <p>Non-ASCII data density may be maximized by using the | |
| 7943 <code>--fullmultibyte</code> switch (API | |
| 7944 <code>option_3 = ZINT_FULL_MULTIBYTE</code>), but check that your | |
| 7945 barcode reader supports this before using.</p> | |
| 7946 <p>Han Xin has four different masks designed to minimize unwanted | |
| 7947 patterns. The best mask to use is selected automatically by Zint but may | |
| 7948 be manually specified by using the <code>--mask</code> switch with | |
| 7949 values 0-3, or in the API by setting | |
| 7950 <code>option_3 = (N + 1) << 8</code> where N is 0-3. To use with | |
| 7951 <code>ZINT_FULL_MULTIBYTE</code> set</p> | |
| 7952 <div class="sourceCode" id="cb118"><pre | |
| 7953 class="sourceCode c"><code class="sourceCode c"><span id="cb118-1"><a href="#cb118-1" aria-hidden="true" tabindex="-1"></a>option_3 <span class="op">=</span> ZINT_FULL_MULTIBYTE <span class="op">|</span> <span class="op">(</span>N <span class="op">+</span> <span class="dv">1</span><span class="op">)</span> <span class="op"><<</span> <span class="dv">8</span></span></code></pre></div> | |
| 7954 <h3 id="ultracode">6.6.14 Ultracode</h3> | |
| 7955 <figure> | |
| 7956 <img src="images/ultra.svg" title="fig:" class="ultra" | |
| 7957 alt="zint -b ULTRA -d "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS"" /> | |
| 7958 <figcaption | |
| 7959 aria-hidden="true"><code>zint -b ULTRA -d "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS"</code></figcaption> | |
| 7960 </figure> | |
| 7961 <p>This symbology uses a grid of coloured elements to encode data. ECI | |
| 7962 and GS1 modes are supported. The amount of error correction can be set | |
| 7963 using the <code>--secure</code> option (API <code>option_1</code>) to a | |
| 7964 value as shown in the following table.</p> | |
| 7965 <div id="tbl:ultra_eccs" class="tablenos"> | |
| 7966 <table id="tbl:ultra_eccs" | |
| 7967 data-tag=": Ultracode Error Correction Values"> | |
| 7968 <caption><span>Table : Ultracode Error Correction Values</span> | |
| 7969 </caption> | |
| 7970 <thead> | |
| 7971 <tr> | |
| 7972 <th>Value</th> | |
| 7973 <th>EC Level</th> | |
| 7974 <th>Amount of symbol holding error correction data</th> | |
| 7975 </tr> | |
| 7976 </thead> | |
| 7977 <tbody> | |
| 7978 <tr> | |
| 7979 <td>1</td> | |
| 7980 <td>EC0</td> | |
| 7981 <td>0% - Error detection only</td> | |
| 7982 </tr> | |
| 7983 <tr> | |
| 7984 <td>2</td> | |
| 7985 <td>EC1</td> | |
| 7986 <td>Approx 5%</td> | |
| 7987 </tr> | |
| 7988 <tr> | |
| 7989 <td>3</td> | |
| 7990 <td>EC2</td> | |
| 7991 <td>Approx 9% - Default value</td> | |
| 7992 </tr> | |
| 7993 <tr> | |
| 7994 <td>4</td> | |
| 7995 <td>EC3</td> | |
| 7996 <td>Approx 17%</td> | |
| 7997 </tr> | |
| 7998 <tr> | |
| 7999 <td>5</td> | |
| 8000 <td>EC4</td> | |
| 8001 <td>Approx 25%</td> | |
| 8002 </tr> | |
| 8003 <tr> | |
| 8004 <td>6</td> | |
| 8005 <td>EC5</td> | |
| 8006 <td>Approx 33%</td> | |
| 8007 </tr> | |
| 8008 </tbody> | |
| 8009 </table> | |
| 8010 </div> | |
| 8011 <p>Zint does not currently implement data compression by default, but | |
| 8012 this can be initiated through the API by setting</p> | |
| 8013 <div class="sourceCode" id="cb119"><pre | |
| 8014 class="sourceCode c"><code class="sourceCode c"><span id="cb119-1"><a href="#cb119-1" aria-hidden="true" tabindex="-1"></a>symbol<span class="op">-></span>option_3 <span class="op">=</span> ULTRA_COMPRESSION<span class="op">;</span></span></code></pre></div> | |
| 8015 <p>With compression, up to 504 digits, 375 alphanumerics or 252 bytes | |
| 8016 can be encoded.</p> | |
| 8017 <p>Revision 2 of Ultracode (2023) may be specified using | |
| 8018 <code>--vers=2</code> (API <code>option_2 = 2</code>).</p> | |
| 8019 <hr /> | |
| 8020 <p>WARNING: Revision 2 of Ultracode was only finalized December 2023 and | |
| 8021 Zint has not yet been updated to support it. Do not use.</p> | |
| 8022 <hr /> | |
| 8023 <p>Ultracode supports Structured Append of up to 8 symbols and an | |
| 8024 optional numeric ID (File Number), which can be set by using the | |
| 8025 <code>--structapp</code> option (see <a href="#structured-append">4.17 | |
| 8026 Structured Append</a>) (API <code>structapp</code>). The ID ranges from | |
| 8027 1 to 80088. If an ID is not given, no ID is encoded.</p> | |
| 8028 <h2 id="other-barcode-like-markings">6.7 Other Barcode-Like | |
| 8029 Markings</h2> | |
| 8030 <h3 id="facing-identification-mark-fim">6.7.1 Facing Identification Mark | |
| 8031 (FIM)</h3> | |
| 8032 <figure> | |
| 8033 <img src="images/fim.svg" title="fig:" class="trk" | |
| 8034 alt="zint -b FIM --compliantheight -d "C"" /> | |
| 8035 <figcaption | |
| 8036 aria-hidden="true"><code>zint -b FIM --compliantheight -d "C"</code></figcaption> | |
| 8037 </figure> | |
| 8038 <p>Used by the United States Postal Service (USPS), the FIM symbology is | |
| 8039 used to assist automated mail processing. There are only 5 valid symbols | |
| 8040 which can be generated using the characters A-E as shown in the table | |
| 8041 below.</p> | |
| 8042 <div id="tbl:fim_characters" class="tablenos"> | |
| 8043 <table id="tbl:fim_characters" data-tag=": Valid FIM Characters"> | |
| 8044 <caption><span>Table : Valid FIM Characters</span> </caption> | |
| 8045 <thead> | |
| 8046 <tr> | |
| 8047 <th>Code Letter</th> | |
| 8048 <th style="text-align: left;">Usage</th> | |
| 8049 </tr> | |
| 8050 </thead> | |
| 8051 <tbody> | |
| 8052 <tr> | |
| 8053 <td>A</td> | |
| 8054 <td style="text-align: left;">Used for courtesy reply mail and metered | |
| 8055 reply mail with a</td> | |
| 8056 </tr> | |
| 8057 <tr> | |
| 8058 <td></td> | |
| 8059 <td style="text-align: left;">pre-printed POSTNET symbol.</td> | |
| 8060 </tr> | |
| 8061 <tr> | |
| 8062 <td>B</td> | |
| 8063 <td style="text-align: left;">Used for business reply mail without a | |
| 8064 pre-printed zip code.</td> | |
| 8065 </tr> | |
| 8066 <tr> | |
| 8067 <td>C</td> | |
| 8068 <td style="text-align: left;">Used for business reply mail with a | |
| 8069 pre-printed zip code.</td> | |
| 8070 </tr> | |
| 8071 <tr> | |
| 8072 <td>D</td> | |
| 8073 <td style="text-align: left;">Used for Information Based Indicia (IBI) | |
| 8074 postage.</td> | |
| 8075 </tr> | |
| 8076 <tr> | |
| 8077 <td>E</td> | |
| 8078 <td style="text-align: left;">Used for customized mail with a USPS | |
| 8079 Intelligent Mail barcode.</td> | |
| 8080 </tr> | |
| 8081 </tbody> | |
| 8082 </table> | |
| 8083 </div> | |
| 8084 <h3 id="flattermarken">6.7.2 Flattermarken</h3> | |
| 8085 <figure> | |
| 8086 <img src="images/flat.svg" title="fig:" class="lin" | |
| 8087 alt="zint -b FLAT -d "1304056"" /> | |
| 8088 <figcaption | |
| 8089 aria-hidden="true"><code>zint -b FLAT -d "1304056"</code></figcaption> | |
| 8090 </figure> | |
| 8091 <p>Used for the recognition of page sequences in print-shops, the | |
| 8092 Flattermarken is not a true barcode symbol and requires precise | |
| 8093 knowledge of the position of the mark on the page. The Flattermarken | |
| 8094 system can encode numeric data up to a maximum of 128 digits and does | |
| 8095 not include a check digit.</p> | |
| 8096 <h1 id="legal-and-version-information">7. Legal and Version | |
| 8097 Information</h1> | |
| 8098 <h2 id="license">7.1 License</h2> | |
| 8099 <p>Zint, libzint and Zint Barcode Studio are Copyright © 2024 Robin | |
| 8100 Stuart. All historical versions are distributed under the GNU General | |
| 8101 Public License version 3 or later. Versions 2.5 and later are released | |
| 8102 under a dual license: the encoding library is released under the BSD (3 | |
| 8103 clause) license whereas the GUI, Zint Barcode Studio, and the CLI are | |
| 8104 released under the GNU General Public License version 3 or later.</p> | |
| 8105 <p>Telepen is a trademark of SB Electronic Systems Ltd.</p> | |
| 8106 <p>QR Code is a registered trademark of Denso Wave Incorporated.</p> | |
| 8107 <p>Mailmark is a registered trademark of Royal Mail Group Ltd.</p> | |
| 8108 <p>Microsoft, Windows and the Windows logo are either registered | |
| 8109 trademarks or trademarks of Microsoft Corporation in the United States | |
| 8110 and/or other countries.</p> | |
| 8111 <p>Linux is the registered trademark of Linus Torvalds in the U.S. and | |
| 8112 other countries.</p> | |
| 8113 <p>Mac and macOS are trademarks of Apple Inc., registered in the U.S. | |
| 8114 and other countries.</p> | |
| 8115 <p>The Zint logo is derived from “SF Planetary Orbiter” font by | |
| 8116 ShyFoundary.</p> | |
| 8117 <p>Zint.org.uk website design and hosting provided by Robert | |
| 8118 Elliott.</p> | |
| 8119 <h2 id="patent-issues">7.2 Patent Issues</h2> | |
| 8120 <p>All of the code in Zint is developed using information in the public | |
| 8121 domain, usually freely available on the Internet. Some of the techniques | |
| 8122 used may be subject to patents and other intellectual property | |
| 8123 legislation. It is my belief that any patents involved in the technology | |
| 8124 underlying symbologies utilised by Zint are ‘unadopted’, that is the | |
| 8125 holder does not object to their methods being used.</p> | |
| 8126 <p>Any methods patented or owned by third parties or trademarks or | |
| 8127 registered trademarks used within Zint or in this document are and | |
| 8128 remain the property of their respective owners and do not indicate | |
| 8129 endorsement or affiliation with those owners, companies or | |
| 8130 organisations.</p> | |
| 8131 <h2 id="version-information">7.3 Version Information</h2> | |
| 8132 <p>The current stable version of Zint is 2.13.0, released on 18th | |
| 8133 December 2023.</p> | |
| 8134 <p>See <code>"ChangeLog"</code> in the project root directory for | |
| 8135 information on all releases.</p> | |
| 8136 <h2 id="sources-of-information">7.4 Sources of Information</h2> | |
| 8137 <p>Below is a list of some of the sources used in rough chronological | |
| 8138 order:</p> | |
| 8139 <ul> | |
| 8140 <li>Nick Johnson’s Barcode Specifications</li> | |
| 8141 <li>Bar Code 1 Specification Source Page</li> | |
| 8142 <li>SB Electronic Systems Telepen website</li> | |
| 8143 <li>Pharmacode specifications from Laetus</li> | |
| 8144 <li>Morovia RM4SCC specification</li> | |
| 8145 <li>Australia Post’s ‘A Guide to Printing the 4-State Barcode’ and | |
| 8146 bcsample source code</li> | |
| 8147 <li>Plessey algorithm from GNU-Barcode v0.98 by Leonid A. Broukhis</li> | |
| 8148 <li>GS1 General Specifications v 8.0 Issue 2</li> | |
| 8149 <li>PNG: The Definitive Guide and wpng source code by Greg Reolofs</li> | |
| 8150 <li>PDF417 specification and pdf417 source code by Grand Zebu</li> | |
| 8151 <li>Barcode Reference, TBarCode/X User Documentation and TBarCode/X | |
| 8152 demonstration program from Tec-It</li> | |
| 8153 <li>IEC16022 source code by Stefan Schmidt et al</li> | |
| 8154 <li>United States Postal Service Specification USPS-B-3200</li> | |
| 8155 <li>Adobe Systems Incorporated Encapsulated PostScript File Format | |
| 8156 Specification</li> | |
| 8157 <li>BSI Online Library</li> | |
| 8158 <li>Libdmtx Data Matrix ECC200 decoding library</li> | |
| 8159 </ul> | |
| 8160 <h2 id="standards-compliance">7.5 Standards Compliance</h2> | |
| 8161 <p>Zint was developed to provide compliance with the following British | |
| 8162 and international standards:</p> | |
| 8163 <h3 id="symbology-standards">7.5.1 Symbology Standards</h3> | |
| 8164 <ul> | |
| 8165 <li>ISO/IEC 24778:2008 Information technology - Automatic identification | |
| 8166 and data capture techniques - Aztec Code bar code symbology | |
| 8167 specification</li> | |
| 8168 <li>SEMI T1-95 Specification for Back Surface Bar Code Marking of | |
| 8169 Silicon Wafers (BC412) (1996)</li> | |
| 8170 <li>ANSI/AIM BC12-1998 - Uniform Symbology Specification Channel | |
| 8171 Code</li> | |
| 8172 <li>BS EN 798:1996 Bar coding - Symbology specifications - | |
| 8173 ‘Codabar’</li> | |
| 8174 <li>AIM Europe ISS-X-24 - Uniform Symbology Specification Codablock-F | |
| 8175 (1995)</li> | |
| 8176 <li>ISO/IEC 15417:2007 Information technology - Automatic identification | |
| 8177 and data capture techniques - Code 128 bar code symbology | |
| 8178 specification</li> | |
| 8179 <li>BS EN 12323:2005 AIDC technologies - Symbology specifications - Code | |
| 8180 16K</li> | |
| 8181 <li>ISO/IEC 16388:2007 Information technology - Automatic identification | |
| 8182 and data capture techniques - Code 39 bar code symbology | |
| 8183 specification</li> | |
| 8184 <li>ANSI/AIM BC6-2000 - Uniform Symbology Specification Code 49</li> | |
| 8185 <li>ANSI/AIM BC5-1995 - Uniform Symbology Specification Code 93</li> | |
| 8186 <li>AIM Uniform Symbology Specification Code One (1994)</li> | |
| 8187 <li>ISO/IEC 16022:2006 Information technology - Automatic identification | |
| 8188 and data capture techniques - Data Matrix ECC200 bar code symbology | |
| 8189 specification</li> | |
| 8190 <li>ISO/IEC 21471:2020 Information technology - Automatic identification | |
| 8191 and data capture techniques - Extended rectangular data matrix (DMRE) | |
| 8192 bar code symbology specification</li> | |
| 8193 <li>AIM TSC1705001 (v 4.0 Draft 0.15) - Information technology - | |
| 8194 Automatic identification and data capture techniques - Bar code | |
| 8195 symbology specification - DotCode (Revised 28th May 2019)</li> | |
| 8196 <li>ISO/IEC 15420:2009 Information technology - Automatic identification | |
| 8197 and data capture techniques - EAN/UPC bar code symbology | |
| 8198 specification</li> | |
| 8199 <li>AIMD014 (v 1.63) - Information technology, Automatic identification | |
| 8200 and data capture techniques - Bar code symbology specification - Grid | |
| 8201 Matrix (Released 9th Dec 2008)</li> | |
| 8202 <li>ISO/IEC 24723:2010 Information technology - Automatic identification | |
| 8203 and data capture techniques - GS1 Composite bar code symbology | |
| 8204 specification</li> | |
| 8205 <li>ISO/IEC 24724:2011 Information technology - Automatic identification | |
| 8206 and data capture techniques - GS1 DataBar bar code symbology | |
| 8207 specification</li> | |
| 8208 <li>ISO/IEC 20830:2021 Information technology - Automatic identification | |
| 8209 and data capture techniques - Han Xin Code bar code symbology | |
| 8210 specification</li> | |
| 8211 <li>ISO/IEC 16390:2007 Information technology - Automatic identification | |
| 8212 and data capture techniques - Interleaved 2 of 5 bar code symbology | |
| 8213 specification</li> | |
| 8214 <li>ISO/IEC 16023:2000 Information technology - International symbology | |
| 8215 specification - MaxiCode</li> | |
| 8216 <li>ISO/IEC 24728:2006 Information technology - Automatic identification | |
| 8217 and data capture techniques - MicroPDF417 bar code symbology | |
| 8218 specification</li> | |
| 8219 <li>ISO/IEC 15438:2015 Information technology - Automatic identification | |
| 8220 and data capture techniques - PDF417 bar code symbology | |
| 8221 specification</li> | |
| 8222 <li>ISO/IEC 18004:2015 Information technology - Automatic identification | |
| 8223 and data capture techniques - QR Code bar code symbology | |
| 8224 specification</li> | |
| 8225 <li>ISO/IEC 23941:2022 Information technology - Automatic identification | |
| 8226 and data capture techniques - Rectangular Micro QR Code (rMQR) bar code | |
| 8227 symbology specification</li> | |
| 8228 <li>AIMD/TSC15032-43 (v 0.99c) - International Technical Specification - | |
| 8229 Ultracode Symbology (Draft) (Released 4th Nov 2015)</li> | |
| 8230 </ul> | |
| 8231 <p>A number of other specification documents have also been referenced, | |
| 8232 such as MIL-STD-1189 Rev. B (1989) (LOGMARS), USPS DMM 300 2006 (2011) | |
| 8233 (POSTNET, PLANET, FIM) and USPS-B-3200 (2015) (IMAIL). Those not named | |
| 8234 include postal and delivery company references in particular.</p> | |
| 8235 <h3 id="general-standards">7.5.2 General Standards</h3> | |
| 8236 <ul> | |
| 8237 <li>AIM ITS/04-001 International Technical Standard - Extended Channel | |
| 8238 Interpretations Part 1: Identification Schemes and Protocol (Released | |
| 8239 24th May 2004)</li> | |
| 8240 <li>AIM ITS/04-023 International Technical Standard - Extended Channel | |
| 8241 Interpretations Part 3: Register (Version 2, February 2022)</li> | |
| 8242 <li>GS1 General Specifications Release 24.0 (Jan 2024)</li> | |
| 8243 <li>ANSI/HIBC 2.6-2016 - The Health Industry Bar Code (HIBC) Supplier | |
| 8244 Labeling Standard</li> | |
| 8245 </ul> | |
| 8246 <h1 id="annex-a.-character-encoding">Annex A. Character Encoding</h1> | |
| 8247 <p>This section is intended as a quick reference to the character sets | |
| 8248 used by Zint. All symbologies use standard ASCII input as shown in | |
| 8249 section A.1, but some support extended characters as shown in the | |
| 8250 subsequent section <a href="#a.2-latin-alphabet-no.-1-isoiec-8859-1">A.2 | |
| 8251 Latin Alphabet No. 1 (ISO/IEC 8859-1)</a>.</p> | |
| 8252 <h2 id="a.1-ascii-standard">A.1 ASCII Standard</h2> | |
| 8253 <p>The ubiquitous ASCII standard is well known to most computer users. | |
| 8254 It’s reproduced here for reference.</p> | |
| 8255 <div id="tbl:ascii" class="tablenos"> | |
| 8256 <table id="tbl:ascii" data-tag=": ASCII"> | |
| 8257 <caption><span>Table : ASCII</span> </caption> | |
| 8258 <thead> | |
| 8259 <tr> | |
| 8260 <th>Hex</th> | |
| 8261 <th style="text-align: left;">0</th> | |
| 8262 <th style="text-align: left;">1</th> | |
| 8263 <th style="text-align: left;">2</th> | |
| 8264 <th style="text-align: left;">3</th> | |
| 8265 <th style="text-align: left;">4</th> | |
| 8266 <th style="text-align: left;">5</th> | |
| 8267 <th style="text-align: left;">6</th> | |
| 8268 <th style="text-align: left;">7</th> | |
| 8269 </tr> | |
| 8270 </thead> | |
| 8271 <tbody> | |
| 8272 <tr> | |
| 8273 <td>0</td> | |
| 8274 <td style="text-align: left;"><code>NUL</code></td> | |
| 8275 <td style="text-align: left;"><code>DLE</code></td> | |
| 8276 <td style="text-align: left;"><code>SPACE</code></td> | |
| 8277 <td style="text-align: left;"><code>0</code></td> | |
| 8278 <td style="text-align: left;"><code>@</code></td> | |
| 8279 <td style="text-align: left;"><code>P</code></td> | |
| 8280 <td style="text-align: left;"><code>`</code></td> | |
| 8281 <td style="text-align: left;"><code>p</code></td> | |
| 8282 </tr> | |
| 8283 <tr> | |
| 8284 <td>1</td> | |
| 8285 <td style="text-align: left;"><code>SOH</code></td> | |
| 8286 <td style="text-align: left;"><code>DC1</code></td> | |
| 8287 <td style="text-align: left;"><code>!</code></td> | |
| 8288 <td style="text-align: left;"><code>1</code></td> | |
| 8289 <td style="text-align: left;"><code>A</code></td> | |
| 8290 <td style="text-align: left;"><code>Q</code></td> | |
| 8291 <td style="text-align: left;"><code>a</code></td> | |
| 8292 <td style="text-align: left;"><code>q</code></td> | |
| 8293 </tr> | |
| 8294 <tr> | |
| 8295 <td>2</td> | |
| 8296 <td style="text-align: left;"><code>STX</code></td> | |
| 8297 <td style="text-align: left;"><code>DC2</code></td> | |
| 8298 <td style="text-align: left;"><code>"</code></td> | |
| 8299 <td style="text-align: left;"><code>2</code></td> | |
| 8300 <td style="text-align: left;"><code>B</code></td> | |
| 8301 <td style="text-align: left;"><code>R</code></td> | |
| 8302 <td style="text-align: left;"><code>b</code></td> | |
| 8303 <td style="text-align: left;"><code>r</code></td> | |
| 8304 </tr> | |
| 8305 <tr> | |
| 8306 <td>3</td> | |
| 8307 <td style="text-align: left;"><code>ETX</code></td> | |
| 8308 <td style="text-align: left;"><code>DC3</code></td> | |
| 8309 <td style="text-align: left;"><code>#</code></td> | |
| 8310 <td style="text-align: left;"><code>3</code></td> | |
| 8311 <td style="text-align: left;"><code>C</code></td> | |
| 8312 <td style="text-align: left;"><code>S</code></td> | |
| 8313 <td style="text-align: left;"><code>c</code></td> | |
| 8314 <td style="text-align: left;"><code>s</code></td> | |
| 8315 </tr> | |
| 8316 <tr> | |
| 8317 <td>4</td> | |
| 8318 <td style="text-align: left;"><code>EOT</code></td> | |
| 8319 <td style="text-align: left;"><code>DC4</code></td> | |
| 8320 <td style="text-align: left;"><code>$</code></td> | |
| 8321 <td style="text-align: left;"><code>4</code></td> | |
| 8322 <td style="text-align: left;"><code>D</code></td> | |
| 8323 <td style="text-align: left;"><code>T</code></td> | |
| 8324 <td style="text-align: left;"><code>d</code></td> | |
| 8325 <td style="text-align: left;"><code>t</code></td> | |
| 8326 </tr> | |
| 8327 <tr> | |
| 8328 <td>5</td> | |
| 8329 <td style="text-align: left;"><code>ENQ</code></td> | |
| 8330 <td style="text-align: left;"><code>NAK</code></td> | |
| 8331 <td style="text-align: left;"><code>%</code></td> | |
| 8332 <td style="text-align: left;"><code>5</code></td> | |
| 8333 <td style="text-align: left;"><code>E</code></td> | |
| 8334 <td style="text-align: left;"><code>U</code></td> | |
| 8335 <td style="text-align: left;"><code>e</code></td> | |
| 8336 <td style="text-align: left;"><code>u</code></td> | |
| 8337 </tr> | |
| 8338 <tr> | |
| 8339 <td>6</td> | |
| 8340 <td style="text-align: left;"><code>ACK</code></td> | |
| 8341 <td style="text-align: left;"><code>SYN</code></td> | |
| 8342 <td style="text-align: left;"><code>&</code></td> | |
| 8343 <td style="text-align: left;"><code>6</code></td> | |
| 8344 <td style="text-align: left;"><code>F</code></td> | |
| 8345 <td style="text-align: left;"><code>V</code></td> | |
| 8346 <td style="text-align: left;"><code>f</code></td> | |
| 8347 <td style="text-align: left;"><code>v</code></td> | |
| 8348 </tr> | |
| 8349 <tr> | |
| 8350 <td>7</td> | |
| 8351 <td style="text-align: left;"><code>BEL</code></td> | |
| 8352 <td style="text-align: left;"><code>ETB</code></td> | |
| 8353 <td style="text-align: left;"><code>'</code></td> | |
| 8354 <td style="text-align: left;"><code>7</code></td> | |
| 8355 <td style="text-align: left;"><code>G</code></td> | |
| 8356 <td style="text-align: left;"><code>W</code></td> | |
| 8357 <td style="text-align: left;"><code>g</code></td> | |
| 8358 <td style="text-align: left;"><code>w</code></td> | |
| 8359 </tr> | |
| 8360 <tr> | |
| 8361 <td>8</td> | |
| 8362 <td style="text-align: left;"><code>BS</code></td> | |
| 8363 <td style="text-align: left;"><code>CAN</code></td> | |
| 8364 <td style="text-align: left;"><code>(</code></td> | |
| 8365 <td style="text-align: left;"><code>8</code></td> | |
| 8366 <td style="text-align: left;"><code>H</code></td> | |
| 8367 <td style="text-align: left;"><code>X</code></td> | |
| 8368 <td style="text-align: left;"><code>h</code></td> | |
| 8369 <td style="text-align: left;"><code>x</code></td> | |
| 8370 </tr> | |
| 8371 <tr> | |
| 8372 <td>9</td> | |
| 8373 <td style="text-align: left;"><code>TAB</code></td> | |
| 8374 <td style="text-align: left;"><code>EM</code></td> | |
| 8375 <td style="text-align: left;"><code>)</code></td> | |
| 8376 <td style="text-align: left;"><code>9</code></td> | |
| 8377 <td style="text-align: left;"><code>I</code></td> | |
| 8378 <td style="text-align: left;"><code>Y</code></td> | |
| 8379 <td style="text-align: left;"><code>i</code></td> | |
| 8380 <td style="text-align: left;"><code>y</code></td> | |
| 8381 </tr> | |
| 8382 <tr> | |
| 8383 <td>A</td> | |
| 8384 <td style="text-align: left;"><code>LF</code></td> | |
| 8385 <td style="text-align: left;"><code>SUB</code></td> | |
| 8386 <td style="text-align: left;"><code>*</code></td> | |
| 8387 <td style="text-align: left;"><code>:</code></td> | |
| 8388 <td style="text-align: left;"><code>J</code></td> | |
| 8389 <td style="text-align: left;"><code>Z</code></td> | |
| 8390 <td style="text-align: left;"><code>j</code></td> | |
| 8391 <td style="text-align: left;"><code>z</code></td> | |
| 8392 </tr> | |
| 8393 <tr> | |
| 8394 <td>B</td> | |
| 8395 <td style="text-align: left;"><code>VT</code></td> | |
| 8396 <td style="text-align: left;"><code>ESC</code></td> | |
| 8397 <td style="text-align: left;"><code>+</code></td> | |
| 8398 <td style="text-align: left;"><code>;</code></td> | |
| 8399 <td style="text-align: left;"><code>K</code></td> | |
| 8400 <td style="text-align: left;"><code>[</code></td> | |
| 8401 <td style="text-align: left;"><code>k</code></td> | |
| 8402 <td style="text-align: left;"><code>{</code></td> | |
| 8403 </tr> | |
| 8404 <tr> | |
| 8405 <td>C</td> | |
| 8406 <td style="text-align: left;"><code>FF</code></td> | |
| 8407 <td style="text-align: left;"><code>FS</code></td> | |
| 8408 <td style="text-align: left;"><code>,</code></td> | |
| 8409 <td style="text-align: left;"><code><</code></td> | |
| 8410 <td style="text-align: left;"><code>L</code></td> | |
| 8411 <td style="text-align: left;"><code>\</code></td> | |
| 8412 <td style="text-align: left;"><code>l</code></td> | |
| 8413 <td style="text-align: left;"><code>|</code></td> | |
| 8414 </tr> | |
| 8415 <tr> | |
| 8416 <td>D</td> | |
| 8417 <td style="text-align: left;"><code>CR</code></td> | |
| 8418 <td style="text-align: left;"><code>GS</code></td> | |
| 8419 <td style="text-align: left;"><code>-</code></td> | |
| 8420 <td style="text-align: left;"><code>=</code></td> | |
| 8421 <td style="text-align: left;"><code>M</code></td> | |
| 8422 <td style="text-align: left;"><code>]</code></td> | |
| 8423 <td style="text-align: left;"><code>m</code></td> | |
| 8424 <td style="text-align: left;"><code>}</code></td> | |
| 8425 </tr> | |
| 8426 <tr> | |
| 8427 <td>E</td> | |
| 8428 <td style="text-align: left;"><code>SO</code></td> | |
| 8429 <td style="text-align: left;"><code>RS</code></td> | |
| 8430 <td style="text-align: left;"><code>.</code></td> | |
| 8431 <td style="text-align: left;"><code>></code></td> | |
| 8432 <td style="text-align: left;"><code>N</code></td> | |
| 8433 <td style="text-align: left;"><code>^</code></td> | |
| 8434 <td style="text-align: left;"><code>n</code></td> | |
| 8435 <td style="text-align: left;"><code>~</code></td> | |
| 8436 </tr> | |
| 8437 <tr> | |
| 8438 <td>F</td> | |
| 8439 <td style="text-align: left;"><code>SI</code></td> | |
| 8440 <td style="text-align: left;"><code>US</code></td> | |
| 8441 <td style="text-align: left;"><code>/</code></td> | |
| 8442 <td style="text-align: left;"><code>?</code></td> | |
| 8443 <td style="text-align: left;"><code>O</code></td> | |
| 8444 <td style="text-align: left;"><code>_</code></td> | |
| 8445 <td style="text-align: left;"><code>o</code></td> | |
| 8446 <td style="text-align: left;"><code>DEL</code></td> | |
| 8447 </tr> | |
| 8448 </tbody> | |
| 8449 </table> | |
| 8450 </div> | |
| 8451 <h2 id="a.2-latin-alphabet-no.-1-isoiec-8859-1">A.2 Latin Alphabet No. 1 | |
| 8452 (ISO/IEC 8859-1)</h2> | |
| 8453 <p>ISO/IEC 8859-1 defines additional characters common in western | |
| 8454 European languages like French, German, Italian and Spanish. This | |
| 8455 extension is the default encoding of many barcodes (see Table <a | |
| 8456 href="#tbl:default_character_sets">: Default Character Sets</a>) when a | |
| 8457 codepoint above hex 9F is encoded. Note that codepoints hex 80 to 9F are | |
| 8458 not defined.</p> | |
| 8459 <div id="tbl:iso_iec_8869_1" class="tablenos"> | |
| 8460 <table id="tbl:iso_iec_8869_1" data-tag=": ISO/IEC 8859-1"> | |
| 8461 <caption><span>Table : ISO/IEC 8859-1</span> </caption> | |
| 8462 <thead> | |
| 8463 <tr> | |
| 8464 <th>Hex</th> | |
| 8465 <th style="text-align: left;">8</th> | |
| 8466 <th style="text-align: left;">9</th> | |
| 8467 <th style="text-align: left;">A</th> | |
| 8468 <th style="text-align: left;">B</th> | |
| 8469 <th style="text-align: left;">C</th> | |
| 8470 <th style="text-align: left;">D</th> | |
| 8471 <th style="text-align: left;">E</th> | |
| 8472 <th style="text-align: left;">F</th> | |
| 8473 </tr> | |
| 8474 </thead> | |
| 8475 <tbody> | |
| 8476 <tr> | |
| 8477 <td>0</td> | |
| 8478 <td style="text-align: left;"></td> | |
| 8479 <td style="text-align: left;"></td> | |
| 8480 <td style="text-align: left;"><code>NBSP</code></td> | |
| 8481 <td style="text-align: left;"><code>°</code></td> | |
| 8482 <td style="text-align: left;"><code>À</code></td> | |
| 8483 <td style="text-align: left;"><code>Ð</code></td> | |
| 8484 <td style="text-align: left;"><code>à</code></td> | |
| 8485 <td style="text-align: left;"><code>ð</code></td> | |
| 8486 </tr> | |
| 8487 <tr> | |
| 8488 <td>1</td> | |
| 8489 <td style="text-align: left;"></td> | |
| 8490 <td style="text-align: left;"></td> | |
| 8491 <td style="text-align: left;"><code>¡</code></td> | |
| 8492 <td style="text-align: left;"><code>±</code></td> | |
| 8493 <td style="text-align: left;"><code>Á</code></td> | |
| 8494 <td style="text-align: left;"><code>Ñ</code></td> | |
| 8495 <td style="text-align: left;"><code>á</code></td> | |
| 8496 <td style="text-align: left;"><code>ñ</code></td> | |
| 8497 </tr> | |
| 8498 <tr> | |
| 8499 <td>2</td> | |
| 8500 <td style="text-align: left;"></td> | |
| 8501 <td style="text-align: left;"></td> | |
| 8502 <td style="text-align: left;"><code>¢</code></td> | |
| 8503 <td style="text-align: left;"><code>²</code></td> | |
| 8504 <td style="text-align: left;"><code>Â</code></td> | |
| 8505 <td style="text-align: left;"><code>Ò</code></td> | |
| 8506 <td style="text-align: left;"><code>â</code></td> | |
| 8507 <td style="text-align: left;"><code>ò</code></td> | |
| 8508 </tr> | |
| 8509 <tr> | |
| 8510 <td>3</td> | |
| 8511 <td style="text-align: left;"></td> | |
| 8512 <td style="text-align: left;"></td> | |
| 8513 <td style="text-align: left;"><code>£</code></td> | |
| 8514 <td style="text-align: left;"><code>³</code></td> | |
| 8515 <td style="text-align: left;"><code>Ã</code></td> | |
| 8516 <td style="text-align: left;"><code>Ó</code></td> | |
| 8517 <td style="text-align: left;"><code>ã</code></td> | |
| 8518 <td style="text-align: left;"><code>ó</code></td> | |
| 8519 </tr> | |
| 8520 <tr> | |
| 8521 <td>4</td> | |
| 8522 <td style="text-align: left;"></td> | |
| 8523 <td style="text-align: left;"></td> | |
| 8524 <td style="text-align: left;"><code>¤</code></td> | |
| 8525 <td style="text-align: left;"><code>´</code></td> | |
| 8526 <td style="text-align: left;"><code>Ä</code></td> | |
| 8527 <td style="text-align: left;"><code>Ô</code></td> | |
| 8528 <td style="text-align: left;"><code>ä</code></td> | |
| 8529 <td style="text-align: left;"><code>ô</code></td> | |
| 8530 </tr> | |
| 8531 <tr> | |
| 8532 <td>5</td> | |
| 8533 <td style="text-align: left;"></td> | |
| 8534 <td style="text-align: left;"></td> | |
| 8535 <td style="text-align: left;"><code>¥</code></td> | |
| 8536 <td style="text-align: left;"><code>μ</code></td> | |
| 8537 <td style="text-align: left;"><code>Å</code></td> | |
| 8538 <td style="text-align: left;"><code>Õ</code></td> | |
| 8539 <td style="text-align: left;"><code>å</code></td> | |
| 8540 <td style="text-align: left;"><code>õ</code></td> | |
| 8541 </tr> | |
| 8542 <tr> | |
| 8543 <td>6</td> | |
| 8544 <td style="text-align: left;"></td> | |
| 8545 <td style="text-align: left;"></td> | |
| 8546 <td style="text-align: left;"><code>¦</code></td> | |
| 8547 <td style="text-align: left;"><code>¶</code></td> | |
| 8548 <td style="text-align: left;"><code>Æ</code></td> | |
| 8549 <td style="text-align: left;"><code>Ö</code></td> | |
| 8550 <td style="text-align: left;"><code>æ</code></td> | |
| 8551 <td style="text-align: left;"><code>ö</code></td> | |
| 8552 </tr> | |
| 8553 <tr> | |
| 8554 <td>7</td> | |
| 8555 <td style="text-align: left;"></td> | |
| 8556 <td style="text-align: left;"></td> | |
| 8557 <td style="text-align: left;"><code>§</code></td> | |
| 8558 <td style="text-align: left;"><code>·</code></td> | |
| 8559 <td style="text-align: left;"><code>Ç</code></td> | |
| 8560 <td style="text-align: left;"><code>×</code></td> | |
| 8561 <td style="text-align: left;"><code>ç</code></td> | |
| 8562 <td style="text-align: left;"><code>÷</code></td> | |
| 8563 </tr> | |
| 8564 <tr> | |
| 8565 <td>8</td> | |
| 8566 <td style="text-align: left;"></td> | |
| 8567 <td style="text-align: left;"></td> | |
| 8568 <td style="text-align: left;"><code>¨</code></td> | |
| 8569 <td style="text-align: left;"><code>¸</code></td> | |
| 8570 <td style="text-align: left;"><code>È</code></td> | |
| 8571 <td style="text-align: left;"><code>Ø</code></td> | |
| 8572 <td style="text-align: left;"><code>è</code></td> | |
| 8573 <td style="text-align: left;"><code>ø</code></td> | |
| 8574 </tr> | |
| 8575 <tr> | |
| 8576 <td>9</td> | |
| 8577 <td style="text-align: left;"></td> | |
| 8578 <td style="text-align: left;"></td> | |
| 8579 <td style="text-align: left;"><code>©</code></td> | |
| 8580 <td style="text-align: left;"><code>¹</code></td> | |
| 8581 <td style="text-align: left;"><code>É</code></td> | |
| 8582 <td style="text-align: left;"><code>Ù</code></td> | |
| 8583 <td style="text-align: left;"><code>é</code></td> | |
| 8584 <td style="text-align: left;"><code>ù</code></td> | |
| 8585 </tr> | |
| 8586 <tr> | |
| 8587 <td>A</td> | |
| 8588 <td style="text-align: left;"></td> | |
| 8589 <td style="text-align: left;"></td> | |
| 8590 <td style="text-align: left;"><code>ª</code></td> | |
| 8591 <td style="text-align: left;"><code>º</code></td> | |
| 8592 <td style="text-align: left;"><code>Ê</code></td> | |
| 8593 <td style="text-align: left;"><code>Ú</code></td> | |
| 8594 <td style="text-align: left;"><code>ê</code></td> | |
| 8595 <td style="text-align: left;"><code>ú</code></td> | |
| 8596 </tr> | |
| 8597 <tr> | |
| 8598 <td>B</td> | |
| 8599 <td style="text-align: left;"></td> | |
| 8600 <td style="text-align: left;"></td> | |
| 8601 <td style="text-align: left;"><code>«</code></td> | |
| 8602 <td style="text-align: left;"><code>»</code></td> | |
| 8603 <td style="text-align: left;"><code>Ë</code></td> | |
| 8604 <td style="text-align: left;"><code>Û</code></td> | |
| 8605 <td style="text-align: left;"><code>ë</code></td> | |
| 8606 <td style="text-align: left;"><code>û</code></td> | |
| 8607 </tr> | |
| 8608 <tr> | |
| 8609 <td>C</td> | |
| 8610 <td style="text-align: left;"></td> | |
| 8611 <td style="text-align: left;"></td> | |
| 8612 <td style="text-align: left;"><code>¬</code></td> | |
| 8613 <td style="text-align: left;"><code>¼</code></td> | |
| 8614 <td style="text-align: left;"><code>Ì</code></td> | |
| 8615 <td style="text-align: left;"><code>Ü</code></td> | |
| 8616 <td style="text-align: left;"><code>ì</code></td> | |
| 8617 <td style="text-align: left;"><code>ü</code></td> | |
| 8618 </tr> | |
| 8619 <tr> | |
| 8620 <td>D</td> | |
| 8621 <td style="text-align: left;"></td> | |
| 8622 <td style="text-align: left;"></td> | |
| 8623 <td style="text-align: left;"><code>SHY</code></td> | |
| 8624 <td style="text-align: left;"><code>½</code></td> | |
| 8625 <td style="text-align: left;"><code>Í</code></td> | |
| 8626 <td style="text-align: left;"><code>Ý</code></td> | |
| 8627 <td style="text-align: left;"><code>í</code></td> | |
| 8628 <td style="text-align: left;"><code>ý</code></td> | |
| 8629 </tr> | |
| 8630 <tr> | |
| 8631 <td>E</td> | |
| 8632 <td style="text-align: left;"></td> | |
| 8633 <td style="text-align: left;"></td> | |
| 8634 <td style="text-align: left;"><code>®</code></td> | |
| 8635 <td style="text-align: left;"><code>¾</code></td> | |
| 8636 <td style="text-align: left;"><code>Î</code></td> | |
| 8637 <td style="text-align: left;"><code>Þ</code></td> | |
| 8638 <td style="text-align: left;"><code>î</code></td> | |
| 8639 <td style="text-align: left;"><code>þ</code></td> | |
| 8640 </tr> | |
| 8641 <tr> | |
| 8642 <td>F</td> | |
| 8643 <td style="text-align: left;"></td> | |
| 8644 <td style="text-align: left;"></td> | |
| 8645 <td style="text-align: left;"><code>¯</code></td> | |
| 8646 <td style="text-align: left;"><code>¿</code></td> | |
| 8647 <td style="text-align: left;"><code>Ï</code></td> | |
| 8648 <td style="text-align: left;"><code>ß</code></td> | |
| 8649 <td style="text-align: left;"><code>ï</code></td> | |
| 8650 <td style="text-align: left;"><code>ÿ</code></td> | |
| 8651 </tr> | |
| 8652 </tbody> | |
| 8653 </table> | |
| 8654 </div> | |
| 8655 <h1 id="annex-b.-qt-backend-qzint">Annex B. Qt Backend QZint</h1> | |
| 8656 <p>Used internally by Zint Barcode Studio to display the preview, the Qt | |
| 8657 Backend <code>QZint</code> renders a barcode by drawing the vector | |
| 8658 representation (see <a href="#buffering-symbols-in-memory-vector">5.5 | |
| 8659 Buffering Symbols in Memory (vector)</a>) provided by the Zint library | |
| 8660 <code>libzint</code>.</p> | |
| 8661 <p>The main class is <code>Zint::QZint</code>, which has getter/setter | |
| 8662 properties that correspond to the <code>zint_symbol</code> structure | |
| 8663 (see <a href="#setting-options">5.7 Setting Options</a>), and a main | |
| 8664 method <code>render()</code> which takes a Qt <code>QPainter</code> to | |
| 8665 paint with, and a <code>QRectF</code> rectangular area specifying where | |
| 8666 to paint into:</p> | |
| 8667 <div class="sourceCode" id="cb120"><pre | |
| 8668 class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb120-1"><a href="#cb120-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* Encode and display barcode in `paintRect` using `painter`.</span></span> | |
| 8669 <span id="cb120-2"><a href="#cb120-2" aria-hidden="true" tabindex="-1"></a><span class="co"> Note: legacy argument `mode` is not used */</span></span> | |
| 8670 <span id="cb120-3"><a href="#cb120-3" aria-hidden="true" tabindex="-1"></a><span class="dt">void</span> render<span class="op">(</span><span class="ex">QPainter</span><span class="op">&</span> painter<span class="op">,</span> <span class="at">const</span> <span class="ex">QRectF</span><span class="op">&</span> paintRect<span class="op">,</span></span> | |
| 8671 <span id="cb120-4"><a href="#cb120-4" aria-hidden="true" tabindex="-1"></a> AspectRatioMode mode <span class="op">=</span> IgnoreAspectRatio<span class="op">);</span></span></code></pre></div> | |
| 8672 <p><code>render()</code> will emit one of two Qt signals - | |
| 8673 <code>encoded</code> on successful encoding and drawing, or | |
| 8674 <code>errored</code> on failure. The client can connect and act | |
| 8675 appropriately, for instance:</p> | |
| 8676 <div class="sourceCode" id="cb121"><pre | |
| 8677 class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb121-1"><a href="#cb121-1" aria-hidden="true" tabindex="-1"></a><span class="fu">connect</span><span class="op">(</span>qzint<span class="op">,</span> <span class="ex">SIGNAL</span><span class="op">(</span>encoded<span class="op">()),</span> <span class="ex">SLOT</span><span class="op">(</span>on_encoded<span class="op">()));</span></span> | |
| 8678 <span id="cb121-2"><a href="#cb121-2" aria-hidden="true" tabindex="-1"></a><span class="fu">connect</span><span class="op">(</span>qzint<span class="op">,</span> <span class="ex">SIGNAL</span><span class="op">(</span>errored<span class="op">()),</span> <span class="ex">SLOT</span><span class="op">(</span>on_errored<span class="op">()));</span></span></code></pre></div> | |
| 8679 <p>where <code>qzint</code> is an instance of <code>Zint::QZint</code> | |
| 8680 and <code>on_encoded()</code> and <code>on_error()</code> are Qt slot | |
| 8681 methods provided by the caller. On error, the error value and message | |
| 8682 can be retrieved by the methods <code>getError()</code> and | |
| 8683 <code>lastError()</code> respectively.</p> | |
| 8684 <p>The other main method is <code>save_to_file()</code>:</p> | |
| 8685 <div class="sourceCode" id="cb122"><pre | |
| 8686 class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb122-1"><a href="#cb122-1" aria-hidden="true" tabindex="-1"></a><span class="co">/* Encode and print barcode to file `filename`.</span></span> | |
| 8687 <span id="cb122-2"><a href="#cb122-2" aria-hidden="true" tabindex="-1"></a><span class="co"> Only sets `getError()` on error, not on warning */</span></span> | |
| 8688 <span id="cb122-3"><a href="#cb122-3" aria-hidden="true" tabindex="-1"></a><span class="dt">bool</span> save_to_file<span class="op">(</span><span class="at">const</span> <span class="ex">QString</span><span class="op">&</span> filename<span class="op">);</span> <span class="co">// `ZBarcode_Print()`</span></span></code></pre></div> | |
| 8689 <p>which takes a <code>filename</code> to output to. It too will emit an | |
| 8690 <code>errored</code> signal on failure, returning <code>false</code> | |
| 8691 (but nothing on success, which just returns <code>true</code>). Note | |
| 8692 that rotation is achieved through the setter method | |
| 8693 <code>setRotateAngleValue()</code> (as opposed to the | |
| 8694 <code>rotate_angle</code> argument used by | |
| 8695 <code>ZBarcode_Print()</code>).</p> | |
| 8696 <p>Various other methods are available, for instance methods for testing | |
| 8697 symbology capabilities, and utility methods such as | |
| 8698 <code>defaultXdim()</code> and <code>getAsCLI()</code>.</p> | |
| 8699 <p>For full details, see <code>"backend_qt/qzint.h"</code>.</p> | |
| 8700 <h1 id="annex-c.-tcl-backend-binding">Annex C. Tcl Backend Binding</h1> | |
| 8701 <p>A Tcl binding is available in the <code>"backend_tcl</code>” | |
| 8702 sub-directory. To make on Unix:</p> | |
| 8703 <div class="sourceCode" id="cb123"><pre | |
| 8704 class="sourceCode bash"><code class="sourceCode bash"><span id="cb123-1"><a href="#cb123-1" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> backend_tcl</span> | |
| 8705 <span id="cb123-2"><a href="#cb123-2" aria-hidden="true" tabindex="-1"></a><span class="fu">autoconf</span></span> | |
| 8706 <span id="cb123-3"><a href="#cb123-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./configure</span></span> | |
| 8707 <span id="cb123-4"><a href="#cb123-4" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span> | |
| 8708 <span id="cb123-5"><a href="#cb123-5" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> make install</span></code></pre></div> | |
| 8709 <p>For Windows, a Visual Studio 6.0 project file is available at | |
| 8710 <code>"backend_tcl\zint_tcl.dsp"</code>. This can also be opened (and | |
| 8711 converted) by more modern Visual Studio versions, though some fixing up | |
| 8712 of the project configuration will likely be required.</p> | |
| 8713 <p>Once built and installed, invoke the Tcl/Tk CLI | |
| 8714 <code>"wish"</code>:</p> | |
| 8715 <div class="sourceCode" id="cb124"><pre | |
| 8716 class="sourceCode bash"><code class="sourceCode bash"><span id="cb124-1"><a href="#cb124-1" aria-hidden="true" tabindex="-1"></a><span class="ex">wish</span></span></code></pre></div> | |
| 8717 <p>and ignoring the Tk window click back to the command prompt | |
| 8718 <code>"%"</code> and type:</p> | |
| 8719 <div class="sourceCode" id="cb125"><pre | |
| 8720 class="sourceCode bash"><code class="sourceCode bash"><span id="cb125-1"><a href="#cb125-1" aria-hidden="true" tabindex="-1"></a><span class="ex">require</span> package zint</span> | |
| 8721 <span id="cb125-2"><a href="#cb125-2" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> help</span></code></pre></div> | |
| 8722 <p>which will show the usage message, with options very similiar to the | |
| 8723 Zint CLI. (One notable difference is that boolean options such as | |
| 8724 <code>-bold</code> take a <code>1</code> or <code>0</code> as an | |
| 8725 argument.)</p> | |
| 8726 <p>A demonstration Tcl/Tk program which is also useful in itself is | |
| 8727 available at <code>"backend_tcl/demo/demo.tcl"</code>. To run type:</p> | |
| 8728 <div class="sourceCode" id="cb126"><pre | |
| 8729 class="sourceCode bash"><code class="sourceCode bash"><span id="cb126-1"><a href="#cb126-1" aria-hidden="true" tabindex="-1"></a><span class="ex">wish</span> demo/demo.tcl</span></code></pre></div> | |
| 8730 <p>which will display the following window.</p> | |
| 8731 <figure> | |
| 8732 <img src="images/tcl_demo.png" title="fig:" class="pop" | |
| 8733 alt="Tcl/Tk demonstration program window" /> | |
| 8734 <figcaption aria-hidden="true">Tcl/Tk demonstration program | |
| 8735 window</figcaption> | |
| 8736 </figure> | |
| 8737 <p>You can select the symbology, enter the data to encode, and set | |
| 8738 options (which are the same as those given in the usage message). A | |
| 8739 raster preview of the configured barcode is displayed once the | |
| 8740 <code>"Generate"</code> button is pressed.</p> | |
| 8741 <h1 id="annex-d.-man-page-zint1">Annex D. Man Page ZINT(1)</h1> | |
| 8742 | |
| 8743 <h2 id="name">NAME</h2> | |
| 8744 <p><code>zint</code> - encode data as a barcode image</p> | |
| 8745 <h2 id="synopsis">SYNOPSIS</h2> | |
| 8746 <div class="line-block"><code>zint</code> [<code>-h</code> | | |
| 8747 <code>--help</code>]<br /> | |
| 8748 <code>zint</code> [<em>options</em>]</div> | |
| 8749 <h2 id="description">DESCRIPTION</h2> | |
| 8750 <p>zint takes input data from the command line or a file to encode in a | |
| 8751 barcode which is then output to an image file.</p> | |
| 8752 <p>Input data is UTF-8, unless <code>--binary</code> is specified.</p> | |
| 8753 <p>Human Readable Text (HRT) is displayed by default for those barcodes | |
| 8754 that support HRT, unless <code>--notext</code> is specified.</p> | |
| 8755 <p>The output image file (specified with <code>-o</code> | | |
| 8756 <code>--output</code>) may be in one of these formats: Windows Bitmap | |
| 8757 (<code>BMP</code>), Enhanced Metafile Format (<code>EMF</code>), | |
| 8758 Encapsulated PostScript (<code>EPS</code>), Graphics Interchange Format | |
| 8759 (<code>GIF</code>), ZSoft Paintbrush (<code>PCX</code>), Portable | |
| 8760 Network Format (<code>PNG</code>), Scalable Vector Graphic | |
| 8761 (<code>SVG</code>), or Tagged Image File Format (<code>TIF</code>).</p> | |
| 8762 <h2 id="options">OPTIONS</h2> | |
| 8763 <dl> | |
| 8764 <dt><code>-h</code>, <code>--help</code></dt> | |
| 8765 <dd> | |
| 8766 <p>Print usage information summarizing command line options.</p> | |
| 8767 </dd> | |
| 8768 <dt><code>-b TYPE</code>, <code>--barcode=TYPE</code></dt> | |
| 8769 <dd> | |
| 8770 <p>Set the barcode symbology that will be used to encode the data. | |
| 8771 <em>TYPE</em> is the number or name of the barcode symbology. If not | |
| 8772 given, the symbology defaults to 20 (Code 128). To see what types are | |
| 8773 available, use the <code>-t</code> | <code>--types</code> option. Type | |
| 8774 names are case-insensitive, and non-alphanumerics are ignored.</p> | |
| 8775 </dd> | |
| 8776 <dt><code>--addongap=INTEGER</code></dt> | |
| 8777 <dd> | |
| 8778 <p>For EAN/UPC symbologies, set the gap between the main data and the | |
| 8779 add-on. <em>INTEGER</em> is in integral multiples of the X-dimension. | |
| 8780 The maximum gap that can be set is 12. The minimum is 7, except for | |
| 8781 UPC-A, when the minimum is 9.</p> | |
| 8782 </dd> | |
| 8783 <dt><code>--batch</code></dt> | |
| 8784 <dd> | |
| 8785 <p>Treat each line of an input file specified with <code>-i</code> | | |
| 8786 <code>--input</code> as a separate data set and produce a barcode image | |
| 8787 for each one. The barcode images are outputted by default to numbered | |
| 8788 filenames starting with “00001.png”, “00002.png” etc., which can be | |
| 8789 changed by using the <code>-o</code> | <code>--output</code> option.</p> | |
| 8790 </dd> | |
| 8791 <dt><code>--bg=COLOUR</code></dt> | |
| 8792 <dd> | |
| 8793 <p>Specify a background (paper) colour where <em>COLOUR</em> is in | |
| 8794 hexadecimal <code>RRGGBB</code> or <code>RRGGBBAA</code> format or in | |
| 8795 decimal <code>C,M,Y,K</code> percentages format.</p> | |
| 8796 </dd> | |
| 8797 <dt><code>--binary</code></dt> | |
| 8798 <dd> | |
| 8799 <p>Treat input data as raw 8-bit binary data instead of the default | |
| 8800 UTF-8. Automatic code page translation to an ECI page is disabled, and | |
| 8801 no validation of the data’s character encoding takes place.</p> | |
| 8802 </dd> | |
| 8803 <dt><code>--bind</code></dt> | |
| 8804 <dd> | |
| 8805 <p>Add horizontal boundary bars (also known as bearer bars) to the | |
| 8806 symbol. The width of the boundary bars is specified by the | |
| 8807 <code>--border</code> option. <code>--bind</code> can also be used to | |
| 8808 add row separator bars to symbols stacked with multiple <code>-d</code> | |
| 8809 | <code>--data</code> inputs, in which case the width of the separator | |
| 8810 bars is specified with the <code>--separator</code> option.</p> | |
| 8811 </dd> | |
| 8812 <dt><code>--bindtop</code></dt> | |
| 8813 <dd> | |
| 8814 <p>Add a horizontal boundary bar to the top of the symbol. The width of | |
| 8815 the boundary bar is specified by the <code>--border</code> option.</p> | |
| 8816 </dd> | |
| 8817 <dt><code>--bold</code></dt> | |
| 8818 <dd> | |
| 8819 <p>Use a bold font for the Human Readable Text (HRT).</p> | |
| 8820 </dd> | |
| 8821 <dt><code>--border=INTEGER</code></dt> | |
| 8822 <dd> | |
| 8823 <p>Set the width of boundary bars (<code>--bind</code> or | |
| 8824 <code>--bindtop</code>) or box borders (<code>--box</code>), where | |
| 8825 <em>INTEGER</em> is in integral multiples of the X-dimension. The | |
| 8826 default is zero.</p> | |
| 8827 </dd> | |
| 8828 <dt><code>--box</code></dt> | |
| 8829 <dd> | |
| 8830 <p>Add a box around the symbol. The width of the borders is specified by | |
| 8831 the <code>--border</code> option.</p> | |
| 8832 </dd> | |
| 8833 <dt><code>--cmyk</code></dt> | |
| 8834 <dd> | |
| 8835 <p>Use the CMYK colour space when outputting to Encapsulated PostScript | |
| 8836 (EPS) or TIF files.</p> | |
| 8837 </dd> | |
| 8838 <dt><code>--cols=INTEGER</code></dt> | |
| 8839 <dd> | |
| 8840 <p>Set the number of data columns in the symbol to <em>INTEGER</em>. | |
| 8841 Affects Codablock-F, DotCode, GS1 DataBar Expanded Stacked | |
| 8842 (DBAR_EXPSTK), MicroPDF417 and PDF417 symbols.</p> | |
| 8843 </dd> | |
| 8844 <dt><code>--compliantheight</code></dt> | |
| 8845 <dd> | |
| 8846 <p>Warn if the height specified by the <code>--height</code> option is | |
| 8847 not compliant with the barcode’s specification, or if | |
| 8848 <code>--height</code> is not given, default to the height specified by | |
| 8849 the specification (if any).</p> | |
| 8850 </dd> | |
| 8851 <dt><code>-d</code>, <code>--data=DATA</code></dt> | |
| 8852 <dd> | |
| 8853 <p>Specify the input <em>DATA</em> to encode. The <code>--esc</code> | |
| 8854 option may be used to enter non-printing characters using escape | |
| 8855 sequences. The <em>DATA</em> should be UTF-8, unless the | |
| 8856 <code>--binary</code> option is given, in which case it can be | |
| 8857 anything.</p> | |
| 8858 </dd> | |
| 8859 <dt><code>--direct</code></dt> | |
| 8860 <dd> | |
| 8861 <p>Send output to stdout, which in most cases should be re-directed to a | |
| 8862 pipe or a file. Use <code>--filetype</code> to specify output | |
| 8863 format.</p> | |
| 8864 </dd> | |
| 8865 <dt><code>--dmiso144</code></dt> | |
| 8866 <dd> | |
| 8867 <p>For Data Matrix symbols, use the standard ISO/IEC codeword placement | |
| 8868 for 144 x 144 (<code>--vers=24</code>) sized symbols, instead of the | |
| 8869 default “de facto” placement (which rotates the placement of ECC | |
| 8870 codewords).</p> | |
| 8871 </dd> | |
| 8872 <dt><code>--dmre</code></dt> | |
| 8873 <dd> | |
| 8874 <p>For Data Matrix symbols, allow Data Matrix Rectangular Extended | |
| 8875 (DMRE) sizes when considering automatic sizes. See also | |
| 8876 <code>--square</code>.</p> | |
| 8877 </dd> | |
| 8878 <dt><code>--dotsize=NUMBER</code></dt> | |
| 8879 <dd> | |
| 8880 <p>Set the radius of the dots in dotty mode (<code>--dotty</code>). | |
| 8881 <em>NUMBER</em> is in X-dimensions, and may be floating-point. The | |
| 8882 default is 0.8.</p> | |
| 8883 </dd> | |
| 8884 <dt><code>--dotty</code></dt> | |
| 8885 <dd> | |
| 8886 <p>Use dots instead of squares for matrix symbols. DotCode is always in | |
| 8887 dotty mode.</p> | |
| 8888 </dd> | |
| 8889 <dt><code>--dump</code></dt> | |
| 8890 <dd> | |
| 8891 <p>Dump a hexadecimal representation of the symbol’s encodation to | |
| 8892 stdout. The same representation may be outputted to a file by using a | |
| 8893 <code>.txt</code> extension with <code>-o</code> | <code>--output</code> | |
| 8894 or by specifying <code>--filetype=txt</code>.</p> | |
| 8895 </dd> | |
| 8896 <dt><code>-e</code>, <code>--ecinos</code></dt> | |
| 8897 <dd> | |
| 8898 <p>Display the table of ECIs (Extended Channel Interpretations).</p> | |
| 8899 </dd> | |
| 8900 <dt><code>--eci=INTEGER</code></dt> | |
| 8901 <dd> | |
| 8902 <p>Set the ECI code for the input data to <em>INTEGER</em>. See | |
| 8903 <code>-e</code> | <code>--ecinos</code> for a list of the ECIs | |
| 8904 available. ECIs are supported by Aztec Code, Code One, Data Matrix, | |
| 8905 DotCode, Grid Matrix, Han Xin Code, MaxiCode, MicroPDF417, PDF417, QR | |
| 8906 Code, rMQR and Ultracode.</p> | |
| 8907 </dd> | |
| 8908 <dt><code>--embedfont</code></dt> | |
| 8909 <dd> | |
| 8910 <p>For vector output, embed the font in the file for portability. | |
| 8911 Currently only available for SVG output.</p> | |
| 8912 </dd> | |
| 8913 <dt><code>--esc</code></dt> | |
| 8914 <dd> | |
| 8915 <p>Process escape characters in the input data. The escape sequences | |
| 8916 are:</p> | |
| 8917 <pre><code>\0 (0x00) NUL Null character | |
| 8918 \E (0x04) EOT End of Transmission | |
| 8919 \a (0x07) BEL Bell | |
| 8920 \b (0x08) BS Backspace | |
| 8921 \t (0x09) HT Horizontal Tab | |
| 8922 \n (0x0A) LF Line Feed | |
| 8923 \v (0x0B) VT Vertical Tab | |
| 8924 \f (0x0C) FF Form Feed | |
| 8925 \r (0x0D) CR Carriage Return | |
| 8926 \e (0x1B) ESC Escape | |
| 8927 \G (0x1D) GS Group Separator | |
| 8928 \R (0x1E) RS Record Separator | |
| 8929 \\ (0x5C) \ Backslash | |
| 8930 \dNNN (NNN) Any 8-bit character where NNN is | |
| 8931 decimal (000-255) | |
| 8932 \oNNN (0oNNN) Any 8-bit character where NNN is | |
| 8933 octal (000-377) | |
| 8934 \xNN (0xNN) Any 8-bit character where NN is | |
| 8935 hexadecimal (00-FF) | |
| 8936 \uNNNN (U+NNNN) Any 16-bit Unicode BMP character | |
| 8937 where NNNN is hexadecimal | |
| 8938 \UNNNNNN (U+NNNNNN) Any 21-bit Unicode character | |
| 8939 where NNNNNN is hexadecimal</code></pre> | |
| 8940 </dd> | |
| 8941 <dt><code>--extraesc</code></dt> | |
| 8942 <dd> | |
| 8943 <p>For Code 128 only, as well as processing the normal escape sequences | |
| 8944 above, process the special escape sequences <code>\^A</code>, | |
| 8945 <code>\^B</code>, <code>\^C</code> and <code>\^@</code> that allow | |
| 8946 manual switching of Code Sets, and the special escape sequence | |
| 8947 <code>\^1</code> that inserts an <code>FNC1</code> character. The | |
| 8948 sequence <code>\@</code> turns off manual switching. The sequence | |
| 8949 <code>\^^</code> can be used to encode data that contains special escape | |
| 8950 sequences.</p> | |
| 8951 </dd> | |
| 8952 <dt><code>--fast</code></dt> | |
| 8953 <dd> | |
| 8954 <p>Use faster if less optimal encodation or other shortcuts (affects | |
| 8955 Data Matrix, MicroPDF417, PDF417, QRCODE & UPNQR only).</p> | |
| 8956 </dd> | |
| 8957 <dt><code>--fg=COLOUR</code></dt> | |
| 8958 <dd> | |
| 8959 <p>Specify a foreground (ink) colour where <em>COLOUR</em> is in | |
| 8960 hexadecimal <code>RRGGBB</code> or <code>RRGGBBAA</code> format or in | |
| 8961 decimal <code>C,M,Y,K</code> percentages format.</p> | |
| 8962 </dd> | |
| 8963 <dt><code>--filetype=TYPE</code></dt> | |
| 8964 <dd> | |
| 8965 <p>Set the output file type to <em>TYPE</em>, which is one of | |
| 8966 <code>BMP</code>, <code>EMF</code>, <code>EPS</code>, <code>GIF</code>, | |
| 8967 <code>PCX</code>, <code>PNG</code>, <code>SVG</code>, <code>TIF</code>, | |
| 8968 <code>TXT</code>.</p> | |
| 8969 </dd> | |
| 8970 <dt><code>--fullmultibyte</code></dt> | |
| 8971 <dd> | |
| 8972 <p>Use the multibyte modes of Grid Matrix, Han Xin and QR Code for | |
| 8973 non-ASCII data.</p> | |
| 8974 </dd> | |
| 8975 <dt><code>--gs1</code></dt> | |
| 8976 <dd> | |
| 8977 <p>Treat input as GS1 compatible data. Application Identifiers (AIs) | |
| 8978 should be placed in square brackets <code>"[]"</code> (but see | |
| 8979 <code>--gs1parens</code>).</p> | |
| 8980 </dd> | |
| 8981 <dt><code>--gs1nocheck</code></dt> | |
| 8982 <dd> | |
| 8983 <p>Do not check the validity of GS1 data.</p> | |
| 8984 </dd> | |
| 8985 <dt><code>--gs1parens</code></dt> | |
| 8986 <dd> | |
| 8987 <p>Process parentheses <code>"()"</code> as GS1 AI delimiters, rather | |
| 8988 than square brackets <code>"[]"</code>. The input data must not | |
| 8989 otherwise contain parentheses.</p> | |
| 8990 </dd> | |
| 8991 <dt><code>--gssep</code></dt> | |
| 8992 <dd> | |
| 8993 <p>For Data Matrix in GS1 mode, use <code>GS</code> (0x1D) as the GS1 | |
| 8994 data separator instead of <code>FNC1</code>.</p> | |
| 8995 </dd> | |
| 8996 <dt><code>--guarddescent=NUMBER</code></dt> | |
| 8997 <dd> | |
| 8998 <p>For EAN/UPC symbols, set the height the guard bars descend below the | |
| 8999 main bars, where <em>NUMBER</em> is in X-dimensions. <em>NUMBER</em> may | |
| 9000 be floating-point.</p> | |
| 9001 </dd> | |
| 9002 <dt><code>--guardwhitespace</code></dt> | |
| 9003 <dd> | |
| 9004 <p>For EAN/UPC symbols, add quiet zone indicators <code>"<"</code> | |
| 9005 and/or <code>">"</code> to HRT where applicable.</p> | |
| 9006 </dd> | |
| 9007 <dt><code>--height=NUMBER</code></dt> | |
| 9008 <dd> | |
| 9009 <p>Set the height of the symbol in X-dimensions. <em>NUMBER</em> may be | |
| 9010 floating-point.</p> | |
| 9011 </dd> | |
| 9012 <dt><code>--heightperrow</code></dt> | |
| 9013 <dd> | |
| 9014 <p>Treat height as per-row. Affects Codablock-F, Code 16K, Code 49, GS1 | |
| 9015 DataBar Expanded Stacked (DBAR_EXPSTK), MicroPDF417 and PDF417.</p> | |
| 9016 </dd> | |
| 9017 <dt><code>-i</code>, <code>--input=FILE</code></dt> | |
| 9018 <dd> | |
| 9019 <p>Read the input data from <em>FILE</em>. Specify a single hyphen | |
| 9020 (<code>-</code>) for <em>FILE</em> to read from stdin.</p> | |
| 9021 </dd> | |
| 9022 <dt><code>--init</code></dt> | |
| 9023 <dd> | |
| 9024 <p>Create a Reader Initialisation (Programming) symbol.</p> | |
| 9025 </dd> | |
| 9026 <dt><code>--mask=INTEGER</code></dt> | |
| 9027 <dd> | |
| 9028 <p>Set the masking pattern to use for DotCode, Han Xin or QR Code to | |
| 9029 <em>INTEGER</em>, overriding the automatic selection.</p> | |
| 9030 </dd> | |
| 9031 <dt><code>--mirror</code></dt> | |
| 9032 <dd> | |
| 9033 <p>Use the batch data to determine the filename in batch mode | |
| 9034 (<code>--batch</code>). The <code>-o</code> | <code>--output</code> | |
| 9035 option can be used to specify an output directory (any filename will be | |
| 9036 ignored).</p> | |
| 9037 </dd> | |
| 9038 <dt><code>--mode=INTEGER</code></dt> | |
| 9039 <dd> | |
| 9040 <p>For MaxiCode and GS1 Composite symbols, set the encoding mode to | |
| 9041 <em>INTEGER</em>.</p> | |
| 9042 <p>For MaxiCode (SCM is Structured Carrier Message, with 3 fields: | |
| 9043 postcode, 3-digit ISO 3166-1 country code, 3-digit service code):</p> | |
| 9044 <pre><code>2 SCM with 9-digit numeric postcode | |
| 9045 3 SCM with 6-character alphanumeric postcode | |
| 9046 4 Enhanced ECC for the primary part of the message | |
| 9047 5 Enhanced ECC for all of the message | |
| 9048 6 Reader Initialisation (Programming)</code></pre> | |
| 9049 <p>For GS1 Composite symbols (names end in <code>_CC</code>, | |
| 9050 i.e. EANX_CC, GS1_128_CC, DBAR_OMN_CC etc.):</p> | |
| 9051 <pre><code>1 CC-A | |
| 9052 2 CC-B | |
| 9053 3 CC-C (GS1_128_CC only)</code></pre> | |
| 9054 </dd> | |
| 9055 <dt><code>--nobackground</code></dt> | |
| 9056 <dd> | |
| 9057 <p>Remove the background colour (EMF, EPS, GIF, PNG, SVG and TIF | |
| 9058 only).</p> | |
| 9059 </dd> | |
| 9060 <dt><code>--noquietzones</code></dt> | |
| 9061 <dd> | |
| 9062 <p>Disable any quiet zones for symbols that define them by default.</p> | |
| 9063 </dd> | |
| 9064 <dt><code>--notext</code></dt> | |
| 9065 <dd> | |
| 9066 <p>Remove the Human Readable Text (HRT).</p> | |
| 9067 </dd> | |
| 9068 <dt><code>-o</code>, <code>--output=FILE</code></dt> | |
| 9069 <dd> | |
| 9070 <p>Send the output to <em>FILE</em>. When not in batch mode, the default | |
| 9071 is “out.png” (or “out.gif” if zint built without PNG support). When in | |
| 9072 batch mode (<code>--batch</code>), special characters can be used to | |
| 9073 format the output filenames:</p> | |
| 9074 <pre><code>~ Insert a number or 0 | |
| 9075 # Insert a number or space | |
| 9076 @ Insert a number or * (+ on Windows) | |
| 9077 Any other Insert literally</code></pre> | |
| 9078 </dd> | |
| 9079 <dt><code>--primary=STRING</code></dt> | |
| 9080 <dd> | |
| 9081 <p>For MaxiCode, set the content of the primary message. For GS1 | |
| 9082 Composite symbols, set the content of the linear symbol.</p> | |
| 9083 </dd> | |
| 9084 <dt><code>--quietzones</code></dt> | |
| 9085 <dd> | |
| 9086 <p>Add compliant quiet zones for symbols that specify them. This is in | |
| 9087 addition to any whitespace specified by <code>-w</code> | | |
| 9088 <code>--whitesp</code> or <code>--vwhitesp</code>.</p> | |
| 9089 </dd> | |
| 9090 <dt><code>-r</code>, <code>--reverse</code></dt> | |
| 9091 <dd> | |
| 9092 <p>Reverse the foreground and background colours (white on black). Known | |
| 9093 as “reflectance reversal” or “reversed reflectance”.</p> | |
| 9094 </dd> | |
| 9095 <dt><code>--rotate=INTEGER</code></dt> | |
| 9096 <dd> | |
| 9097 <p>Rotate the symbol by <em>INTEGER</em> degrees, where <em>INTEGER</em> | |
| 9098 can be 0, 90, 270 or 360.</p> | |
| 9099 </dd> | |
| 9100 <dt><code>--rows=INTEGER</code></dt> | |
| 9101 <dd> | |
| 9102 <p>Set the number of rows for Codablock-F or PDF417 to <em>INTEGER</em>. | |
| 9103 It will also set the minimum number of rows for Code 16K or Code 49, and | |
| 9104 the maximum number of rows for GS1 DataBar Expanded Stacked | |
| 9105 (DBAR_EXPSTK).</p> | |
| 9106 </dd> | |
| 9107 <dt><code>--scale=NUMBER</code></dt> | |
| 9108 <dd> | |
| 9109 <p>Adjust the size of the X-dimension. <em>NUMBER</em> may be | |
| 9110 floating-point, and is multiplied by 2 (except for MaxiCode) before | |
| 9111 being applied. The default scale is 1.</p> | |
| 9112 <p>For MaxiCode, the scale is multiplied by 10 for raster output, by 40 | |
| 9113 for EMF output, and by 2 otherwise.</p> | |
| 9114 <p>Increments of 0.5 (half-integers) are recommended for non-MaxiCode | |
| 9115 raster output (BMP, GIF, PCX, PNG and TIF).</p> | |
| 9116 <p>See also <code>--scalexdimdp</code> below.</p> | |
| 9117 </dd> | |
| 9118 <dt><code>--scalexdimdp=X[,R]</code></dt> | |
| 9119 <dd> | |
| 9120 <p>Scale the image according to X-dimension <em>X</em> and resolution | |
| 9121 <em>R</em>, where <em>X</em> is in mm and <em>R</em> is in dpmm (dots | |
| 9122 per mm). <em>X</em> and <em>R</em> may be floating-point. <em>R</em> is | |
| 9123 optional and defaults to 12 dpmm (approximately 300 dpi). <em>X</em> may | |
| 9124 be zero in which case a symbology-specific default is used.</p> | |
| 9125 <p>The scaling takes into account the output filetype, and deals with | |
| 9126 all the details mentioned above. Units may be specified for <em>X</em> | |
| 9127 by appending “in” (inch) or “mm”, and for <em>R</em> by appending “dpi” | |
| 9128 (dots per inch) or “dpmm” - | |
| 9129 e.g. <code>--scalexdimdp=0.013in,300dpi</code>.</p> | |
| 9130 </dd> | |
| 9131 <dt><code>--scmvv=INTEGER</code></dt> | |
| 9132 <dd> | |
| 9133 <p>For MaxiCode, prefix the Structured Carrier Message (SCM) with | |
| 9134 <code>"[)>\R01\Gvv"</code>, where <code>vv</code> is a 2-digit | |
| 9135 <em>INTEGER</em>.</p> | |
| 9136 </dd> | |
| 9137 <dt><code>--secure=INTEGER</code></dt> | |
| 9138 <dd> | |
| 9139 <p>Set the error correction level (ECC) to <em>INTEGER</em>. The meaning | |
| 9140 is specific to the following matrix symbols (all except PDF417 are | |
| 9141 approximate):</p> | |
| 9142 <pre><code>Aztec Code 1 to 4 (10%, 23%, 36%, 50%) | |
| 9143 Grid Matrix 1 to 5 (10% to 50%) | |
| 9144 Han Xin 1 to 4 (8%, 15%, 23%, 30%) | |
| 9145 Micro QR 1 to 3 (7%, 15%, 25%) (L, M, Q) | |
| 9146 PDF417 0 to 8 (2^(INTEGER + 1) codewords) | |
| 9147 QR Code 1 to 4 (7%, 15%, 25%, 30%) (L, M, Q, H) | |
| 9148 rMQR 2 or 4 (15% or 30%) (M or H) | |
| 9149 Ultracode 1 to 6 (0%, 5%, 9%, 17%, 25%, 33%)</code></pre> | |
| 9150 </dd> | |
| 9151 <dt><code>--segN=ECI,DATA</code></dt> | |
| 9152 <dd> | |
| 9153 <p>Set the <em>ECI</em> & <em>DATA</em> content for segment N, where | |
| 9154 N is 1 to 9. <code>-d</code> | <code>--data</code> must still be given, | |
| 9155 and counts as segment 0, its ECI given by <code>--eci</code>. Segments | |
| 9156 must be consecutive.</p> | |
| 9157 </dd> | |
| 9158 <dt><code>--separator=INTEGER</code></dt> | |
| 9159 <dd> | |
| 9160 <p>Set the height of row separator bars for stacked symbologies, where | |
| 9161 <em>INTEGER</em> is in integral multiples of the X-dimension. The | |
| 9162 default is zero.</p> | |
| 9163 </dd> | |
| 9164 <dt><code>--small</code></dt> | |
| 9165 <dd> | |
| 9166 <p>Use a smaller font for Human Readable Text (HRT).</p> | |
| 9167 </dd> | |
| 9168 <dt><code>--square</code></dt> | |
| 9169 <dd> | |
| 9170 <p>For Data Matrix symbols, exclude rectangular sizes when considering | |
| 9171 automatic sizes. See also <code>--dmre</code>.</p> | |
| 9172 </dd> | |
| 9173 <dt><code>--structapp=I,C[,ID]</code></dt> | |
| 9174 <dd> | |
| 9175 <p>Set Structured Append info, where <em>I</em> is the 1-based index, | |
| 9176 <em>C</em> is the total number of symbols in the sequence, and | |
| 9177 <em>ID</em>, which is optional, is the identifier that all symbols in | |
| 9178 the sequence share. Structured Append is supported by Aztec Code, Code | |
| 9179 One, Data Matrix, DotCode, Grid Matrix, MaxiCode, MicroPDF417, PDF417, | |
| 9180 QR Code and Ultracode.</p> | |
| 9181 </dd> | |
| 9182 <dt><code>-t</code>, <code>--types</code></dt> | |
| 9183 <dd> | |
| 9184 <p>Display the table of barcode types (symbologies). The numbers or | |
| 9185 names can be used with <code>-b</code> | <code>--barcode</code>.</p> | |
| 9186 </dd> | |
| 9187 <dt><code>--textgap=NUMBER</code></dt> | |
| 9188 <dd> | |
| 9189 <p>Adjust the gap between the barcode and the Human Readable Text (HRT). | |
| 9190 <em>NUMBER</em> is in X-dimensions, and may be floating-point. Maximum | |
| 9191 is 10 and minimum is -5. The default is 1.</p> | |
| 9192 </dd> | |
| 9193 <dt><code>--vers=INTEGER</code></dt> | |
| 9194 <dd> | |
| 9195 <p>Set the symbol version (size, check digits, other options) to | |
| 9196 <em>INTEGER</em>. The meaning is symbol-specific.</p> | |
| 9197 <p>For most matrix symbols, it specifies size:</p> | |
| 9198 <pre><code>Aztec Code 1 to 36 (1 to 4 compact) | |
| 9199 1 15x15 13 53x53 25 105x105 | |
| 9200 2 19x19 14 57x57 26 109x109 | |
| 9201 3 23x23 15 61x61 27 113x113 | |
| 9202 4 27x27 16 67x67 28 117x117 | |
| 9203 5 19x19 17 71x71 29 121x121 | |
| 9204 6 23x23 18 75x75 30 125x125 | |
| 9205 7 27x27 19 79x79 31 131x131 | |
| 9206 8 31x31 20 83x83 32 135x135 | |
| 9207 9 37x37 21 87x87 33 139x139 | |
| 9208 10 41x41 22 91x91 34 143x143 | |
| 9209 11 45x45 23 95x95 35 147x147 | |
| 9210 12 49x49 24 101x101 36 151x151 | |
| 9211 | |
| 9212 Code One 1 to 10 (9 and 10 variable width) (WxH) | |
| 9213 1 16x18 6 70x76 | |
| 9214 2 22x22 7 104x98 | |
| 9215 3 28x28 8 148x134 | |
| 9216 4 40x42 9 Wx8 | |
| 9217 5 52x54 10 Wx16 | |
| 9218 | |
| 9219 Data Matrix 1 to 48 (31 to 48 DMRE) (HxW) | |
| 9220 1 10x10 17 72x72 33 8x80 | |
| 9221 2 12x12 18 80x80 34 8x96 | |
| 9222 3 14x14 19 88x88 35 8x120 | |
| 9223 4 16x16 20 96x96 36 8x144 | |
| 9224 5 18x18 21 104x104 37 12x64 | |
| 9225 6 20x20 22 120x120 38 12x88 | |
| 9226 7 22x22 23 132x132 39 16x64 | |
| 9227 8 24x24 24 144x144 40 20x36 | |
| 9228 9 26x26 25 8x18 41 20x44 | |
| 9229 10 32x32 26 8x32 42 20x64 | |
| 9230 11 36x36 28 12x26 43 22x48 | |
| 9231 12 40x40 28 12x36 44 24x48 | |
| 9232 13 44x44 29 16x36 45 24x64 | |
| 9233 14 48x48 30 16x48 46 26x40 | |
| 9234 15 52x52 31 8x48 47 26x48 | |
| 9235 16 64x64 32 8x64 48 26x64 | |
| 9236 | |
| 9237 Grid Matrix 1 to 13 | |
| 9238 1 18x18 6 78x78 11 138x138 | |
| 9239 2 30x30 7 90x90 12 150x150 | |
| 9240 3 42x42 8 102x102 13 162x162 | |
| 9241 4 54x54 9 114x114 | |
| 9242 5 66x66 10 126x126 | |
| 9243 | |
| 9244 Han Xin 1 to 84 | |
| 9245 1 23x23 29 79x79 57 135x135 | |
| 9246 2 25x25 30 81x81 58 137x137 | |
| 9247 3 27x27 31 83x83 59 139x139 | |
| 9248 4 29x29 32 85x85 60 141x141 | |
| 9249 5 31x31 33 87x87 61 143x143 | |
| 9250 6 33x33 34 89x89 62 145x145 | |
| 9251 7 35x35 35 91x91 63 147x147 | |
| 9252 8 37x37 36 93x93 64 149x149 | |
| 9253 9 39x39 37 95x95 65 151x151 | |
| 9254 10 41x41 38 97x97 66 153x153 | |
| 9255 11 43x43 39 99x99 67 155x155 | |
| 9256 12 45x45 40 101x101 68 157x157 | |
| 9257 13 47x47 41 103x103 69 159x159 | |
| 9258 14 49x49 42 105x105 70 161x161 | |
| 9259 15 51x51 43 107x107 71 163x163 | |
| 9260 16 53x53 44 109x109 72 165x165 | |
| 9261 17 55x55 45 111x111 73 167x167 | |
| 9262 18 57x57 46 113x113 74 169x169 | |
| 9263 19 59x59 47 115x115 75 171x171 | |
| 9264 20 61x61 48 117x117 76 173x173 | |
| 9265 21 63x63 49 119x119 77 175x175 | |
| 9266 22 65x65 50 121x121 78 177x177 | |
| 9267 23 67x67 51 123x123 79 179x179 | |
| 9268 24 69x69 52 125x125 80 181x181 | |
| 9269 25 71x71 53 127x127 81 183x183 | |
| 9270 26 73x73 54 129x129 82 185x185 | |
| 9271 27 75x75 55 131x131 83 187x187 | |
| 9272 28 77x77 56 133x133 84 189x189 | |
| 9273 | |
| 9274 Micro QR 1 to 4 (M1, M2, M3, M4) | |
| 9275 1 11x11 3 15x15 | |
| 9276 2 13x13 4 17x17 | |
| 9277 | |
| 9278 QR Code 1 to 40 | |
| 9279 1 21x21 15 77x77 29 133x133 | |
| 9280 2 25x25 16 81x81 30 137x137 | |
| 9281 3 29x29 17 85x85 31 141x141 | |
| 9282 4 33x33 18 89x89 32 145x145 | |
| 9283 5 37x37 19 93x93 33 149x149 | |
| 9284 6 41x41 20 97x97 34 153x153 | |
| 9285 7 45x45 21 101x101 35 157x157 | |
| 9286 8 49x49 22 105x105 36 161x161 | |
| 9287 9 53x53 23 109x109 37 165x165 | |
| 9288 10 57x57 24 113x113 38 169x169 | |
| 9289 11 61x61 25 117x117 39 173x173 | |
| 9290 12 65x65 26 121x121 40 177x177 | |
| 9291 13 69x69 27 125x125 | |
| 9292 14 73x73 28 129x129 | |
| 9293 | |
| 9294 rMQR 1 to 38 (33 to 38 automatic width) (HxW) | |
| 9295 1 7x43 14 11x77 27 15x139 | |
| 9296 2 7x59 15 11x99 28 17x43 | |
| 9297 3 7x77 16 11x139 29 17x59 | |
| 9298 4 7x99 17 13x27 30 17x77 | |
| 9299 5 7x139 18 13x43 31 17x99 | |
| 9300 6 9x43 19 13x59 32 17x139 | |
| 9301 7 9x59 20 13x77 33 7xW | |
| 9302 8 9x77 21 13x99 34 9xW | |
| 9303 9 9x99 22 13x139 35 11xW | |
| 9304 10 9x139 23 15x43 36 13xW | |
| 9305 11 11x27 24 15x59 37 15xW | |
| 9306 12 11x43 25 15x77 38 17xW | |
| 9307 13 11x59 26 15x99</code></pre> | |
| 9308 <p>For a number of linear symbols, it specifies check character options | |
| 9309 (“hide” or “hidden” means don’t show in HRT, “visible” means do display | |
| 9310 in HRT):</p> | |
| 9311 <pre><code>C25IATA 1 or 2 (add visible or hidden check digit) | |
| 9312 C25IND ditto | |
| 9313 C25INTER ditto | |
| 9314 C25LOGIC ditto | |
| 9315 C25STANDARD ditto | |
| 9316 Codabar 1 or 2 (add hidden or visible check digit) | |
| 9317 Code 11 0 to 2 (2 visible check digits to none) | |
| 9318 0 (default 2 visible check digits) | |
| 9319 1 (1 visible check digit) | |
| 9320 2 (no check digits) | |
| 9321 Code 39 1 or 2 (add visible or hidden check digit) | |
| 9322 Code 93 1 (hide the default check characters) | |
| 9323 EXCODE39 1 or 2 (add visible or hidden check digit) | |
| 9324 LOGMARS 1 or 2 (add visible or hidden check digit) | |
| 9325 MSI Plessey 0 to 6 (none to various visible options) | |
| 9326 1, 2 (mod-10, mod-10 + mod-10) | |
| 9327 3, 4 (mod-11 IBM, mod-11 IBM + mod-10) | |
| 9328 5, 6 (mod-11 NCR, mod-11 NCR + mod-10) | |
| 9329 +10 (hide)</code></pre> | |
| 9330 <p>For a few other symbologies, it specifies other characteristics:</p> | |
| 9331 <pre><code>Channel Code 3 to 8 (no. of channels) | |
| 9332 DAFT 50 to 900 (permille tracker ratio) | |
| 9333 DPD 1 (relabel) | |
| 9334 PZN 1 (PZN7 instead of default PZN8) | |
| 9335 Ultracode 2 (revision 2) | |
| 9336 VIN 1 (add international prefix)</code></pre> | |
| 9337 </dd> | |
| 9338 <dt><code>-v</code>, <code>--version</code></dt> | |
| 9339 <dd> | |
| 9340 <p>Display zint version.</p> | |
| 9341 </dd> | |
| 9342 <dt><code>--vwhitesp=INTEGER</code></dt> | |
| 9343 <dd> | |
| 9344 <p>Set the height of vertical whitespace above and below the barcode, | |
| 9345 where <em>INTEGER</em> is in integral multiples of the X-dimension.</p> | |
| 9346 </dd> | |
| 9347 <dt><code>-w</code>, <code>--whitesp=INTEGER</code></dt> | |
| 9348 <dd> | |
| 9349 <p>Set the width of horizontal whitespace either side of the barcode, | |
| 9350 where <em>INTEGER</em> is in integral multiples of the X-dimension.</p> | |
| 9351 </dd> | |
| 9352 <dt><code>--werror</code></dt> | |
| 9353 <dd> | |
| 9354 <p>Convert all warnings into errors.</p> | |
| 9355 </dd> | |
| 9356 </dl> | |
| 9357 <h2 id="exit-status">EXIT STATUS</h2> | |
| 9358 <dl> | |
| 9359 <dt><code>0</code></dt> | |
| 9360 <dd> | |
| 9361 Success (including when given informational options <code>-h</code> | | |
| 9362 <code>--help</code>, <code>-e</code> | <code>--ecinos</code>, | |
| 9363 <code>-t</code> | <code>--types</code>, <code>-v</code> | | |
| 9364 <code>--version</code>). | |
| 9365 </dd> | |
| 9366 <dt><code>1</code></dt> | |
| 9367 <dd> | |
| 9368 Human Readable Text was truncated (maximum 199 bytes) | |
| 9369 (<code>ZINT_WARN_HRT_TRUNCATED</code>) | |
| 9370 </dd> | |
| 9371 <dt><code>2</code></dt> | |
| 9372 <dd> | |
| 9373 Invalid option given but overridden by Zint | |
| 9374 (<code>ZINT_WARN_INVALID_OPTION</code>) | |
| 9375 </dd> | |
| 9376 <dt><code>3</code></dt> | |
| 9377 <dd> | |
| 9378 Automatic ECI inserted by Zint (<code>ZINT_WARN_USES_ECI</code>) | |
| 9379 </dd> | |
| 9380 <dt><code>4</code></dt> | |
| 9381 <dd> | |
| 9382 Symbol created not compliant with standards | |
| 9383 (<code>ZINT_WARN_NONCOMPLIANT</code>) | |
| 9384 </dd> | |
| 9385 <dt><code>5</code></dt> | |
| 9386 <dd> | |
| 9387 Input data wrong length (<code>ZINT_ERROR_TOO_LONG</code>) | |
| 9388 </dd> | |
| 9389 <dt><code>6</code></dt> | |
| 9390 <dd> | |
| 9391 Input data incorrect (<code>ZINT_ERROR_INVALID_DATA</code>) | |
| 9392 </dd> | |
| 9393 <dt><code>7</code></dt> | |
| 9394 <dd> | |
| 9395 Input check digit incorrect (<code>ZINT_ERROR_INVALID_CHECK</code>) | |
| 9396 </dd> | |
| 9397 <dt><code>8</code></dt> | |
| 9398 <dd> | |
| 9399 Incorrect option given (<code>ZINT_ERROR_INVALID_OPTION</code>) | |
| 9400 </dd> | |
| 9401 <dt><code>9</code></dt> | |
| 9402 <dd> | |
| 9403 Internal error (should not happen) | |
| 9404 (<code>ZINT_ERROR_ENCODING_PROBLEM</code>) | |
| 9405 </dd> | |
| 9406 <dt><code>10</code></dt> | |
| 9407 <dd> | |
| 9408 Error opening output file (<code>ZINT_ERROR_FILE_ACCESS</code>) | |
| 9409 </dd> | |
| 9410 <dt><code>11</code></dt> | |
| 9411 <dd> | |
| 9412 Memory allocation (malloc) failure (<code>ZINT_ERROR_MEMORY</code>) | |
| 9413 </dd> | |
| 9414 <dt><code>12</code></dt> | |
| 9415 <dd> | |
| 9416 Error writing to output file (<code>ZINT_ERROR_FILE_WRITE</code>) | |
| 9417 </dd> | |
| 9418 <dt><code>13</code></dt> | |
| 9419 <dd> | |
| 9420 Error counterpart of warning if <code>--werror</code> given | |
| 9421 (<code>ZINT_ERROR_USES_ECI</code>) | |
| 9422 </dd> | |
| 9423 <dt><code>14</code></dt> | |
| 9424 <dd> | |
| 9425 Error counterpart of warning if <code>--werror</code> given | |
| 9426 (<code>ZINT_ERROR_NONCOMPLIANT</code>) | |
| 9427 </dd> | |
| 9428 <dt><code>15</code></dt> | |
| 9429 <dd> | |
| 9430 Error counterpart of warning if <code>--werror</code> given | |
| 9431 (<code>ZINT_ERROR_HRT_TRUNCATED</code>) | |
| 9432 </dd> | |
| 9433 </dl> | |
| 9434 <h2 id="examples">EXAMPLES</h2> | |
| 9435 <p>Create “out.png” (or “out.gif” if zint built without PNG support) in | |
| 9436 the current directory, as a Code 128 symbol.</p> | |
| 9437 <div class="sourceCode" id="cb135"><pre | |
| 9438 class="sourceCode bash"><code class="sourceCode bash"><span id="cb135-1"><a href="#cb135-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-d</span> <span class="st">'This Text'</span></span></code></pre></div> | |
| 9439 <p>Create “qr.svg” in the current directory, as a QR Code symbol.</p> | |
| 9440 <div class="sourceCode" id="cb136"><pre | |
| 9441 class="sourceCode bash"><code class="sourceCode bash"><span id="cb136-1"><a href="#cb136-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> QRCode <span class="at">-d</span> <span class="st">'This Text'</span> <span class="at">-o</span> <span class="st">'qr.svg'</span></span></code></pre></div> | |
| 9442 <p>Use batch mode to read from an input file “ean13nos.txt” containing a | |
| 9443 list of 13-digit GTINs, each on a separate line, to create a series of | |
| 9444 EAN-13 barcodes, formatting the output filenames to “ean001.gif”, | |
| 9445 “ean002.gif” etc. using the special character “~”.</p> | |
| 9446 <div class="sourceCode" id="cb137"><pre | |
| 9447 class="sourceCode bash"><code class="sourceCode bash"><span id="cb137-1"><a href="#cb137-1" aria-hidden="true" tabindex="-1"></a><span class="ex">zint</span> <span class="at">-b</span> EANX <span class="at">--batch</span> <span class="at">-i</span> <span class="st">'ean13nos.txt'</span> <span class="at">-o</span> <span class="st">'ean~~~.gif'</span></span></code></pre></div> | |
| 9448 <h2 id="bugs">BUGS</h2> | |
| 9449 <p>Please send bug reports to | |
| 9450 https://sourceforge.net/p/zint/tickets/.</p> | |
| 9451 <h2 id="see-also">SEE ALSO</h2> | |
| 9452 <p>Full documention for <code>zint</code> (and the API | |
| 9453 <code>libzint</code> and the GUI <code>zint-qt</code>) is available | |
| 9454 from</p> | |
| 9455 <pre><code> https://zint.org.uk/manual/</code></pre> | |
| 9456 <p>and at</p> | |
| 9457 <pre><code> https://sourceforge.net/p/zint/docs/manual.txt</code></pre> | |
| 9458 <h2 id="conforming-to">CONFORMING TO</h2> | |
| 9459 <p>Zint is designed to be compliant with a number of international | |
| 9460 standards, including:</p> | |
| 9461 <p>ISO/IEC 24778:2008, ANSI/AIM BC12-1998, EN 798:1996, AIM ISS-X-24 | |
| 9462 (1995), ISO/IEC 15417:2007, EN 12323:2005, ISO/IEC 16388:2007, ANSI/AIM | |
| 9463 BC6-2000, ANSI/AIM BC5-1995, AIM USS Code One (1994), ISO/IEC | |
| 9464 16022:2006, ISO/IEC 21471:2019, ISO/IEC 15420:2009, AIMD014 (v 1.63) | |
| 9465 (2008), ISO/IEC 24723:2010, ISO/IEC 24724:2011, ISO/IEC 20830:2021, | |
| 9466 ISO/IEC 16390:2007, ISO/IEC 16023:2000, ISO/IEC 24728:2006, ISO/IEC | |
| 9467 15438:2015, ISO/IEC 18004:2015, ISO/IEC 23941:2022, AIM ITS/04-023 | |
| 9468 (2022)</p> | |
| 9469 <h2 id="copyright">COPYRIGHT</h2> | |
| 9470 <p>Copyright © 2024 Robin Stuart. Released under GNU GPL 3.0 or | |
| 9471 later.</p> | |
| 9472 <h2 id="author">AUTHOR</h2> | |
| 9473 <p>Robin Stuart <a href="mailto:robin@zint.org.uk" | |
| 9474 class="email">robin@zint.org.uk</a></p> | |
| 9475 <section id="footnotes" class="footnotes footnotes-end-of-document" | |
| 9476 role="doc-endnotes"> | |
| 9477 <hr /> | |
| 9478 <ol> | |
| 9479 <li id="fn1"><p>See the Homebrew website <a | |
| 9480 href="https://brew.sh">https://brew.sh</a>.<a href="#fnref1" | |
| 9481 class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9482 <li id="fn2"><p>In Unicode contexts, BMP stands for Basic Multilingual | |
| 9483 Plane, the plane 0 codeset from U+0000 to U+D7FF and U+E000 to U+FFFF | |
| 9484 (i.e. excluding surrogates). Not to be confused with the Windows Bitmap | |
| 9485 file format BMP!<a href="#fnref2" class="footnote-back" | |
| 9486 role="doc-backlink">↩︎</a></p></li> | |
| 9487 <li id="fn3"><p>The symbologies marked with an asterisk (<code>*</code>) | |
| 9488 in Table <a href="#tbl:barcode_types">: Barcode Types (Symbologies)</a> | |
| 9489 above used different names in Zint before version 2.9.0. For example, | |
| 9490 symbology 29 used the name <code>BARCODE_RSS14</code>. These names are | |
| 9491 now deprecated but are still recognised by Zint and will continue to be | |
| 9492 supported in future versions.<a href="#fnref3" class="footnote-back" | |
| 9493 role="doc-backlink">↩︎</a></p></li> | |
| 9494 <li id="fn4"><p>The background is omitted for vector outputs EMF, EPS | |
| 9495 and SVG when <code>--nobackground</code> is given. For raster outputs | |
| 9496 GIF, PCX, PNG and TIF, the background’s alpha channel is set to zero | |
| 9497 (fully transparent).<a href="#fnref4" class="footnote-back" | |
| 9498 role="doc-backlink">↩︎</a></p></li> | |
| 9499 <li id="fn5"><p>Shift JIS (JIS X 0201 Roman) re-maps two ASCII | |
| 9500 characters: backslash (<code>\</code>) to the yen sign (¥), and tilde | |
| 9501 (<code>~</code>) to overline (U+203E).<a href="#fnref5" | |
| 9502 class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9503 <li id="fn6"><p>ISO/IEC 646 Invariant is a subset of ASCII with 12 | |
| 9504 characters undefined: <code>#</code>, <code>$</code>, <code>@</code>, | |
| 9505 <code>[</code>, <code>\</code>, <code>]</code>, <code>^</code>, | |
| 9506 <code>`</code>, <code>{</code>, <code>|</code>, <code>}</code>, | |
| 9507 <code>~</code>.<a href="#fnref6" class="footnote-back" | |
| 9508 role="doc-backlink">↩︎</a></p></li> | |
| 9509 <li id="fn7"><p>BARCODE_MEMORY_FILE textual formats EPS and SVG will | |
| 9510 have Unix newlines (LF) on both Windows and Unix, i.e. not CR+LF on | |
| 9511 Windows.<a href="#fnref7" class="footnote-back" | |
| 9512 role="doc-backlink">↩︎</a></p></li> | |
| 9513 <li id="fn8"><p>The <code>height</code> value is ignored for Aztec | |
| 9514 (including HIBC and Aztec Rune), Code One, Data Matrix (including HIBC), | |
| 9515 DotCode, Grid Matrix, Han Xin, MaxiCode, QR Code (including HIBC, Micro | |
| 9516 QR, rMQR and UPNQR), and Ultracode - all of which have a fixed | |
| 9517 width-to-height ratio (or, in the case of Code One, a fixed height).<a | |
| 9518 href="#fnref8" class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9519 <li id="fn9"><p>For Windows, <code>outfile</code> is assumed to be UTF-8 | |
| 9520 encoded.<a href="#fnref9" class="footnote-back" | |
| 9521 role="doc-backlink">↩︎</a></p></li> | |
| 9522 <li id="fn10"><p>The <code>BARCODE_BIND_TOP</code> flag is set by | |
| 9523 default for DPD - see <a href="#dpd-code">6.1.10.7 DPD Code</a>.<a | |
| 9524 href="#fnref10" class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9525 <li id="fn11"><p>The <code>BARCODE_BIND</code> flag is always set for | |
| 9526 Codablock-F, Code 16K and Code 49. Special considerations apply to | |
| 9527 ITF-14 - see <a href="#itf-14">6.1.2.6 ITF-14</a>.<a href="#fnref11" | |
| 9528 class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9529 <li id="fn12"><p>Codablock-F, Code 16K, Code 49, EAN-2 to EAN-13, ISBN, | |
| 9530 ITF-14, UPC-A and UPC-E have compliant quiet zones added by default.<a | |
| 9531 href="#fnref12" class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9532 <li id="fn13"><p><code>ZINT_CAP_EANUPC</code> was previously named | |
| 9533 <code>ZINT_CAP_EXTENDABLE</code>, which is still recognised.<a | |
| 9534 href="#fnref13" class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9535 <li id="fn14"><p><code>BARCODE_CODE128AB</code> previously used the name | |
| 9536 <code>BARCODE_CODE128B</code>, which is still recognised.<a | |
| 9537 href="#fnref14" class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9538 <li id="fn15"><p>The DX Number may be looked up in The (Modified) Big | |
| 9539 Film Database at <a | |
| 9540 href="https://thebigfilmdatabase.merinorus.com">https://thebigfilmdatabase.merinorus.com</a>.<a | |
| 9541 href="#fnref15" class="footnote-back" role="doc-backlink">↩︎</a></p></li> | |
| 9542 </ol> | |
| 9543 </section> | |
| 9544 </body> | |
| 9545 </html> |
