1
0
Fork 0
mirror of https://git.code.sf.net/p/zint/code synced 2025-05-31 07:08:26 -04:00

Add text_length (length of text) to zint_symbol, and new

`BARCODE_PLAIN_HRT` option for `output_options` - for use
  primarily by ZXing-C++ but may be generally useful;
  centralize setting of HRT using new common `hrt_cpy_nochk()` etc.
  routines to ensure `text_length` always set
PLESSEY: add show default check characters option
CODE32: ignore `option_2` (check digit options)
PZN: ignore `option_2` (check digit options) except when indicates
  PZN7 only
DPD: exclude DEL from ident tag also
out_maybe_mkdir: fix `utf8_to_wide()` return (Windows only)
general: replace use of `strcpy()` etc. (except for test suite)
  with `memcpy()`, `hrt_()` etc. in lib & `cpy_str()` etc. in CLI
  & `cpy_bytearray_left()` in backend_qt
clang-tidy: update README reflecting above
backend_tcl: use sizeof(primary) to check length; tabs -> spaces
general: various code fiddling
docs: pandoc 3.6.2 -> 3.6.3
This commit is contained in:
gitlost 2025-02-15 20:32:55 +00:00
parent ddedd00d2d
commit fef8b083b4
82 changed files with 2873 additions and 1671 deletions

View file

@ -1,11 +1,11 @@
% docs/README 2025-01-18
% docs/README 2025-02-15
For generation of "docs/manual.pdf" and "docs/manual.txt" from "manual.pmd" using a recent version of pandoc
On Ubuntu/Debian (tested on Ubuntu 22.04 and Ubuntu 24.04)
wget https://github.com/jgm/pandoc/releases/download/3.6.2/pandoc-3.6.2-1-amd64.deb
sudo dpkg -i pandoc-3.6.2-1-amd64.deb
wget https://github.com/jgm/pandoc/releases/download/3.6.3/pandoc-3.6.3-1-amd64.deb
sudo dpkg -i pandoc-3.6.3-1-amd64.deb
For Ubuntu 22.04 (python < 3.12)
sudo apt install python3-pip
pip install pandoc-tablenos --user
@ -27,9 +27,9 @@ Then
On Fedora (tested on Fedora Linux 38 (Workstation Edition) and Fedora Linux 40 (Workstation Edition))
wget https://github.com/jgm/pandoc/releases/download/3.6.2/pandoc-3.6.2-linux-amd64.tar.gz
tar xf pandoc-3.6.2-linux-amd64.tar.gz
sudo mv -i pandoc-3.6.2/bin/pandoc /usr/local/bin
wget https://github.com/jgm/pandoc/releases/download/3.6.3/pandoc-3.6.3-linux-amd64.tar.gz
tar xf pandoc-3.6.3-linux-amd64.tar.gz
sudo mv -i pandoc-3.6.3/bin/pandoc /usr/local/bin
sudo dnf install python3-pip
pip install pandoc-tablenos --user
export PATH=~/.local/bin:"$PATH"

View file

