1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-17 09:57:02 +00:00

general: suppress clang-tidy-21/22 warnings;

some code fiddling on affected files
manual: use new lua filter "lua-crossrefs.lua" hacked from
  https://github.com/rnwst/pandoc-lua-crossrefs as replacement for
  tablenos which broke with pandoc 2.8.2 (get nicer output anyway);
  fix "excode39.svg" data $ -> # to avoid shell processing;
  document `ZBarcode_HaveGS1SyntaxEngine()`
This commit is contained in:
gitlost
2025-10-08 12:21:29 +01:00
parent d413255c93
commit a3cca33f32
30 changed files with 1645 additions and 1080 deletions

View File

@@ -2,7 +2,7 @@
# Copyright (C) 2022-2025 <rstuart114@gmail.com>
# vim: set ts=4 sw=4 noet :
#
# Requires a recent version of pandoc, plus pandoc-tablenos, xelatex and various other packages - see "README"
# Requires pandoc 3.8.2, plus xelatex and various other packages - see "README"
# .svg images generated by "zint_images.sh"
SOURCE = manual.pmd
@@ -16,6 +16,8 @@ INCLUDES_TXT = inc_header_txt.tex
INC_TXT = --include-in-header $(INCLUDES_TXT)
SOURCE_MAN_PAGE = zint.1.pmd
OUT_MAN_PAGE = zint.1
LUA_FILTER = lua-crossrefs/lua-crossrefs.lua
INFRASTRUCTURE = Makefile $(LUA_FILTER)
IMAGES = \
images/zint.png \
images/zint-qt.png \
@@ -148,15 +150,18 @@ IMAGES = \
MAIN_FONT = mainfont="TeX Gyre Pagella"
MONO_FONT = monofont="Liberation Mono"
CJK_FONT = CJKmainfont="WenQuanYi Micro Hei Mono"
PDF_OPTS = --pdf-engine=xelatex --filter pandoc-tablenos -M tablenos-warning-level=0 \
--highlight-style=haddock -V colorlinks -V geometry:margin=20mm -V papersize=a4 -V csquotes=true --dpi=300
PDF_OPTS = --pdf-engine=xelatex \
--lua-filter=$(LUA_FILTER) \
--syntax-highlighting=haddock -V colorlinks -V geometry:margin=20mm -V papersize=a4 \
-V csquotes=true --dpi=300
TEX_MAN_PAGE = zint.1.tex
TXT_OPTS = --filter pandoc-tablenos -M tablenos-warning-level=0 --columns 80 --eol=lf -t plain
TXT_OPTS = --lua-filter=$(LUA_FILTER) \
--columns 80 --eol=lf -t plain
MAN_PAGE_OPTS = -s -t man
all : $(OUT_PDF) $(OUT_TXT) $(OUT_MAN_PAGE) $(OUT_HTML)
$(OUT_PDF) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) Makefile
$(OUT_PDF) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) $(INFRASTRUCTURE)
pandoc $(SOURCE_MAN_PAGE) -f markdown \
$(PDF_OPTS) \
-o $(TEX_MAN_PAGE)
@@ -167,7 +172,7 @@ $(OUT_PDF) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PD
--include-after-body $(TEX_MAN_PAGE) \
-o $(OUT_PDF)
$(OUT_TXT) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INCLUDES_TXT) Makefile
$(OUT_TXT) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INCLUDES_TXT) $(INFRASTRUCTURE)
pandoc $(SOURCE) $(SOURCE_MAN_PAGE) -f markdown $(INC_TXT) --toc --toc-depth=4 \
-V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) \
$(TXT_OPTS) \
@@ -179,19 +184,19 @@ $(OUT_TXT) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INCLUDES_TXT) Makefile
-e 's/ *$$//' \
-e '/^\[.*\]$$/{N;N;s/\[\(.*\)\]\n\n\1/[\1]/;p;d}' \
-e 's/ *{#tbl:[^}]*}//' \
-e 's/: Table\xC2\xA0: \([^:]*\):/Table : \1/' \
-e 's/^ : Table/ Table/' \
$(OUT_TXT)
# Wrap
sed -i '/.\{81\}/{s/.\{80\}/&\n/}' $(OUT_TXT)
$(OUT_MAN_PAGE) : $(SOURCE_MAN_PAGE) Makefile
$(OUT_MAN_PAGE) : $(SOURCE_MAN_PAGE) $(INFRASTRUCTURE)
pandoc $(SOURCE_MAN_PAGE) -f markdown \
$(MAN_PAGE_OPTS) \
-o $(OUT_MAN_PAGE)
# For debugging
manual.tex : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) Makefile
manual.tex : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PDF) $(IMAGES) $(INFRASTRUCTURE)
pandoc $(SOURCE_MAN_PAGE) -f markdown \
$(PDF_OPTS) \
-o $(TEX_MAN_PAGE)
@@ -204,13 +209,14 @@ manual.tex : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PD
# HTML one-page (uses modified "templates/styles.html", unchanged "templates/default.html")
HTML_OPTS = --filter pandoc-tablenos -M tablenos-warning-level=0 --highlight-style=haddock \
HTML_OPTS = --lua-filter=$(LUA_FILTER) \
--syntax-highlighting=haddock \
--template=templates/default.html --eol=lf -s -t html
INC_BEFORE_BODY_HTML = inc_before_body_html.html
INC_HTML = --include-before-body $(INC_BEFORE_BODY_HTML)
TEMPLATES_HTML = templates/default.html templates/styles.html
$(OUT_HTML) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_BEFORE_BODY_HTML) $(TEMPLATES_HTML) Makefile
$(OUT_HTML) : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_BEFORE_BODY_HTML) $(TEMPLATES_HTML) $(INFRASTRUCTURE)
pandoc $(SOURCE) $(SOURCE_MAN_PAGE) -f markdown+link_attributes $(INC_HTML) --toc --toc-depth=4 \
-V $(MAIN_FONT) -V $(MONO_FONT) -V $(CJK_FONT) \
$(HTML_OPTS) \

View File

