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

DXFILMEDGE: various tweaks:

change # 147 -> 127 to use up barcode # holes;
  use "common.h" funcs `str_to_uppercase()` -> `to_upper()`,
  `count_char_occurrences()` -> `chr_cnt()`;
  prefix defines with `DX_` and funcs with `dx_`;
  `ZINT_DEBUG_PRINT` -> `symbol->debug & ZINT_DEBUG_PRINT`;
  bools to ints; use `posn()` to check for slash (returns length);
  restrict line lengths to 118; suppress some clang-tidy warnings;
  normalize some error messages;
  check for single "A" if any (`sscanf()`);
  use compliant height default; some whitespace formatting;
Tcl: add DXFILMEDGE support
docs: document DXFILMEDGE; update to latest pandoc
test suite: ZXingCPP: DXFILMEDGE support
This commit is contained in:
gitlost
2024-12-23 20:52:08 +00:00
parent d13a3aaf1a
commit fe3907c2cb
21 changed files with 451 additions and 255 deletions

View File

@@ -1,11 +1,11 @@
% docs/README 2024-10-27
% docs/README 2024-12-23
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.5/pandoc-3.5-1-amd64.deb
sudo dpkg -i pandoc-3.5-1-amd64.deb
wget https://github.com/jgm/pandoc/releases/download/3.6.1/pandoc-3.6.1-1-amd64.deb
sudo dpkg -i pandoc-3.6.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.5/pandoc-3.5-linux-amd64.tar.gz
tar xf pandoc-3.5-linux-amd64.tar.gz
sudo mv -i pandoc-3.5/bin/pandoc /usr/local/bin
wget https://github.com/jgm/pandoc/releases/download/3.6.1/pandoc-3.6.1-linux-amd64.tar.gz
tar xf pandoc-3.6.1-linux-amd64.tar.gz
sudo mv -i pandoc-3.6.1/bin/pandoc /usr/local/bin
sudo dnf install python3-pip
pip install pandoc-tablenos --user
export PATH=~/.local/bin:"$PATH"

View File

@@ -0,0 +1,9 @@
<?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="248" height="48" 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="248" height="48" fill="#FFFFFF"/>
<path d="M0 0h40v24h-40ZM48 0h8v24h-8ZM64 0h8v24h-8ZM80 0h8v24h-8ZM96 0h8v24h-8ZM112 0h8v24h-8ZM128 0h8v24h-8ZM144 0h8v24h-8ZM160 0h8v48h-8ZM176 0h8v48h-8ZM192 0h8v48h-8ZM208 0h8v48h-8ZM224 0h24v24h-24ZM0 24h8v24h-8ZM16 24h8v24h-8ZM32 24h8v24h-8ZM48 24h24v24h-24ZM136 24h8v24h-8ZM224 24h8v24h-8ZM240 24h8v24h-8Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 676 B

View File

