69
Page 14 of 88
TBarCode/X User Documentation
4.1.1 TBarCode/X Command Line Tool
TBarCode/X is shipped with a command line tool, which can be called from any console (shell) to
create barcodes. It can also be used or invoked by shell scripts and applications.
4.1.1.1 Create Barcodes on Command Line
TBarCode/X supports different output formats:
Vector image formats such as PostScript
®
(PS, EPS) and PCL
®
Bitmap image formats: BMP, GIF, JPG, PNG, and TIF
1
The following example command creates a barcode of type
“
Code 128
”
that contains the data
“abc1234”.
tbarcode --output=barcode.eps --barcode=20 --data="abc1234"
The resulting barcode is stored as Encapsulated PostScript (*.eps) in the file
“
barcode.eps
”
.
4.1.1.2 Using TBarCode/X to Process Data Streams
With the TBarCode/X command line application you can also process data streams (like print-jobs).
In
this “
filter mode
”
the TBarCode/X command line application reads data from standard input
(stdin)
and writes the results to standard output
(stdout)
. All barcode related control sequen-
ces are replaced by the corresponding barcodes automatically. For example:
tbarcode --filter <input.ps >output.ps
This command processes the PostScript document
input.ps
and searches for certain barcode
control sequences in the file. The control sequences are replaced with barcodes. The resulting
document that includes the barcodes is written to
output.ps
. TBarCode/X can be installed in the
printing system to automatically filter print jobs.
4.1.2 TBarCode/X Library
TBarCode/X Library (also referred to as LibTBarCode) is available as static and shared library
and as framework for Mac OS. It provides functions to generate barcodes. The TBarCode/X
command line application uses the functions of the library to create the barcodes.
Programmers can use the library to add barcode generation capabilities to their own applications.
By default all required library files and header files (for C/C++) are automatically installed. The
complete documentation of the TBarCode/X Library API, is available online: http://www.tec-it.com
(Download ►
TBarCode/X).
►
To develop your own applications with the TBarCode/X Library you need to acquire a deve-
loper license from TEC-IT. Just visit our website http://www.tec-it.com
or contact us to find
out more.
4.1.2.1 TBarCode/X Library Java Interface
For LibTBarCode we provide a Java Interface. This interface uses JNI and consists of Java
Classes and a JNI interface library (more information see TBarCode/X Developer Manual). The
Java Interface is available on request - please contact our support and provide information about
your target platform.
1
Please note: TIF is only supported on Linux systems