@@ -1,41 +1,22 @@
% docs/README 2025-09-16
% docs/README 2025-10-08
For generation of "docs/manual.pdf" and "docs/manual.txt" from "manual.pmd" using a recent version of pandoc
For generation of "docs/manual.pdf" and "docs/manual.txt" from "manual.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/pandoc-3.8-1-amd64.deb
sudo dpkg -i pandoc-3.8-1-amd64.deb
For Ubuntu 22.04 (python < 3.12)
sudo apt install python3-pip
pip install pandoc-tablenos --user
Else for Ubuntu 24.04 (one way around "externally-managed-environment" error, PEP 668)
sudo apt install python3-full
python3 -m venv ~/py_envs
source ~/py_envs/bin/activate
pip install pandoc-tablenos
Then
export PATH=~/.local/bin:"$PATH"
# Temporary fix for version regex - see https://github.com/tomduck/pandoc-xnos/pull/29
python -m pip install --force-reinstall \
git+https://github.com/tomduck/pandoc-xnos@284474574f51888be75603e7d1df667a0890504d#egg=pandoc-xnos
wget https://github.com/jgm/pandoc/releases/download/3.8.2/pandoc-3.8.2-1-amd64.deb
sudo dpkg -i pandoc-3.8.2-1-amd64.deb
sudo apt install librsvg2-bin
sudo apt install texlive-xetex
sudo apt install texlive-lang-cjk
sudo apt install fonts-wqy-microhei
make
On Fedora (tested on Fedora Linux 38 (Workstation Edition) and Fedora Linux 40 (Workstation Edition))
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/pandoc-3.8-linux-amd64.tar.gz
tar xf pandoc-3.8-linux-amd64.tar.gz
sudo mv -i pandoc-3.8/bin/pandoc /usr/local/bin
sudo dnf install python3-pip
pip install pandoc-tablenos --user
export PATH=~/.local/bin:"$PATH"
# Temporary fix for version regex - see https://github.com/tomduck/pandoc-xnos/pull/29
python -m pip install --force-reinstall \
git+https://github.com/tomduck/pandoc-xnos@284474574f51888be75603e7d1df667a0890504d#egg=pandoc-xnos
wget https://github.com/jgm/pandoc/releases/download/3.8.2/pandoc-3.8.2-linux-amd64.tar.gz
tar xf pandoc-3.8.2-linux-amd64.tar.gz
sudo mv -i pandoc-3.8.2/bin/pandoc /usr/local/bin
sudo dnf install librsvg2-tools.x86_64
sudo dnf install texlive-xetex
sudo dnf install texlive-ctex.noarch
@@ -51,3 +32,11 @@ On Fedora (tested on Fedora Linux 38 (Workstation Edition) and Fedora Linux 40 (
On Windows
Not compatible.
On BSD
TODO
On macOS
TODO

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="744" height="280" version="1.1" xmlns="http://www.w3.org/2000/svg">
<svg width="994" height="280" version="1.1" xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="744" height="280" fill="#FFFFFF"/>
<path d="M0 0h4.8v240h-4.8ZM14.4 0h4.8v240h-4.8ZM24 0h9.6v240h-9.6ZM38.4 0h9.6v240h-9.6ZM52.8 0h4.8v240h-4.8ZM62.4 0h9.6v240h-9.6ZM76.8 0h4.8v240h-4.8ZM91.2 0h4.8v240h-4.8ZM100.8 0h4.8v240h-4.8ZM110.4 0h9.6v240h-9.6ZM124.8 0h4.8v240h-4.8ZM134.4 0h9.6v240h-9.6ZM153.6 0h4.8v240h-4.8ZM163.2 0h4.8v240h-4.8ZM172.8 0h9.6v240h-9.6ZM187.2 0h9.6v240h-9.6ZM201.6 0h9.6v240h-9.6ZM220.8 0h4.8v240h-4.8ZM230.4 0h4.8v240h-4.8ZM240 0h4.8v240h-4.8ZM249.6 0h9.6v240h-9.6ZM268.8 0h4.8v240h-4.8ZM278.4 0h4.8v240h-4.8ZM288 0h9.6v240h-9.6ZM302.4 0h4.8v240h-4.8ZM312 0h4.8v240h-4.8ZM321.6 0h4.8v240h-4.8ZM336 0h9.6v240h-9.6ZM350.4 0h4.8v240h-4.8ZM360 0h9.6v240h-9.6ZM374.4 0h9.6v240h-9.6ZM388.8 0h4.8v240h-4.8ZM403.2 0h9.6v240h-9.6ZM417.6 0h4.8v240h-4.8ZM427.2 0h4.8v240h-4.8ZM436.8 0h4.8v240h-4.8ZM451.2 0h4.8v240h-4.8ZM460.8 0h4.8v240h-4.8ZM475.2 0h4.8v240h-4.8ZM489.6 0h4.8v240h-4.8ZM499.2 0h4.8v240h-4.8ZM508.8 0h9.6v240h-9.6ZM523.2 0h9.6v240h-9.6ZM542.4 0h4.8v240h-4.8ZM552 0h4.8v240h-4.8ZM561.6 0h4.8v240h-4.8ZM576 0h4.8v240h-4.8ZM585.6 0h4.8v240h-4.8ZM600 0h4.8v240h-4.8ZM614.4 0h4.8v240h-4.8ZM624 0h4.8v240h-4.8ZM633.6 0h4.8v240h-4.8ZM643.2 0h9.6v240h-9.6ZM662.4 0h4.8v240h-4.8ZM672 0h9.6v240h-9.6ZM686.4 0h4.8v240h-4.8ZM700.8 0h4.8v240h-4.8ZM710.4 0h9.6v240h-9.6ZM724.8 0h9.6v240h-9.6ZM739.2 0h4.8v240h-4.8Z"/>
<text x="372" y="272.03" text-anchor="middle" font-family="Arimo, Arial, sans-serif" font-size="33.6">
123.45fd
<rect x="0" y="0" width="994" height="280" fill="#FFFFFF"/>
<path d="M0 0h4.8v240h-4.8ZM14.4 0h4.8v240h-4.8ZM24 0h9.6v240h-9.6ZM38.4 0h9.6v240h-9.6ZM52.8 0h4.8v240h-4.8ZM62.4 0h9.6v240h-9.6ZM76.8 0h4.8v240h-4.8ZM91.2 0h4.8v240h-4.8ZM100.8 0h4.8v240h-4.8ZM110.4 0h9.6v240h-9.6ZM124.8 0h4.8v240h-4.8ZM134.4 0h9.6v240h-9.6ZM153.6 0h4.8v240h-4.8ZM163.2 0h4.8v240h-4.8ZM172.8 0h9.6v240h-9.6ZM187.2 0h9.6v240h-9.6ZM201.6 0h9.6v240h-9.6ZM220.8 0h4.8v240h-4.8ZM230.4 0h4.8v240h-4.8ZM240 0h4.8v240h-4.8ZM249.6 0h9.6v240h-9.6ZM268.8 0h4.8v240h-4.8ZM278.4 0h4.8v240h-4.8ZM288 0h9.6v240h-9.6ZM302.4 0h4.8v240h-4.8ZM312 0h4.8v240h-4.8ZM321.6 0h4.8v240h-4.8ZM336 0h9.6v240h-9.6ZM350.4 0h4.8v240h-4.8ZM360 0h9.6v240h-9.6ZM374.4 0h9.6v240h-9.6ZM388.8 0h4.8v240h-4.8ZM403.2 0h9.6v240h-9.6ZM417.6 0h4.8v240h-4.8ZM427.2 0h4.8v240h-4.8ZM436.8 0h4.8v240h-4.8ZM451.2 0h4.8v240h-4.8ZM465.6 0h4.8v240h-4.8ZM475.2 0h4.8v240h-4.8ZM489.6 0h4.8v240h-4.8ZM499.2 0h9.6v240h-9.6ZM513.6 0h9.6v240h-9.6ZM528 0h4.8v240h-4.8ZM542.4 0h4.8v240h-4.8ZM552 0h4.8v240h-4.8ZM561.6 0h4.8v240h-4.8ZM571.2 0h4.8v240h-4.8ZM585.6 0h4.8v240h-4.8ZM600 0h4.8v240h-4.8ZM614.4 0h4.8v240h-4.8ZM624 0h4.8v240h-4.8ZM638.4 0h9.6v240h-9.6ZM652.8 0h4.8v240h-4.8ZM662.4 0h4.8v240h-4.8ZM672 0h9.6v240h-9.6ZM686.4 0h4.8v240h-4.8ZM700.8 0h4.8v240h-4.8ZM710.4 0h4.8v240h-4.8ZM724.8 0h4.8v240h-4.8ZM739.2 0h4.8v240h-4.8ZM748.8 0h4.8v240h-4.8ZM758.4 0h9.6v240h-9.6ZM772.8 0h9.6v240h-9.6ZM792 0h4.8v240h-4.8ZM801.6 0h4.8v240h-4.8ZM811.2 0h4.8v240h-4.8ZM825.6 0h4.8v240h-4.8ZM835.2 0h4.8v240h-4.8ZM849.6 0h4.8v240h-4.8ZM864 0h4.8v240h-4.8ZM873.6 0h4.8v240h-4.8ZM883.2 0h4.8v240h-4.8ZM892.8 0h9.6v240h-9.6ZM912 0h4.8v240h-4.8ZM921.6 0h9.6v240h-9.6ZM936 0h4.8v240h-4.8ZM950.4 0h4.8v240h-4.8ZM960 0h9.6v240h-9.6ZM974.4 0h9.6v240h-9.6ZM988.8 0h4.8v240h-4.8Z"/>
<text x="496.8" y="272.03" text-anchor="middle" font-family="Arimo, Arial, sans-serif" font-size="33.6">
123.45#@fd
</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -36,46 +36,8 @@
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
%% https://github.com/tomduck/pandoc-tablenos
%% As using --include-in-header (this file), need to manually include the following (displayed by setting
%% "-M tablenos-warning-level=2"):
%% PDF metadata - the values are set in "docs/inc_before_body.tex" (otherwise may get overridden)
%% PDF metadata - the values are set in "docs/inc_before_body_pdf.tex" (otherwise may get overridden)
\usepackage{hyperref}
%% pandoc-tablenos: required package
%% pandoc-lua-crossrefs: required package
\usepackage{caption}
%% pandoc-tablenos: environment to disable table caption prefixes
\makeatletter
\newcounter{tableno}
\newenvironment{tablenos:no-prefix-table-caption}{
\caption@ifcompatibility{}{
\let\oldthetable\thetable
\let\oldtheHtable\theHtable
\renewcommand{\thetable}{tableno:\thetableno}
\renewcommand{\theHtable}{tableno:\thetableno}
\stepcounter{tableno}
\captionsetup{labelformat=empty}
}
}{
\caption@ifcompatibility{}{
\captionsetup{labelformat=default}
\let\thetable\oldthetable
\let\theHtable\oldtheHtable
\addtocounter{table}{-1}
}
}
\makeatother
%% pandoc-tablenos: environment for tagged tables
\newenvironment{tablenos:tagged-table}[1][]{
\let\oldthetable\thetable
\let\oldtheHtable\theHtable
\renewcommand{\thetable}{#1}
\renewcommand{\theHtable}{#1}
}{
\let\thetable\oldthetable
\let\theHtable\oldtheHtable
\addtocounter{table}{-1}
}

339
docs/lua-crossrefs/COPYING Normal file
View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -0,0 +1,271 @@
-- libzint - the open source barcode library
-- Copyright (C) 2025 Robin Stuart <rstuart114@gmail.com>
-- Hacked from https://github.com/rnwst/pandoc-lua-crossrefs
-- © 2025 R. N. West. Released under the GPL version 2 or greater.
-- SPDX-License-Identifier: GPL-2.0-or-later
-- Hacked from "pandoc-lua-crossrefs/init.lua"
-- Table of Ids and corresponding cross-referenceable elements. To be populated
-- by various element numbering functions.
---@type table<string, {type: ('fig'|'tbl'), number: string, caption: string}>
IDs = {}
-- Hacked from "pandoc-lua-crossrefs/lib/crossrefs.lua"
---Check if AST element is a cross-reference (a cross-reference is a Span with class 'cross-ref').
---@param inline Inline
---@return boolean
local _is_crossref = function(inline)
local is_crossref_link = inline and inline.tag == 'Link' and inline.attributes['reference-type'] ~= nil
return is_crossref_link
end
---Parse a cross-reference in Pandoc's Markdown.
---@param str Str
---@return Inline[] | nil
local _parse_crossref = function(str)
local opening_bracket, prefix_suppressor, id, closing_bracket1, punctuation, closing_bracket2 =
str.text:match('^(%[?)(%-?)#([%a%d-_:%.]-)(%]?)([\\%.!:?,;)]-)(%]?)$')
if not id or id == '' then return end
local only_internal_punctuation = id:find('^[%a%d]+[%a%d%-_:%.]*[%a%d]+$') or id:find('^[%a%d]+$')
if not only_internal_punctuation then return end
if #closing_bracket1 ~= 0 and #closing_bracket2 ~= 0 then return end
local crossref = pandoc.Link({}, '#' .. id, '', pandoc.Attr('', {}, { ['reference-type'] = 'ref+label' }))
if prefix_suppressor == '-' then crossref.attributes['reference-type'] = 'ref' end
local elts = pandoc.List { crossref }
if opening_bracket == '[' then elts:insert(1, pandoc.Str('[')) end
if closing_bracket1 == ']' then elts:insert(pandoc.Str(']')) end
if punctuation ~= '' then elts:insert(pandoc.Str(punctuation)) end
if closing_bracket2 == ']' then elts:insert(pandoc.Str(']')) end
return elts
end
---Parse cross-references in Inlines.
---@param inlines Inlines
---@return (Inline[] | Inlines | nil), boolean?
local parse_crossrefs = function(inlines)
-- Parse cross-references into Links.
local new_inlines = inlines:walk { Str = _parse_crossref }
-- Early return if no cross-references were found!
if new_inlines == inlines then return end
inlines = new_inlines
-- Now separate out any opening or closing brackets in Strs into separate
-- Strs, in case crossref groups don't begin and end with cross-references.
inlines = inlines:walk {
Str = function(str)
if str.text:find('^%[.') then
return { pandoc.Str('['), pandoc.Str(str.text:sub(2)) }
elseif str.text:find('.%]$') then
return { pandoc.Str(str.text:sub(1, -2)), pandoc.Str(']') }
end
end,
}
-- Now create crossref groups. Crossref Groups are represented by Spans of
-- class 'cross-ref-group'.
---@type List<Inline>
new_inlines = pandoc.List {}
local i = 1
while inlines[i] do
if i < #inlines and inlines[i].tag == 'Str' and inlines[i].text == '[' then
---@type boolean
local at_least_one_crossref = false
---@type List<Inline>
local group_content = pandoc.List {}
---@type boolean
local group_valid = false
local j = i + 1
while inlines[j] do
local elt = inlines[j]
if elt.tag == 'Str' and elt.text == ']' then
if at_least_one_crossref then
group_valid = true
break
else
group_valid = false
break
end
-- Another opening bracket invalidates the group if no cross-reference has yet been
-- found. This ensures that the smallest possible Crossref Groups are created.
elseif elt.tag == 'Str' and elt.text == '[' and not at_least_one_crossref then
group_valid = false
break
else
if _is_crossref(elt) then at_least_one_crossref = true end
group_content:insert(inlines[j])
end
j = j + 1
if _is_crossref(elt) and inlines[j] and inlines[j].tag == 'Str' then
if inlines[j].text == ';' and inlines[j + 1] and inlines[j + 1].tag == 'Space' then
-- Skip punctuation following crossref if it is ';'.
j = j + 2
elseif inlines[j].text == '\\;' then
-- To still allow a semicolon to be used to separate cross-references, an
-- escaped semicolon is converted to a semicolon.
group_content:insert(pandoc.Str(';'))
j = j + 1
end
end
end
if group_valid then
-- Insert Crossref Group into inlines.
local crossref_group = pandoc.Span(group_content, pandoc.Attr('', { 'cross-ref-group' }))
new_inlines:insert(crossref_group)
i = j
else
new_inlines:insert(inlines[i])
end
else
new_inlines:insert(inlines[i])
end
i = i + 1
end
return new_inlines, false -- Nested cross-references are not allowed!
end
---Get cross-reference target
---@param crossref Link
---@return { type: 'fig'|'tbl', number: string, caption: string }
local _get_target = function(crossref) return IDs[crossref.target:sub(2)] end
---Resolve cross-reference.
---@param crossref Link cross-reference
---@param suppress_prefix? boolean whether to suppress prefixing the referenced object's type (e.g. 'Fig.' or 'Tbl.')
---@return Link
local _resolve_crossref = function(crossref, suppress_prefix)
local target = _get_target(crossref)
local crossref_text = ''
if target ~= nil then
if crossref.attributes['reference-type'] == 'ref+label' and not suppress_prefix then
if target.type == 'fig' then
crossref_text = 'Figure '
elseif target.type == 'tbl' then
crossref_text = 'Table '
end
end
crossref_text = crossref_text .. target.number .. ': ' .. target.caption
else
crossref_text = '??'
pandoc.log.warn('Cross-referenced element with id ' .. tostring(crossref.target) .. ' could not be resolved.')
end
local link = pandoc.Link(crossref_text, crossref.target)
link.attr = pandoc.Attr('', { 'cross-ref' })
return link
end
---Resolve single cross-references.
---@param link Link
---@return Link?
local write_crossref = function(link)
if _is_crossref(link) then return _resolve_crossref(link) end
end
-- Hacked from "pandoc-lua-crossrefs/lib/numbering.lua"
local figure_number = 0
local table_number = 0
---Number figure or table.
---@param fig_or_tbl (Figure | Table)
---@return (Figure | Table), false Numbered Figure or Table, or `nil` if unnumbered
---@overload fun(fig_or_tbl: Figure | Table): nil
local number_fig_or_tbl = function(fig_or_tbl)
if not fig_or_tbl.classes:includes('unnumbered') then
---@type string
local _type
---@type integer
local number
---@type string
local label_class
---@type fun(num: integer): string
local number_formatter = function(num) return tostring(num) end
---@type fun(num: integer): string
local label_formatter
---@type boolean
local colon_after_label = true
if fig_or_tbl.tag == 'Figure' then
_type = 'fig'
figure_number = figure_number + 1
number = figure_number
label_class = 'figure-label'
label_formatter = function(num) return string.format('Figure %s', num) end
end
if fig_or_tbl.tag == 'Table' then
_type = 'tbl'
table_number = table_number + 1
number = table_number
label_class = 'table-label'
label_formatter = function(num) return string.format('Table %s', num) end
end
---Add Fig or Tbl to table of Ids, prepend label to caption.
---@param elt (Figure | Table)
local function process_fig_or_tbl(elt)
if elt.identifier ~= '' then
local caption = pandoc.utils.stringify(elt.caption.long)
IDs[elt.identifier] = { type = _type, number = number_formatter(number), caption = caption }
end
local caption_prefix = pandoc.Span({ pandoc.Str(label_formatter(number)) }, pandoc.Attr('', { label_class }))
if FORMAT ~= 'latex' then
-- If figure or table caption is not empty, append colon to number.
if #elt.caption.long ~= 0 then
if colon_after_label then
caption_prefix.content[1].text = caption_prefix.content[1].text .. ':'
elt.caption.long[1].content:insert(1, pandoc.Space())
end
elt.caption.long[1].content:insert(1, caption_prefix)
else
elt.caption.long:insert(pandoc.Plain(caption_prefix))
end
end
end
process_fig_or_tbl(fig_or_tbl)
-- Number subfigs.
if _type == 'fig' then
number = 0
number_formatter = function(num) return figure_number .. label_formatter(num) end
label_formatter = function(num) return string.format('(%s)', string.char(96 + num)) end
colon_after_label = false
fig_or_tbl = fig_or_tbl:walk {
Figure = function(subfig)
number = number + 1
process_fig_or_tbl(subfig)
return subfig
end,
}
end
return fig_or_tbl, false -- Return `false` as second value to avoid processing subfigures again.
end
end
-- Hacked from "pandoc-lua-crossrefs/init.lua"
---@param doc Pandoc
function Pandoc(doc)
return doc
:walk({
Inlines = parse_crossrefs,
})
:walk({
-- Number cross-referenceable elements and construct table with Ids and numbers.
traverse = 'topdown', -- needed for subfigs
Figure = number_fig_or_tbl,
Table = number_fig_or_tbl,
})
:walk {
-- Resolve single cross-references.
Link = write_crossref,
}
end

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
% Zint Barcode Generator and Zint Barcode Studio User Manual
% Version 2.15.0.9
% September 2025
% October 2025
# 1. Introduction
@@ -439,7 +439,7 @@ meanings as given below:
|`*` | Insert leading asterisks|
|Any other character | Interpreted literally |
Table: {#tbl:sequence_format_characters tag=": Sequence Format Characters"}
Table: Sequence Format Characters {#tbl:sequence_format_characters}
Once you're happy with the Sequence Data, click the `"Export..."` button to
bring up the Export Dialog, discussed next.
@@ -578,7 +578,7 @@ Sequence Equivalent
is hexadecimal (000000-10FFFF)
-----------------------------------------------------------------------------
Table: {#tbl:escape_sequences tag=": Escape Sequences"}
Table: Escape Sequences {#tbl:escape_sequences}
[^3]: In Unicode contexts, BMP stands for Basic Multilingual Plane, the plane 0
codeset from U+0000 to U+D7FF and U+E000 to U+FFFF (i.e. excluding surrogates).
@@ -619,7 +619,7 @@ for the other supported file types:
zint -o there.eps -d "This Text"
```
The currently supported output file formats are shown in the following table.
The currently supported output file formats are:
Extension File format
--------- ------------------------------------
@@ -633,7 +633,7 @@ svg Scalable Vector Graphic
tif Tagged Image File Format
txt Text file (see [4.19 Other Options])
Table: {#tbl:output_file_formats tag=": Output File Formats"}
Table: Output File Formats {#tbl:output_file_formats}
The filename can contain directories and sub-directories also, which will be
created if they don't already exist:
@@ -889,13 +889,13 @@ Value
component
-----------------------------------------------------------------------------
Table: {#tbl:barcode_types tag=": Barcode Types (Symbologies)"}
Table: Barcode Types (Symbologies) {#tbl:barcode_types}
[^4]: The symbology names marked with an asterisk (`*`) in Table
{@tbl:barcode_types} above used different names in previous versions of Zint.
These names are now deprecated but are still recognised by Zint. Those marked
with a dagger (`†`) are replacements for `BARCODE_EANX` (13), `BARCODE_EANX_CHK`
(14) and `BARCODE_EANX_CC` (130), which are still recognised by Zint.
[^4]: The symbology names marked with an asterisk (`*`) in [#tbl:barcode_types]
above used different names in previous versions of Zint. These names are now
deprecated but are still recognised by Zint. Those marked with a dagger (`†`)
are replacements for `BARCODE_EANX` (13), `BARCODE_EANX_CHK` (14) and
`BARCODE_EANX_CC` (130), which are still recognised by Zint.
## 4.4 Adjusting Height
@@ -1129,7 +1129,7 @@ Yes Vector (non-EMF) 2 0.1 N/A
Yes EMF 40 0.1 N/A
-----------------------------------------------------------------
Table: {#tbl:scaling_multipliers tag=": Scaling Multipliers and Minima"}
Table: Scaling Multipliers and Minima {#tbl:scaling_multipliers}
### 4.9.1 Scaling by X-dimension and Resolution
@@ -1268,7 +1268,7 @@ Ultracode Latin-1 None
UPNQR Latin-2 N/A
All others ASCII N/A
Table: {#tbl:default_character_sets tag=": Default Character Sets"}
Table: Default Character Sets {#tbl:default_character_sets}
[^7]: Shift JIS (JIS X 0201 Roman) re-maps two ASCII characters: backslash (`\`)
to the yen sign (¥), and tilde (`~`) to overline (U+203E).
@@ -1313,8 +1313,8 @@ behaviour.
### 4.11.2 Input Modes and ECI
If your data contains characters that are not in the default character set, you
may encode it using an ECI-aware symbology and an ECI value from Table
{@tbl:eci_codes} below. The ECI information is added to your code symbol as
may encode it using an ECI-aware symbology and an ECI value from
[#tbl:eci_codes] below. The ECI information is added to your code symbol as
prefix data. The symbologies that support ECI are
------------ ------------ ------------
@@ -1324,7 +1324,7 @@ Data Matrix MaxiCode rMQR
DotCode MicroPDF417 Ultracode
------------ ------------ ------------
Table: {#tbl:eci_aware_symbologies tag=": ECI-Aware Symbologies"}
Table: ECI-Aware Symbologies {#tbl:eci_aware_symbologies}
Be aware that not all barcode readers support ECI mode, so this can sometimes
lead to unreadable barcodes. If you are using characters beyond those supported
@@ -1371,14 +1371,14 @@ ECI Code Character Encoding Scheme (ISO/IEC 8859 schemes include ASCII)
170 ISO/IEC 646 Invariant[^8]
899 8-bit binary data
Table: {#tbl:eci_codes tag=": ECI Codes"}
Table: ECI Codes {#tbl:eci_codes}
[^8]: ISO/IEC 646 Invariant is a subset of ASCII with 12 characters undefined:
`#`, `$`, `@`, `[`, `\`, `]`, `^`, `` ` ``, `{`, `|`, `}`, `~` (tilde).
An ECI value of 0 does not encode any ECI information in the code symbol (unless
the data contains non-default character set characters). In this case, the
default character set applies (see Table @tbl:default_character_sets above).
default character set applies (see [#tbl:default_character_sets] above).
If no ECI is specified or a value of 0 is given, and the data does contain
characters other than in the default character set, then Zint will automatically
@@ -1496,7 +1496,7 @@ Input Character Interpretation
`@` Insert a number or `*` (or `+` on Windows)
Any other Insert literally
Table: {#tbl:batch_filename_formatting tag=": Batch Filename Formatting"}
Table: Batch Filename Formatting {#tbl:batch_filename_formatting}
For instance
@@ -1514,7 +1514,7 @@ Input Filenames Generated
`-o my~~~bar.eps` `"my001bar.eps"`, `"my002bar.eps"`, `"my003bar.eps"`
`-o t#es~t~.png` `"t es0t1.png"`, `"t es0t2.png"`, `"t es0t3.png"`
Table: {#tbl:batch_filename_examples tag=": Batch Filename Examples"}
Table: Batch Filename Examples {#tbl:batch_filename_examples}
The special characters can span directories also, which is useful when creating
a large number of barcodes:
@@ -1524,7 +1524,7 @@ Input Filenames Generated
`-o dir~/file~~~.svg` `"dir0/file001.svg"`, `"dir0/file002.svg"`, ...
`"dir0/file999.svg"`, `"dir1/file000.svg"`, ...
Table: {#tbl:batch_dir_examples tag=": Batch Directory Examples"}
Table: Batch Directory Examples {#tbl:batch_dir_examples}
For an alternative method of naming output files see the `--mirror` option in
[4.14 Automatic Filenames] below.
@@ -1542,7 +1542,7 @@ zint -b 84 --direct --filetype=pcx -d "Data to encode"
```
This command will output the symbol as a PCX file to stdout. For the supported
output file formats see Table {@tbl:output_file_formats}.
output file formats see [#tbl:output_file_formats].
* * *
CAUTION: Outputting binary files to the command shell without catching that data
@@ -1585,10 +1585,10 @@ The default and minimum scale for raster output in dotty mode is 1.
If you need to specify different ECIs for different sections of the input data,
the `--seg1` to `--seg9` options can be used. Each option is of the form
`--segN=ECI,data` where `ECI` is the ECI code (see Table {@tbl:eci_codes}) and
`data` is the data to which this applies. This is in addition to the ECI and
data specified using the `--eci` and `-d` options which must still be present
and which in effect constitute segment 0. For instance
`--segN=ECI,data` where `ECI` is the ECI code (see [#tbl:eci_codes]) and `data`
is the data to which this applies. This is in addition to the ECI and data
specified using the `--eci` and `-d` options which must still be present and
which in effect constitute segment 0. For instance
```bash
zint -b AZTEC_CODE --eci=9 -d "Κείμενο" --seg1=7,"Текст" --seg2=20,"文章"
@@ -1597,8 +1597,7 @@ zint -b AZTEC_CODE --eci=9 -d "Κείμενο" --seg1=7,"Текст" --seg2=20,"
specifies 3 segments: segment 0 with ECI 9 (Greek), segment 1 with ECI 7
(Cyrillic), and segment 2 with ECI 20 (Shift JIS). Segments must be consecutive.
Naturally the symbology must be ECI-aware (see Table
{@tbl:eci_aware_symbologies}).
Naturally the symbology must be ECI-aware (see [#tbl:eci_aware_symbologies]).
![`zint -b AZTEC --eci=9 -d "Κείμενο" --seg1=7,"Текст"
--seg2=20,"文章"`](images/aztec_segs.svg){.i2d}
@@ -2132,7 +2131,7 @@ Member Name Type Meaning Default Value
`raw_seg_count` integer Number of raw segments. (output only)
-----------------------------------------------------------------------------
Table: API Structure `zint_symbol` {#tbl:api_structure_zint_symbol tag="$ $"}
Table: API Structure `zint_symbol` {#tbl:api_structure_zint_symbol}
[^10]: The `height` value is ignored for Aztec (including HIBC and Aztec Rune),
Code One, Data Matrix (including HIBC), DotCode, Grid Matrix, Han Xin, MaxiCode,
@@ -2243,7 +2242,7 @@ Return Value Meaning
and `ZINT_WARN_HRT_TRUNCATED` occurs.
------------------------------------------------------------------------------
Table: {#tbl:api_warnings_errors tag=": API Warning and Error Return Values"}
Table: API Warning and Error Return Values {#tbl:api_warnings_errors}
To catch errors use an integer variable as shown in the code below:
@@ -2284,8 +2283,8 @@ To treat all warnings as errors, set `symbol->warn_level` to `WARN_FAIL_ALL`.
## 5.9 Specifying a Symbology
Symbologies can be specified by number or by name as shown in the Table
{@tbl:barcode_types}. For example
Symbologies can be specified by number or by name as listed in
[#tbl:barcode_types]. For example
```c
symbol->symbology = BARCODE_LOGMARS;
@@ -2362,7 +2361,7 @@ Value Effect
`symbol->raw_segs` (see [5.16 Feedback]).
------------------------------------------------------------------------------
Table: API `output_options` Values {#tbl:api_output_options tag="$ $"}
Table: API `output_options` Values {#tbl:api_output_options}
[^12]: The `BARCODE_BIND_TOP` flag is set by default for DPD - see [6.1.10.7 DPD
Code].
@@ -2416,7 +2415,7 @@ Value Effect
------------------------------------------------------------------------------
Table: API `input_mode` Values {#tbl:api_input_mode tag="$ $"}
Table: API `input_mode` Values {#tbl:api_input_mode}
The default mode is `DATA_MODE` (CLI option `--binary`). (Note that this differs
from the default for the CLI and GUI, which is `UNICODE_MODE`.)
@@ -2444,8 +2443,8 @@ my_symbol->input_mode = DATA_MODE | GS1_MODE;
is not valid.
Permissible escape sequences (`ESCAPE_MODE`) are listed in Table
{@tbl:escape_sequences}, and the special Code 128-only `EXTRA_ESCAPE_MODE`
Permissible escape sequences (`ESCAPE_MODE`) are listed in
[#tbl:escape_sequences], and the special Code 128-only `EXTRA_ESCAPE_MODE`
escape sequences are given in [6.1.10.1 Standard Code 128 (ISO 15417)]. An
example of `GS1PARENS_MODE` usage is given in section [6.1.10.3 GS1-128].
@@ -2506,8 +2505,7 @@ struct zint_seg {
};
```
The symbology must support ECIs (see Table {@tbl:eci_aware_symbologies}). For
example:
The symbology must support ECIs (see [#tbl:eci_aware_symbologies]). For example:
```c
#include <zint.h>
@@ -2671,7 +2669,7 @@ Value Meaning
linear symbologies.
------------------------------------------------------------------------------
Table: {#tbl:api_cap tag=": API Capability Flags"}
Table: API Capability Flags {#tbl:api_cap}
[^15]: `ZINT_CAP_EANUPC` was previously named `ZINT_CAP_EXTENDABLE`, which is
still recognised.
@@ -2703,10 +2701,10 @@ defaults or were overridden by Zint.
In particular for symbologies that have masks,[^16] `option_3` will contain the
mask used as `(N + 1) << 8`, N being the mask. Also Aztec Code will return the
actual ECC percentage used in `option_1` as `P << 8`, where P is the integer
percentage, the low byte containing the values given in Table {@tbl:aztec_eccs}
(with the addition of `0` meaning less than 5% + 3 codewords and `-1` meaning
minimum 3 codewords). Micro PDF417 also will return the ECC percentage in
`option_1` as `P << 8`.
percentage, the low byte containing the values given in [#tbl:aztec_eccs] (with
the addition of `0` meaning less than 5% + 3 codewords and `-1` meaning minimum
3 codewords). Micro PDF417 also will return the ECC percentage in `option_1` as
`P << 8`.
Detailed feedback on the data encoded may be requested by specifying the
`BARCODE_RAW_TEXT` option in the `output_options` member, which will populate
@@ -2764,14 +2762,23 @@ https://sourceforge.net/projects/libzueci/).
## 5.18 Zint Version
Whether the Zint library linked to was built with PNG support may be determined
with:
Whether the Zint library linked to was built without PNG support may be
determined with:
```c
int ZBarcode_NoPng();
```
which returns 1 if no PNG support is available, else zero.
which returns 1 if PNG support is **not** available, else zero.
Similarly, but with opposite sense, whether the Zint library linked to was built
with GS1 Syntax Engine support may be determined with:
```c
int ZBarcode_HaveGS1SyntaxEngine();
```
which returns 1 if GS1 Syntax Engine support **is** available, else zero.
Lastly, the version of the Zint library linked to is returned by:
@@ -3144,7 +3151,7 @@ Value Check Digits
5 Modulo-11 (NCR)
6 Modulo-11 (NCR) & Modulo-10
Table: {#tbl:msi_plessey_check_digits tag=": MSI Plessey Check Digit Options"}
Table: MSI Plessey Check Digit Options {#tbl:msi_plessey_check_digits}
To not show the check digit or digits in the Human Readable Text, add 10 to the
`--vers` value. For example `--vers=12` (API `option_2 = 12`) will add two
@@ -3189,7 +3196,7 @@ a check digit but not show it in the Human Readable Text, set `--vers=2` (API
#### 6.1.7.2 Extended Code 39
![`zint -b EXCODE39 --compliantheight -d
"123.45$@fd"`](images/excode39.svg){.lin}
"123.45#@fd"`](images/excode39.svg){.lin}
Also known as Code 39e and Code39+, this symbology expands on Standard Code 39
to provide support for the full 7-bit ASCII character set. The check digit
@@ -3425,7 +3432,7 @@ PPPPPPP TTTTTTTTTTTTTT SSS CCC
(7 alphanumerics) (14 alphanumerics) (3 digits) (3-digit ISO 3166-1)
-----------------------------------------------------------------------
Table: {#tbl:dpd_input_fields tag=": DPD Input Fields"}
Table: DPD Input Fields {#tbl:dpd_input_fields}
A warning will be generated if the Service Code, the Destination Country Code,
or the last 10 characters of the Tracking Number are non-numeric.
@@ -3549,7 +3556,7 @@ the table below:
| 7 | 000000 | 576688
| 8 | 0000000 | 7742862
Table: {#tbl:channel_maxima tag=": Channel Value Ranges"}
Table: Channel Value Ranges {#tbl:channel_maxima}
### 6.1.14 BC412 (SEMI T1-95)
@@ -3803,7 +3810,7 @@ Value
component
---------------------------------------------------------------------------
Table: {#tbl:composite_symbologies tag=": GS1 Composite Symbology Values"}
Table: GS1 Composite Symbology Values {#tbl:composite_symbologies}
The data to be encoded in the linear component of a composite symbol should be
entered into a primary string with the data for the 2D component being entered
@@ -3984,7 +3991,7 @@ Length Length Table
23 `99999999999999999999999` 67-bar 62 N
-------------------------------------------------------------
Table: {#tbl:auspost_input_formats tag=": Australia Post Input Formats"}
Table: Australia Post Input Formats {#tbl:auspost_input_formats}
#### 6.5.1.2 Reply Paid Barcode
@@ -4045,8 +4052,7 @@ Format Version Class Supply Chain ID Item ID Destination+DPS
(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"}
Table: Royal Mail 4-State Mailmark Input Fields {#tbl:mailmark_4s_input_fields}
The 6 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
patterns are:
@@ -4055,8 +4061,8 @@ patterns are:
`ANNLLNLSS` `AANNLLNLS` `ANNNLLNLS` `AANNNLLNL` `ANANLLNLS` `AANANLLNL`
----------- ----------- ----------- ----------- ----------- -----------
Table: {#tbl:mailmark_4s_destination_dps
tag=": Royal Mail 4-State Mailmark Destination+DPS Patterns"}
Table: Royal Mail 4-State Mailmark Destination+DPS Patterns
{#tbl:mailmark_4s_destination_dps}
where `'A'` stands for full alphabetic (A-Z), `'L'` for limited alphabetic (A-Z
less `'CIKMOV'`), `'N'` for numeric (0-9), and `'S'` for space.
@@ -4151,7 +4157,7 @@ Input Symbol Size Input Symbol Size Input Symbol Size
9 26 x 26 19 88 x 88 29 16 x 36
10 32 x 32 20 96 x 96 30 16 x 48
Table: {#tbl:datamatrix_sizes tag=": Data Matrix Sizes"}
Table: Data Matrix Sizes {#tbl:datamatrix_sizes}
The largest version 24 (144 x 144) can encode 3116 digits, around 2335
alphanumeric characters, or 1555 bytes of data.
@@ -4175,7 +4181,7 @@ Input Symbol Size Input Symbol Size
38 12 x 88 47 26 x 48
39 16 x 64 48 26 x 64
Table: {#tbl:dmre_sizes tag=": DMRE Sizes"}
Table: DMRE Sizes {#tbl:dmre_sizes}
DMRE symbol sizes may be activated in automatic size mode using the option
`--dmre` (API `option_3 = DM_DMRE`).
@@ -4224,8 +4230,7 @@ RTS Post Code 7 Alphanumeric (1 of 7 patterns)
Reserved 6 Spaces
Customer Data 6, 45 or 29 Anything (Latin-1)
Table: {#tbl:mailmark_2d_input_fields
tag=": Royal Mail 2D Mailmark Input Fields"}
Table: Royal Mail 2D Mailmark Input Fields {#tbl:mailmark_2d_input_fields}
The 12 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
patterns are similar to those for the 4-state except that the alphabetic
@@ -4237,8 +4242,8 @@ is required (the rest can be blank), and the whole field can be blank:
`ANSSSSSSS` `AANSSSSSS` `ANNSSSSSS` `AANNSSSSS` `ANASSSSSS` `AANASSSSS`
----------- ----------- ----------- ----------- ----------- -----------
Table: {#tbl:mailmark_2d_destination_dps
tag=": Royal Mail 2D Mailmark Destination+DPS Patterns"}
Table: Royal Mail 2D Mailmark Destination+DPS Patterns
{#tbl:mailmark_2d_destination_dps}
where `'A'` is alphabetic (A-Z), `'N'` numeric (0-9), and `'S'` space.
@@ -4250,8 +4255,7 @@ without the DPS (`'NA'`), and the trailing "inward" part cannot be blank
`ANNAASS` `AANNAAS` `ANNNAAS` `AANNNAA` `ANANAAS` `AANANAA`
--------- --------- --------- --------- --------- ---------
Table: {#tbl:mailmark_2d_rts
tag=": Royal Mail 2D Mailmark RTS Patterns"}
Table: Royal Mail 2D Mailmark RTS Patterns {#tbl:mailmark_2d_rts}
Three sizes are defined, one rectangular, with varying maximum amounts of
optional customer data:
@@ -4262,7 +4266,7 @@ Type 7 24 x 24 6 characters 8
Type 9 32 x 32 45 characters 10
Type 29 16 x 48 29 characters 30
Table: {#tbl:mailmark_2d_sizes tag=": Royal Mail 2D Mailmark Sizes"}
Table: Royal Mail 2D Mailmark Sizes {#tbl:mailmark_2d_sizes}
Zint will automatically select a size based on the amount of customer data, or
it can be specified using the `--vers` option (API `option_2`), which takes the
@@ -4289,7 +4293,7 @@ Input ECC Level Error Correction Capacity Recovery Capacity
3 Q Approx 55% of symbol Approx 25%
4 H Approx 65% of symbol Approx 30%
Table: {#tbl:qrcode_eccs tag=": QR Code ECC Levels"}
Table: QR Code ECC Levels {#tbl:qrcode_eccs}
The size of the symbol can be specified by setting the `--vers` option (API
`option_2`) to the QR Code version required (1-40). The size of symbol generated
@@ -4312,7 +4316,7 @@ Input Symbol Size Input Symbol Size Input Symbol Size
13 69 x 69 27 125 x 125
14 73 x 73 28 129 x 129
Table: {#tbl:qrcode_sizes tag=": QR Code Sizes"}
Table: QR Code Sizes {#tbl:qrcode_sizes}
The maximum capacity of a QR Code symbol (version 40) is 7089 numeric digits,
4296 alphanumeric characters or 2953 bytes of data. QR Code symbols can also be
@@ -4372,7 +4376,7 @@ Input Version Symbol Size Allowed Characters
4 M4 17 x 17 Latin-1 and Shift JIS
------------------------------------------------------------------
Table: {#tbl:micrqr_sizes tag=": Micro QR Code Sizes"}
Table: Micro QR Code Sizes {#tbl:micrqr_sizes}
Version M4 can encode up to 35 digits, 21 alphanumerics, 15 bytes or 9 Kanji
characters.
@@ -4393,7 +4397,7 @@ Input ECC Error Correction Recovery Available for
3 Q Approx 55% of symbol Approx 25% M4
----------------------------------------------------------------------
Table: {#tbl:micrqr_eccs tag=": Micro QR ECC Levels"}
Table: Micro QR ECC Levels {#tbl:micrqr_eccs}
The defaults for symbol size and ECC level depend on the input and whether
either of them is specified.
@@ -4426,7 +4430,7 @@ Input ECC Level Error Correction Capacity Recovery Capacity
2 M Approx 37% of symbol Approx 15%
4 H Approx 65% of symbol Approx 30%
Table: {#tbl:rmqr_eccs tag=": rMQR ECC Levels"}
Table: rMQR ECC Levels {#tbl:rmqr_eccs}
The preferred symbol sizes can be selected using the `--vers` option (API
`option_2`) as shown in the table below. Input values between 33 and 38 fix the
@@ -4474,7 +4478,7 @@ Input Version Symbol Size (HxW) Input Version Symbol Size (HxW)
19 R13x59 13 x 59 38 R17xW 17 x automatic width
--------------------------------------------------------------------------
Table: {#tbl:rmqr_sizes tag=": rMQR Sizes"}
Table: rMQR Sizes {#tbl:rmqr_sizes}
The largest version R17x139 (32) can encode up to 361 digits, 219 alphanumerics,
150 bytes, or 92 Kanji characters.
@@ -4532,7 +4536,7 @@ Characters Meaning
13 - 15 Three-digit service code. This depends on your parcel courier.
----------------------------------------------------------------------------
Table: {#tbl:maxicode_scm tag=": MaxiCode Structured Carrier Message Format"}
Table: MaxiCode Structured Carrier Message Format {#tbl:maxicode_scm}
The primary message can be set at the command prompt using the `--primary`
switch (API `primary`). The secondary message uses the normal data entry method.
@@ -4561,7 +4565,7 @@ zint -b 57 --primary="152382802840001" --scmvv=96 --esc -d \
will prefix `"[)>\R01\G96"` to the secondary message. (`\R`, `\G` and `\E` are
the escape sequences for Record Separator, Group Separator and End of
Transmission respectively - see Table {@tbl:escape_sequences}.)
Transmission respectively - see [#tbl:escape_sequences].)
Modes 4 to 6 can be accessed using the `--mode` switch (API `option_1`). Modes 4
to 6 do not have a primary message. For example:
@@ -4594,7 +4598,7 @@ Mode Maximum Data Length Maximum Data Length Number of Error
6 93 138 50
-----------------------------------------------------------------------
Table: {#tbl:maxicode_data_length_maxima tag=": MaxiCode Data Length Maxima"}
Table: MaxiCode Data Length Maxima {#tbl:maxicode_data_length_maxima}
`*` - secondary only
@@ -4638,7 +4642,7 @@ Input Symbol Size Input Symbol Size Input Symbol Size
11 45 x 45 23 95 x 95 35 147 x 147
12 49 x 49 24 101 x 101 36 151 x 151
Table: {#tbl:aztec_sizes tag=": Aztec Code Sizes"}
Table: Aztec Code Sizes {#tbl:aztec_sizes}
Note that in symbols which have a specified size the amount of error correction
is dependent on the length of the data input and Zint will allow error
@@ -4654,7 +4658,7 @@ Mode Error Correction Capacity
3 >36% + 3 codewords
4 >50% + 3 codewords
Table: {#tbl:aztec_eccs tag=": Aztec Code Error Correction Modes"}
Table: Aztec Code Error Correction Modes {#tbl:aztec_eccs}
It is not possible to select both symbol size and error correction capacity for
the same symbol. If both options are selected then the error correction capacity
@@ -4714,7 +4718,7 @@ Input Version Size Numeric Alphanumeric
10 T 16 x automatic width 90 55
----------------------------------------------------------------------
Table: {#tbl:codeone_sizes tag=": Code One Sizes"}
Table: Code One Sizes {#tbl:codeone_sizes}
Version S symbols can only encode numeric data. The width of version S and
version T symbols is determined by the length of the input data.
@@ -4752,7 +4756,7 @@ Input Symbol Size Input Symbol Size
6 78 x 78 13 162 x 162
7 90 x 90
Table: {#tbl:gridmatrix_sizes tag=": Grid Matrix Sizes"}
Table: Grid Matrix Sizes {#tbl:gridmatrix_sizes}
Mode Error Correction Capacity
---- -------------------------
@@ -4762,7 +4766,7 @@ Mode Error Correction Capacity
4 Approximately 40%
5 Approximately 50%
Table: {#tbl:gridmatrix_eccs tag=": Grid Matrix Error Correction Modes"}
Table: Grid Matrix Error Correction Modes {#tbl:gridmatrix_eccs}
Non-ASCII data density may be maximized by using the `--fullmultibyte` switch
(API `option_3 = ZINT_FULL_MULTIBYTE`), but check that your barcode reader
@@ -4841,7 +4845,7 @@ Input Symbol Size Input Symbol Size Input Symbol Size
27 75 x 75 55 131 x 131 83 187 x 187
28 77 x 77 56 133 x 133 84 189 x 189
Table: {#tbl:hanxin_sizes tag=": Han Xin Sizes"}
Table: Han Xin Sizes {#tbl:hanxin_sizes}
The largest version (84) can encode 7827 digits, 4350 ASCII characters, up to
2175 Chinese characters, or 3261 bytes, making it the most capacious of all the
@@ -4858,7 +4862,7 @@ Mode Recovery Capacity
3 Approx 23%
4 Approx 30%
Table: {#tbl:hanxin_eccs tag=": Han Xin Error Correction Modes"}
Table: Han Xin Error Correction Modes {#tbl:hanxin_eccs}
Non-ASCII data density may be maximized by using the `--fullmultibyte` switch
(API `option_3 = ZINT_FULL_MULTIBYTE`), but check that your barcode reader
@@ -4891,7 +4895,7 @@ Value EC Level Amount of symbol holding error correction data
5 EC4 Approx 25%
6 EC5 Approx 33%
Table: {#tbl:ultra_eccs tag=": Ultracode Error Correction Values"}
Table: Ultracode Error Correction Values {#tbl:ultra_eccs}
Zint does not currently implement data compression by default, but this can be
initiated through the API by setting
@@ -4938,7 +4942,7 @@ C Used for business reply mail with a pre-printed zip code.
D Used for Information Based Indicia (IBI) postage.
E Used for customized mail with a USPS Intelligent Mail barcode.
Table: {#tbl:fim_characters tag=": Valid FIM Characters"}
Table: Valid FIM Characters {#tbl:fim_characters}
### 6.7.2 Flattermarken
@@ -5128,13 +5132,13 @@ D `CR` `GS` `-` `=` `M` `]` `m` `}`
E `SO` `RS` `.` `>` `N` `^` `n` `~`
F `SI` `US` `/` `?` `O` `_` `o` `DEL`
Table: {#tbl:ascii tag=": ASCII"}
Table: ASCII {#tbl:ascii}
## A.2 Latin Alphabet No. 1 (ISO/IEC 8859-1)
ISO/IEC 8859-1 defines additional characters common in western European
languages like French, German, Italian and Spanish. This extension is the
default encoding of many barcodes (see Table @tbl:default_character_sets) when a
default encoding of many barcodes (see [#tbl:default_character_sets]) when a
codepoint above hex 9F is encoded. Note that codepoints hex 80 to 9F are not
defined.
@@ -5157,7 +5161,7 @@ D `SHY` `½` `Í` `Ý` `í` `ý`
E `®` `¾` `Î` `Þ` `î` `þ`
F `¯` `¿` `Ï` `ß` `ï` `ÿ`
Table: {#tbl:iso_iec_8869_1 tag=": ISO/IEC 8859-1"}
Table: ISO/IEC 8859-1 {#tbl:iso_iec_8869_1}
# Annex B. Qt Backend QZint

View File

@@ -1,6 +1,6 @@
Zint Barcode Generator and Zint Barcode Studio User Manual
Version 2.15.0.9
September 2025
October 2025
*******************************************************************************
* For reference the following is a text-only version of the Zint manual, *
@@ -599,7 +599,7 @@ meanings as given below:
* Insert leading asterisks
Any other character Interpreted literally
Table : Sequence Format Characters
Table 1: Sequence Format Characters
Once youre happy with the Sequence Data, click the "Export..." button to bring
up the Export Dialog, discussed next.
@@ -727,7 +727,7 @@ sequences are shown in the table below.
hexadecimal (000000-10FFFF)
------------------------------------------------------------------------------
Table : Escape Sequences
Table 2: Escape Sequences
(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
@@ -758,7 +758,7 @@ the other supported file types:
zint -o there.eps -d "This Text"
The currently supported output file formats are shown in the following table.
The currently supported output file formats are:
Extension File format
----------- ------------------------------------
@@ -772,7 +772,7 @@ The currently supported output file formats are shown in the following table.
tif Tagged Image File Format
txt Text file (see 4.19 Other Options)
Table : Output File Formats
Table 3: Output File Formats
The filename can contain directories and sub-directories also, which will be
created if they dont already exist:
@@ -1022,7 +1022,7 @@ underscores are optional.
component
-----------------------------------------------------------------------------
Table : Barcode Types (Symbologies)
Table 4: Barcode Types (Symbologies)
4.4 Adjusting Height
@@ -1225,7 +1225,7 @@ To summarize the more intricate details:
Yes EMF 40 0.1 N/A
-------------------------------------------------------------------
Table : Scaling Multipliers and Minima
Table 5: Scaling Multipliers and Minima
4.9.1 Scaling by X-dimension and Resolution
@@ -1344,7 +1344,7 @@ Latin-2 (ISO/IEC 8859-2 plus ASCII).
UPNQR Latin-2 N/A
All others ASCII N/A
Table : Default Character Sets
Table 6: Default Character Sets
If Zint encounters characters which can not be encoded using the default
character encoding then it will take advantage of the ECI (Extended Channel
@@ -1386,9 +1386,9 @@ behaviour.
4.11.2 Input Modes and ECI
If your data contains characters that are not in the default character set, you
may encode it using an ECI-aware symbology and an ECI value from Table
: ECI Codes below. The ECI information is added to your code symbol as prefix
data. The symbologies that support ECI are
may encode it using an ECI-aware symbology and an ECI value from Table 8: ECI
Codes below. The ECI information is added to your code symbol as prefix data.
The symbologies that support ECI are
------------- -------------- -----------
Aztec Code Grid Matrix PDF417
@@ -1397,7 +1397,7 @@ data. The symbologies that support ECI are
DotCode MicroPDF417 Ultracode
------------- -------------- -----------
Table : ECI-Aware Symbologies
Table 7: ECI-Aware Symbologies
Be aware that not all barcode readers support ECI mode, so this can sometimes
lead to unreadable barcodes. If you are using characters beyond those supported
@@ -1444,11 +1444,11 @@ formatted. Zint automatically translates the data into the target encoding.
170 ISO/IEC 646 Invariant[8]
899 8-bit binary data
Table : ECI Codes
Table 8: ECI Codes
An ECI value of 0 does not encode any ECI information in the code symbol (unless
the data contains non-default character set characters). In this case, the
default character set applies (see Table : Default Character Sets above).
default character set applies (see Table 6: Default Character Sets above).
If no ECI is specified or a value of 0 is given, and the data does contain
characters other than in the default character set, then Zint will automatically
@@ -1547,7 +1547,7 @@ characters in the output filename as shown in the table below:
@ Insert a number or * (or + on Windows)
Any other Insert literally
Table : Batch Filename Formatting
Table 9: Batch Filename Formatting
For instance
@@ -1563,7 +1563,7 @@ The following table shows some examples to clarify this method:
-o my~~~bar.eps "my001bar.eps", "my002bar.eps", "my003bar.eps"
-o t#es~t~.png "t es0t1.png", "t es0t2.png", "t es0t3.png"
Table : Batch Filename Examples
Table 10: Batch Filename Examples
The special characters can span directories also, which is useful when creating
a large number of barcodes:
@@ -1573,7 +1573,7 @@ a large number of barcodes:
-o dir~/file~~~.svg "dir0/file001.svg", "dir0/file002.svg", …
"dir0/file999.svg", "dir1/file000.svg", …
Table : Batch Directory Examples
Table 11: Batch Directory Examples
For an alternative method of naming output files see the --mirror option in 4.14
Automatic Filenames below.
@@ -1589,7 +1589,7 @@ suffix of the file type required. For example:
zint -b 84 --direct --filetype=pcx -d "Data to encode"
This command will output the symbol as a PCX file to stdout. For the supported
output file formats see Table : Output File Formats.
output file formats see Table 3: Output File Formats.
--------------------------------------------------------------------------------
@@ -1632,7 +1632,7 @@ The default and minimum scale for raster output in dotty mode is 1.
If you need to specify different ECIs for different sections of the input data,
the --seg1 to --seg9 options can be used. Each option is of the form
--segN=ECI,data where ECI is the ECI code (see Table : ECI Codes) and data is
--segN=ECI,data where ECI is the ECI code (see Table 8: ECI Codes) and data is
the data to which this applies. This is in addition to the ECI and data
specified using the --eci and -d options which must still be present and which
in effect constitute segment 0. For instance
@@ -1642,7 +1642,7 @@ in effect constitute segment 0. For instance
specifies 3 segments: segment 0 with ECI 9 (Greek), segment 1 with ECI 7
(Cyrillic), and segment 2 with ECI 20 (Shift JIS). Segments must be consecutive.
Naturally the symbology must be ECI-aware (see Table : ECI-Aware Symbologies).
Naturally the symbology must be ECI-aware (see Table 7: ECI-Aware Symbologies).
[zint -b AZTEC --eci=9 -d "Κείμενο" --seg1=7,"Текст" --seg2=20,"文章"]
@@ -2138,7 +2138,7 @@ the following members:
raw_seg_count integer Number of raw segments. (output only)
------------------------------------------------------------------------------
: Table  : API Structure zint_symbol
Table 12: API Structure zint_symbol
To alter these values use the syntax shown in the example below. This code has
the same result as the previous example except the output is now taller and
@@ -2237,7 +2237,7 @@ the nature of the error. The errors generated by Zint are:
ZINT_WARN_HRT_TRUNCATED occurs.
------------------------------------------------------------------------------
Table : API Warning and Error Return Values
Table 13: API Warning and Error Return Values
To catch errors use an integer variable as shown in the code below:
@@ -2274,8 +2274,8 @@ To treat all warnings as errors, set symbol->warn_level to WARN_FAIL_ALL.
5.9 Specifying a Symbology
Symbologies can be specified by number or by name as shown in the Table
: Barcode Types (Symbologies). For example
Symbologies can be specified by number or by name as listed in Table 4: Barcode
Types (Symbologies). For example
symbol->symbology = BARCODE_LOGMARS;
@@ -2346,7 +2346,7 @@ together when adjusting this value:
symbol->raw_segs (see 5.16 Feedback).
------------------------------------------------------------------------------
: Table  : API output_options Values
Table 14: API output_options Values
5.11 Setting the Input Mode
@@ -2390,7 +2390,7 @@ member. Valid values are shown in the table below.
validate GS1 input.
------------------------------------------------------------------------------
: Table  : API input_mode Values
Table 15: API input_mode Values
The default mode is DATA_MODE (CLI option --binary). (Note that this differs
from the default for the CLI and GUI, which is UNICODE_MODE.)
@@ -2412,10 +2412,10 @@ whereas
is not valid.
Permissible escape sequences (ESCAPE_MODE) are listed in Table
: Escape Sequences, and the special Code 128-only EXTRA_ESCAPE_MODE escape
sequences are given in 6.1.10.1 Standard Code 128 (ISO 15417). An example of
GS1PARENS_MODE usage is given in section 6.1.10.3 GS1-128.
Permissible escape sequences (ESCAPE_MODE) are listed in Table 2: Escape
Sequences, and the special Code 128-only EXTRA_ESCAPE_MODE escape sequences are
given in 6.1.10.1 Standard Code 128 (ISO 15417). An example of GS1PARENS_MODE
usage is given in section 6.1.10.3 GS1-128.
GS1NOCHECK_MODE (CLI --gs1nocheck) is for use with legacy systems that have data
that does not conform to the current GS1 standard. Printable ASCII input is
@@ -2469,7 +2469,7 @@ number of elements it contains. The zint_seg structure is of the form:
int eci; /* Extended Channel Interpretation */
};
The symbology must support ECIs (see Table : ECI-Aware Symbologies). For
The symbology must support ECIs (see Table 7: ECI-Aware Symbologies). For
example:
#include <zint.h>
@@ -2618,7 +2618,7 @@ see which are set.
linear symbologies.
------------------------------------------------------------------------------
Table : API Capability Flags
Table 16: API Capability Flags
For example:
@@ -2645,10 +2645,10 @@ were overridden by Zint.
In particular for symbologies that have masks,[16] option_3 will contain the
mask used as (N + 1) << 8, N being the mask. Also Aztec Code will return the
actual ECC percentage used in option_1 as P << 8, where P is the integer
percentage, the low byte containing the values given in Table
: Aztec Code Error Correction Modes (with the addition of 0 meaning less than
5% + 3 codewords and -1 meaning minimum 3 codewords). Micro PDF417 also will
return the ECC percentage in option_1 as P << 8.
percentage, the low byte containing the values given in Table 39: Aztec Code
Error Correction Modes (with the addition of 0 meaning less than 5% + 3
codewords and -1 meaning minimum 3 codewords). Micro PDF417 also will return the
ECC percentage in option_1 as P << 8.
Detailed feedback on the data encoded may be requested by specifying the
BARCODE_RAW_TEXT option in the output_options member, which will populate the
@@ -2693,12 +2693,19 @@ NUL-terminated. The destination buffer is not NUL-terminated. The obsolete ECIs
5.18 Zint Version
Whether the Zint library linked to was built with PNG support may be determined
with:
Whether the Zint library linked to was built without PNG support may be
determined with:
int ZBarcode_NoPng();
which returns 1 if no PNG support is available, else zero.
which returns 1 if PNG support is not available, else zero.
Similarly, but with opposite sense, whether the Zint library linked to was built
with GS1 Syntax Engine support may be determined with:
int ZBarcode_HaveGS1SyntaxEngine();
which returns 1 if GS1 Syntax Engine support is available, else zero.
Lastly, the version of the Zint library linked to is returned by:
@@ -3029,7 +3036,7 @@ below:
5 Modulo-11 (NCR)
6 Modulo-11 (NCR) & Modulo-10
Table : MSI Plessey Check Digit Options
Table 17: MSI Plessey Check Digit Options
To not show the check digit or digits in the Human Readable Text, add 10 to the
--vers value. For example --vers=12 (API option_2 = 12) will add two hidden
@@ -3071,7 +3078,7 @@ but not show it in the Human Readable Text, set --vers=2 (API option_2 = 2).
6.1.7.2 Extended Code 39
[zint -b EXCODE39 --compliantheight -d "123.45$@fd"]
[zint -b EXCODE39 --compliantheight -d "123.45#@fd"]
Also known as Code 39e and Code39+, this symbology expands on Standard Code 39
to provide support for the full 7-bit ASCII character set. The check digit
@@ -3290,7 +3297,7 @@ and is of the form:
-----------------------------------------------------------------------
Table : DPD Input Fields
Table 18: DPD Input Fields
A warning will be generated if the Service Code, the Destination Country Code,
or the last 10 characters of the Tracking Number are non-numeric.
@@ -3408,7 +3415,7 @@ the table below:
7 000000 576688
8 0000000 7742862
Table : Channel Value Ranges
Table 19: Channel Value Ranges
6.1.14 BC412 (SEMI T1-95)
@@ -3645,7 +3652,7 @@ encoding methods. Valid values are shown below.
component
----------------------------------------------------------------------------
Table : GS1 Composite Symbology Values
Table 20: GS1 Composite Symbology Values
The data to be encoded in the linear component of a composite symbol should be
entered into a primary string with the data for the 2D component being entered
@@ -3808,7 +3815,7 @@ shown in the following table.
23 99999999999999999999999 67-bar 62 N
---------------------------------------------------------------
Table : Australia Post Input Formats
Table 21: Australia Post Input Formats
6.5.1.2 Reply Paid Barcode
@@ -3868,7 +3875,7 @@ the following table.
------------------------------------------------------------------------------
Table : Royal Mail 4-State Mailmark Input Fields
Table 22: Royal Mail 4-State Mailmark Input Fields
The 6 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
@@ -3878,7 +3885,7 @@ patterns are:
ANNLLNLSS AANNLLNLS ANNNLLNLS AANNNLLNL ANANLLNLS AANANLLNL
----------- ----------- ----------- ----------- ----------- -----------
Table : Royal Mail 4-State Mailmark Destination+DPS Patterns
Table 23: Royal Mail 4-State Mailmark Destination+DPS Patterns
where 'A' stands for full alphabetic (A-Z), 'L' for limited alphabetic (A-Z less
@@ -3966,7 +3973,7 @@ standards (ECC 000 to 140) have now been removed from Zint.
9 26 x 26 19 88 x 88 29 16 x 36
10 32 x 32 20 96 x 96 30 16 x 48
Table : Data Matrix Sizes
Table 24: Data Matrix Sizes
The largest version 24 (144 x 144) can encode 3116 digits, around 2335
alphanumeric characters, or 1555 bytes of data.
@@ -3990,7 +3997,7 @@ the following values as before:
38 12 x 88 47 26 x 48
39 16 x 64 48 26 x 64
Table : DMRE Sizes
Table 25: DMRE Sizes
DMRE symbol sizes may be activated in automatic size mode using the option
--dmre (API option_3 = DM_DMRE).
@@ -4037,7 +4044,8 @@ section, as summarized below.
Reserved 6 Spaces
Customer Data 6, 45 or 29 Anything (Latin-1)
Table : Royal Mail 2D Mailmark Input Fields
Table 26: Royal Mail 2D Mailmark Input Fields
The 12 Destination+DPS (Destination Post Code plus Delivery Point Suffix)
patterns are similar to those for the 4-state except that the alphabetic
@@ -4049,7 +4057,7 @@ required (the rest can be blank), and the whole field can be blank:
ANSSSSSSS AANSSSSSS ANNSSSSSS AANNSSSSS ANASSSSSS AANASSSSS
----------- ----------- ----------- ----------- ----------- -----------
Table : Royal Mail 2D Mailmark Destination+DPS Patterns
Table 27: Royal Mail 2D Mailmark Destination+DPS Patterns
where 'A' is alphabetic (A-Z), 'N' numeric (0-9), and 'S' space.
@@ -4062,7 +4070,7 @@ the whole field can be):
ANNAASS AANNAAS ANNNAAS AANNNAA ANANAAS AANANAA
--------- --------- --------- --------- --------- ---------
Table : Royal Mail 2D Mailmark RTS Patterns
Table 28: Royal Mail 2D Mailmark RTS Patterns
Three sizes are defined, one rectangular, with varying maximum amounts of
optional customer data:
@@ -4073,7 +4081,7 @@ optional customer data:
Type 9 32 x 32 45 characters 10
Type 29 16 x 48 29 characters 30
Table : Royal Mail 2D Mailmark Sizes
Table 29: Royal Mail 2D Mailmark Sizes
Zint will automatically select a size based on the amount of customer data, or
it can be specified using the --vers option (API option_2), which takes the Zint
@@ -4100,7 +4108,7 @@ option_1) as shown in the following table.
3 Q Approx 55% of symbol Approx 25%
4 H Approx 65% of symbol Approx 30%
Table : QR Code ECC Levels
Table 30: QR Code ECC Levels
The size of the symbol can be specified by setting the --vers option (API
option_2) to the QR Code version required (1-40). The size of symbol generated
@@ -4123,7 +4131,7 @@ is shown in the table below.
13 69 x 69 27 125 x 125
14 73 x 73 28 129 x 129
Table : QR Code Sizes
Table 31: QR Code Sizes
The maximum capacity of a QR Code symbol (version 40) is 7089 numeric digits,
4296 alphanumeric characters or 2953 bytes of data. QR Code symbols can also be
@@ -4181,7 +4189,7 @@ that versions M1 and M2 have restrictions on what characters can be encoded.
4 M4 17 x 17 Latin-1 and Shift JIS
------------------------------------------------------------------
Table : Micro QR Code Sizes
Table 32: Micro QR Code Sizes
Version M4 can encode up to 35 digits, 21 alphanumerics, 15 bytes or 9 Kanji
characters.
@@ -4201,7 +4209,7 @@ not available for any version, and ECC level Q is only available for version M4:
3 Q Approx 55% of symbol Approx 25% M4
----------------------------------------------------------------------
Table : Micro QR ECC Levels
Table 33: Micro QR ECC Levels
The defaults for symbol size and ECC level depend on the input and whether
either of them is specified.
@@ -4232,7 +4240,7 @@ valid for this type of symbol.
2 M Approx 37% of symbol Approx 15%
4 H Approx 65% of symbol Approx 30%
Table : rMQR ECC Levels
Table 34: rMQR ECC Levels
The preferred symbol sizes can be selected using the --vers option (API
option_2) as shown in the table below. Input values between 33 and 38 fix the
@@ -4280,7 +4288,7 @@ height of the symbol while allowing Zint to determine the minimum symbol width.
19 R13x59 13 x 59 38 R17xW 17 x automatic width
------------------------------------------------------------------------------
Table : rMQR Sizes
Table 35: rMQR Sizes
The largest version R17x139 (32) can encode up to 361 digits, 219 alphanumerics,
150 bytes, or 92 Kanji characters.
@@ -4334,7 +4342,7 @@ message required by Zint is given in the following table.
13 - 15 Three-digit service code. This depends on your parcel courier.
----------------------------------------------------------------------------
Table : MaxiCode Structured Carrier Message Format
Table 36: MaxiCode Structured Carrier Message Format
The primary message can be set at the command prompt using the --primary switch
(API primary). The secondary message uses the normal data entry method. For
@@ -4358,7 +4366,7 @@ option_2 = vv + 1). For example to use the common version "96" (ASC MH10/SC 8):
will prefix "[)>\R01\G96" to the secondary message. (\R, \G and \E are the
escape sequences for Record Separator, Group Separator and End of Transmission
respectively - see Table : Escape Sequences.)
respectively - see Table 2: Escape Sequences.)
Modes 4 to 6 can be accessed using the --mode switch (API option_1). Modes 4 to
6 do not have a primary message. For example:
@@ -4389,7 +4397,7 @@ Example maximum data lengths are given in the table below:
6 93 138 50
------------------------------------------------------------------------
Table : MaxiCode Data Length Maxima
Table 37: MaxiCode Data Length Maxima
* - secondary only
@@ -4433,7 +4441,7 @@ a smaller bullseye pattern at the centre of the symbol.
11 45 x 45 23 95 x 95 35 147 x 147
12 49 x 49 24 101 x 101 36 151 x 151
Table : Aztec Code Sizes
Table 38: Aztec Code Sizes
Note that in symbols which have a specified size the amount of error correction
is dependent on the length of the data input and Zint will allow error
@@ -4449,7 +4457,7 @@ the --secure option (API option_1) to a value from the following table.
3 >36% + 3 codewords
4 >50% + 3 codewords
Table : Aztec Code Error Correction Modes
Table 39: Aztec Code Error Correction Modes
It is not possible to select both symbol size and error correction capacity for
the same symbol. If both options are selected then the error correction capacity
@@ -4509,7 +4517,7 @@ and variable-width versions (versions S and T). These can be selected by using
10 T 16 x automatic width 90 55
------------------------------------------------------------------------
Table : Code One Sizes
Table 40: Code One Sizes
Version S symbols can only encode numeric data. The width of version S and
version T symbols is determined by the length of the input data.
@@ -4547,7 +4555,7 @@ using the --secure option (API option_1), according to the following tables.
6 78 x 78 13 162 x 162
7 90 x 90
Table : Grid Matrix Sizes
Table 41: Grid Matrix Sizes
Mode Error Correction Capacity
------ ---------------------------
@@ -4557,7 +4565,7 @@ using the --secure option (API option_1), according to the following tables.
4 Approximately 40%
5 Approximately 50%
Table : Grid Matrix Error Correction Modes
Table 42: Grid Matrix Error Correction Modes
Non-ASCII data density may be maximized by using the --fullmultibyte switch (API
option_3 = ZINT_FULL_MULTIBYTE), but check that your barcode reader supports
@@ -4635,7 +4643,7 @@ to a value between 1 and 84 according to the following table.
27 75 x 75 55 131 x 131 83 187 x 187
28 77 x 77 56 133 x 133 84 189 x 189
Table : Han Xin Sizes
Table 43: Han Xin Sizes
The largest version (84) can encode 7827 digits, 4350 ASCII characters, up to
2175 Chinese characters, or 3261 bytes, making it the most capacious of all the
@@ -4652,7 +4660,7 @@ following table.
3 Approx 23%
4 Approx 30%
Table : Han Xin Error Correction Modes
Table 44: Han Xin Error Correction Modes
Non-ASCII data density may be maximized by using the --fullmultibyte switch (API
option_3 = ZINT_FULL_MULTIBYTE), but check that your barcode reader supports
@@ -4682,7 +4690,7 @@ modes are supported. The amount of error correction can be set using the
5 EC4 Approx 25%
6 EC5 Approx 33%
Table : Ultracode Error Correction Values
Table 45: Ultracode Error Correction Values
Zint does not currently implement data compression by default, but this can be
initiated through the API by setting
@@ -4726,7 +4734,7 @@ generated using the characters A-E as shown in the table below.
D Used for Information Based Indicia (IBI) postage.
E Used for customized mail with a USPS Intelligent Mail barcode.
Table : Valid FIM Characters
Table 46: Valid FIM Characters
6.7.2 Flattermarken
@@ -4914,13 +4922,13 @@ reproduced here for reference.
E SO RS . > N ^ n ~
F SI US / ? O _ o DEL
Table : ASCII
Table 47: ASCII
A.2 Latin Alphabet No. 1 (ISO/IEC 8859-1)
ISO/IEC 8859-1 defines additional characters common in western European
languages like French, German, Italian and Spanish. This extension is the
default encoding of many barcodes (see Table : Default Character Sets) when a
default encoding of many barcodes (see Table 6: Default Character Sets) when a
codepoint above hex 9F is encoded. Note that codepoints hex 80 to 9F are not
defined.
@@ -4943,7 +4951,7 @@ defined.
E ® ¾ Î Þ î þ
F ¯ ¿ Ï ß ï ÿ
Table : ISO/IEC 8859-1
Table 48: ISO/IEC 8859-1
Annex B. Qt Backend QZint
@@ -5033,7 +5041,7 @@ configured barcode is updated when the "Generate" button is pressed.
Annex D. Man Page ZINT(1)
% ZINT(1) Version 2.15.0.9 % % September 2025
% ZINT(1) Version 2.15.0.9 % % October 2025
NAME
@@ -5763,12 +5771,11 @@ see “GS1 Barcode Syntax Engine” at https://github.com/gs1/gs1-syntax-engine.
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!
[4] The symbology names marked with an asterisk (*) in Table
: Barcode Types (Symbologies) above used different names in previous versions of
Zint. These names are now deprecated but are still recognised by Zint. Those
marked with a dagger (†) are replacements for BARCODE_EANX (13),
BARCODE_EANX_CHK (14) and BARCODE_EANX_CC (130), which are still recognised by
Zint.
[4] The symbology names marked with an asterisk (*) in Table 4: Barcode Types
(Symbologies) above used different names in previous versions of Zint. These
names are now deprecated but are still recognised by Zint. Those marked with a
dagger (†) are replacements for BARCODE_EANX (13), BARCODE_EANX_CHK (14) and
BARCODE_EANX_CC (130), which are still recognised by Zint.
[5] The background is omitted for vector outputs EMF, EPS and SVG when
--nobackground is given. For raster outputs GIF, PCX, PNG and TIF, the

View File

@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.8
.\" Automatically generated by Pandoc 3.8.2
.\"
.TH "ZINT" "1" "September 2025" "Version 2.15.0.9"
.TH "ZINT" "1" "October 2025" "Version 2.15.0.9"
.SH NAME
\f[CR]zint\f[R] \- encode data as a barcode image
.SH SYNOPSIS

View File

@@ -1,6 +1,6 @@
% ZINT(1) Version 2.15.0.9
%
% September 2025
% October 2025
# NAME

View File

@@ -65,7 +65,7 @@ zint -b MSI_PLESSEY -d "6502" --vers=2 --scale=$SCALE_LINEAR -o images/msi_pless
zint -b TELEPEN --compliantheight -d "Z80" --scale=$SCALE_LINEAR -o images/telepen.svg
zint -b TELEPEN_NUM --compliantheight -d "466X33" --scale=$SCALE_LINEAR -o images/telepen_num.svg
zint -b CODE39 --compliantheight -d "1A" --vers=1 --scale=$SCALE_LINEAR -o images/code39.svg
zint -b EXCODE39 --compliantheight -d "123.45$@fd" --scale=$SCALE_LINEAR -o images/excode39.svg
zint -b EXCODE39 --compliantheight -d "123.45#@fd" --scale=$SCALE_LINEAR -o images/excode39.svg
zint -b CODE93 --compliantheight -d "C93" --scale=$SCALE_LINEAR -o images/code93.svg
zint -b PZN --compliantheight -d "2758089" --scale=$SCALE_LINEAR -o images/pzn.svg
zint -b LOGMARS --compliantheight -d "12345/ABCDE" --vers=1 --scale=$SCALE_LINEAR -o images/logmars.svg