@@ -260,8 +260,9 @@
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
/* CSS for syntax highlighting */
html { -webkit-text-size-adjust: 100%; }
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
@@ -272,7 +273,7 @@
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
@@ -332,7 +333,7 @@
<h1 class="title">Zint Barcode Generator and Zint Barcode Studio User
Manual</h1>
<p class="author">Version 2.13.0.9</p>
<p class="date">November 2024</p>
<p class="date">December 2024</p>
</header>
<nav id="TOC" role="doc-toc">
<ul>
@@ -655,6 +656,8 @@ Two-Track Pharmacode</a></li>
<li><a href="#planet" id="toc-planet">6.4.3 PLANET</a></li>
<li><a href="#brazilian-cepnet" id="toc-brazilian-cepnet">6.4.4
Brazilian CEPNet</a></li>
<li><a href="#dx-film-edge-barcode" id="toc-dx-film-edge-barcode">6.4.5
DX Film Edge Barcode</a></li>
</ul></li>
<li><a href="#state-postal-codes" id="toc-state-postal-codes">6.5
4-State Postal Codes</a>
@@ -1950,6 +1953,11 @@ Matrix)</td>
<td style="text-align: left;">Royal Mail 4-State Mailmark</td>
</tr>
<tr>
<td style="text-align: left;">127</td>
<td style="text-align: left;"><code>BARCODE_DXFILMEDGE</code></td>
<td style="text-align: left;">DX Film Edge Barcode</td>
</tr>
<tr>
<td style="text-align: left;">128</td>
<td style="text-align: left;"><code>BARCODE_AZRUNE</code></td>
<td style="text-align: left;">Aztec Runes</td>
@@ -5575,6 +5583,35 @@ aria-hidden="true"><code>zint -b CEPNET --compliantheight -d "12345678"</code></
Brazilian postal service, to encode CEP (Código de Endereçamento Postal)
numbers on mail items. Input should consist of eight digits with the
check digit being automatically added by Zint.</p>
<h3 id="dx-film-edge-barcode">6.4.5 DX Film Edge Barcode</h3>
<figure>
<img src="images/dxfilmedge.svg" title="fig:" class="trk"
alt="zint -b DXFILMEDGE --compliantheight -d &quot;112-1/10A&quot;" />
<figcaption
aria-hidden="true"><code>zint -b DXFILMEDGE --compliantheight -d "112-1/10A"</code></figcaption>
</figure>
<p>Introduced by Kodak in the 1980s, the DX (Digital Index) barcode is
printed on the bottom edge of 35mm film to aid in the reordering and
post-processing of prints.</p>
<p>The data can be in two parts. The first part (required) is the “DX
number”, identifying the manufacturer and film type - the National
Association of Photographic Manufacturers (NAPM) number. The second
part, which is optional and if present is separated from the first by a
slash (<code>/</code>), gives the frame number.</p>
<p>The DX number is in either of two formats. The first format is a
number of 1 to 4 digits (“DX Extract”) or 6 digits (“DX Full”), but for
the 6-digit version the first and last digit are ignored, leaving a
4-digit DX Extract number in any case, which must be in the range 16 to
2047. The second format “NNN-NN” represents the DX Extract as two
numbers separated by a dash (<code>-</code>), the first number being 1
to 3 digits (range 1 to 127) and the second 1 to 2 digits (range 0 to
15).<a href="#fn15" class="footnote-ref" id="fnref15"
role="doc-noteref"><sup>15</sup></a></p>
<p>The optional frame number is a number in the range 0 to 63, and may
have a half frame indicator “A” appended. Special character sequences
(with or without a half frame indicator appended) may also be used: “S”
or “X” means frame number 62, “K” or “00” means frame number 63, and “F”
means frame number 0.</p>
<h2 id="state-postal-codes">6.5 4-State Postal Codes</h2>
<h3 id="australia-post-4-state-symbols">6.5.1 Australia Post 4-State
Symbols</h3>
@@ -9497,6 +9534,9 @@ href="#fnref13" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn14"><p><code>BARCODE_CODE128AB</code> previously used the name
<code>BARCODE_CODE128B</code>, which is still recognised.<a
href="#fnref14" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn15"><p>The DX Number may be looked up in The (Modified) Big
Film Database at https://thebigfilmdatabase.merinorus.com<a
href="#fnref15" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
</body>

View File

@@ -1,6 +1,6 @@
% Zint Barcode Generator and Zint Barcode Studio User Manual
% Version 2.13.0.9
% November 2024
% December 2024
# 1. Introduction
@@ -817,6 +817,8 @@ Value
121 `BARCODE_MAILMARK_4S` Royal Mail 4-State Mailmark
127 `BARCODE_DXFILMEDGE` DX Film Edge Barcode
128 `BARCODE_AZRUNE` Aztec Runes
129 `BARCODE_CODE32` Code 32
@@ -3733,6 +3735,37 @@ service, to encode CEP (Código de Endereçamento Postal) numbers on mail items.
Input should consist of eight digits with the check digit being automatically
added by Zint.
### 6.4.5 DX Film Edge Barcode
![`zint -b DXFILMEDGE --compliantheight -d
"112-1/10A"`](images/dxfilmedge.svg){.trk}
Introduced by Kodak in the 1980s, the DX (Digital Index) barcode is printed on
the bottom edge of 35mm film to aid in the reordering and post-processing of
prints.
The data can be in two parts. The first part (required) is the "DX number",
identifying the manufacturer and film type - the National Association of
Photographic Manufacturers (NAPM) number. The second part, which is
optional and if present is separated from the first by a slash (`/`), gives the
frame number.
The DX number is in either of two formats. The first format is a number of 1 to
4 digits ("DX Extract") or 6 digits ("DX Full"), but for the 6-digit version the
first and last digit are ignored, leaving a 4-digit DX Extract number in any
case, which must be in the range 16 to 2047. The second format "NNN-NN"
represents the DX Extract as two numbers separated by a dash (`-`), the first
number being 1 to 3 digits (range 1 to 127) and the second 1 to 2 digits (range
0 to 15).[^15]
The optional frame number is a number in the range 0 to 63, and may have a half
frame indicator "A" appended. Special character sequences (with or without a
half frame indicator appended) may also be used: "S" or "X" means frame number
62, "K" or "00" means frame number 63, and "F" means frame number 0.
[^15]: The DX Number may be looked up in The (Modified) Big Film Database at
https://thebigfilmdatabase.merinorus.com
\clearpage
## 6.5 4-State Postal Codes