@ -1440,8 +1440,8 @@ is hexadecimal (000000-10FFFF)</td>
</table>
</div>
<p>(Special escape sequences are available for Code 128 only to manually
switch Code Sets and insert special FNC1 characters - see <a
href="#standard-code-128-iso-15417">6.1.10.1 Standard Code 128 (ISO
switch Code Sets and insert special <code>FNC1</code> characters - see
<a href="#standard-code-128-iso-15417">6.1.10.1 Standard Code 128 (ISO
15417)</a> for details.)</p>
<p>Input data can be read directly from file using the <code>-i</code>
or <code>--input</code> switch as shown below. The input file is assumed
@ -3555,6 +3555,12 @@ with a terminating <code>NUL</code>.</td>
<td style="text-align: left;"><code>""</code> (empty) (output only)</td>
</tr>
<tr>
<td style="text-align: left;"><code>text_length</code></td>
<td style="text-align: left;">integer</td>
<td style="text-align: left;">Length of <code>text</code>.</td>
<td style="text-align: left;">0 (output only)</td>
</tr>
<tr>
<td style="text-align: left;"><code>rows</code></td>
<td style="text-align: left;">integer</td>
<td style="text-align: left;">Number of rows used by the symbol.</td>
@ -3891,8 +3897,8 @@ than squares.</td>
</tr>
<tr>
<td style="text-align: left;"><code>GS1_GS_SEPARATOR</code></td>
<td style="text-align: left;">Use GS (Group Separator) instead of FNC1
as GS1 separator (Data Matrix only).</td>
<td style="text-align: left;">Use <code>GS</code> (Group Separator)
instead of <code>FNC1</code> as GS1 separator (Data Matrix only).</td>
</tr>
<tr>
<td style="text-align: left;"><code>OUT_BUFFER_INTERMEDIATE</code></td>
@ -3934,6 +3940,18 @@ available for SVG output only.</td>
<code>symbol-&gt;memfile</code> instead of to <code>outfile</code>
file.</td>
</tr>
<tr>
<td style="text-align: left;"><code>BARCODE_PLAIN_HRT</code></td>
<td style="text-align: left;">Set HRT with no decoration,<a href="#fn13"
class="footnote-ref" id="fnref13" role="doc-noteref"><sup>13</sup></a>
complete with any control characters<a href="#fn14" class="footnote-ref"
id="fnref14" role="doc-noteref"><sup>14</sup></a> and check
characters,<a href="#fn15" class="footnote-ref" id="fnref15"
role="doc-noteref"><sup>15</sup></a> and for all linear symbologies,
including those that normally dont set it.<a href="#fn16"
class="footnote-ref" id="fnref16"
role="doc-noteref"><sup>16</sup></a></td>
</tr>
</tbody>
</table>
</div>
@ -3967,7 +3985,7 @@ binary data.</td>
</tr>
<tr>
<td style="text-align: left;"><code>GS1_MODE</code></td>
<td style="text-align: left;">Encodes GS1 data using FNC1
<td style="text-align: left;">Encodes GS1 data using <code>FNC1</code>
characters.</td>
</tr>
<tr>
@ -4195,8 +4213,8 @@ Text?</td>
</tr>
<tr>
<td style="text-align: left;"><code>ZINT_CAP_EANUPC</code><a
href="#fn13" class="footnote-ref" id="fnref13"
role="doc-noteref"><sup>13</sup></a></td>
href="#fn17" class="footnote-ref" id="fnref17"
role="doc-noteref"><sup>17</sup></a></td>
<td style="text-align: left;">Is the symbology EAN/UPC?</td>
</tr>
<tr>
@ -4421,13 +4439,13 @@ aria-hidden="true"><code>zint -b UPCA --compliantheight -d "72527270270"</code><
<p>UPC-A is used in the United States for retail applications. The
symbol requires an 11-digit article number. The check digit is
calculated by Zint. In addition EAN-2 and EAN-5 add-on symbols can be
added using the + character. For example, to draw a UPC-A symbol with
the data 72527270270 with an EAN-5 add-on showing the data 12345 use the
command:</p>
added using the <code>+</code> character. For example, to draw a UPC-A
symbol with the data 72527270270 with an EAN-5 add-on showing the data
12345 use the command:</p>
<div class="sourceCode" id="cb88"><pre
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">&quot;72527270270+12345&quot;</span></span></code></pre></div>
<p>or using the API encode a data string with the + character
included:</p>
<p>or using the API encode a data string with the <code>+</code>
character included:</p>
<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">-&gt;</span>symbology <span class="op">=</span> BARCODE_UPCA<span class="op">;</span></span>
<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">&quot;72527270270+12345&quot;</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>
<figure>
@ -4515,8 +4533,8 @@ aria-hidden="true"><code>zint -b EANX --compliantheight -d "4512345678906"</code
for EAN-2, EAN-5, EAN-8 and EAN-13 which encode 2, 5, 7 or 12-digit
numbers respectively. Zint will decide which symbology to use depending
on the length of the input data. In addition EAN-2 and EAN-5 add-on
symbols can be added to EAN-8 and EAN-13 symbols using the + character
as with UPC symbols. For example:</p>
symbols can be added to EAN-8 and EAN-13 symbols using the
<code>+</code> character as with UPC symbols. For example:</p>
<div class="sourceCode" id="cb95"><pre
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">&quot;54321&quot;</span></span></code></pre></div>
<figure>
@ -4578,9 +4596,10 @@ alt="zint -b ISBNX --compliantheight -d &quot;9789295055124&quot; --guardwhitesp
<figcaption
aria-hidden="true"><code>zint -b ISBNX --compliantheight -d "9789295055124" --guardwhitespace</code></figcaption>
</figure>
<p>EAN-2 and EAN-5 add-on symbols can be added using the + character,
and there are options to adjust the add-on gap and the guard bar descent
height - see <a href="#upc-version-e">6.1.3.2 UPC Version E</a>.</p>
<p>EAN-2 and EAN-5 add-on symbols can be added using the <code>+</code>
character, and there are options to adjust the add-on gap and the guard
bar descent height - see <a href="#upc-version-e">6.1.3.2 UPC Version
E</a>.</p>
<h3 id="plessey">6.1.5 Plessey</h3>
<h4 id="uk-plessey">6.1.5.1 UK Plessey</h4>
<figure>
@ -4591,8 +4610,10 @@ aria-hidden="true"><code>zint -b PLESSEY -d "C64"</code></figcaption>
</figure>
<p>Also known as Plessey Code, this symbology was developed by the
Plessey Company Ltd. in the UK. The symbol can encode data consisting of
digits (0-9) or letters A-F up to a maximum of 67 characters and
includes a hidden CRC check digit.</p>
digits (0-9) or letters A-F (i.e. hexadecimal digits) up to a maximum of
67 characters and includes two hidden CRC check digits, which may be
shown in the Human Readable Text by setting <code>--vers=1</code> (API
<code>option_2 |= 1</code>).</p>
<h4 id="msi-plessey">6.1.5.2 MSI Plessey</h4>
<figure>
<img src="images/msi_plessey.svg" title="fig:" class="lin"
@ -4851,8 +4872,8 @@ escaped by doubling the caret (<code>^</code>). For instance</p>
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">&quot;\^AABC\^^BDEF&quot;</span> <span class="at">--extraesc</span></span></code></pre></div>
<p>will encode the data <code>"ABC\^BDEF"</code> in Code Set A.</p>
<p>There is also the extra escape <code>\^1</code>, which will encode a
special Function Code 1 character (FNC1) anywhere you chose in the data,
for instance</p>
special Function Code 1 character (<code>FNC1</code>) anywhere you chose
in the data, for instance</p>
<div class="sourceCode" id="cb101"><pre
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">&quot;A\^1BC\^1DEF&quot;</span> <span class="at">--extraesc</span></span></code></pre></div>
<p>Zint can encode a maximum of 102 symbol characters, which allows for
@ -4868,8 +4889,8 @@ aria-hidden="true"><code>zint -b CODE128AB -d "130170X178"</code></figcaption>
</figure>
<p>It is sometimes advantageous to stop Code 128 from using Code Set C
which compresses numerical data. The <code>BARCODE_CODE128AB</code><a
href="#fn14" class="footnote-ref" id="fnref14"
role="doc-noteref"><sup>14</sup></a> variant (symbology 60) suppresses
href="#fn18" class="footnote-ref" id="fnref18"
role="doc-noteref"><sup>18</sup></a> variant (symbology 60) suppresses
Code Set C in favour of Code Sets A and B.</p>
<p>Note that the special extra escapes mentioned above are not available
for this variant (nor for any other).</p>
@ -5609,8 +5630,8 @@ the 6-digit version the first and last digit are ignored, leaving a
2047. The second format <code>"NNN-NN"</code> represents the DX Extract
as two numbers separated by a dash (<code>-</code>), the first number
being 1 to 3 digits (range 1 to 127) and the second 1 to 2 digits (range
0 to 15).<a href="#fn15" class="footnote-ref" id="fnref15"
role="doc-noteref"><sup>15</sup></a></p>
0 to 15).<a href="#fn19" class="footnote-ref" id="fnref19"
role="doc-noteref"><sup>19</sup></a></p>
<p>The optional frame number is a number in the range 0 to 63, and may
have a half frame indicator <code>"A"</code> appended. Special character
sequences (with or without a half frame indicator appended) may also be
@ -5762,16 +5783,16 @@ characters, producing a symbol with 66 or 78 bars respectively. The
rules for the input data are complex, as summarized in the following
table.</p>
<div id="tbl:mailmark_4s_input_fields" class="tablenos">
<table id="tbl:mailmark_4s_input_fields" style="width:100%;"
<table id="tbl:mailmark_4s_input_fields"
data-tag=": Royal Mail 4-State Mailmark Input Fields">
<caption><span>Table : Royal Mail 4-State Mailmark Input Fields</span>
</caption>
<colgroup>
<col style="width: 11%" />
<col style="width: 11%" />
<col style="width: 17%" />
<col style="width: 22%" />
<col style="width: 13%" />
<col style="width: 16%" />
<col style="width: 23%" />
<col style="width: 14%" />
<col style="width: 23%" />
</colgroup>
<thead>
@ -6108,9 +6129,10 @@ generated with the following values as before:</p>
</div>
<p>DMRE symbol sizes may be activated in automatic size mode using the
option <code>--dmre</code> (API <code>option_3 = DM_DMRE</code>).</p>
<p>GS1 data may be encoded using FNC1 (default) or GS (Group Separator,
ASCII 29) as separator. Use the option <code>--gssep</code> to change to
GS (API <code>output_options |= GS1_GS_SEPARATOR</code>).</p>
<p>GS1 data may be encoded using <code>FNC1</code> (default) or
<code>GS</code> (Group Separator, ASCII 29) as separator. Use the option
<code>--gssep</code> to change to <code>GS</code> (API
<code>output_options |= GS1_GS_SEPARATOR</code>).</p>
<p>By default Zint uses a “de facto” codeword placement for symbols of
size 144 x 144 (version 24). To override this and use the now clarified
ISO/IEC standard placement, use option <code>--dmiso144</code> (API
@ -8227,7 +8249,7 @@ Interpretations Part 1: Identification Schemes and Protocol (Released
24th May 2004)</li>
<li>AIM ITS/04-023 International Technical Standard - Extended Channel
Interpretations Part 3: Register (Version 2, February 2022)</li>
<li>GS1 General Specifications Release 24.0 (Jan 2024)</li>
<li>GS1 General Specifications Release 25.0 (Jan 2025)</li>
<li>ANSI/HIBC 2.6-2016 - The Health Industry Bar Code (HIBC) Supplier
Labeling Standard</li>
</ul>
@ -9315,6 +9337,7 @@ Code 39 1 or 2 (add visible or hidden check digit)
Code 93 1 (show the default check characters)
EXCODE39 1 or 2 (add visible or hidden check digit)
LOGMARS 1 or 2 (add visible or hidden check digit)
UK Plessey 1 (show the default check characters)
MSI Plessey 0 to 6 (none to various visible options)
1, 2 (mod-10, mod-10 + mod-10)
3, 4 (mod-11 IBM, mod-11 IBM + mod-10)
@ -9522,16 +9545,36 @@ class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn12"><p>Codablock-F, Code 16K, Code 49, EAN-2 to EAN-13, ISBN,
ITF-14, UPC-A and UPC-E have compliant quiet zones added by default.<a
href="#fnref12" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn13"><p><code>ZINT_CAP_EANUPC</code> was previously named
<li id="fn13"><p>In particular no parentheses will appear in the HRT for
GS1 symbologies, and <code>GS</code> separators will be added as
required. Also for EAN/UPC symbologies, any add-on data will directly
follow the main data, i.e. will not be separated by a <code>+</code>
character.<a href="#fnref13" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn14"><p>Normally control characters (including
<code>DEL</code>) and non-ISO/IEC 8859-1 are replaced by spaces in the
HRT.<a href="#fnref14" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn15"><p>Except for Japanese Postal Code, whose check character
is not truly representable in HRT.<a href="#fnref15"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn16"><p>HRT is normally not set for the postal codes Australia
Post (all variants), USPS Intelligent Mail, POSTNET and PLANET,
Brazilian CEPNet, Royal Mail 4-State Customer Code and 4-State Mailmark,
Dutch Post KIX Code, Japanese Postal Code, DAFT Code, Flattermarken and
FIM, the pharma codes Pharmacode One-Track and Pharmacode Two-Track, and
DX Film Edge Barcode.<a href="#fnref16" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn17"><p><code>ZINT_CAP_EANUPC</code> was previously named
<code>ZINT_CAP_EXTENDABLE</code>, which is still recognised.<a
href="#fnref13" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn14"><p><code>BARCODE_CODE128AB</code> previously used the name
href="#fnref17" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn18"><p><code>BARCODE_CODE128AB</code> previously used the name
<code>BARCODE_CODE128B</code>, which is still recognised.<a
href="#fnref14" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn15"><p>The DX number may be looked up in The (Modified) Big
href="#fnref18" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn19"><p>The DX number may be looked up in The (Modified) Big
Film Database at <a
href="https://thebigfilmdatabase.merinorus.com">https://thebigfilmdatabase.merinorus.com</a>.<a
href="#fnref15" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
href="#fnref19" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
</body>

