BCMaker/Documentation/Linear Barcode API
DEVELOPER DOCUMENTATION

Linear Barcode Generator Parameters

Generate popular 1D barcode types including Code 128, EAN, UPC and Code 39. Customize alignment, human-readable text, colors and sizing.

Linear Barcode / API
Linear Barcode barcode example
GET /cgi-bin/barcgidHTTP / HTTPS
API OVERVIEW

One request. One barcode image.

Specify the data and optional barcode settings through the BCMaker generator endpoint. The official CGI help confirms GET and POST are both accepted.

GEThttps://www.bcmaker.com/cgi-bin/barcgid
Parameters listed25
Reference valuesCGI help
Barcode typeLinear Barcode
01 / BASICS

Image & Data

Specify barcode content, symbology and image dimensions.

Image & Data parameters
ParameterDescriptionAccepted valuesDefault
dataText or digits encoded as a linear barcode.URL-encoded text appropriate for the selected barcode type1234567
btypeSelect barcode symbology by numeric identifier.Integer 0–21; see symbology table below7
wOutput barcode picture width.Pixel value, optional—
hOutput barcode picture height.Pixel value, optional—
xdimX-dimension (width of the smallest bar).Pixel units; used for zero-degree rotation when w is not set2
02 / ENCODING

Symbol & Check Digits

Select how symbology-specific characters and checks are handled.

Symbol & Check Digits parameters
ParameterDescriptionAccepted valuesDefault
c128Code 128 character set selection.0–3; 0 = Auto, 1 = A, 2 = B, 3 = C in demo0
cchkCalculate an optional check digit when supported.0 = No; 1 = Yes1
schkShow an existing check digit in the readable text.0 = Hide; 1 = Show1
ststShow start/stop characters for types that use them.0 = Hide; 1 = Show0
ntxtConvert nonprinting characters into readable text.0 = No; 1 = Yes1
03 / APPEARANCE

Appearance & Colors

Position the barcode and configure rendering, ratios and colors.

Appearance & Colors parameters
ParameterDescriptionAccepted valuesDefault
angleBarcode rotation.0, 90, 180, 270 degrees0
quietInclude clear quiet zones around the bars.0 = Hide; 1 = Show1
balignHorizontal barcode alignment.0–22
talignAlignment of the human-readable text.0–50
bcolorBackground RGB color.000000–ffffff, no #ffffff
fcolorBar / foreground RGB color.000000–ffffff, no #000000
tcolorHuman-readable text RGB color.000000–ffffff, no #000000
guardDraw special guard bars for EAN/UPC types.0 = Hide; 1 = Show1
textShow human-readable barcode text.0 = Hide; 1 = Show1
tdownPlace readable text above or below bars.0 = Above; 1 = Below1
fhHeight of readable-text font.Numeric font height14
bredReduce or expand effective bar width.-99 through 990
w2nWide-to-narrow bar-width ratio.2 through 42.5
04 / UTILITIES

Help & Debug

Access diagnostic messages and parameter documentation.

Help & Debug parameters
ParameterDescriptionAccepted valuesDefault
helpDisplay help for the linear barcode CGI script.help=1—
debugDisplay information about processing errors.Example: debug=1—
BARCODE TYPE LOOKUP

Linear Barcode Type IDs

Send the numeric ID using the btype request parameter. These labels follow the BCMaker generator menu.

Barcode Type IDs parameters
ParameterDescriptionAccepted valuesDefault
0Interleaved 2 of 5Barcode type ID—
1Industrial 2 of 5Barcode type ID—
2Code 39Barcode type ID—
3Code 39 ExtendedBarcode type ID—
4Code 11Barcode type ID—
5CodabarBarcode type ID—
6MSIBarcode type ID—
7Code 128Barcode type ID—
8EAN Add-on 2Barcode type ID—
9EAN Add-on 5Barcode type ID—
10EAN-8Barcode type ID—
11EAN-13Barcode type ID—
12EAN-14Barcode type ID—
13UPC-ABarcode type ID—
14UPC-EBarcode type ID—
15UCC/EAN-128Barcode type ID—
16SSCC-18Barcode type ID—
17PostNetBarcode type ID—
18PlanetBarcode type ID—
19Code 93Barcode type ID—
20Code 93 ExtendedBarcode type ID—
21ITF-14Barcode type ID—
EXAMPLE REQUEST

Generate a Linear Barcode barcode

This example encodes 1234567 and includes the settings from the BCMaker demonstration request.

Linear Barcode • GET
https://www.bcmaker.com/cgi-bin/barcgid?data=1234567&btype=7&angle=0&quiet=1&balign=2&talign=0&bcolor=ffffff&fcolor=000000&tcolor=000000&guarg=1&text=1&tdown=1&stst=1&schk=1&cchk=1&ntxt=1&c128=0&fh=14&bred=0&w2n=2.5&xdim=2&w=&h=&submit=+Generate+Barcode+&debug=1
GOOD TO KNOW

Implementation Notes

01

guard versus guarg

The server help documents the field as guard. The demo GET URL used on this site sends guarg. Both spellings are shown as received, but compatibility of guarg with the server is not established by the help page.

02

Start/stop setting

The server help lists stst=0 as its default. The example generator form explicitly sends stst=1.

03

Symbology-specific settings

Parameters such as c128, guard and w2n matter only for certain barcode formats.

04

Image sizing

According to CGI help, xdim applies when w is not supplied for a zero-degree barcode.

Reference: Official CGI Help. CGI help defaults.

Ready to generate a barcode?

Open the BCMaker generator and choose Linear Barcode.

Go to Generator