1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-06-09 23:23:36 +00:00

AZTEC: use algorithm adapted from ZXing for optimized encodation

(ticket #347), props Frank Yellin and Rustam Abdullaev;
   also improve performance of `FAST_MODE`
DATAMATRIX: assert max size on `edges` will fit in unsigned short;
   use MASK for DMRE/SQUARE `option_3` setting
PDF417: assert max size on `edges` will fit in unsigned short
GUI: fix setting AZTEC size and ECC combos if not previously set
manual: fix not mentioning AZTEC re `FAST_MODE`;
  gs1 mode footnote: mention 3940's length; pandoc -> 3.9
test suite: DOTCODE: account for new BWIPP input length guard
This commit is contained in:
gitlost
2026-03-11 15:48:24 +00:00
parent ee71a5cc56
commit b3a3c0d3b4
19 changed files with 3668 additions and 1558 deletions
+6 -6
View File
@@ -1,12 +1,12 @@
% docs/README 2025-12-09
% docs/README 2026-03-11
For generation of "docs/manual.html", "docs/manual.pdf" and "docs/manual.txt" from "manual.pmd"
and man page "docs/zint.1" from "docs/zint.1.pmd" using pandoc >= 3.8.2.
On Ubuntu/Debian (tested on Ubuntu 22.04 and Ubuntu 24.04)
wget https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-1-amd64.deb
sudo dpkg -i pandoc-3.8.3-1-amd64.deb
wget https://github.com/jgm/pandoc/releases/download/3.9/pandoc-3.9-1-amd64.deb
sudo dpkg -i pandoc-3.9-1-amd64.deb
sudo apt install librsvg2-bin
sudo apt install texlive-xetex
sudo apt install texlive-lang-cjk
@@ -15,9 +15,9 @@ On Ubuntu/Debian (tested on Ubuntu 22.04 and Ubuntu 24.04)
On Fedora (tested on Fedora Linux 38 (Workstation Edition) and Fedora Linux 42 (Workstation Edition))
wget https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-linux-amd64.tar.gz
tar xf pandoc-3.8.3-linux-amd64.tar.gz
sudo mv -i pandoc-3.8.3/bin/pandoc /usr/local/bin
wget https://github.com/jgm/pandoc/releases/download/3.9/pandoc-3.9-linux-amd64.tar.gz
tar xf pandoc-3.9-linux-amd64.tar.gz
sudo mv -i pandoc-3.9/bin/pandoc /usr/local/bin
sudo dnf install librsvg2-tools.x86_64
sudo dnf install texlive-xetex
sudo dnf install texlive-ctex.noarch
+19 -18
View File
@@ -334,7 +334,7 @@
<h1 class="title">Zint Barcode Generator and Zint Barcode Studio User
Manual</h1>
<p class="author">Version 2.16.0.9</p>
<p class="date">February 2026</p>
<p class="date">March 2026</p>
</header>
<nav id="TOC" role="doc-toc">
<ul>
@@ -2601,13 +2601,12 @@ Modes and ECI</a> below.</p>
<p>GS1 data can be encoded in a number of symbologies - see <a
href="#gs1-data-entry-and-options">4.11.3 GS1 Data Entry and
Options</a>.</p>
<p>Health Industry Barcode (HIBC) data may also be encoded in the
symbologies Aztec Code, Codablock-F, Code 128, Code 39, Data Matrix,
MicroPDF417, PDF417 and QR Code. Within this mode, the leading
<code>'+'</code> and the check character are automatically added by
Zint, conforming to HIBC Labeler Identification Code (HIBC LIC). For
HIBC Provider Applications Standard (HIBC PAS), preface the data with a
slash <code>'/'</code>.</p>
<p>Health Industry Barcode (HIBC) data may be encoded in the symbologies
Aztec Code, Codablock-F, Code 128, Code 39, Data Matrix, MicroPDF417,
PDF417 and QR Code. Within this mode, the leading <code>'+'</code> and
the check character are automatically added by Zint, conforming to HIBC
Labeler Identification Code (HIBC LIC). For HIBC Provider Applications
Standard (HIBC PAS), preface the data with a slash <code>'/'</code>.</p>
<p>The <code>--binary</code> option encodes the input data as given.
Automatic code page translation to an ECI page is disabled, and no
validation of the datas encoding takes place. This may be used for raw
@@ -4240,9 +4239,9 @@ as per-row rather than as overall height.</td>
<tr>
<td style="text-align: left;"><code>FAST_MODE</code></td>
<td style="text-align: left;">Use faster if less optimal encodation or
other shortcuts if available (affects <code>DATAMATRIX</code>,
<code>MICROPDF417</code>, <code>PDF417</code>, <code>QRCODE</code> and
<code>UPNQR</code> only).</td>
other shortcuts if available (affects <code>AZTEC</code>,
<code>DATAMATRIX</code>, <code>MICROPDF417</code>, <code>PDF417</code>,
<code>QRCODE</code> and <code>UPNQR</code> only).</td>
</tr>
<tr>
<td style="text-align: left;"><code>EXTRA_ESCAPE_MODE</code></td>
@@ -4297,8 +4296,8 @@ in section <a href="#adjusting-height">4.4 Adjusting Height</a>. The
<code>height</code> member should be set to the desired per-row value on
input (it will be set to the overall height on output).</p>
<p><code>FAST_MODE</code> causes a less optimal encodation scheme to be
used for Data Matrix, MicroPDF417 and PDF417. For QR Code and UPNQR, it
limits Zints automatic mask selection - see <a
used for Aztec Code, Data Matrix, MicroPDF417 and PDF417. For QR Code
and UPNQR, it limits Zints automatic mask selection - see <a
href="#qr-code-iso-18004">6.6.3 QR Code (ISO 18004)</a> for details.</p>
<h2 id="multiple-segments-1">5.12 Multiple Segments</h2>
<p>For input data requiring multiple ECIs, the following functions may
@@ -5890,8 +5889,9 @@ or 3 for CC-A, CC-B or CC-C respectively.</p>
into a small space. The size of the 2D component and the amount of error
correction is determined by the amount of data to be encoded and the
type of linear component which is being used. CC-A can encode up to 56
numeric digits or an alphanumeric string of shorter length. To select
CC-A use <code>--mode=1</code> (API <code>option_1 = 1</code>).</p>
numeric digits (including AIs) or an alphanumeric string of shorter
length (e.g. if all capitals, at most 30, excluding AI). To select CC-A
use <code>--mode=1</code> (API <code>option_1 = 1</code>).</p>
<figure>
<img src="images/ean13_cc_a.svg" class="upcean"
alt="zint -b EAN13_CC --compliantheight -d &quot;[99]1234-abcd&quot; --mode=1 --primary=331234567890" />
@@ -9946,9 +9946,10 @@ of any AI (except when the last) <strong>apart</strong> from those whose
11, 12, 13, 15, 16, 17, 20, 31, 32, 33, 34, 35, 36 and 41, as specified
in GS1 General Specifications 26.0 Table 7-6 “Element strings with
predefined length using GS1 Application Identifiers”. Note that this
applies even to AIs with fixed lengths, so e.g. the data for AI 3940
must have a terminating <code>FNC1</code> (except when the last AI).<a
href="#fnref11" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
applies even to AIs with fixed lengths, so e.g. the data for AI 3940,
which has a fixed length of 4, must have a terminating <code>FNC1</code>
(except when the last AI).<a href="#fnref11" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn12"><p>BARCODE_MEMORY_FILE textual formats EPS and SVG will
have Unix newlines (LF) on both Windows and Unix, i.e. not CR+LF on
Windows.<a href="#fnref12" class="footnote-back"
+11 -10
View File
@@ -1,6 +1,6 @@
% Zint Barcode Generator and Zint Barcode Studio User Manual
% Version 2.16.0.9
% February 2026
% March 2026
# 1. Introduction
@@ -1289,7 +1289,7 @@ Interpretations) mechanism to encode the data if the symbology supports it - see
GS1 data can be encoded in a number of symbologies - see [4.11.3 GS1 Data Entry
and Options].
Health Industry Barcode (HIBC) data may also be encoded in the symbologies Aztec
Health Industry Barcode (HIBC) data may be encoded in the symbologies Aztec
Code, Codablock-F, Code 128, Code 39, Data Matrix, MicroPDF417, PDF417 and QR
Code. Within this mode, the leading `'+'` and the check character are
automatically added by Zint, conforming to HIBC Labeler Identification Code
@@ -1550,8 +1550,8 @@ last) **apart** from those whose **first two digits** match the following: 00,
01, 02, 03, 11, 12, 13, 15, 16, 17, 20, 31, 32, 33, 34, 35, 36 and 41, as
specified in GS1 General Specifications 26.0 Table 7-6 "Element strings with
predefined length using GS1 Application Identifiers". Note that this applies
even to AIs with fixed lengths, so e.g. the data for AI 3940 must have a
terminating `FNC1` (except when the last AI).
even to AIs with fixed lengths, so e.g. the data for AI 3940, which has a fixed
length of 4, must have a terminating `FNC1` (except when the last AI).
The final way to specify input is the related "raw" mode using the `--gs1raw`
option. Here `FNC1`s are indicated by Group Separators (`GS`, ASCII 29, escape
@@ -2517,7 +2517,7 @@ Value Effect
as overall height.
`FAST_MODE` Use faster if less optimal encodation or other
shortcuts if available (affects `DATAMATRIX`,
shortcuts if available (affects `AZTEC`, `DATAMATRIX`,
`MICROPDF417`, `PDF417`, `QRCODE` and `UPNQR` only).
`EXTRA_ESCAPE_MODE` Process special symbology-specific escape sequences
@@ -2572,9 +2572,9 @@ For `HEIGHTPERROW_MODE`, see `--heightperrow` in section [4.4 Adjusting Height].
The `height` member should be set to the desired per-row value on input (it will
be set to the overall height on output).
`FAST_MODE` causes a less optimal encodation scheme to be used for Data Matrix,
MicroPDF417 and PDF417. For QR Code and UPNQR, it limits Zint's automatic mask
selection - see [6.6.3 QR Code (ISO 18004)] for details.
`FAST_MODE` causes a less optimal encodation scheme to be used for Aztec Code,
Data Matrix, MicroPDF417 and PDF417. For QR Code and UPNQR, it limits Zint's
automatic mask selection - see [6.6.3 QR Code (ISO 18004)] for details.
## 5.12 Multiple Segments
@@ -3972,8 +3972,9 @@ followed by 1, 2 or 3 for CC-A, CC-B or CC-C respectively.
This system uses a variation of MicroPDF417 which is optimised to fit into a
small space. The size of the 2D component and the amount of error correction is
determined by the amount of data to be encoded and the type of linear component
which is being used. CC-A can encode up to 56 numeric digits or an alphanumeric
string of shorter length. To select CC-A use `--mode=1` (API `option_1 = 1`).
which is being used. CC-A can encode up to 56 numeric digits (including AIs) or
an alphanumeric string of shorter length (e.g. if all capitals, at most 30,
excluding AI). To select CC-A use `--mode=1` (API `option_1 = 1`).
![`zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1
--primary=331234567890`](images/ean13_cc_a.svg){.upcean}
+12 -11
View File
@@ -1,6 +1,6 @@
Zint Barcode Generator and Zint Barcode Studio User Manual
Version 2.16.0.9
February 2026
March 2026
*******************************************************************************
* For reference the following is a text-only version of the Zint manual, *
@@ -1370,7 +1370,7 @@ Interpretations) mechanism to encode the data if the symbology supports it - see
GS1 data can be encoded in a number of symbologies - see 4.11.3 GS1 Data Entry
and Options.
Health Industry Barcode (HIBC) data may also be encoded in the symbologies Aztec
Health Industry Barcode (HIBC) data may be encoded in the symbologies Aztec
Code, Codablock-F, Code 128, Code 39, Data Matrix, MicroPDF417, PDF417 and QR
Code. Within this mode, the leading '+' and the check character are
automatically added by Zint, conforming to HIBC Labeler Identification Code
@@ -2476,7 +2476,7 @@ member:
overall height.
FAST_MODE Use faster if less optimal encodation or other
shortcuts if available (affects DATAMATRIX,
shortcuts if available (affects AZTEC, DATAMATRIX,
MICROPDF417, PDF417, QRCODE and UPNQR only).
EXTRA_ESCAPE_MODE Process special symbology-specific escape sequences
@@ -2524,9 +2524,9 @@ For HEIGHTPERROW_MODE, see --heightperrow in section 4.4 Adjusting Height. The
height member should be set to the desired per-row value on input (it will be
set to the overall height on output).
FAST_MODE causes a less optimal encodation scheme to be used for Data Matrix,
MicroPDF417 and PDF417. For QR Code and UPNQR, it limits Zints automatic mask
selection - see 6.6.3 QR Code (ISO 18004) for details.
FAST_MODE causes a less optimal encodation scheme to be used for Aztec Code,
Data Matrix, MicroPDF417 and PDF417. For QR Code and UPNQR, it limits Zints
automatic mask selection - see 6.6.3 QR Code (ISO 18004) for details.
5.12 Multiple Segments
@@ -3794,8 +3794,9 @@ followed by 1, 2 or 3 for CC-A, CC-B or CC-C respectively.
This system uses a variation of MicroPDF417 which is optimised to fit into a
small space. The size of the 2D component and the amount of error correction is
determined by the amount of data to be encoded and the type of linear component
which is being used. CC-A can encode up to 56 numeric digits or an alphanumeric
string of shorter length. To select CC-A use --mode=1 (API option_1 = 1).
which is being used. CC-A can encode up to 56 numeric digits (including AIs) or
an alphanumeric string of shorter length (e.g. if all capitals, at most 30,
excluding AI). To select CC-A use --mode=1 (API option_1 = 1).
[zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234
567890]
@@ -5185,7 +5186,7 @@ configured barcode is updated when the "Generate" button is pressed.
Annex D. Man Page ZINT(1)
% ZINT(1) Version 2.16.0.9 % % February 2026
% ZINT(1) Version 2.16.0.9 % % March 2026
NAME
@@ -5963,8 +5964,8 @@ apart from those whose first two digits match the following: 00, 01, 02, 03, 11,
12, 13, 15, 16, 17, 20, 31, 32, 33, 34, 35, 36 and 41, as specified in GS1
General Specifications 26.0 Table 7-6 “Element strings with predefined length
using GS1 Application Identifiers”. Note that this applies even to AIs with
fixed lengths, so e.g. the data for AI 3940 must have a terminating FNC1 (except
when the last AI).
fixed lengths, so e.g. the data for AI 3940, which has a fixed length of 4, must
have a terminating FNC1 (except when the last AI).
[12] BARCODE_MEMORY_FILE textual formats EPS and SVG will have Unix newlines
(LF) on both Windows and Unix, i.e. not CR+LF on Windows.
+2 -2
View File
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.8.3
.\" Automatically generated by Pandoc 3.9
.\"
.TH "ZINT" "1" "February 2026" "Version 2.16.0.9"
.TH "ZINT" "1" "March 2026" "Version 2.16.0.9"
.SH NAME
\f[CR]zint\f[R] \- encode data as a barcode image
.SH SYNOPSIS
+1 -1
View File
@@ -1,6 +1,6 @@
% ZINT(1) Version 2.16.0.9
%
% February 2026
% March 2026
# NAME