Omneo Barcodes
Omneo Barcodes
The Omneo Barcodes service returns an HTML reponse with a barcode, that can be embedded in external platforms, such as emails or web forms.
How it works
- Decide on how you'd like your barcode to look using the options below
- Set the omneo barcode service as the
src
of an image. - Set the url parameters based on your options in step 1
- The document will fetch the barcode service, and render a barcode.
<img src="https://omneo-barcode-v5r64nnrcq-ts.a.run.app/barcode?data=13924318823&padding=0&color=black&bgColor=white&type=code128&hriFontSize=3&hriMarginTop=1&hriFontFamily=Geneva&token=XXXXXXXXX"/>
Authentication
Get your secret
The barcode service authenticates using a secret for your omneo instance.
This secret can be obtained from your omneo administrator.
Encode your parameters with your secret.
You must HMAC 256 encode your parameters with the provided secret.
This creates a token that is only valid for the set of parameters used to generate the HMAC
for example, using a secret of 1234
If you'd like to generate a barcode, with params
data=13924318823&padding=0&color=black&bgColor=white&type=code128&hriFontSize=3&hriMarginTop=1&hriFontFamily=Geneva
you'd get the following token
13628a9b6c8e9e0eb39cf63f5876477dc66fa688622010a6e10c9f2cba4f3f6e
This can then be used to invoke the barcode service with
https://omneo-barcode-v5r64nnrcq-ts.a.run.app/barcode?data=13924318823&padding=0&color=black&bgColor=white&type=code128&hriFontSize=3&hriMarginTop=1&hriFontFamily=Geneva&token=13628a9b6c8e9e0eb39cf63f5876477dc66fa688622010a6e10c9f2cba4f3f6e
It's important to note, any changes to the url params above will make the url invalid
as your token
acts as your password to generate a barcode in this way.
Url Parameters
token
: Your HMAC encoded data parameters (not including this token param) see Authenticationdata
: The data to encode within your barcodetype
: The barcode type must be one of the belowcodabar
: each character to encode must be one of 0123456789-$:/.+code11
: each character to encode must be one of 0123456789-code39
: each character to encode must be one of 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%code93
: each character to encode must be one of 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%code128
: each character to encode must be one of !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ean8
: data to encode must contain 7 numerical digits.ean13
: data to encode must contain 12 numerical digits.std25
(standard 2 of 5): data to encode must contain only numerical digits.int25
(interleaved 2 of 5): data to encode must contain only numerical digits.msi
: data to encode must contain only numerical digits.upc
: data to encode must contain 11 numerical digits.datamatrix
: data to encode has no restrictions.
crc
: Cyclic redundancy check. For code93, std25, int25 and msi barcode types. Default:true
rectangular
: For datamatrix only. Default:false
padding
: The space in pixels around one side of the barcode that will be applied for its 4 sides. Default:0
width
: The width in pixels to fix for the generated image. Default:150
height
: The height in pixels to fix for the generated image. Default:150
barWidth
: The bar width in pixels for 1D barcodes. Default:1
barHeight
: The bar height in pixels for 1D barcodes. Default:50
original1DSize
: If true keep the original 1D barcode size determined by barWidth and barHeight else apply the specified width and height sizes to the final image. Default:false
original2DSize
: For rectangular datamatrixes, if true keep the original 2D barcode size based on width else apply the specified width and height sizes to the final image. Default:false
addQuietZone
: Add a quiet zone at the end of 1D barcodes. Default:true
color
: The bars and hri color#000000
opacity
: The bars and hri opacity.bgColor
: The background color.bgOpacity
: The background opacity.hriShow
: Show human readable interpretation of the encoded data.hriFontFamily
: The HRI Font, must be one of:Sans-serif
Arial
Arial Black
Arial Narrow
Arial Rounded MT Bold
Avant Garde
Calibri
Candara
Century Gothic
Franklin Gothic Medium
Futura
Geneva
Gill Sans
Helvetica
Impact
Lucida Grande
Optima
Segoe UI
Tahoma
Trebuchet MS
Verdana
Serif
Bodoni MT
Book Antiqua
Calisto MT
Cambria
Didot
Garamond
Goudy Old Style
Lucida Bright
Palatino
Perpetua
Rockwell
Rockwell Extra Bold
Baskerville
Times New Roman
Consolas
Courier New
Lucida Console
Lucida Sans Typewriter
Monaco
Andale Mono
Copperlate
Papyrus
Brush Script MT
hriFontSize
: HRI Font SizehriMarginTop
: The margin size in pixels between the barcode bottom and the hri text. Default:0
Updated 7 days ago