Web API Barcode Reader (WaBR)

Overview

Web API Barcode Reader (WaBR) extends Inlite’s ClearImage barcode recognition technology to cloud-based imaging applications.

WaBR Server implements server-side RESTful API for barcode reading.
It is pre-configured Web site, licensed by Inlite, for deployment on a customer-owned Windows Server with IIS

Step-by-Step

1- Install WaBR Server and Evaluation license

2 – Test your images on the WaBR Server

  • Go to WaBR Server test page http://localhost/wabr
  • Use the file or url as image source to read barcodes from your images. Start with sample image listed below.
  • If WaBR fails to read your barcode try, try uploading your image to Inlite’s Online Barcode Reader.  If that reader succeeds, then set the tbr field to value 103, and read again. .
    If the barcode is still unreadable or you want read barcodes faster or you have any other questions send the image file or image URL to support@inliteresearch.com and we will advise further.

3 – Develop client-side code or use Command Line EXE

  • Use JavaScript sample or one of client SDK ( .NETJavaNode JSPHPPython and Ruby) to develop your client side code. Each SDK comes with source code that can be adopted to your requirements.
  • Send requests to your WaBR Server endpoint

Alternatively use BarcodeReaderCL.exe. This is a Windows command line application client to any WaBR Server. Download BarcodeReaderCL.zip from here.

4 – Start Production use

  • Purchase a WaBR Server License   and the appropriate SDK Server License (1D, 2D, 1D+2D, or DL/ID)
  • Install ClearImage PDK and register the purchased product certificates (both will be supplied in an e-mail after the purchase)
  • Restart IIS Server

WaBR API

Endpoints

The following endpoints read barcodes from various sources. All optional reader parameters can be used with each endpoint.

 
/barcodes POST request using any combination of urlfile and image parameters as an image source
/barcodes/url GET request using url parameter as an image source
/barcodes/file POST request using file parameter as an image source
/barcodes/base64 POST request using image parameter as an image source

Image source parameters

At least one image source should be specified. Most popular image formats are acceptable as image source, including PDFTIFJPEG etc. Multi-page PDF and TIF files are supported

url – URL of an image file. The name should start with http:// , https:// or file://. Examples:

url value supplied as query parameter if GET request should be url-encoded. (e.g. use encodeURIComponent() in JavaScript)

file – Local file supplied in POST request .   JavaScript examples:

image – Base64-encoded string representing content of an image file.   Example:

Format :

Only content, representing file content encoded as base64, is required. The values in [ ] are optional. The values in italic are variables.
MIME-type identifies file format. e.g. application/pdf or image/tiff. The value is only for compatibility with data URI scheme. The barcode reader will automatically identify file format based on data in content

Optional reader parameters

String parameters are not case-sensitive and might contain the list of comma-separated values. If parameter not specified, default value is used.

 

types – Barcode types to read. Default value is  1d2d. Valid values are:

 
1d same as code39code128code93ucc128codabarinterleaved2of5upcaupceean8ean13
code39 Code 39 Full ASCII
code128 Code 128
code93 Code 93
codabar Codabar
ucc128 GS1-128
interleaved2of5 Interleaved 2 of 5
ean13 EAN-13
ean8 EAN-8
upca UPC-A
upce UPC-E
2d same as pdf417datamatrixqr
pdf417 PDF417 code
datamatrix DataMatrix code
qr QR code
drvlic Driver License, ID Cards and military CAC ID
postal same as imbbpoaustsingpostnet
imb US Post Intelligent Mail Barcode
bpo UK Royal Mail barcode (RM4SCC)
aust Australia Post barcode
sing Singapore Post barcode 
postnet Postnet, Planet
code39basic Code 39 Basic
patch Patch code

 

format –  Identifies output format. Default value is json. Valid values:

 
xml XML-formatted result
json JSON-formatted result (default)

 

fields –  Identifies elements of barcode information present in output. Default: value is all fields except meta. Valid values:

 
text Barcode value as text (UTF-8 formatted)
data Un-formatted barcode value as Base64 string. This value should be used to obtain binary content of barcode.
values List of values obtain after parsing barcode content. For example Driver License fields
length Length of un-formatted barcode value
type Barcode type (also called symbology)
rectangle Position of barcode on a page (in pixels)
rotation Barcode orientation
file Name of the file
page Page number in a file
meta Technical information about barcode

 

options –  Additional options: Default: no options

 
horz read only horizontal barcodes.
vert read only vertical barcodes.
info return additional information about WaBR server

 

tbr –  Target Barcode Reader code(s). Default: no TBR code

TBR should be used only if WaBR fails to read your barcode. Try tbr value 103 (used by Inlite’s Online Barcode Reader).  If your barcode is still unreadable, you want read barcodes faster or you have any other questions send the image file or image URL to support@inliteresearch.com and we will advise further.

JavaScript WaBR example

The following examples demonstrate the basic techniques to read barcodes from an image file or URL page. Try it here

Sample Images

In order to simplify your rapid WaBR evaluation, development, deployment and testing Inlite provides a set of sample Images (see list below) with multiple symbologies and content. The images can be used from either your client-side code or from the Inlite Test Web Page.
The same images are included in your Web Server installation Kit to facilitate testing in your secure environment.

  • To test a URL, include the link in your GET or POST request
  • To test a file or base64 upload, first download the images to your client, then use them in the POST request.

https://www.dropbox.com/s/qcd8zfdvckwwdem/img39.pdf?dl=1
https://wabr.inliteresearch.com/SampleImages/1d.pdf
https://wabr.inliteresearch.com/SampleImages/2d.pdf
https://wabr.inliteresearch.com/SampleImages/postal.pdf
https://wabr.inliteresearch.com/SampleImages/drvlic.ca.jpg
https://wabr.inliteresearch.com/SampleImages/c39.multipage.tif
https://wabr.inliteresearch.com/SampleImages/I25.tbr132.jpg
https://wabr.inliteresearch.com/SampleImages/pdf417.adobe.pdf
https://wabr.inliteresearch.com/SampleImages/pdf417.utf8.pdf
https://wabr.inliteresearch.com/SampleImages/pdf417.ЙшзщЪфг_Russian.pdf
https://wabr.inliteresearch.com/SampleImages/pdf417.بساطة لأنه الأل_Arabic.pdf

Output Examples

Reading 1D barcode with with types set to code39,code128:

Reading Pdf417 with UTF-8 encoded data with with types set to pdf417:

Reading driver license barcode with fields set to values:

Reading driver license barcode with fields set to values and format set to xml:

WaBR Server System Requirements

  • OS:  Windows 7 or later, Windows Server 2008 or later.
    Preferred: Windows Server 2012 r2 or later
  • Architecture: x86 or x64
    Preferred: x64
  • CPU:  1GHz or faster
    Preferred: 3GHz or faster,  4 CORE
  • RAM Memory:  4GB or more
    Preferred: 8GB or more
  • IIS: v7.5 or later