No Description

Matt Clark ce446c7569 Throw invalids for failed requests to prevent redirect. 1 year ago
resources 3fcd65a628 Implementing a blacklist per customer request. 1 year ago
src ce446c7569 Throw invalids for failed requests to prevent redirect. 1 year ago
.classpath a797f6e4e4 Added web resources to project. 2 years ago
.gitignore 3d311f80da Basic render of Code128. 2 years ago
.project c401492724 Initial commit of barcode service server. 2 years ago 6a9da4daef Added Readme, URL encoding in requests. 2 years ago 2a41f14eaa Working HTML menu for selecting code type. 1 year ago
pom.xml d51d8aaf47 Fixing session when loaded from index, adding parameter to not serve web, adding comments. 1 year ago

The web server was designed to provide an easy to use barcode generation API via the HTTP protocol for use in external / mobile applications where generation libraries might not exist; the WebUI is also designed to be responsive such that users may generate barcodes to be scanned directly in their web browser, or download the barcodes after testing them out.


Master Repo
GitHub Mirror


Web Server

The server comes with a set of static HTML and Javascript files that allow users to navigate to a simple UI and generate barcodes in their web browser with ease.

API Server

The server will generate a barcode for any content passed to the /api endpoint; this can be done using a web browser, fetched through a user script, or even simply with cURL.

curl > gen.png

Automatic Code Type Detection

When simply calling the api endpoint without specifying an eplitit code type, the server will make its best judgement as to which code type will be best suited for the supplied data.

Defined Code Type

Also available at the api endpoint, a user may optionally define their required code type:

# UPC-E (e, upc-e, upce)

# UCP-A (a, upc-a, upca, upc)

# EAN-8 (8, ean-8, ean8)

# EAN-13 (13, ean-13, ean13)

# Code 39 (39, code39)

# Code 128 (128, code128)

# QR Code (qr, qrcode)

# Data Matrix (matrix, datamatrix, dm)

# Codabar (codabar)

Server Statistics

The server will keep counters for most basic actions, such as total number of hits, generation requests, and render times for each type of code.

Server statistic are available at the /stats endpoint.


The server implements a basic cache for rendered images. Provided the image has not expired and evicted from cache, a render request will first attempt a cache lookup before being rendered. Only requests matching certain criteria will be cached.

All cache details are available at the /cache endpoint.


A simple session cache will track a users render requests. This can be used to provide a UI that will show a user a list of their most used codes.

A user's session details are available at the /session endpoint.

Third-Party is only made possible with the use of third-party software.

Jetty, Apache 2.0

The BarcodeAPI server was built around the Jetty web server framework.

Barcode4J, Apache 2.0

Barcode4J is an open source barcode generator; it is used for the generation of the following code types:

ZXing, Apache 2.0

ZXing is a barcode processing library that makes QR code generation possible.


Copyright 2017

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.