gs1: New AIs 7041 (GSCN 23-272) (packagetype) and 716 (GSCN-24-157)

CODE49: Better error message on ZINT_ERROR_TOO_LONG
manual: Use floating pt notation for floating pt args on options
backend/tools/data: Remove overlooked "GB2312.TXT" from git
raster: `size2` -> `prev_size`; one line `malloc()`s
C25/CODE128: some code fiddling
tests/PNG: Add some more text examples
This commit is contained in:
gitlost 2024-09-18 03:40:45 +01:00
parent 93c3e27fba
commit b42d5baf4c
19 changed files with 790 additions and 7937 deletions

View file

@ -1436,13 +1436,13 @@ is hexadecimal (000000-10FFFF)</td>
</table>
</div>
<p>(Special escape sequences are available for Code 128 only to manually
switch Code Sets and/or insert special FNC1 characters - see <a
switch Code Sets and insert special FNC1 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
to be UTF-8 formatted unless an alternative mode is selected. This
command replaces the use of the <code>-d</code> switch.</p>
option replaces the use of the <code>-d</code> switch.</p>
<div class="sourceCode" id="cb17"><pre
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>
<p>To read from stdin specify a single hyphen <code>"-"</code> as the
@ -2066,13 +2066,13 @@ example:</p>
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">&quot;This Text&quot;</span></span></code></pre></div>
<p>This specifies a symbol height of 100 times the X-dimension of the
symbol.</p>
<p>The default height of most linear barcodes is 50X, but this can be
<p>The default height of most linear barcodes is 50.0X, but this can be
changed for barcodes whose specifications give a standard height by
using the switch <code>--compliantheight</code>. For instance</p>
<div class="sourceCode" id="cb24"><pre
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">&quot;This Text&quot;</span> <span class="at">--compliantheight</span></span></code></pre></div>
<p>will produce a barcode of height 45.455X instead of the normal
default of 50X. The flag also causes Zint to return a warning if a
default of 50.0X. The flag also causes Zint to return a warning if a
non-compliant height is given:</p>
<div class="sourceCode" id="cb25"><pre
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">&quot;This Text&quot;</span> <span class="at">--compliantheight</span> <span class="at">--height</span><span class="op">=</span>6.2</span>
@ -2237,7 +2237,7 @@ aria-hidden="true"><code>zint -d "This Text" --rotate=90</code></figcaption>
<h2 id="adjusting-image-size-x-dimension">4.9 Adjusting Image Size
(X-dimension)</h2>
<p>The size of the image can be altered using the <code>--scale</code>
option, which sets the X-dimension. The default scale is 1.</p>
option, which sets the X-dimension. The default scale is 1.0.</p>
<p>The scale is multiplied by 2 (with the exception of MaxiCode) before
being applied to the X-dimension. For MaxiCode, it is multiplied by 10
for raster output, by 40 for EMF vector output, and by 2 otherwise
@ -2387,9 +2387,9 @@ aria-hidden="true"><code>zint --bold -d "This Text" --small</code></figcaption>
</figure>
<p>The gap between the barcode and the text can be adjusted using the
<code>--textgap</code> option, where the gap is given in X-dimensions,
and may be negative (minimum -5X, maximum 10X). The default gap is 1X.
Note that a very small gap may cause accented texts to overlap with the
barcode:</p>
and may be negative (minimum -5.0X, maximum 10.0X). The default gap is
1X. Note that a very small gap may cause accented texts to overlap with
the barcode:</p>
<figure>
<img src="images/code128_textgap.svg" title="fig:" class="lin"
alt="zint -d &quot;Áccent&quot; --textgap=0.1" />
@ -4450,7 +4450,8 @@ integral multiples of the X-dimension by setting <code>--addongap</code>
(API <code>option_2</code>) to a value between 9 (default) and 12. The
height in X-dimensions that the guard bars descend below the main bars
can be adjusted by setting <code>--guarddescent</code> (API
<code>guard_descent</code>) to a value between 0 and 20 (default 5).</p>
<code>guard_descent</code>) to a value between 0.0 and 20.0 (default
5.0).</p>
<h4 id="upc-version-e">6.1.3.2 UPC Version E</h4>
<figure>
<img src="images/upce.svg" title="fig:" class="upcean"
@ -4488,7 +4489,8 @@ integral multiples of the X-dimension by setting <code>--addongap</code>
(API <code>option_2</code>) to a value between 7 (default) and 12. The
height in X-dimensions that the guard bars descend below the main bars
can be adjusted by setting <code>--guarddescent</code> (API
<code>guard_descent</code>) to a value between 0 and 20 (default 5).</p>
<code>guard_descent</code>) to a value between 0.0 and 20.0 (default
5.0).</p>
<h3 id="ean-european-article-number-iso-15420">6.1.4 EAN (European
Article Number) (ISO 15420)</h3>
<h4 id="ean-2-ean-5-ean-8-and-ean-13">6.1.4.1 EAN-2, EAN-5, EAN-8 and
@ -9392,10 +9394,10 @@ class="sourceCode bash"><code class="sourceCode bash"><span id="cb135-1"><a href
<p>Create “qr.svg” in the current directory, as a QR Code symbol.</p>
<div class="sourceCode" id="cb136"><pre
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">&#39;This Text&#39;</span> <span class="at">-o</span> <span class="st">&#39;qr.svg&#39;</span></span></code></pre></div>
<p>Use batch mode to read from an input file “ean13nos.txt” containing
13-digit GTINs, to create a series of EAN-13 barcodes, formatting the
output filenames to “ean001.gif”, “ean002.gif” etc. using the special
character “~”.</p>
<p>Use batch mode to read from an input file “ean13nos.txt” containing a
list of 13-digit GTINs, each on a separate line, to create a series of
EAN-13 barcodes, formatting the output filenames to “ean001.gif”,
“ean002.gif” etc. using the special character “~”.</p>
<div class="sourceCode" id="cb137"><pre
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">&#39;ean13nos.txt&#39;</span> <span class="at">-o</span> <span class="st">&#39;ean~~~.gif&#39;</span></span></code></pre></div>
<h2 id="bugs">BUGS</h2>