View file

@ -573,7 +573,7 @@ codeset from U+0000 to U+D7FF and U+E000 to U+FFFF (i.e. excluding surrogates).
Not to be confused with the Windows Bitmap file format BMP!
(Special escape sequences are available for Code 128 only to manually switch
Code Sets and insert special FNC1 characters - see [6.1.10.1 Standard Code 128
Code Sets and insert special `FNC1` characters - see [6.1.10.1 Standard Code 128
(ISO 15417)] for details.)
Input data can be read directly from file using the `-i` or `--input` switch as
@ -2037,6 +2037,8 @@ Member Name Type Meaning Default Value
formatting, with a
terminating `NUL`.
`text_length` integer Length of `text`. 0 (output only)
`rows` integer Number of rows used by (output only)
the symbol.
@ -2297,7 +2299,7 @@ Value Effect
`BARCODE_DOTTY_MODE` Plot a matrix symbol using dots rather than
squares.
`GS1_GS_SEPARATOR` Use GS (Group Separator) instead of FNC1 as GS1
`GS1_GS_SEPARATOR` Use `GS` (Group Separator) instead of `FNC1` as GS1
separator (Data Matrix only).
`OUT_BUFFER_INTERMEDIATE` Return the bitmap buffer as ASCII values instead of
@ -2320,6 +2322,11 @@ Value Effect
`BARCODE_MEMORY_FILE` Write output to in-memory buffer `symbol->memfile`
instead of to `outfile` file.
`BARCODE_PLAIN_HRT` Set HRT with no decoration,[^13] complete with any
control characters[^14] and check characters,[^15]
and for all linear symbologies, including those
that normally don't set it.[^16]
------------------------------------------------------------------------------
Table: API `output_options` Values {#tbl:api_output_options tag="$ $"}
@ -2333,6 +2340,23 @@ Code].
[^12]: Codablock-F, Code 16K, Code 49, EAN-2 to EAN-13, ISBN, ITF-14, UPC-A and
UPC-E have compliant quiet zones added by default.
[^13]: In particular no parentheses will appear in the HRT for GS1 symbologies,
and `GS` separators will be added as required. Also for EAN/UPC symbologies, any
add-on data will directly follow the main data, i.e. will not be separated by a
`+` character.
[^14]: Normally control characters (including `DEL`) and non-ISO/IEC 8859-1 are
replaced by spaces in the HRT.
[^15]: Except for Japanese Postal Code, whose check character is not truly
representable in HRT.
[^16]: HRT is normally not set for the postal codes Australia Post (all
variants), USPS Intelligent Mail, POSTNET and PLANET, Brazilian CEPNet, Royal
Mail 4-State Customer Code and 4-State Mailmark, Dutch Post KIX Code, Japanese
Postal Code, DAFT Code, Flattermarken and FIM, the pharma codes Pharmacode
One-Track and Pharmacode Two-Track, and DX Film Edge Barcode.
## 5.11 Setting the Input Mode
The way in which the input data is encoded can be set using the `input_mode`
@ -2345,7 +2369,7 @@ Value Effect
`UNICODE_MODE` Uses UTF-8 input.
`GS1_MODE` Encodes GS1 data using FNC1 characters.
`GS1_MODE` Encodes GS1 data using `FNC1` characters.
_The above are exclusive, the following optional and
OR-ed._
@ -2585,7 +2609,7 @@ Value Meaning
`ZINT_CAP_STACKABLE` Is the symbology stackable?
`ZINT_CAP_EANUPC`[^13] Is the symbology EAN/UPC?
`ZINT_CAP_EANUPC`[^17] Is the symbology EAN/UPC?
`ZINT_CAP_COMPOSITE` Does the symbology support composite data? (see
[6.3 GS1 Composite Symbols (ISO 24723)] below)
@ -2616,7 +2640,7 @@ Value Meaning
Table: {#tbl:api_cap tag=": API Capability Flags"}
[^13]: `ZINT_CAP_EANUPC` was previously named `ZINT_CAP_EXTENDABLE`, which is
[^17]: `ZINT_CAP_EANUPC` was previously named `ZINT_CAP_EXTENDABLE`, which is
still recognised.
For example:
@ -2774,15 +2798,15 @@ Zint adds a check digit.
UPC-A is used in the United States for retail applications. The symbol requires
an 11-digit article number. The check digit is calculated by Zint. In addition
EAN-2 and EAN-5 add-on symbols can be added using the + character. For example,
to draw a UPC-A symbol with the data 72527270270 with an EAN-5 add-on showing
the data 12345 use the command:
EAN-2 and EAN-5 add-on symbols can be added using the `+` character. For
example, to draw a UPC-A symbol with the data 72527270270 with an EAN-5 add-on
showing the data 12345 use the command:
```bash
zint -b UPCA -d "72527270270+12345"
```
or using the API encode a data string with the + character included:
or using the API encode a data string with the `+` character included:
```c
my_symbol->symbology = BARCODE_UPCA;
@ -2873,7 +2897,7 @@ The EAN system is used in retail across Europe and includes standards for EAN-2,
EAN-5, EAN-8 and EAN-13 which encode 2, 5, 7 or 12-digit numbers respectively.
Zint will decide which symbology to use depending on the length of the input
data. In addition EAN-2 and EAN-5 add-on symbols can be added to EAN-8 and
EAN-13 symbols using the + character as with UPC symbols. For example:
EAN-13 symbols using the `+` character as with UPC symbols. For example:
```bash
zint -b EANX -d "54321"
@ -2932,9 +2956,9 @@ As with EAN-13, a quiet zone indicator can be added using `--guardwhitespace`:
![`zint -b ISBNX --compliantheight -d "9789295055124"
--guardwhitespace`](images/isbnx_gws.svg){.upcean}
EAN-2 and EAN-5 add-on symbols can be added using the + character, and there are
options to adjust the add-on gap and the guard bar descent height - see [6.1.3.2
UPC Version E].
EAN-2 and EAN-5 add-on symbols can be added using the `+` character, and there
are options to adjust the add-on gap and the guard bar descent height - see
[6.1.3.2 UPC Version E].
### 6.1.5 Plessey
@ -2944,7 +2968,9 @@ UPC Version E].
Also known as Plessey Code, this symbology was developed by the Plessey Company
Ltd. in the UK. The symbol can encode data consisting of digits (0-9) or letters
A-F up to a maximum of 67 characters and includes a hidden CRC check digit.
A-F (i.e. hexadecimal digits) up to a maximum of 67 characters and includes two
hidden CRC check digits, which may be shown in the Human Readable Text by
setting `--vers=1` (API `option_2 |= 1`).
#### 6.1.5.2 MSI Plessey
@ -3142,7 +3168,7 @@ zint -b CODE128 -d "\^AABC\^^BDEF" --extraesc
will encode the data `"ABC\^BDEF"` in Code Set A.
There is also the extra escape `\^1`, which will encode a special Function Code
1 character (FNC1) anywhere you chose in the data, for instance
1 character (`FNC1`) anywhere you chose in the data, for instance
```bash
zint -b CODE128 -d "A\^1BC\^1DEF" --extraesc
@ -3157,13 +3183,13 @@ alphanumerics) are not recommended.
![`zint -b CODE128AB -d "130170X178"`](images/code128ab.svg){.lin}
It is sometimes advantageous to stop Code 128 from using Code Set C which
compresses numerical data. The `BARCODE_CODE128AB`[^14] variant (symbology 60)
compresses numerical data. The `BARCODE_CODE128AB`[^18] variant (symbology 60)
suppresses Code Set C in favour of Code Sets A and B.
Note that the special extra escapes mentioned above are not available for this
variant (nor for any other).
[^14]: `BARCODE_CODE128AB` previously used the name `BARCODE_CODE128B`, which is
[^18]: `BARCODE_CODE128AB` previously used the name `BARCODE_CODE128B`, which is
still recognised.
#### 6.1.10.3 GS1-128
@ -3755,7 +3781,7 @@ first and last digit are ignored, leaving a 4-digit DX Extract number in any
case, which must be in the range 16 to 2047. The second format `"NNN-NN"`
represents the DX Extract as two numbers separated by a dash (`-`), the first
number being 1 to 3 digits (range 1 to 127) and the second 1 to 2 digits (range
0 to 15).[^15]
0 to 15).[^19]
The optional frame number is a number in the range 0 to 63, and may have a half
frame indicator `"A"` appended. Special character sequences (with or without a
@ -3765,7 +3791,7 @@ number 62, `"K"` or `"00"` means frame number 63, and `"F"` means frame number
A parity bit is automatically added by Zint.
[^15]: The DX number may be looked up in The (Modified) Big Film Database at
[^19]: The DX number may be looked up in The (Modified) Big Film Database at
[https://thebigfilmdatabase.merinorus.com](
https://thebigfilmdatabase.merinorus.com).
@ -3856,13 +3882,13 @@ Solomon error correction. Input is a pre-formatted alphanumeric string of 22
78 bars respectively. The rules for the input data are complex, as summarized in
the following table.
---------------------------------------------------------------------------
Format Version Class Supply Chain ID Item ID Destination+DPS
-----------------------------------------------------------------------------
Format Version Class Supply Chain ID Item ID Destination+DPS
ID
------- ------- ----------- --------------- -------- -----------------
1 digit 1 digit 1 alphanum. 2 digits (C) or 8 digits 9 alphanumerics
(0-4) (0-3) (0-9A-E) 6 digits (L) (1 of 6 patterns)
---------------------------------------------------------------------------
------- ------- ----------- --------------- -------- -----------------
1 digit 1 digit 1 alphanum. 2 digits (C) or 8 digits 9 alphanumerics
(0-4) (0-3) (0-9A-E) 6 digits (L) (1 of 6 patterns)
-----------------------------------------------------------------------------
Table: {#tbl:mailmark_4s_input_fields
tag=": Royal Mail 4-State Mailmark Input Fields"}
@ -4000,9 +4026,9 @@ Table: {#tbl:dmre_sizes tag=": DMRE Sizes"}
DMRE symbol sizes may be activated in automatic size mode using the option
`--dmre` (API `option_3 = DM_DMRE`).
GS1 data may be encoded using FNC1 (default) or GS (Group Separator, ASCII 29)
as separator. Use the option `--gssep` to change to GS (API `output_options |=
GS1_GS_SEPARATOR`).
GS1 data may be encoded using `FNC1` (default) or `GS` (Group Separator, ASCII
29) as separator. Use the option `--gssep` to change to `GS` (API
`output_options |= GS1_GS_SEPARATOR`).
By default Zint uses a "de facto" codeword placement for symbols of size 144 x
144 (version 24). To override this and use the now clarified ISO/IEC standard
@ -4899,7 +4925,7 @@ company references in particular.
May 2004)
- AIM ITS/04-023 International Technical Standard - Extended Channel
Interpretations Part 3: Register (Version 2, February 2022)
- GS1 General Specifications Release 24.0 (Jan 2024)
- GS1 General Specifications Release 25.0 (Jan 2025)
- ANSI/HIBC 2.6-2016 - The Health Industry Bar Code (HIBC) Supplier Labeling
Standard

View file

@ -2053,6 +2053,8 @@ the following members:
formatting, with a
terminating NUL.
text_length integer Length of text. 0 (output only)
rows integer Number of rows used by the (output only)
symbol.
@ -2311,6 +2313,11 @@ together when adjusting this value:
BARCODE_MEMORY_FILE Write output to in-memory buffer symbol->memfile
instead of to outfile file.
BARCODE_PLAIN_HRT Set HRT with no decoration,[13] complete with any
control characters[14] and check characters,[15]
and for all linear symbologies, including those
that normally dont set it.[16]
------------------------------------------------------------------------------
: Table  : API output_options Values
@ -2539,7 +2546,7 @@ see which are set.
ZINT_CAP_STACKABLE Is the symbology stackable?
ZINT_CAP_EANUPC[13] Is the symbology EAN/UPC?
ZINT_CAP_EANUPC[17] Is the symbology EAN/UPC?
ZINT_CAP_COMPOSITE Does the symbology support composite data? (see
6.3 GS1 Composite Symbols (ISO 24723) below)
@ -2854,7 +2861,9 @@ UPC Version E.
Also known as Plessey Code, this symbology was developed by the Plessey Company
Ltd. in the UK. The symbol can encode data consisting of digits (0-9) or letters
A-F up to a maximum of 67 characters and includes a hidden CRC check digit.
A-F (i.e. hexadecimal digits) up to a maximum of 67 characters and includes two
hidden CRC check digits, which may be shown in the Human Readable Text by
setting --vers=1 (API option_2 |= 1).
6.1.5.2 MSI Plessey
@ -3053,7 +3062,7 @@ alphanumerics) are not recommended.
[zint -b CODE128AB -d "130170X178"]
It is sometimes advantageous to stop Code 128 from using Code Set C which
compresses numerical data. The BARCODE_CODE128AB[14] variant (symbology 60)
compresses numerical data. The BARCODE_CODE128AB[18] variant (symbology 60)
suppresses Code Set C in favour of Code Sets A and B.
Note that the special extra escapes mentioned above are not available for this
@ -3605,7 +3614,7 @@ first and last digit are ignored, leaving a 4-digit DX Extract number in any
case, which must be in the range 16 to 2047. The second format "NNN-NN"
represents the DX Extract as two numbers separated by a dash (-), the first
number being 1 to 3 digits (range 1 to 127) and the second 1 to 2 digits (range
0 to 15).[15]
0 to 15).[19]
The optional frame number is a number in the range 0 to 63, and may have a half
frame indicator "A" appended. Special character sequences (with or without a
@ -3697,14 +3706,14 @@ Solomon error correction. Input is a pre-formatted alphanumeric string of 22
78 bars respectively. The rules for the input data are complex, as summarized in
the following table.
----------------------------------------------------------------------------
Format Version Class Supply Chain ID Item ID Destination+DPS
------------------------------------------------------------------------------
Format Version Class Supply Chain ID Item ID Destination+DPS
ID
-------- --------- ------------ ---------------- --------- -----------------
1 digit 1 digit 1 alphanum. 2 digits (C) or 8 digits 9 alphanumerics
(0-4) (0-3) (0-9A-E) 6 digits (L) (1 of 6 patterns)
-------- --------- ------------ ----------------- ---------- -----------------
1 digit 1 digit 1 alphanum. 2 digits (C) or 6 8 digits 9 alphanumerics
(0-4) (0-3) (0-9A-E) digits (L) (1 of 6 patterns)
----------------------------------------------------------------------------
------------------------------------------------------------------------------
Table : Royal Mail 4-State Mailmark Input Fields
@ -4710,7 +4719,7 @@ company references in particular.
May 2004)
- AIM ITS/04-023 International Technical Standard - Extended Channel
Interpretations Part 3: Register (Version 2, February 2022)
- GS1 General Specifications Release 24.0 (Jan 2024)
- GS1 General Specifications Release 25.0 (Jan 2025)
- ANSI/HIBC 2.6-2016 - The Health Industry Bar Code (HIBC) Supplier Labeling
Standard
@ -5431,6 +5440,7 @@ OPTIONS
Code 93 1 (show the default check characters)
EXCODE39 1 or 2 (add visible or hidden check digit)
LOGMARS 1 or 2 (add visible or hidden check digit)
UK Plessey 1 (show the default check characters)
MSI Plessey 0 to 6 (none to various visible options)
1, 2 (mod-10, mod-10 + mod-10)
3, 4 (mod-11 IBM, mod-11 IBM + mod-10)
@ -5612,11 +5622,28 @@ Special considerations apply to ITF-14 - see 6.1.2.6 ITF-14.
[12] Codablock-F, Code 16K, Code 49, EAN-2 to EAN-13, ISBN, ITF-14, UPC-A and
UPC-E have compliant quiet zones added by default.
[13] ZINT_CAP_EANUPC was previously named ZINT_CAP_EXTENDABLE, which is still
[13] In particular no parentheses will appear in the HRT for GS1 symbologies,
and GS separators will be added as required. Also for EAN/UPC symbologies, any
add-on data will directly follow the main data, i.e. will not be separated by
a + character.
[14] Normally control characters (including DEL) and non-ISO/IEC 8859-1 are
replaced by spaces in the HRT.
[15] Except for Japanese Postal Code, whose check character is not truly
representable in HRT.
[16] HRT is normally not set for the postal codes Australia Post (all variants),
USPS Intelligent Mail, POSTNET and PLANET, Brazilian CEPNet, Royal Mail 4-State
Customer Code and 4-State Mailmark, Dutch Post KIX Code, Japanese Postal Code,
DAFT Code, Flattermarken and FIM, the pharma codes Pharmacode One-Track and
Pharmacode Two-Track, and DX Film Edge Barcode.
[17] ZINT_CAP_EANUPC was previously named ZINT_CAP_EXTENDABLE, which is still
recognised.
[14] BARCODE_CODE128AB previously used the name BARCODE_CODE128B, which is still
[18] BARCODE_CODE128AB previously used the name BARCODE_CODE128B, which is still
recognised.
[15] The DX number may be looked up in The (Modified) Big Film Database at
[19] The DX number may be looked up in The (Modified) Big Film Database at
https://thebigfilmdatabase.merinorus.com.

View file

@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 3.6.2
.\" Automatically generated by Pandoc 3.6.3
.\"
.TH "ZINT" "1" "February 2025" "Version 2.14.0.9"
.SH NAME
@ -591,6 +591,7 @@ Code 39 1 or 2 (add visible or hidden check digit)
Code 93 1 (show the default check characters)
EXCODE39 1 or 2 (add visible or hidden check digit)
LOGMARS 1 or 2 (add visible or hidden check digit)
UK Plessey 1 (show the default check characters)
MSI Plessey 0 to 6 (none to various visible options)
1, 2 (mod\-10, mod\-10 + mod\-10)
3, 4 (mod\-11 IBM, mod\-11 IBM + mod\-10)

View file

@ -523,6 +523,7 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S
Code 93 1 (show the default check characters)
EXCODE39 1 or 2 (add visible or hidden check digit)
LOGMARS 1 or 2 (add visible or hidden check digit)
UK Plessey 1 (show the default check characters)
MSI Plessey 0 to 6 (none to various visible options)
1, 2 (mod-10, mod-10 + mod-10)
3, 4 (mod-11 IBM, mod-11 IBM + mod-10)