Introduction Description
Download Registration
History Installation
Example 1 Example 2
FAQ E-Mail

Description

WEBCODE

All details and parameters about the shape of the barcode to be generated are obtained from the configuration files. These are text files, present in the same CGI WEBCODE directory. Such files have the following format:

;comment lines (starting with a semi-colon);
[barcode]
var1=val1
var2=val2
.
.

[ hosts]
1=host1.name.com
2=host2.mane.com.uk
3=IP#1
4=IP#2
5=wild card format for IPs*.*
.
.

You can have up to 999 different configuration files. Their file name should follow the WEBCnnn.INI format, nnn varying from 001 to 999. When CGI WEBCODE is called, the number of the configuration file to be used is entered as a parameter: G=nnn. If this parameter is not entered, 001 is assumed.

The configuration files have quite a simple structure: Two different sections called [barcode] and [hosts].

The [barcode] section is used to inform parameters and variables, which define all the details of the barcodes to be generated. The [hosts] section informs the names and/or IPs of the hosts authorized to call CGI WEBCODE.

The possible parameters and variables in the configuration files include:

Parameter Description
Z=xxxxxxxx Informs the measurement unit to be used, "Centimeters" or "Inches" in mils (1/1000). If omitted, "Inches" is assumed. In the following parameters description, the "Inches" value is expected (always in mils). In addition the unit “Pixels” can also be used specifying the resolution parameter R=2540 (in this case the Z parameter is ignored.
F=xxxxxxxx If entered, it generates the xxxxxx.GIF file containing the generated barcode image in the same directory containing CGI WEBCODE
R=nnn Resolution of the code to be generated, in DPI. The following values can be used: 75, 150, 300, 360, 600 or 720. If omitted, 75 is assumed. The special value 2540 for resolution parameter is used to indicate that “Pixels” will be used as measurement unit.
T=xxxxxxxx The barcode pattern to be generated. The current version supports the following values for this variable: int2of5 (for the interleaved 2 of 5, codabar, code39, code128, ean-8, ean-13, upc-a and upc-e. If omitted, int2of5 is assumed.
L=xxxxxxx Name of the source file to be used in generating the codes captions. The allowed files (only TTF-type) must be in the same directory containing CGI WEBCODE. If omitted, ARIAL.TTF is assumed.
B=nnnnn Narrow bars width (0.001"). If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
E=nnnnn Narrow spaces width (0.001"). If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
A=nnnnn Bar height (0.001"). If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
M=nnnnn UPC/EAN lengthening height (0.001"). If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
D=nnnnn Caption character height (0.001"). If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
U=nnnnn Caption character width (0.001"). If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
P=nn Wide/narrow ratio x 10 of the code elements. You can use 20, 25 or 30, corresponding to the 2.0 : 1, 2,5 : 1 or 3,0 : 1 ratios. You can also use value 0 for patterns whose ratio is automatic. If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
K=0 or 1 If = 1, it generates the code explicit digit-check. If = 0, this digit-check is not generated. If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
H=0 or 1 If = 1, generates the code protection horizontal bars. If = 0, the bars are not generated. If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
N=0 or 1 If = 1, generates the code captions. If = 0, the captions are not generated. If omitted, a particular value for the barcode pattern to be generated is assumed (see table below)
S=xy Start/stop characters for Codabar (x=start, y=stop) or Code 128 start (x=start). For the Codabar pattern, you can use the start/stop characters: a, b, c, d, A, B, C, D. For the Code 128 pattern, you can use the following start characters: A, B or C. If omitted, S=ab for Codabar and S=B for Code 128 will be assumed.
I=xyz Shift characters A, B and C for Code 128. If omitted, characters ( [ { for shift A, B and C respectively will be assumed.
C=xxxxx Code to be generated. The data length and type allowed in the xxxxx sequence will depend on the barcode pattern to be generated (see table below)

All those parameters can also be entered during the CGI WEBCODE call; in such cases, the entered parameter will have priority over its correlate contained in the configuration file.

Thus, the priority order for obtaining each of the parameters will be the following:

1) Entered during the call. If the parameter is not entered, CGI WEBCODE will try to find it in the
2) Configuration file. If not found, CGI WEBCODE will use the
3) Default value

For any parameters entered during the CGI WEBCODE call, its syntax must be the same as described for the configuration file, using the "&" character as a separator. Examples:

<IMG SRC="http://www.yourdomain.com.br/cgi-bin/webcode.exe?C=982&P=30&H=1">
<IMG SRC="http://www.yourdomain.com.br/cgi-bin/webcode.exe?C=9378&G=003">

The following tables show all patterns supported by CGI WEBCODE, their minimum and maximum values, options and the default values for each parameter:

PARAMETERS

Possible values for the parameters

interleaved
2 of 5
Code 39 Code 128 CODABAR

B = Narrow bars width
minimum:
maximum:
default:


1 (0.01 mm)
500 (5 mm)
48 (0.48 mm)

1 (0.01 mm)
500 (5 mm)
48 (0.48 mm)

1 (0.01 mm)
500 (5 mm)
48 (0.48 mm)

1 (0.01 mm)
500 (5 mm)
48 (0.48 mm)

E = Narrow spaces width
minimum:
maximum:
default:


B
B + 20
B + 2

B
B + 20
B + 2

B
B + 20
B + 2

B
B + 20
B + 2
A = Bar height
minimum:
maximum:
default:

10 (0.1 mm)
15000(150mm)
1600 (16 mm)

10 (0.1 mm)
15000(150mm)
1600 (16 mm)

10 (0.1 mm)
15000(150mm)
1600 (16 mm)

10 (0.1 mm)
15000(150mm)
1600 (16 mm)
M= UPC/EAN lengthening height Overridden Overridden Overridden Overridden
D = Caption character height
minimum:
maximum:
default:

A / 12
A / 3
A / 5

A / 12
A / 3
A / 5

A / 12
A / 3
A / 5

A / 12
A / 3
A / 5
U = Caption character width
minimum:
maximum:
default:

D / 4
D * 4
2 / 3 * D

D / 4
D * 4
2 / 3 * D

D / 4
D * 4
2 / 3 * D

D / 4
D * 4
2 / 3 * D
P = Wide/narrow ratio
options:
default:

20, 25 ou 30
20

20, 25 ou 30
20

automatic
---

20, 25 ou 30
20
H = Horizontal bars
options:
default:

0 (no), 1 (yes)
0 (no)

0 (no), 1 (yes)
0 (no)

0 (no), 1 (yes)
0 (no)

0 (no), 1 (yes)
0 (no)
N = Caption generation
options:
default:

0 (no), 1 (yes)
1 (yes)

0 (no), 1 (yes)
1 (yes)

0 (no), 1 (yes)
1 (yes)

0 (no), 1 (yes)
1 (yes)
K = Explicit check-digit
options:
default:

0 (no), 1 (yes)
0 (no)

0 (no), 1 (yes)
0 (no)

automatic
---

0 (no), 1 (yes)
0 (no)
S = Start/stop characters
options:
default:

Overridden
---

Overridden
---

A, B ou C
B

a b c d A B C D
a b
I = Shift ABC characters
options:
default:

Overridden
---

Overridden
---

any
( [ {

Overridden
---
C = Code to be generated
minimum:
maximum:
type:

1 digit + ckd
63 digit + ckd
numeric 0-9

1 digit + ckd
63 digit + ckd
0-9 A-Z $/+-:.

1 character + ckd
63 characters + ckd
any

1 digit + ckd
63 digit + ckd
0-9 $:/.+-

 

PARAMETERS

Possible values for the parameters

UPC-E UPC-A EAN-8 EAN-13

B = Narrow bars width
minimum:
maximum:
default:


1 (0.01 mm)
500 (5 mm)
29 (0.29 mm)

1 (0.01 mm)
500 (5 mm)
39 (0.39 mm)

1 (0.01 mm)
500 (5 mm)
29 (0.29 mm)

1 (0.01 mm)
500 (5 mm)
39 (0.39 mm)

E = Narrow spaces width
minimum:
maximum:
default:


B
B + 20
B + 1

B
B + 20
B + 1

B
B + 20
B + 1

B
B + 20
B + 1
A = Bar height
minimum:
maximum:
default:

10 (0.1 mm)
15000(150mm)
800 (8 mm)

10 (0.1 mm)
15000(150mm)
2100 (21 mm)

10 (0.1 mm)
15000(150mm)
800 (8 mm)

10 (0.1 mm)
15000(150mm)
2100 (21 mm)
M= UPC/EAN lengthening height
minimum:
maximum:
default:

A / 16
A / 4
A / 14

A / 16
A / 4
A / 8

A / 16
A / 4
A / 14

A / 16
A / 4
A / 8
D = Caption character height
minimum:
maximum:
default:

A / 12
A / 3
A / 7

A / 12
A / 3
A / 4

A / 12
A / 3
A / 7

A / 12
A / 3
A / 4
U = Caption character width
minimum:
maximum:
default:

D / 4
D * 4
2 / 3 * D

D / 4
D * 4
2 / 3 * D

D / 4
D * 4
2 / 3 * D

D / 4
D * 4
2 / 3 * D
P = Wide/narrow ratio automatic automatic automatic automatic
H = Horizontal bars never generates never generates never generates never generates
N = Caption generation always generates always generates always generates always generates
K = Explicit check-digit automatic automatic automatic automatic
S = Start/stop characters Overridden Overridden Overridden Overridden
I = Shift ABC characters Overridden Overridden Overridden Overridden
C = Code to be generated
minimum:
maximum:
type:

5 digit + ckd
5 digit + ckd
numeric 0-9

11 digit + ckd
11 digit + ckd
numeric 0-9

7 digit + ckd
7 digit + ckd
numeric 0-9

12 digit + ckd
12 digit + ckd
numeric 0-9

Notes on the tables above:

1) The code to be generated must always be entered WITHOUT the digit-check. The CGI WEBCODE will generate it automatically, if necessary.
2) If any data entered is inconsistent, CGI WEBCODE will generate an error message that will be sent to the client browser to replace the requested barcode.

All information in this page and some additional details are in the WEBCODE.DOC module, part of the download (demo and test copy).