Add Brizilian CEPNet (almost identical to POSTNET) using Symbol #54

This commit is contained in:
Robin Stuart 2022-08-16 16:17:39 +01:00
parent c0ec67f99e
commit 35c207edd4
12 changed files with 386 additions and 207 deletions

View File

@ -521,7 +521,7 @@ static const void *barcode_funcs[BARCODE_LAST + 1] = {
eanx, NULL, eanx, eanx, NULL, /*35-39*/
postnet, NULL, NULL, NULL, NULL, /*40-44*/
NULL, NULL, msi_plessey, NULL, fim, /*45-49*/
code39, pharma, pzn, pharma_two, NULL, /*50-54*/
code39, pharma, pzn, pharma_two, postnet, /*50-54*/
pdf417, pdf417, maxicode, qrcode, NULL, /*55-59*/
code128, NULL, NULL, auspost, NULL, /*60-64*/
NULL, auspost, auspost, auspost, eanx, /*65-69*/

View File

@ -132,6 +132,10 @@ static int usps_set_height(struct zint_symbol *symbol, const int no_errtxt) {
}
/* Handles the PostNet system used for Zip codes in the US */
/* Also handles Brazilian CEPNet - more information at
* https://silo.tips/download/sumario-4-regras-de-endereamento
* https://barcodeguide.seagullscientific.com/Content/Symbologies/CEPNet.htm
* TODO: Check compliant symbol sizes */
static int postnet_enc(struct zint_symbol *symbol, const unsigned char source[], char *d, const int length) {
int i, sum, check_digit;
int error_number = 0;
@ -140,9 +144,17 @@ static int postnet_enc(struct zint_symbol *symbol, const unsigned char source[],
strcpy(symbol->errtxt, "480: Input too long (38 character maximum)");
return ZINT_ERROR_TOO_LONG;
}
if (length != 5 && length != 9 && length != 11) {
strcpy(symbol->errtxt, "479: Input length is not standard (5, 9 or 11 characters)");
error_number = ZINT_WARN_NONCOMPLIANT;
if (symbol->symbology == BARCODE_CEPNET) {
if (length != 8) {
strcpy(symbol->errtxt, "499: Input is wrong length (should be 8 digits)");
error_number = ZINT_WARN_NONCOMPLIANT;
}
} else {
if (length != 5 && length != 9 && length != 11) {
strcpy(symbol->errtxt, "479: Input length is not standard (5, 9 or 11 characters)");
error_number = ZINT_WARN_NONCOMPLIANT;
}
}
if (!is_sane(NEON_F, source, length)) {
strcpy(symbol->errtxt, "481: Invalid character in data (digits only)");

View File

@ -178,6 +178,7 @@ extern "C" {
#define BARCODE_PHARMA 51 /* Pharmacode One-Track */
#define BARCODE_PZN 52 /* Pharmazentralnummer */
#define BARCODE_PHARMA_TWO 53 /* Pharmacode Two-Track */
#define BARCODE_CEPNET 54 /* Brazilian CEPNet Postal Code */
#define BARCODE_PDF417 55 /* PDF417 */
#define BARCODE_PDF417COMP 56 /* Compact PDF417 (Truncated PDF417) */
#define BARCODE_PDF417TRUNC 56 /* Legacy */

51
docs/images/bc412.svg Normal file
View File

@ -0,0 +1,51 @@
<?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="123" height="32" 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="123" height="32" fill="#FFFFFF" />
<rect x="0.00" y="0.00" width="1.20" height="20.00" />
<rect x="3.60" y="0.00" width="1.20" height="20.00" />
<rect x="6.00" y="0.00" width="1.20" height="20.00" />
<rect x="10.80" y="0.00" width="1.20" height="20.00" />
<rect x="14.40" y="0.00" width="1.20" height="20.00" />
<rect x="18.00" y="0.00" width="1.20" height="20.00" />
<rect x="22.80" y="0.00" width="1.20" height="20.00" />
<rect x="25.20" y="0.00" width="1.20" height="20.00" />
<rect x="27.60" y="0.00" width="1.20" height="20.00" />
<rect x="32.40" y="0.00" width="1.20" height="20.00" />
<rect x="37.20" y="0.00" width="1.20" height="20.00" />
<rect x="39.60" y="0.00" width="1.20" height="20.00" />
<rect x="42.00" y="0.00" width="1.20" height="20.00" />
<rect x="46.80" y="0.00" width="1.20" height="20.00" />
<rect x="49.20" y="0.00" width="1.20" height="20.00" />
<rect x="51.60" y="0.00" width="1.20" height="20.00" />
<rect x="58.80" y="0.00" width="1.20" height="20.00" />
<rect x="61.20" y="0.00" width="1.20" height="20.00" />
<rect x="63.60" y="0.00" width="1.20" height="20.00" />
<rect x="67.20" y="0.00" width="1.20" height="20.00" />
<rect x="69.60" y="0.00" width="1.20" height="20.00" />
<rect x="75.60" y="0.00" width="1.20" height="20.00" />
<rect x="78.00" y="0.00" width="1.20" height="20.00" />
<rect x="81.60" y="0.00" width="1.20" height="20.00" />
<rect x="85.20" y="0.00" width="1.20" height="20.00" />
<rect x="90.00" y="0.00" width="1.20" height="20.00" />
<rect x="92.40" y="0.00" width="1.20" height="20.00" />
<rect x="96.00" y="0.00" width="1.20" height="20.00" />
<rect x="100.80" y="0.00" width="1.20" height="20.00" />
<rect x="104.40" y="0.00" width="1.20" height="20.00" />
<rect x="106.80" y="0.00" width="1.20" height="20.00" />
<rect x="109.20" y="0.00" width="1.20" height="20.00" />
<rect x="111.60" y="0.00" width="1.20" height="20.00" />
<rect x="118.80" y="0.00" width="1.20" height="20.00" />
<rect x="121.20" y="0.00" width="1.20" height="20.00" />
<text x="61.20" y="29.24" text-anchor="middle"
font-family="Helvetica, sans-serif" font-size="8.4" >
AQQ45670
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

59
docs/images/cepnet.svg Normal file
View File

@ -0,0 +1,59 @@
<?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="186" height="11" 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="186" height="11" fill="#FFFFFF" />
<rect x="0.00" y="0.00" width="2.00" height="10.75" />
<rect x="16.00" y="0.00" width="2.00" height="10.75" />
<rect x="20.00" y="0.00" width="2.00" height="10.75" />
<rect x="32.00" y="0.00" width="2.00" height="10.75" />
<rect x="40.00" y="0.00" width="2.00" height="10.75" />
<rect x="52.00" y="0.00" width="2.00" height="10.75" />
<rect x="56.00" y="0.00" width="2.00" height="10.75" />
<rect x="68.00" y="0.00" width="2.00" height="10.75" />
<rect x="80.00" y="0.00" width="2.00" height="10.75" />
<rect x="88.00" y="0.00" width="2.00" height="10.75" />
<rect x="96.00" y="0.00" width="2.00" height="10.75" />
<rect x="108.00" y="0.00" width="2.00" height="10.75" />
<rect x="112.00" y="0.00" width="2.00" height="10.75" />
<rect x="124.00" y="0.00" width="2.00" height="10.75" />
<rect x="140.00" y="0.00" width="2.00" height="10.75" />
<rect x="144.00" y="0.00" width="2.00" height="10.75" />
<rect x="156.00" y="0.00" width="2.00" height="10.75" />
<rect x="168.00" y="0.00" width="2.00" height="10.75" />
<rect x="180.00" y="0.00" width="2.00" height="10.75" />
<rect x="184.00" y="0.00" width="2.00" height="10.75" />
<rect x="4.00" y="6.45" width="2.00" height="4.30" />
<rect x="8.00" y="6.45" width="2.00" height="4.30" />
<rect x="12.00" y="6.45" width="2.00" height="4.30" />
<rect x="24.00" y="6.45" width="2.00" height="4.30" />
<rect x="28.00" y="6.45" width="2.00" height="4.30" />
<rect x="36.00" y="6.45" width="2.00" height="4.30" />
<rect x="44.00" y="6.45" width="2.00" height="4.30" />
<rect x="48.00" y="6.45" width="2.00" height="4.30" />
<rect x="60.00" y="6.45" width="2.00" height="4.30" />
<rect x="64.00" y="6.45" width="2.00" height="4.30" />
<rect x="72.00" y="6.45" width="2.00" height="4.30" />
<rect x="76.00" y="6.45" width="2.00" height="4.30" />
<rect x="84.00" y="6.45" width="2.00" height="4.30" />
<rect x="92.00" y="6.45" width="2.00" height="4.30" />
<rect x="100.00" y="6.45" width="2.00" height="4.30" />
<rect x="104.00" y="6.45" width="2.00" height="4.30" />
<rect x="116.00" y="6.45" width="2.00" height="4.30" />
<rect x="120.00" y="6.45" width="2.00" height="4.30" />
<rect x="128.00" y="6.45" width="2.00" height="4.30" />
<rect x="132.00" y="6.45" width="2.00" height="4.30" />
<rect x="136.00" y="6.45" width="2.00" height="4.30" />
<rect x="148.00" y="6.45" width="2.00" height="4.30" />
<rect x="152.00" y="6.45" width="2.00" height="4.30" />
<rect x="160.00" y="6.45" width="2.00" height="4.30" />
<rect x="164.00" y="6.45" width="2.00" height="4.30" />
<rect x="172.00" y="6.45" width="2.00" height="4.30" />
<rect x="176.00" y="6.45" width="2.00" height="4.30" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -11,89 +11,109 @@
<rect x="12.00" y="1.20" width="2.40" height="36.00" />
<rect x="15.60" y="1.20" width="1.20" height="36.00" />
<rect x="21.60" y="1.20" width="1.20" height="36.00" />
<rect x="25.20" y="1.20" width="1.20" height="36.00" />
<rect x="27.60" y="1.20" width="4.80" height="36.00" />
<rect x="33.60" y="1.20" width="3.60" height="36.00" />
<rect x="38.40" y="1.20" width="1.20" height="12.00" />
<rect x="42.00" y="1.20" width="1.20" height="12.00" />
<rect x="44.40" y="1.20" width="2.40" height="12.00" />
<rect x="51.60" y="1.20" width="1.20" height="36.00" />
<rect x="56.40" y="1.20" width="1.20" height="12.00" />
<rect x="61.20" y="1.20" width="2.40" height="12.00" />
<rect x="64.80" y="1.20" width="1.20" height="12.00" />
<rect x="69.60" y="1.20" width="3.60" height="12.00" />
<rect x="74.40" y="1.20" width="2.40" height="12.00" />
<rect x="78.00" y="1.20" width="1.20" height="36.00" />
<rect x="80.40" y="1.20" width="2.40" height="12.00" />
<rect x="86.40" y="1.20" width="1.20" height="12.00" />
<rect x="91.20" y="1.20" width="1.20" height="12.00" />
<rect x="93.60" y="1.20" width="1.20" height="12.00" />
<rect x="98.40" y="1.20" width="2.40" height="12.00" />
<rect x="104.40" y="1.20" width="1.20" height="12.00" />
<rect x="109.20" y="1.20" width="1.20" height="12.00" />
<rect x="111.60" y="1.20" width="2.40" height="12.00" />
<rect x="117.60" y="1.20" width="1.20" height="12.00" />
<rect x="122.40" y="1.20" width="2.40" height="12.00" />
<rect x="126.00" y="1.20" width="3.60" height="12.00" />
<rect x="130.80" y="1.20" width="1.20" height="12.00" />
<rect x="135.60" y="1.20" width="3.60" height="12.00" />
<rect x="140.40" y="1.20" width="2.40" height="12.00" />
<rect x="144.00" y="1.20" width="1.20" height="24.00" />
<rect x="148.80" y="1.20" width="1.20" height="12.00" />
<rect x="153.60" y="1.20" width="2.40" height="24.00" />
<rect x="157.20" y="1.20" width="3.60" height="12.00" />
<rect x="162.00" y="1.20" width="1.20" height="12.00" />
<rect x="164.40" y="1.20" width="4.80" height="24.00" />
<rect x="25.20" y="1.20" width="1.20" height="11.40" />
<rect x="27.60" y="1.20" width="4.80" height="11.40" />
<rect x="33.60" y="1.20" width="3.60" height="11.40" />
<rect x="38.40" y="1.20" width="1.20" height="11.40" />
<rect x="42.00" y="1.20" width="1.20" height="11.40" />
<rect x="44.40" y="1.20" width="2.40" height="11.40" />
<rect x="51.60" y="1.20" width="1.20" height="11.40" />
<rect x="56.40" y="1.20" width="1.20" height="11.40" />
<rect x="61.20" y="1.20" width="2.40" height="11.40" />
<rect x="64.80" y="1.20" width="1.20" height="11.40" />
<rect x="69.60" y="1.20" width="3.60" height="11.40" />
<rect x="74.40" y="1.20" width="2.40" height="11.40" />
<rect x="78.00" y="1.20" width="1.20" height="11.40" />
<rect x="80.40" y="1.20" width="2.40" height="11.40" />
<rect x="86.40" y="1.20" width="1.20" height="11.40" />
<rect x="91.20" y="1.20" width="1.20" height="11.40" />
<rect x="93.60" y="1.20" width="1.20" height="11.40" />
<rect x="98.40" y="1.20" width="2.40" height="11.40" />
<rect x="104.40" y="1.20" width="1.20" height="11.40" />
<rect x="109.20" y="1.20" width="1.20" height="11.40" />
<rect x="111.60" y="1.20" width="2.40" height="11.40" />
<rect x="117.60" y="1.20" width="1.20" height="11.40" />
<rect x="122.40" y="1.20" width="2.40" height="11.40" />
<rect x="126.00" y="1.20" width="3.60" height="11.40" />
<rect x="130.80" y="1.20" width="1.20" height="11.40" />
<rect x="135.60" y="1.20" width="3.60" height="11.40" />
<rect x="140.40" y="1.20" width="2.40" height="11.40" />
<rect x="144.00" y="1.20" width="1.20" height="11.40" />
<rect x="148.80" y="1.20" width="1.20" height="11.40" />
<rect x="153.60" y="1.20" width="2.40" height="11.40" />
<rect x="157.20" y="1.20" width="3.60" height="11.40" />
<rect x="162.00" y="1.20" width="1.20" height="11.40" />
<rect x="164.40" y="1.20" width="4.80" height="11.40" />
<rect x="170.40" y="1.20" width="2.40" height="36.00" />
<rect x="176.40" y="1.20" width="3.60" height="36.00" />
<rect x="181.20" y="1.20" width="1.20" height="36.00" />
<rect x="183.60" y="1.20" width="2.40" height="36.00" />
<rect x="38.40" y="13.20" width="2.40" height="12.00" />
<rect x="44.40" y="13.20" width="1.20" height="12.00" />
<rect x="48.00" y="13.20" width="1.20" height="12.00" />
<rect x="54.00" y="13.20" width="2.40" height="12.00" />
<rect x="60.00" y="13.20" width="3.60" height="12.00" />
<rect x="64.80" y="13.20" width="2.40" height="24.00" />
<rect x="68.40" y="13.20" width="2.40" height="12.00" />
<rect x="73.20" y="13.20" width="2.40" height="12.00" />
<rect x="82.80" y="13.20" width="2.40" height="12.00" />
<rect x="88.80" y="13.20" width="1.20" height="24.00" />
<rect x="91.20" y="13.20" width="2.40" height="12.00" />
<rect x="94.80" y="13.20" width="2.40" height="24.00" />
<rect x="99.60" y="13.20" width="2.40" height="12.00" />
<rect x="104.40" y="13.20" width="2.40" height="24.00" />
<rect x="108.00" y="13.20" width="3.60" height="12.00" />
<rect x="112.80" y="13.20" width="1.20" height="12.00" />
<rect x="117.60" y="13.20" width="2.40" height="12.00" />
<rect x="121.20" y="13.20" width="2.40" height="12.00" />
<rect x="124.80" y="13.20" width="4.80" height="24.00" />
<rect x="130.80" y="13.20" width="4.80" height="12.00" />
<rect x="136.80" y="13.20" width="3.60" height="12.00" />
<rect x="141.60" y="13.20" width="1.20" height="24.00" />
<rect x="147.60" y="13.20" width="1.20" height="12.00" />
<rect x="157.20" y="13.20" width="1.20" height="24.00" />
<rect x="160.80" y="13.20" width="1.20" height="12.00" />
<rect x="38.40" y="25.20" width="1.20" height="12.00" />
<rect x="40.80" y="25.20" width="2.40" height="12.00" />
<rect x="45.60" y="25.20" width="3.60" height="12.00" />
<rect x="56.40" y="25.20" width="4.80" height="12.00" />
<rect x="62.40" y="25.20" width="1.20" height="12.00" />
<rect x="69.60" y="25.20" width="1.20" height="12.00" />
<rect x="72.00" y="25.20" width="1.20" height="12.00" />
<rect x="82.80" y="25.20" width="4.80" height="12.00" />
<rect x="91.20" y="25.20" width="1.20" height="12.00" />
<rect x="98.40" y="25.20" width="1.20" height="12.00" />
<rect x="108.00" y="25.20" width="2.40" height="12.00" />
<rect x="111.60" y="25.20" width="4.80" height="12.00" />
<rect x="117.60" y="25.20" width="1.20" height="12.00" />
<rect x="120.00" y="25.20" width="3.60" height="12.00" />
<rect x="130.80" y="25.20" width="1.20" height="12.00" />
<rect x="136.80" y="25.20" width="2.40" height="12.00" />
<rect x="144.00" y="25.20" width="2.40" height="12.00" />
<rect x="147.60" y="25.20" width="3.60" height="12.00" />
<rect x="152.40" y="25.20" width="3.60" height="12.00" />
<rect x="159.60" y="25.20" width="1.20" height="12.00" />
<rect x="163.20" y="25.20" width="4.80" height="12.00" />
<rect x="25.20" y="13.80" width="1.20" height="10.80" />
<rect x="27.60" y="13.80" width="4.80" height="10.80" />
<rect x="33.60" y="13.80" width="3.60" height="10.80" />
<rect x="38.40" y="13.80" width="2.40" height="10.80" />
<rect x="44.40" y="13.80" width="1.20" height="10.80" />
<rect x="48.00" y="13.80" width="1.20" height="10.80" />
<rect x="51.60" y="13.80" width="1.20" height="10.80" />
<rect x="54.00" y="13.80" width="2.40" height="10.80" />
<rect x="60.00" y="13.80" width="3.60" height="10.80" />
<rect x="64.80" y="13.80" width="2.40" height="10.80" />
<rect x="68.40" y="13.80" width="2.40" height="10.80" />
<rect x="73.20" y="13.80" width="2.40" height="10.80" />
<rect x="78.00" y="13.80" width="1.20" height="10.80" />
<rect x="82.80" y="13.80" width="2.40" height="10.80" />
<rect x="88.80" y="13.80" width="1.20" height="10.80" />
<rect x="91.20" y="13.80" width="2.40" height="10.80" />
<rect x="94.80" y="13.80" width="2.40" height="10.80" />
<rect x="99.60" y="13.80" width="2.40" height="10.80" />
<rect x="104.40" y="13.80" width="2.40" height="10.80" />
<rect x="108.00" y="13.80" width="3.60" height="10.80" />
<rect x="112.80" y="13.80" width="1.20" height="10.80" />
<rect x="117.60" y="13.80" width="2.40" height="10.80" />
<rect x="121.20" y="13.80" width="2.40" height="10.80" />
<rect x="124.80" y="13.80" width="4.80" height="10.80" />
<rect x="130.80" y="13.80" width="4.80" height="10.80" />
<rect x="136.80" y="13.80" width="3.60" height="10.80" />
<rect x="141.60" y="13.80" width="1.20" height="10.80" />
<rect x="144.00" y="13.80" width="1.20" height="10.80" />
<rect x="147.60" y="13.80" width="1.20" height="10.80" />
<rect x="153.60" y="13.80" width="2.40" height="10.80" />
<rect x="157.20" y="13.80" width="1.20" height="10.80" />
<rect x="160.80" y="13.80" width="1.20" height="10.80" />
<rect x="164.40" y="13.80" width="4.80" height="10.80" />
<rect x="25.20" y="25.80" width="1.20" height="11.40" />
<rect x="27.60" y="25.80" width="4.80" height="11.40" />
<rect x="33.60" y="25.80" width="3.60" height="11.40" />
<rect x="38.40" y="25.80" width="1.20" height="11.40" />
<rect x="40.80" y="25.80" width="2.40" height="11.40" />
<rect x="45.60" y="25.80" width="3.60" height="11.40" />
<rect x="51.60" y="25.80" width="1.20" height="11.40" />
<rect x="56.40" y="25.80" width="4.80" height="11.40" />
<rect x="62.40" y="25.80" width="1.20" height="11.40" />
<rect x="64.80" y="25.80" width="2.40" height="11.40" />
<rect x="69.60" y="25.80" width="1.20" height="11.40" />
<rect x="72.00" y="25.80" width="1.20" height="11.40" />
<rect x="78.00" y="25.80" width="1.20" height="11.40" />
<rect x="82.80" y="25.80" width="4.80" height="11.40" />
<rect x="88.80" y="25.80" width="1.20" height="11.40" />
<rect x="91.20" y="25.80" width="1.20" height="11.40" />
<rect x="94.80" y="25.80" width="2.40" height="11.40" />
<rect x="98.40" y="25.80" width="1.20" height="11.40" />
<rect x="104.40" y="25.80" width="2.40" height="11.40" />
<rect x="108.00" y="25.80" width="2.40" height="11.40" />
<rect x="111.60" y="25.80" width="4.80" height="11.40" />
<rect x="117.60" y="25.80" width="1.20" height="11.40" />
<rect x="120.00" y="25.80" width="3.60" height="11.40" />
<rect x="124.80" y="25.80" width="4.80" height="11.40" />
<rect x="130.80" y="25.80" width="1.20" height="11.40" />
<rect x="136.80" y="25.80" width="2.40" height="11.40" />
<rect x="141.60" y="25.80" width="1.20" height="11.40" />
<rect x="144.00" y="25.80" width="2.40" height="11.40" />
<rect x="147.60" y="25.80" width="3.60" height="11.40" />
<rect x="152.40" y="25.80" width="3.60" height="11.40" />
<rect x="157.20" y="25.80" width="1.20" height="11.40" />
<rect x="159.60" y="25.80" width="1.20" height="11.40" />
<rect x="163.20" y="25.80" width="4.80" height="11.40" />
<rect x="25.20" y="12.60" width="145.20" height="1.20" />
<rect x="25.20" y="24.60" width="145.20" height="1.20" />
<rect x="12.00" y="0.00" width="174.00" height="1.20" />

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -8,40 +8,46 @@
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="98" height="28" fill="#FFFFFF" />
<rect x="12.00" y="1.20" width="3.60" height="12.60" />
<rect x="18.00" y="1.20" width="1.20" height="12.60" />
<rect x="20.40" y="1.20" width="1.20" height="25.20" />
<rect x="22.80" y="1.20" width="2.40" height="12.60" />
<rect x="27.60" y="1.20" width="2.40" height="12.60" />
<rect x="31.20" y="1.20" width="3.60" height="25.20" />
<rect x="36.00" y="1.20" width="2.40" height="12.60" />
<rect x="39.60" y="1.20" width="1.20" height="12.60" />
<rect x="43.20" y="1.20" width="4.80" height="12.60" />
<rect x="49.20" y="1.20" width="2.40" height="12.60" />
<rect x="52.80" y="1.20" width="4.80" height="12.60" />
<rect x="60.00" y="1.20" width="1.20" height="25.20" />
<rect x="63.60" y="1.20" width="2.40" height="25.20" />
<rect x="68.40" y="1.20" width="1.20" height="12.60" />
<rect x="72.00" y="1.20" width="2.40" height="25.20" />
<rect x="78.00" y="1.20" width="1.20" height="12.60" />
<rect x="81.60" y="1.20" width="1.20" height="12.60" />
<rect x="86.40" y="1.20" width="1.20" height="12.60" />
<rect x="91.20" y="1.20" width="2.40" height="12.60" />
<rect x="94.80" y="1.20" width="1.20" height="25.20" />
<rect x="12.00" y="13.80" width="2.40" height="12.60" />
<rect x="16.80" y="13.80" width="2.40" height="12.60" />
<rect x="22.80" y="13.80" width="1.20" height="12.60" />
<rect x="27.60" y="13.80" width="1.20" height="12.60" />
<rect x="36.00" y="13.80" width="4.80" height="12.60" />
<rect x="42.00" y="13.80" width="1.20" height="12.60" />
<rect x="45.60" y="13.80" width="2.40" height="12.60" />
<rect x="50.40" y="13.80" width="1.20" height="12.60" />
<rect x="54.00" y="13.80" width="1.20" height="12.60" />
<rect x="67.20" y="13.80" width="1.20" height="12.60" />
<rect x="75.60" y="13.80" width="1.20" height="12.60" />
<rect x="79.20" y="13.80" width="1.20" height="12.60" />
<rect x="84.00" y="13.80" width="3.60" height="12.60" />
<rect x="90.00" y="13.80" width="2.40" height="12.60" />
<rect x="12.00" y="1.20" width="3.60" height="12.00" />
<rect x="18.00" y="1.20" width="1.20" height="12.00" />
<rect x="20.40" y="1.20" width="1.20" height="12.00" />
<rect x="22.80" y="1.20" width="2.40" height="12.00" />
<rect x="27.60" y="1.20" width="2.40" height="12.00" />
<rect x="31.20" y="1.20" width="3.60" height="12.00" />
<rect x="36.00" y="1.20" width="2.40" height="12.00" />
<rect x="39.60" y="1.20" width="1.20" height="12.00" />
<rect x="43.20" y="1.20" width="4.80" height="12.00" />
<rect x="49.20" y="1.20" width="2.40" height="12.00" />
<rect x="52.80" y="1.20" width="4.80" height="12.00" />
<rect x="60.00" y="1.20" width="1.20" height="12.00" />
<rect x="63.60" y="1.20" width="2.40" height="12.00" />
<rect x="68.40" y="1.20" width="1.20" height="12.00" />
<rect x="72.00" y="1.20" width="2.40" height="12.00" />
<rect x="78.00" y="1.20" width="1.20" height="12.00" />
<rect x="81.60" y="1.20" width="1.20" height="12.00" />
<rect x="86.40" y="1.20" width="1.20" height="12.00" />
<rect x="91.20" y="1.20" width="2.40" height="12.00" />
<rect x="94.80" y="1.20" width="1.20" height="12.00" />
<rect x="12.00" y="14.40" width="2.40" height="12.00" />
<rect x="16.80" y="14.40" width="2.40" height="12.00" />
<rect x="20.40" y="14.40" width="1.20" height="12.00" />
<rect x="22.80" y="14.40" width="1.20" height="12.00" />
<rect x="27.60" y="14.40" width="1.20" height="12.00" />
<rect x="31.20" y="14.40" width="3.60" height="12.00" />
<rect x="36.00" y="14.40" width="4.80" height="12.00" />
<rect x="42.00" y="14.40" width="1.20" height="12.00" />
<rect x="45.60" y="14.40" width="2.40" height="12.00" />
<rect x="50.40" y="14.40" width="1.20" height="12.00" />
<rect x="54.00" y="14.40" width="1.20" height="12.00" />
<rect x="60.00" y="14.40" width="1.20" height="12.00" />
<rect x="63.60" y="14.40" width="2.40" height="12.00" />
<rect x="67.20" y="14.40" width="1.20" height="12.00" />
<rect x="72.00" y="14.40" width="2.40" height="12.00" />
<rect x="75.60" y="14.40" width="1.20" height="12.00" />
<rect x="79.20" y="14.40" width="1.20" height="12.00" />
<rect x="84.00" y="14.40" width="3.60" height="12.00" />
<rect x="90.00" y="14.40" width="2.40" height="12.00" />
<rect x="94.80" y="14.40" width="1.20" height="12.00" />
<rect x="12.00" y="13.20" width="84.00" height="1.20" />
<rect x="0.00" y="0.00" width="97.20" height="1.20" />
<rect x="0.00" y="26.40" width="97.20" height="1.20" />

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -8,81 +8,96 @@
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="98" height="68" fill="#FFFFFF" />
<rect x="12.00" y="1.20" width="1.20" height="64.80" />
<rect x="14.40" y="1.20" width="6.00" height="12.96" />
<rect x="21.60" y="1.20" width="2.40" height="12.96" />
<rect x="26.40" y="1.20" width="1.20" height="12.96" />
<rect x="28.80" y="1.20" width="3.60" height="12.96" />
<rect x="33.60" y="1.20" width="1.20" height="25.92" />
<rect x="36.00" y="1.20" width="3.60" height="12.96" />
<rect x="42.00" y="1.20" width="2.40" height="12.96" />
<rect x="49.20" y="1.20" width="2.40" height="12.96" />
<rect x="52.80" y="1.20" width="4.80" height="12.96" />
<rect x="58.80" y="1.20" width="1.20" height="12.96" />
<rect x="61.20" y="1.20" width="2.40" height="12.96" />
<rect x="64.80" y="1.20" width="6.00" height="12.96" />
<rect x="72.00" y="1.20" width="1.20" height="25.92" />
<rect x="74.40" y="1.20" width="4.80" height="12.96" />
<rect x="80.40" y="1.20" width="1.20" height="12.96" />
<rect x="85.20" y="1.20" width="1.20" height="12.96" />
<rect x="91.20" y="1.20" width="4.80" height="64.80" />
<rect x="14.40" y="14.16" width="1.20" height="12.96" />
<rect x="16.80" y="14.16" width="1.20" height="12.96" />
<rect x="22.80" y="14.16" width="1.20" height="12.96" />
<rect x="28.80" y="14.16" width="1.20" height="12.96" />
<rect x="37.20" y="14.16" width="4.80" height="12.96" />
<rect x="45.60" y="14.16" width="1.20" height="12.96" />
<rect x="48.00" y="14.16" width="3.60" height="12.96" />
<rect x="52.80" y="14.16" width="1.20" height="12.96" />
<rect x="56.40" y="14.16" width="2.40" height="12.96" />
<rect x="62.40" y="14.16" width="4.80" height="12.96" />
<rect x="68.40" y="14.16" width="1.20" height="12.96" />
<rect x="76.80" y="14.16" width="1.20" height="25.92" />
<rect x="79.20" y="14.16" width="3.60" height="12.96" />
<rect x="86.40" y="14.16" width="2.40" height="12.96" />
<rect x="14.40" y="27.12" width="2.40" height="12.96" />
<rect x="19.20" y="27.12" width="2.40" height="12.96" />
<rect x="27.60" y="27.12" width="1.20" height="25.92" />
<rect x="30.00" y="27.12" width="2.40" height="12.96" />
<rect x="33.60" y="27.12" width="2.40" height="12.96" />
<rect x="37.20" y="27.12" width="3.60" height="12.96" />
<rect x="42.00" y="27.12" width="3.60" height="12.96" />
<rect x="50.40" y="27.12" width="1.20" height="12.96" />
<rect x="52.80" y="27.12" width="2.40" height="12.96" />
<rect x="57.60" y="27.12" width="1.20" height="12.96" />
<rect x="60.00" y="27.12" width="2.40" height="12.96" />
<rect x="67.20" y="27.12" width="3.60" height="12.96" />
<rect x="72.00" y="27.12" width="3.60" height="12.96" />
<rect x="79.20" y="27.12" width="4.80" height="12.96" />
<rect x="87.60" y="27.12" width="2.40" height="12.96" />
<rect x="14.40" y="40.08" width="1.20" height="12.96" />
<rect x="18.00" y="40.08" width="2.40" height="12.96" />
<rect x="22.80" y="40.08" width="2.40" height="12.96" />
<rect x="33.60" y="40.08" width="4.80" height="12.96" />
<rect x="39.60" y="40.08" width="1.20" height="12.96" />
<rect x="43.20" y="40.08" width="1.20" height="12.96" />
<rect x="48.00" y="40.08" width="2.40" height="12.96" />
<rect x="52.80" y="40.08" width="1.20" height="12.96" />
<rect x="55.20" y="40.08" width="1.20" height="12.96" />
<rect x="57.60" y="40.08" width="3.60" height="12.96" />
<rect x="62.40" y="40.08" width="7.20" height="12.96" />
<rect x="72.00" y="40.08" width="2.40" height="25.92" />
<rect x="75.60" y="40.08" width="1.20" height="25.92" />
<rect x="80.40" y="40.08" width="1.20" height="12.96" />
<rect x="84.00" y="40.08" width="6.00" height="25.92" />
<rect x="14.40" y="53.04" width="2.40" height="12.96" />
<rect x="19.20" y="53.04" width="4.80" height="12.96" />
<rect x="26.40" y="53.04" width="1.20" height="12.96" />
<rect x="28.80" y="53.04" width="3.60" height="12.96" />
<rect x="33.60" y="53.04" width="1.20" height="12.96" />
<rect x="42.00" y="53.04" width="1.20" height="12.96" />
<rect x="44.40" y="53.04" width="1.20" height="12.96" />
<rect x="48.00" y="53.04" width="3.60" height="12.96" />
<rect x="52.80" y="53.04" width="6.00" height="12.96" />
<rect x="60.00" y="53.04" width="3.60" height="12.96" />
<rect x="64.80" y="53.04" width="1.20" height="12.96" />
<rect x="69.60" y="53.04" width="1.20" height="12.96" />
<rect x="80.40" y="53.04" width="2.40" height="12.96" />
<rect x="12.00" y="1.20" width="1.20" height="12.36" />
<rect x="14.40" y="1.20" width="6.00" height="12.36" />
<rect x="21.60" y="1.20" width="2.40" height="12.36" />
<rect x="26.40" y="1.20" width="1.20" height="12.36" />
<rect x="28.80" y="1.20" width="3.60" height="12.36" />
<rect x="33.60" y="1.20" width="1.20" height="12.36" />
<rect x="36.00" y="1.20" width="3.60" height="12.36" />
<rect x="42.00" y="1.20" width="2.40" height="12.36" />
<rect x="49.20" y="1.20" width="2.40" height="12.36" />
<rect x="52.80" y="1.20" width="4.80" height="12.36" />
<rect x="58.80" y="1.20" width="1.20" height="12.36" />
<rect x="61.20" y="1.20" width="2.40" height="12.36" />
<rect x="64.80" y="1.20" width="6.00" height="12.36" />
<rect x="72.00" y="1.20" width="1.20" height="12.36" />
<rect x="74.40" y="1.20" width="4.80" height="12.36" />
<rect x="80.40" y="1.20" width="1.20" height="12.36" />
<rect x="85.20" y="1.20" width="1.20" height="12.36" />
<rect x="91.20" y="1.20" width="4.80" height="12.36" />
<rect x="12.00" y="14.76" width="1.20" height="11.76" />
<rect x="14.40" y="14.76" width="1.20" height="11.76" />
<rect x="16.80" y="14.76" width="1.20" height="11.76" />
<rect x="22.80" y="14.76" width="1.20" height="11.76" />
<rect x="28.80" y="14.76" width="1.20" height="11.76" />
<rect x="33.60" y="14.76" width="1.20" height="11.76" />
<rect x="37.20" y="14.76" width="4.80" height="11.76" />
<rect x="45.60" y="14.76" width="1.20" height="11.76" />
<rect x="48.00" y="14.76" width="3.60" height="11.76" />
<rect x="52.80" y="14.76" width="1.20" height="11.76" />
<rect x="56.40" y="14.76" width="2.40" height="11.76" />
<rect x="62.40" y="14.76" width="4.80" height="11.76" />
<rect x="68.40" y="14.76" width="1.20" height="11.76" />
<rect x="72.00" y="14.76" width="1.20" height="11.76" />
<rect x="76.80" y="14.76" width="1.20" height="11.76" />
<rect x="79.20" y="14.76" width="3.60" height="11.76" />
<rect x="86.40" y="14.76" width="2.40" height="11.76" />
<rect x="91.20" y="14.76" width="4.80" height="11.76" />
<rect x="12.00" y="27.72" width="1.20" height="11.76" />
<rect x="14.40" y="27.72" width="2.40" height="11.76" />
<rect x="19.20" y="27.72" width="2.40" height="11.76" />
<rect x="27.60" y="27.72" width="1.20" height="11.76" />
<rect x="30.00" y="27.72" width="2.40" height="11.76" />
<rect x="33.60" y="27.72" width="2.40" height="11.76" />
<rect x="37.20" y="27.72" width="3.60" height="11.76" />
<rect x="42.00" y="27.72" width="3.60" height="11.76" />
<rect x="50.40" y="27.72" width="1.20" height="11.76" />
<rect x="52.80" y="27.72" width="2.40" height="11.76" />
<rect x="57.60" y="27.72" width="1.20" height="11.76" />
<rect x="60.00" y="27.72" width="2.40" height="11.76" />
<rect x="67.20" y="27.72" width="3.60" height="11.76" />
<rect x="72.00" y="27.72" width="3.60" height="11.76" />
<rect x="76.80" y="27.72" width="1.20" height="11.76" />
<rect x="79.20" y="27.72" width="4.80" height="11.76" />
<rect x="87.60" y="27.72" width="2.40" height="11.76" />
<rect x="91.20" y="27.72" width="4.80" height="11.76" />
<rect x="12.00" y="40.68" width="1.20" height="11.76" />
<rect x="14.40" y="40.68" width="1.20" height="11.76" />
<rect x="18.00" y="40.68" width="2.40" height="11.76" />
<rect x="22.80" y="40.68" width="2.40" height="11.76" />
<rect x="27.60" y="40.68" width="1.20" height="11.76" />
<rect x="33.60" y="40.68" width="4.80" height="11.76" />
<rect x="39.60" y="40.68" width="1.20" height="11.76" />
<rect x="43.20" y="40.68" width="1.20" height="11.76" />
<rect x="48.00" y="40.68" width="2.40" height="11.76" />
<rect x="52.80" y="40.68" width="1.20" height="11.76" />
<rect x="55.20" y="40.68" width="1.20" height="11.76" />
<rect x="57.60" y="40.68" width="3.60" height="11.76" />
<rect x="62.40" y="40.68" width="7.20" height="11.76" />
<rect x="72.00" y="40.68" width="2.40" height="11.76" />
<rect x="75.60" y="40.68" width="1.20" height="11.76" />
<rect x="80.40" y="40.68" width="1.20" height="11.76" />
<rect x="84.00" y="40.68" width="6.00" height="11.76" />
<rect x="91.20" y="40.68" width="4.80" height="11.76" />
<rect x="12.00" y="53.64" width="1.20" height="12.36" />
<rect x="14.40" y="53.64" width="2.40" height="12.36" />
<rect x="19.20" y="53.64" width="4.80" height="12.36" />
<rect x="26.40" y="53.64" width="1.20" height="12.36" />
<rect x="28.80" y="53.64" width="3.60" height="12.36" />
<rect x="33.60" y="53.64" width="1.20" height="12.36" />
<rect x="42.00" y="53.64" width="1.20" height="12.36" />
<rect x="44.40" y="53.64" width="1.20" height="12.36" />
<rect x="48.00" y="53.64" width="3.60" height="12.36" />
<rect x="52.80" y="53.64" width="6.00" height="12.36" />
<rect x="60.00" y="53.64" width="3.60" height="12.36" />
<rect x="64.80" y="53.64" width="1.20" height="12.36" />
<rect x="69.60" y="53.64" width="1.20" height="12.36" />
<rect x="72.00" y="53.64" width="2.40" height="12.36" />
<rect x="75.60" y="53.64" width="1.20" height="12.36" />
<rect x="80.40" y="53.64" width="2.40" height="12.36" />
<rect x="84.00" y="53.64" width="6.00" height="12.36" />
<rect x="91.20" y="53.64" width="4.80" height="12.36" />
<rect x="12.00" y="13.56" width="84.00" height="1.20" />
<rect x="12.00" y="26.52" width="84.00" height="1.20" />
<rect x="12.00" y="39.48" width="84.00" height="1.20" />

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -602,6 +602,8 @@ Value
53 `BARCODE_PHARMA_TWO` Pharmacode Two-Track
54 `BARCODE_CEPNET` Brazilian CEPNet
55 `BARCODE_PDF417` PDF417
56`*` `BARCODE_PDF417COMP` Compact PDF417 (Truncated PDF417)
@ -3147,6 +3149,15 @@ lengths used by USPS were `Planet12` (11-digit input) and `Planet14` (13-digit
input), and as with POSTNET a warning will be issued if the length is not one of
these.
### 6.4.4 Brazilian CEPNet
![`zint -b CEPNET --compliantheight -d "12345678"`](images/cepnet.svg)
Based on POSTNET, the CEPNet symbol is used by Correios, the 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 automattically
added by Zint.
\clearpage
## 6.5 4-State Postal Codes

View File

@ -75,6 +75,7 @@ zint -b GS1_128_CC --compliantheight -d "[99]1234-abcd" --mode=3 --primary="[01]
zint -b PHARMA_TWO --compliantheight -d "29876543" --scale=1 -o images/pharma_two.svg
zint -b POSTNET --compliantheight -d "12345678901" --scale=1 -o images/postnet.svg
zint -b PLANET --compliantheight -d "4012345235636" --scale=1 -o images/planet.svg
zint -b CEPNET --compliantheight -d "12345678" --scale=1 -o images/cepnet.svg
zint -b AUSPOST --compliantheight -d "96184209" --scale=1 -o images/auspost.svg
zint -b AUSROUTE --compliantheight -d "34567890" --scale=1 -o images/ausroute.svg
zint -b AUSREPLY --compliantheight -d "12345678" --scale=1 -o images/ausreply.svg

View File

@ -81,20 +81,21 @@ static void types(void) {
"51 PHARMA Pharmacode One-Track 130 EANX_CC Composite EAN\n"
"52 PZN Pharmazentralnummer 131 GS1_128_CC Composite GS1-128\n"
"53 PHARMA_TWO Pharmacode Two-Track 132 DBAR_OMN_CC Comp DataBar Omni\n"
"55 PDF417 PDF417 133 DBAR_LTD_CC Comp DataBar Limited\n"
"56 PDF417COMP Compact PDF417 134 DBAR_EXP_CC Comp DataBar Expanded\n"
"57 MAXICODE MaxiCode 135 UPCA_CC Composite UPC-A\n"
"58 QRCODE QR Code 136 UPCE_CC Composite UPC-E\n"
"60 CODE128B Code 128 (Subset B) 137 DBAR_STK_CC Comp DataBar Stacked\n"
"63 AUSPOST AP Standard Customer 138 DBAR_OMNSTK_CC Comp DataBar Stack Omn\n"
"66 AUSREPLY AP Reply Paid 139 DBAR_EXPSTK_CC Comp DataBar Exp Stack\n"
"67 AUSROUTE AP Routing 140 CHANNEL Channel Code\n"
"68 AUSREDIRECT AP Redirection 141 CODEONE Code One\n"
"69 ISBNX ISBN 142 GRIDMATRIX Grid Matrix\n"
"70 RM4SCC Royal Mail 4SCC 143 UPNQR UPN QR Code\n"
"71 DATAMATRIX Data Matrix 144 ULTRA Ultracode\n"
"72 EAN14 EAN-14 145 RMQR Rectangular Micro QR\n"
"73 VIN Vehicle Information No. 146 BC412 BC412\n"
"54 CEPNET Brazilian CEPNet 133 DBAR_LTD_CC Comp DataBar Limited\n"
"55 PDF417 PDF417 134 DBAR_EXP_CC Comp DataBar Expanded\n"
"56 PDF417COMP Compact PDF417 135 UPCA_CC Composite UPC-A\n"
"57 MAXICODE MaxiCode 136 UPCE_CC Composite UPC-E\n"
"58 QRCODE QR Code 137 DBAR_STK_CC Comp DataBar Stacked\n"
"60 CODE128B Code 128 (Subset B) 138 DBAR_OMNSTK_CC Comp DataBar Stack Omn\n"
"63 AUSPOST AP Standard Customer 139 DBAR_EXPSTK_CC Comp DataBar Exp Stack\n"
"66 AUSREPLY AP Reply Paid 140 CHANNEL Channel Code\n"
"67 AUSROUTE AP Routing 141 CODEONE Code One\n"
"68 AUSREDIRECT AP Redirection 142 GRIDMATRIX Grid Matrix\n"
"69 ISBNX ISBN 143 UPNQR UPN QR Code\n"
"70 RM4SCC Royal Mail 4SCC 144 ULTRA Ultracode\n"
"71 DATAMATRIX Data Matrix 145 RMQR Rectangular Micro QR\n"
"72 EAN14 EAN-14 146 BC412 BC412\n"
"73 VIN Vehicle Information No.\n"
);
}
@ -303,6 +304,7 @@ static int get_barcode_name(const char *barcode_name) {
{ BARCODE_C25LOGIC, "c25logic" },
{ BARCODE_C25STANDARD, "c25matrix" },
{ BARCODE_C25STANDARD, "c25standard" },
{ BARCODE_CEPNET, "cepnet" },
{ BARCODE_CHANNEL, "channel" },
{ BARCODE_CHANNEL, "channelcode" }, /* Synonym */
{ BARCODE_CODABAR, "codabar" },

View File

@ -73,6 +73,7 @@ static const struct bstyle_item bstyle_items[] = {
{ QSL("Aztec Code (ISO 24778) (and HIBC)"), BARCODE_AZTEC },
{ QSL("Aztec Runes (ISO 24778)"), BARCODE_AZRUNE },
{ QSL("BC412 (SEMI T1-95)"), BARCODE_BC412 },
{ QSL("Brazilian Postal Code (CEPNet)"), BARCODE_CEPNET },
{ QSL("Channel Code"), BARCODE_CHANNEL },
{ QSL("Codabar (EN 798)"), BARCODE_CODABAR },
{ QSL("Codablock-F (and HIBC)"), BARCODE_CODABLOCKF },
@ -259,7 +260,7 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
filter_bstyle->hide();
#endif
bstyle->setCurrentIndex(settings.value(QSL("studio/symbology"), 11).toInt());
bstyle->setCurrentIndex(settings.value(QSL("studio/symbology"), 12).toInt());
load_settings(settings);