Barcode Generator |
[This is preliminary documentation and is subject to change.]
Barcode Generation in TOPICA
This document describes how to generate barcodes in Topica and how to integrate them into new and existing Topica applications.
The Barcode generator operates on the principles of REST. A Get request is issued to a specific URL, with a set of QueryString parameters, and a barcode is generated from the QueryString parameters and returned as an Image response type. The Image response can be used directly in an HTML Image tag or it can be saved to disk by the caller.
The Barcode generator operates on the principles of REST. A Get request is issued to a specific URL, with a set of QueryString parameters, and a barcode is generated from the QueryString parameters and returned as an Image response type. The Image response can be used directly in an HTML Image tag or it can be saved to disk by the caller.
The URL to reference for generating a barcode in the following Minimal qualified URL: Fully qualified URL:
QueryString parameter | Valid values | Required? | Default | Description |
---|---|---|---|---|
value | The valid values in for this parameter depends on the selected barcode format. | true | N/A | This is the value that will be converted to barcode representation. |
label | Any value is applicable. But it is the preferred practice to use the exact same value as the 'value' parameter. | false | Empty | This is a text that can be printed with the actual barcode. |
alignment | left, right, center | false | center | This parameter controls the alignment of the barcode. |
type | UPC-A, UPC-E, UPC 2 Digit Ext., UPC 5 Digit Ext., EAN-13, JAN-13, EAN-8, ITF-14, Codabar, PostNet, Bookland/ISBN, Code 11, Code 39, Code 39 Extended, Code 93, LOGMARS, MSI, Interleaved 2 of 5, Standard 2 of 5, Code 128, Code 128-A, Code 128-B, Code 128-C, Telepen, FIM | false | Code 128 | This parameter controls the format of the generated barcode. |
position | BOTTOMCENTER, BOTTOMLEFT, BOTTOMRIGHT, TOPCENTER, TOPLEFT, TOPRIGHT | false | BOTTOMCENTER | This parameter controls the position of the label. |
width | 0 - x | false | 200 | This parameter control the width property of generated image. Width is specified in pixels. |
height | 0 - x | false | 50 | This parameter control the height property of generated image. Height is specified in pixels. |
This requires an Image template item in order to be truely usable. This would allow the querystring parameters to be computed via Topica Basic, and thus generate barcodes dynamically.
It is possible to use the include tag for this. But not in a "clever" way. Topica Basic is not available.
The Barcode generator operates on the principles of REST. A Get request is issued to a specific URL, with a set of QueryString parameters, and a barcode is generated from the QueryString parameters and returned as an Image response type. The Image response can be used directly in an HTML Image tag or it can be saved to disk by the caller.
This example shows how to use the barcode feature on an aspx page. QueryString parameters could be appended to the URL from the code-behind file.
This example shows how to use the barcode feature using a standard HTML image tag.