mirror of
https://git.code.sf.net/p/zint/code
synced 2025-06-05 01:04:07 -04:00
AZTEC/PDF417: stripf ecc feedback (was getting 32-bit difference)
test suite: test for `arc4random_uniform()` before including "test_bwipp" & "test_random" in build github/ci: try enabling Qt test for ubuntu
This commit is contained in:
parent
578d3e4df9
commit
18096a25a7
6 changed files with 129 additions and 114 deletions
96
.github/workflows/ci.yml
vendored
96
.github/workflows/ci.yml
vendored
|
@ -1,7 +1,8 @@
|
|||
name: CI
|
||||
|
||||
# .github/workflows/ci.yml 2025-05-24
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
# events but only for the master branch (or test branch github_ci push)
|
||||
on:
|
||||
push:
|
||||
branches: [ master, github_ci ]
|
||||
|
@ -19,7 +20,7 @@ jobs:
|
|||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install libpng-dev
|
||||
run: sudo apt-get install libpng-dev
|
||||
|
@ -28,30 +29,30 @@ jobs:
|
|||
shell: bash
|
||||
run: sudo locale-gen de_DE.UTF-8 && sudo update-locale
|
||||
|
||||
- name: Install Qt5
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 5.15.2
|
||||
dir: .
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_QT=OFF
|
||||
run: CMAKE_PREFIX_PATH=$QT_ROOT_DIR cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cmake --build . -j8 --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|
||||
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" QT_QPA_PLATFORM=offscreen ctest -V -C $BUILD_TYPE
|
||||
|
||||
build-ubuntu-debug:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -60,7 +61,7 @@ jobs:
|
|||
BUILD_TYPE: Debug
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install libpng-dev
|
||||
run: sudo apt-get install libpng-dev
|
||||
|
@ -69,45 +70,53 @@ jobs:
|
|||
shell: bash
|
||||
run: sudo locale-gen de_DE.UTF-8 && sudo update-locale
|
||||
|
||||
- name: Install Qt6
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: 6.9.0
|
||||
dir: .
|
||||
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_QT=OFF
|
||||
run: CMAKE_PREFIX_PATH=$QT_ROOT_DIR cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_QT6=ON
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake --build . -j8 --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|
||||
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" QT_QPA_PLATFORM=offscreen ctest -V -C $BUILD_TYPE
|
||||
|
||||
build-windows-32bit:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake $GITHUB_WORKSPACE -A Win32 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake --build . -j8 --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: PATH=$PATH:"$(pwd)/backend/Release:$(pwd)/frontend/Release" ctest -V -C $BUILD_TYPE
|
||||
|
||||
|
@ -115,23 +124,24 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake --build . -j8 --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: PATH=$PATH:"$(pwd)/backend/Release:$(pwd)/frontend/Release" ctest -V -C $BUILD_TYPE
|
||||
|
||||
|
@ -139,23 +149,24 @@ jobs:
|
|||
runs-on: macOS-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" cmake --build . -j8 --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|
||||
|
||||
|
@ -163,22 +174,23 @@ jobs:
|
|||
runs-on: macOS-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_SANITIZE=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" cmake --build . -j8 --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
|
||||
|
|
|
@ -1125,7 +1125,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, struct zint_seg segs[], const int
|
|||
error_number = ZEXT errtxt(ZINT_WARN_NONCOMPLIANT, symbol, 706, "Number of ECC codewords 3 at minimum");
|
||||
symbol->option_1 = -1; /* Feedback options: indicate minimum 3 with -1 */
|
||||
} else {
|
||||
ecc_ratio = (float) (ecc_blocks - 3) / (data_blocks + ecc_blocks);
|
||||
ecc_ratio = stripf((float) (ecc_blocks - 3) / (data_blocks + ecc_blocks));
|
||||
if (ecc_ratio < 0.05f) {
|
||||
error_number = ZEXT errtxtf(ZINT_WARN_NONCOMPLIANT, symbol, 708,
|
||||
"Number of ECC codewords %1$d less than 5%% + 3 of data codewords %2$d",
|
||||
|
@ -1136,7 +1136,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, struct zint_seg segs[], const int
|
|||
symbol->option_1 = ecc_ratio < 0.165f ? 1 : ecc_ratio < 0.295f ? 2 : ecc_ratio < 0.43f ? 3 : 4;
|
||||
}
|
||||
/* Feedback percentage in top byte */
|
||||
symbol->option_1 |= ((int) (ecc_ratio * 100.0f)) << 8;
|
||||
symbol->option_1 |= ((int) stripf(ecc_ratio * 100.0f)) << 8;
|
||||
}
|
||||
|
||||
if (debug_print) {
|
||||
|
|
|
@ -1681,7 +1681,7 @@ INTERNAL int micropdf417(struct zint_symbol *symbol, struct zint_seg segs[], con
|
|||
|
||||
/* Feedback options */
|
||||
/* Place in top byte, leaving bottom one for maybe future use - also compatible with AZTEC */
|
||||
symbol->option_1 = ((int) roundf(ecc_cwds * 100.0f / (longueur + ecc_cwds))) << 8;
|
||||
symbol->option_1 = ((int) stripf(roundf(stripf(ecc_cwds * 100.0f / (longueur + ecc_cwds))))) << 8;
|
||||
|
||||
if (debug_print) {
|
||||
fputs("\nChoose symbol size:\n", stdout);
|
||||
|
|
|
@ -19,6 +19,8 @@ if(NOT EXISTS ${BWIPP_PS})
|
|||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tools)
|
||||
endif()
|
||||
|
||||
check_function_exists(arc4random_uniform HAVE_ARC4RANDOM_UNIFORM)
|
||||
|
||||
set(testcommon_SRCS testcommon.c testcommon.h)
|
||||
|
||||
if(ZINT_SHARED)
|
||||
|
@ -45,7 +47,9 @@ zint_add_test(aztec test_aztec)
|
|||
zint_add_test(bc412 test_bc412)
|
||||
zint_add_test(big5 test_big5)
|
||||
zint_add_test(bmp test_bmp)
|
||||
if(HAVE_ARC4RANDOM_UNIFORM)
|
||||
zint_add_test(bwipp test_bwipp)
|
||||
endif()
|
||||
zint_add_test(channel test_channel)
|
||||
zint_add_test(codabar test_codabar)
|
||||
zint_add_test(codablock test_codablock)
|
||||
|
@ -90,7 +94,9 @@ zint_add_test(postal test_postal)
|
|||
zint_add_test(print test_print)
|
||||
zint_add_test(ps test_ps)
|
||||
zint_add_test(qr test_qr)
|
||||
if(HAVE_ARC4RANDOM_UNIFORM)
|
||||
zint_add_test(random test_random)
|
||||
endif()
|
||||
zint_add_test(raster test_raster)
|
||||
zint_add_test(reedsol test_reedsol)
|
||||
zint_add_test(rss test_rss)
|
||||
|
|
12
docs/README
12
docs/README
|
@ -1,11 +1,11 @@
|
|||
% docs/README 2025-03-28
|
||||
% docs/README 2025-05-24
|
||||
|
||||
For generation of "docs/manual.pdf" and "docs/manual.txt" from "manual.pmd" using a recent version of pandoc
|
||||
|
||||
On Ubuntu/Debian (tested on Ubuntu 22.04 and Ubuntu 24.04)
|
||||
|
||||
wget https://github.com/jgm/pandoc/releases/download/3.6.4/pandoc-3.6.4-1-amd64.deb
|
||||
sudo dpkg -i pandoc-3.6.4-1-amd64.deb
|
||||
wget https://github.com/jgm/pandoc/releases/download/3.7.0.1/pandoc-3.7.0.1-1-amd64.deb
|
||||
sudo dpkg -i pandoc-3.7.0.1-1-amd64.deb
|
||||
For Ubuntu 22.04 (python < 3.12)
|
||||
sudo apt install python3-pip
|
||||
pip install pandoc-tablenos --user
|
||||
|
@ -27,9 +27,9 @@ Then
|
|||
|
||||
On Fedora (tested on Fedora Linux 38 (Workstation Edition) and Fedora Linux 40 (Workstation Edition))
|
||||
|
||||
wget https://github.com/jgm/pandoc/releases/download/3.6.4/pandoc-3.6.4-linux-amd64.tar.gz
|
||||
tar xf pandoc-3.6.4-linux-amd64.tar.gz
|
||||
sudo mv -i pandoc-3.6.4/bin/pandoc /usr/local/bin
|
||||
wget https://github.com/jgm/pandoc/releases/download/3.7.0.1/pandoc-3.7.0.1-linux-amd64.tar.gz
|
||||
tar xf pandoc-3.7.0.1-linux-amd64.tar.gz
|
||||
sudo mv -i pandoc-3.7.0.1/bin/pandoc /usr/local/bin
|
||||
sudo dnf install python3-pip
|
||||
pip install pandoc-tablenos --user
|
||||
export PATH=~/.local/bin:"$PATH"
|
||||
|
|
123
docs/zint.1
123
docs/zint.1
|
@ -1,4 +1,4 @@
|
|||
.\" Automatically generated by Pandoc 3.6.4
|
||||
.\" Automatically generated by Pandoc 3.7.0.1
|
||||
.\"
|
||||
.TH "ZINT" "1" "April 2025" "Version 2.15.0.9"
|
||||
.SH NAME
|
||||
|
@ -51,8 +51,8 @@ Treat each line of an input file specified with \f[CR]\-i\f[R] |
|
|||
\f[CR]\-\-input\f[R] as a separate data set and produce a barcode image
|
||||
for each one.
|
||||
The barcode images are outputted by default to numbered filenames
|
||||
starting with \[lq]00001.png\[rq], \[lq]00002.png\[rq] etc., which can
|
||||
be changed by using the \f[CR]\-o\f[R] | \f[CR]\-\-output\f[R] option.
|
||||
starting with \(lq00001.png\(rq, \(lq00002.png\(rq etc., which can be
|
||||
changed by using the \f[CR]\-o\f[R] | \f[CR]\-\-output\f[R] option.
|
||||
.TP
|
||||
\f[CR]\-\-bg=COLOUR\f[R]
|
||||
Specify a background (paper) colour where \f[I]COLOUR\f[R] is in
|
||||
|
@ -63,7 +63,7 @@ decimal \f[CR]C,M,Y,K\f[R] percentages format.
|
|||
Treat input data as raw 8\-bit binary data instead of the default
|
||||
UTF\-8.
|
||||
Automatic code page translation to an ECI page is disabled, and no
|
||||
validation of the data\[cq]s character encoding takes place.
|
||||
validation of the data\(cqs character encoding takes place.
|
||||
.TP
|
||||
\f[CR]\-\-bind\f[R]
|
||||
Add horizontal boundary bars (also known as bearer bars) to the symbol.
|
||||
|
@ -104,7 +104,7 @@ Affects Codablock\-F, DotCode, GS1 DataBar Expanded Stacked
|
|||
.TP
|
||||
\f[CR]\-\-compliantheight\f[R]
|
||||
Warn if the height specified by the \f[CR]\-\-height\f[R] option is not
|
||||
compliant with the barcode\[cq]s specification, or if
|
||||
compliant with the barcode\(cqs specification, or if
|
||||
\f[CR]\-\-height\f[R] is not given, default to the height specified by
|
||||
the specification (if any).
|
||||
.TP
|
||||
|
@ -123,7 +123,7 @@ Use \f[CR]\-\-filetype\f[R] to specify output format.
|
|||
\f[CR]\-\-dmiso144\f[R]
|
||||
For Data Matrix symbols, use the standard ISO/IEC codeword placement for
|
||||
144 x 144 (\f[CR]\-\-vers=24\f[R]) sized symbols, instead of the default
|
||||
\[lq]de facto\[rq] placement (which rotates the placement of ECC
|
||||
\(lqde facto\(rq placement (which rotates the placement of ECC
|
||||
codewords).
|
||||
.TP
|
||||
\f[CR]\-\-dmre\f[R]
|
||||
|
@ -141,7 +141,7 @@ Use dots instead of squares for matrix symbols.
|
|||
DotCode is always in dotty mode.
|
||||
.TP
|
||||
\f[CR]\-\-dump\f[R]
|
||||
Dump a hexadecimal representation of the symbol\[cq]s encodation to
|
||||
Dump a hexadecimal representation of the symbol\(cqs encodation to
|
||||
stdout.
|
||||
The same representation may be outputted to a file by using a
|
||||
\f[CR].txt\f[R] extension with \f[CR]\-o\f[R] | \f[CR]\-\-output\f[R] or
|
||||
|
@ -168,45 +168,44 @@ The escape sequences are:
|
|||
.RS
|
||||
.IP
|
||||
.EX
|
||||
\[rs]0 (0x00) NUL Null character
|
||||
\[rs]E (0x04) EOT End of Transmission
|
||||
\[rs]a (0x07) BEL Bell
|
||||
\[rs]b (0x08) BS Backspace
|
||||
\[rs]t (0x09) HT Horizontal Tab
|
||||
\[rs]n (0x0A) LF Line Feed
|
||||
\[rs]v (0x0B) VT Vertical Tab
|
||||
\[rs]f (0x0C) FF Form Feed
|
||||
\[rs]r (0x0D) CR Carriage Return
|
||||
\[rs]e (0x1B) ESC Escape
|
||||
\[rs]G (0x1D) GS Group Separator
|
||||
\[rs]R (0x1E) RS Record Separator
|
||||
\[rs]( (0x28) ( Opening parenthesis (only with
|
||||
\(rs0 (0x00) NUL Null character
|
||||
\(rsE (0x04) EOT End of Transmission
|
||||
\(rsa (0x07) BEL Bell
|
||||
\(rsb (0x08) BS Backspace
|
||||
\(rst (0x09) HT Horizontal Tab
|
||||
\(rsn (0x0A) LF Line Feed
|
||||
\(rsv (0x0B) VT Vertical Tab
|
||||
\(rsf (0x0C) FF Form Feed
|
||||
\(rsr (0x0D) CR Carriage Return
|
||||
\(rse (0x1B) ESC Escape
|
||||
\(rsG (0x1D) GS Group Separator
|
||||
\(rsR (0x1E) RS Record Separator
|
||||
\(rs( (0x28) ( Opening parenthesis (only with
|
||||
\-\-gs1parens)
|
||||
\[rs]) (0x29) ) Closing parenthesis (only with
|
||||
\(rs) (0x29) ) Closing parenthesis (only with
|
||||
\-\-gs1parens)
|
||||
\[rs]\[rs] (0x5C) \[rs] Backslash
|
||||
\[rs]dNNN (NNN) Any 8\-bit character where NNN is
|
||||
\(rs\(rs (0x5C) \(rs Backslash
|
||||
\(rsdNNN (NNN) Any 8\-bit character where NNN is
|
||||
decimal (000\-255)
|
||||
\[rs]oNNN (0oNNN) Any 8\-bit character where NNN is
|
||||
\(rsoNNN (0oNNN) Any 8\-bit character where NNN is
|
||||
octal (000\-377)
|
||||
\[rs]xNN (0xNN) Any 8\-bit character where NN is
|
||||
\(rsxNN (0xNN) Any 8\-bit character where NN is
|
||||
hexadecimal (00\-FF)
|
||||
\[rs]uNNNN (U+NNNN) Any 16\-bit Unicode BMP character
|
||||
\(rsuNNNN (U+NNNN) Any 16\-bit Unicode BMP character
|
||||
where NNNN is hexadecimal
|
||||
\[rs]UNNNNNN (U+NNNNNN) Any 21\-bit Unicode character
|
||||
\(rsUNNNNNN (U+NNNNNN) Any 21\-bit Unicode character
|
||||
where NNNNNN is hexadecimal
|
||||
.EE
|
||||
.RE
|
||||
.TP
|
||||
\f[CR]\-\-extraesc\f[R]
|
||||
For Code 128 only, as well as processing the normal escape sequences
|
||||
above, process the special escape sequences \f[CR]\[rs]\[ha]A\f[R],
|
||||
\f[CR]\[rs]\[ha]B\f[R], \f[CR]\[rs]\[ha]C\f[R] and
|
||||
\f[CR]\[rs]\[ha]\[at]\f[R] that allow manual switching of Code Sets, and
|
||||
the special escape sequence \f[CR]\[rs]\[ha]1\f[R] that inserts an
|
||||
\f[CR]FNC1\f[R] character.
|
||||
The sequence \f[CR]\[rs]\[at]\f[R] turns off manual switching.
|
||||
The sequence \f[CR]\[rs]\[ha]\[ha]\f[R] can be used to encode data that
|
||||
above, process the special escape sequences \f[CR]\(rs\(haA\f[R],
|
||||
\f[CR]\(rs\(haB\f[R], \f[CR]\(rs\(haC\f[R] and \f[CR]\(rs\(ha\(at\f[R]
|
||||
that allow manual switching of Code Sets, and the special escape
|
||||
sequence \f[CR]\(rs\(ha1\f[R] that inserts an \f[CR]FNC1\f[R] character.
|
||||
The sequence \f[CR]\(rs\(at\f[R] turns off manual switching.
|
||||
The sequence \f[CR]\(rs\(ha\(ha\f[R] can be used to encode data that
|
||||
contains special escape sequences.
|
||||
.TP
|
||||
\f[CR]\-\-fast\f[R]
|
||||
|
@ -231,16 +230,16 @@ non\-ASCII data.
|
|||
\f[CR]\-\-gs1\f[R]
|
||||
Treat input as GS1 compatible data.
|
||||
Application Identifiers (AIs) should be placed in square brackets
|
||||
\f[CR]\[dq][]\[dq]\f[R] (but see \f[CR]\-\-gs1parens\f[R]).
|
||||
\f[CR]\(dq[]\(dq\f[R] (but see \f[CR]\-\-gs1parens\f[R]).
|
||||
.TP
|
||||
\f[CR]\-\-gs1nocheck\f[R]
|
||||
Do not check the validity of GS1 data.
|
||||
.TP
|
||||
\f[CR]\-\-gs1parens\f[R]
|
||||
Process parentheses \f[CR]\[dq]()\[dq]\f[R] as GS1 AI delimiters, rather
|
||||
than square brackets \f[CR]\[dq][]\[dq]\f[R].
|
||||
Process parentheses \f[CR]\(dq()\(dq\f[R] as GS1 AI delimiters, rather
|
||||
than square brackets \f[CR]\(dq[]\(dq\f[R].
|
||||
If the AI data contains parentheses, they must be backslashed
|
||||
(\f[CR]\[dq]\[rs](\[dq]\f[R] or \f[CR]\[dq]\[rs])\[dq]\f[R]) and the
|
||||
(\f[CR]\(dq\(rs(\(dq\f[R] or \f[CR]\(dq\(rs)\(dq\f[R]) and the
|
||||
\f[CR]\-\-esc\f[R] option selected.
|
||||
.TP
|
||||
\f[CR]\-\-gssep\f[R]
|
||||
|
@ -253,8 +252,8 @@ main bars, where \f[I]NUMBER\f[R] is in X\-dimensions.
|
|||
\f[I]NUMBER\f[R] may be floating\-point.
|
||||
.TP
|
||||
\f[CR]\-\-guardwhitespace\f[R]
|
||||
For EAN/UPC symbols, add quiet zone indicators \f[CR]\[dq]<\[dq]\f[R]
|
||||
and/or \f[CR]\[dq]>\[dq]\f[R] to HRT where applicable.
|
||||
For EAN/UPC symbols, add quiet zone indicators \f[CR]\(dq<\(dq\f[R]
|
||||
and/or \f[CR]\(dq>\(dq\f[R] to HRT where applicable.
|
||||
.TP
|
||||
\f[CR]\-\-height=NUMBER\f[R]
|
||||
Set the height of the symbol in X\-dimensions.
|
||||
|
@ -321,16 +320,16 @@ Remove the Human Readable Text (HRT).
|
|||
.TP
|
||||
\f[CR]\-o\f[R], \f[CR]\-\-output=FILE\f[R]
|
||||
Send the output to \f[I]FILE\f[R].
|
||||
When not in batch mode, the default is \[lq]out.png\[rq] (or
|
||||
\[lq]out.gif\[rq] if zint built without PNG support).
|
||||
When not in batch mode, the default is \(lqout.png\(rq (or
|
||||
\(lqout.gif\(rq if zint built without PNG support).
|
||||
When in batch mode (\f[CR]\-\-batch\f[R]), special characters can be
|
||||
used to format the output filenames:
|
||||
.RS
|
||||
.IP
|
||||
.EX
|
||||
\[ti] Insert a number or 0
|
||||
\(ti Insert a number or 0
|
||||
# Insert a number or space
|
||||
\[at] Insert a number or * (+ on Windows)
|
||||
\(at Insert a number or * (+ on Windows)
|
||||
Any other Insert literally
|
||||
.EE
|
||||
.RE
|
||||
|
@ -346,8 +345,7 @@ This is in addition to any whitespace specified by \f[CR]\-w\f[R] |
|
|||
.TP
|
||||
\f[CR]\-r\f[R], \f[CR]\-\-reverse\f[R]
|
||||
Reverse the foreground and background colours (white on black).
|
||||
Known as \[lq]reflectance reversal\[rq] or \[lq]reversed
|
||||
reflectance\[rq].
|
||||
Known as \(lqreflectance reversal\(rq or \(lqreversed reflectance\(rq.
|
||||
.TP
|
||||
\f[CR]\-\-rotate=INTEGER\f[R]
|
||||
Rotate the symbol by \f[I]INTEGER\f[R] degrees, where \f[I]INTEGER\f[R]
|
||||
|
@ -389,16 +387,15 @@ used.
|
|||
.PP
|
||||
The scaling takes into account the output filetype, and deals with all
|
||||
the details mentioned above.
|
||||
Units may be specified for \f[I]X\f[R] by appending \[lq]in\[rq] (inch)
|
||||
or \[lq]mm\[rq], and for \f[I]R\f[R] by appending \[lq]dpi\[rq] (dots
|
||||
per inch) or \[lq]dpmm\[rq] \-
|
||||
e.g.\ \f[CR]\-\-scalexdimdp=0.013in,300dpi\f[R].
|
||||
Units may be specified for \f[I]X\f[R] by appending \(lqin\(rq (inch) or
|
||||
\(lqmm\(rq, and for \f[I]R\f[R] by appending \(lqdpi\(rq (dots per inch)
|
||||
or \(lqdpmm\(rq \- e.g.\ \f[CR]\-\-scalexdimdp=0.013in,300dpi\f[R].
|
||||
.RE
|
||||
.TP
|
||||
\f[CR]\-\-scmvv=INTEGER\f[R]
|
||||
For MaxiCode, prefix the Structured Carrier Message (SCM) with
|
||||
\f[CR]\[dq][)>\[rs]R01\[rs]Gvv\[dq]\f[R], where \f[CR]vv\f[R] is a
|
||||
2\-digit \f[I]INTEGER\f[R].
|
||||
\f[CR]\(dq[)>\(rsR01\(rsGvv\(dq\f[R], where \f[CR]vv\f[R] is a 2\-digit
|
||||
\f[I]INTEGER\f[R].
|
||||
.TP
|
||||
\f[CR]\-\-secure=INTEGER\f[R]
|
||||
Set the error correction level (ECC) to \f[I]INTEGER\f[R].
|
||||
|
@ -411,7 +408,7 @@ Aztec Code 1 to 4 (10%, 23%, 36%, 50%)
|
|||
Grid Matrix 1 to 5 (10% to 50%)
|
||||
Han Xin 1 to 4 (8%, 15%, 23%, 30%)
|
||||
Micro QR 1 to 3 (7%, 15%, 25%) (L, M, Q)
|
||||
PDF417 0 to 8 (2\[ha](INTEGER + 1) codewords)
|
||||
PDF417 0 to 8 (2\(ha(INTEGER + 1) codewords)
|
||||
QR Code 1 to 4 (7%, 15%, 25%, 30%) (L, M, Q, H)
|
||||
rMQR 2 or 4 (15% or 30%) (M or H)
|
||||
Ultracode 1 to 6 (0%, 5%, 9%, 17%, 25%, 33%)
|
||||
|
@ -580,8 +577,8 @@ rMQR 1 to 38 (33 to 38 automatic width) (HxW)
|
|||
.EE
|
||||
.PP
|
||||
For a number of linear symbols, it specifies check character options
|
||||
(\[lq]hide\[rq] or \[lq]hidden\[rq] means don\[cq]t show in HRT,
|
||||
\[lq]visible\[rq] means do display in HRT):
|
||||
(\(lqhide\(rq or \(lqhidden\(rq means don\(cqt show in HRT,
|
||||
\(lqvisible\(rq means do display in HRT):
|
||||
.IP
|
||||
.EX
|
||||
C25IATA 1 or 2 (add visible or hidden check digit)
|
||||
|
@ -691,27 +688,27 @@ Error counterpart of warning if \f[CR]\-\-werror\f[R] given
|
|||
Error counterpart of warning if \f[CR]\-\-werror\f[R] given
|
||||
(\f[CR]ZINT_ERROR_HRT_TRUNCATED\f[R])
|
||||
.SH EXAMPLES
|
||||
Create \[lq]out.png\[rq] (or \[lq]out.gif\[rq] if zint built without PNG
|
||||
Create \(lqout.png\(rq (or \(lqout.gif\(rq if zint built without PNG
|
||||
support) in the current directory, as a Code 128 symbol.
|
||||
.IP
|
||||
.EX
|
||||
zint \-d \[aq]This Text\[aq]
|
||||
zint \-d \(aqThis Text\(aq
|
||||
.EE
|
||||
.PP
|
||||
Create \[lq]qr.svg\[rq] in the current directory, as a QR Code symbol.
|
||||
Create \(lqqr.svg\(rq in the current directory, as a QR Code symbol.
|
||||
.IP
|
||||
.EX
|
||||
zint \-b QRCode \-d \[aq]This Text\[aq] \-o \[aq]qr.svg\[aq]
|
||||
zint \-b QRCode \-d \(aqThis Text\(aq \-o \(aqqr.svg\(aq
|
||||
.EE
|
||||
.PP
|
||||
Use batch mode to read from an input file \[lq]ean13nos.txt\[rq]
|
||||
Use batch mode to read from an input file \(lqean13nos.txt\(rq
|
||||
containing a list of 13\-digit GTINs, each on a separate line, to create
|
||||
a series of EAN\-13 barcodes, formatting the output filenames to
|
||||
\[lq]ean001.gif\[rq], \[lq]ean002.gif\[rq] etc.
|
||||
using the special character \[lq]\[ti]\[rq].
|
||||
\(lqean001.gif\(rq, \(lqean002.gif\(rq etc.
|
||||
using the special character \(lq\(ti\(rq.
|
||||
.IP
|
||||
.EX
|
||||
zint \-b EAN13 \-\-batch \-i \[aq]ean13nos.txt\[aq] \-o \[aq]ean\[ti]\[ti]\[ti].gif\[aq]
|
||||
zint \-b EAN13 \-\-batch \-i \(aqean13nos.txt\(aq \-o \(aqean\(ti\(ti\(ti.gif\(aq
|
||||
.EE
|
||||
.SH BUGS
|
||||
Please send bug reports to https://sourceforge.net/p/zint/tickets/.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue