Usage

Use bcod.es URLs like you would use images.

<img src="http://show.bcod.es/CODE128/value" />

Pass the format as first parameter in the URL. The second parameter is the value to be encoded.

<img src="http://show.bcod.es/QR/www.example.com.jpeg" />

You can also choose the image format. Valid options are png (default), jpg, jpeg and gif.

$ curl bcod.es/CODE128/123456?lineColor=purple > Code128.png

Create and save images locally with curl.

Examples

CODE39 (basic)

<img src="http://show.bcod.es/CODE39/123-456-789" />

EAN13 (file type)

<img src="http://show.bcod.es/EAN13/4012345123456.gif" />

EAN8 (custom text)

<img src="http://show.bcod.es/EAN8/12345670?text=Scan%20me" />

ITF (line color)

<img src="http://show.bcod.es/ITF/12345670?lineColor=red" />

MSI (no background)

<img src="http://show.bcod.es/MSI/12345670?background=transparent&lineColor=white" />

Pharmacode (height)

<img src="http://show.bcod.es/pharmacode/1234?height=10" />

UPC (javascript)

let img = document.getElementById('target-image'); img.src = 'http://show.bcod.es/upc/' + '123456789999' + '?lineColor=white' + '&height=120' + '&width=4' + '&background=black' + '&text=bcod.es';

QR

<img src="http://show.bcod.es/QR/www.example.com/example%2Ftest%2F" />

Note: the QR code format only accepts height and width options. Width does represent the final image width in this case.

BLANK

<img src="http://show.bcod.es/BLANK/123-456-789?height=100" />

Errors (styles are still applied)

<img src="http://show.bcod.es/UPC/123-456-789" />

Value is not valid for encoding. Returns "Error" image.

<img src="http://show.bcod.es/WRONG/123-456-789?background=black&lineColor=white&height=300" />

Unkown format provided. Returns "Unknown format" image.