View File

@@ -1,6 +1,6 @@
Zint Barcode Generator and Zint Barcode Studio User Manual
Version 2.13.0.9
November 2024
December 2024
*******************************************************************************
* For reference the following is a text-only version of the Zint manual, *
@@ -145,6 +145,7 @@ November 2024
- 6.4.2 POSTNET
- 6.4.3 PLANET
- 6.4.4 Brazilian CEPNet
- 6.4.5 DX Film Edge Barcode
- 6.5 4-State Postal Codes
- 6.5.1 Australia Post 4-State Symbols
- 6.5.1.1 Customer Barcodes
@@ -951,6 +952,8 @@ underscores are optional.
121 BARCODE_MAILMARK_4S Royal Mail 4-State Mailmark
127 BARCODE_DXFILMEDGE DX Film Edge Barcode
128 BARCODE_AZRUNE Aztec Runes
129 BARCODE_CODE32 Code 32
@@ -3583,6 +3586,32 @@ service, to encode CEP (Código de Endereçamento Postal) numbers on mail items.
Input should consist of eight digits with the check digit being automatically
added by Zint.
6.4.5 DX Film Edge Barcode
[zint -b DXFILMEDGE --compliantheight -d "112-1/10A"]
Introduced by Kodak in the 1980s, the DX (Digital Index) barcode is printed on
the bottom edge of 35mm film to aid in the reordering and post-processing of
prints.
The data can be in two parts. The first part (required) is the “DX number”,
identifying the manufacturer and film type - the National Association of
Photographic Manufacturers (NAPM) number. The second part, which is optional and
if present is separated from the first by a slash (/), gives the frame number.
The DX number is in either of two formats. The first format is a number of 1 to
4 digits (“DX Extract”) or 6 digits (“DX Full”), but for the 6-digit version the
first and last digit are ignored, leaving a 4-digit DX Extract number in any
case, which must be in the range 16 to 2047. The second format “NNN-NN”
represents the DX Extract as two numbers separated by a dash (-), the first
number being 1 to 3 digits (range 1 to 127) and the second 1 to 2 digits (range
0 to 15).[15]
The optional frame number is a number in the range 0 to 63, and may have a half
frame indicator “A” appended. Special character sequences (with or without a
half frame indicator appended) may also be used: “S” or “X” means frame number
62, “K” or “00” means frame number 63, and “F” means frame number 0.
6.5 4-State Postal Codes
6.5.1 Australia Post 4-State Symbols
@@ -4829,7 +4858,7 @@ configured barcode is displayed once the "Generate" button is pressed.
Annex D. Man Page ZINT(1)
% ZINT(1) Version 2.13.0.9 % % November 2024
% ZINT(1) Version 2.13.0.9 % % December 2024
NAME
@@ -5581,3 +5610,6 @@ recognised.
[14] BARCODE_CODE128AB previously used the name BARCODE_CODE128B, which is still
recognised.
[15] The DX Number may be looked up in The (Modified) Big Film Database at
https://thebigfilmdatabase.merinorus.com

View File

@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.5
.\" Automatically generated by Pandoc 3.6
.\"
.TH "ZINT" "1" "November 2024" "Version 2.13.0.9"
.TH "ZINT" "1" "December 2024" "Version 2.13.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.13.0.9
%
% November 2024
% December 2024
# NAME

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (C) 2022 <rstuart114@gmail.com>
# Copyright (C) 2022-2024 <rstuart114@gmail.com>
#
# Generate the barcode .svg images for manual.pdf (via manual.pmd)
@@ -104,6 +104,7 @@ zint -b PHARMA_TWO --compliantheight -d "29876543" --scale=$SCALE_TRACK -o image
zint -b POSTNET --compliantheight -d "12345678901" --scale=$SCALE_TRACK -o images/postnet.svg
zint -b PLANET --compliantheight -d "4012345235636" --scale=$SCALE_TRACK -o images/planet.svg
zint -b CEPNET --compliantheight -d "12345678" --scale=$SCALE_TRACK -o images/cepnet.svg
zint -b DXFILMEDGE --compliantheight -d "112-1/10A" --scale=$SCALE_TRACK -o images/dxfilmedge.svg
zint -b AUSPOST --compliantheight -d "96184209" --scale=$SCALE_TRACK -o images/auspost.svg
zint -b AUSROUTE --compliantheight -d "34567890" --scale=$SCALE_TRACK -o images/ausroute.svg
zint -b AUSREPLY --compliantheight -d "12345678" --scale=$SCALE_TRACK -o images/ausreply.svg