NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Represent a class for handling barcode generation and validation tasks.
This class provides methods for parsing, rendering, generating, validating,
and calculating check digits for barcodes. It supports both EAN-13 and UPC
formats, among others. Users can work with external tools and manage barcode
data effectively.
Encoding used for left and right digits
Left Digits Right Digit
Odd Parity Even Parity
S B S B B S B S
0 3 2 1 1 3 2 1 1
1 2 2 2 1 2 2 2 1
2 2 1 2 2 2 1 2 2
3 1 4 1 1 1 4 1 1
4 1 1 3 2 1 1 3 2
5 1 2 3 1 1 2 3 1
6 1 1 1 4 1 1 1 4
7 1 3 1 2 1 3 1 2
8 1 2 1 3 1 2 1 3
9 3 1 1 2 3 1 1 2
Encoding use to pack the first digit into the next six
0 Odd Odd Odd Odd Odd Odd
1 Odd Odd Even Odd Even Even
2 Odd Odd Even Even Odd Even
3 Odd Odd Even Even Even Odd
4 Odd Even Odd Odd Even Even
5 Odd Even Even Odd Odd Even
6 Odd Even Even Even Odd Odd
7 Odd Even Odd Even Odd Even
8 Odd Even Odd Even Even Odd
9 Odd Even Even Odd Even Odd
apt-get install barcode
If you want to re-enable PostScript and PDF formats for ImageMagick,
you could make the following changes in the file
/etc/ImageMagick-6/policy.xml
[... about 70 lines deleted ...]
<!-- disable ghostscript format types -->
<!--
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPI" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
-->
<policy domain="coder" rights="read|write" pattern="PDF,PS" />
</policymap>
cythonize -3 -a -i ObjBarcode.py
Compiling /home/axion/projects/axion/factory.core/ObjBarcode.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.core/ObjBarcode.py./home/axion/projects/axion/dev-env/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py:108: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.. warnings.warn(msg, _BetaConfiguration).error: could not create './factory/core/ObjBarcode.cpython-311-x86_64-linux-gnu.so': No such file or directory
Updated : 2025-10-02