Home FAQs Linear Barcodes FAQ
|
Linear Barcodes FAQ |
|
|
Is it possible to encode binary data with linear barcodes?
What are the limitations to the demo version of BarCode-ActiveX? I tried creating a Code 39 barcode and it only produced a criss cross pattern of a box, is this right?
How can I insert FNC1 into barcodes of the UCC/EAN128 type?
What should I so if an AI has a variable length (UCC/EAN128)?
I use BarCode ActiveX and try to print a Code128C barcode, but for some reason I have a leading zero that should not be there inserted into the barcode. Is it possible to get rid of this digit?
|
|
Yes, it is, but not the entire range of binary data. For example, Code 39 Extended and Code 93 Extended allow
you to encode data within the range 0..127 (00..7F hex).
Since data for encoding must be presented as a string, you have to convert binary data to a string to be able to encode it.
Suppose you need to encode the following byte array:
00 01 02 03 (it is binary data)
To do it, you should set the following properties:
BarType - Code 39 Extended (or Code 93 Extended)
BarText - "~00~01~02~03"
|
|
There is only one limitation – it is a red line with the demo reminder.
If your barcode has a crisscross pattern, it means that there is some kind of error in the process
of encoding. For example, you could have used a character invalid for this type of barcodes, or your
barcode cannot be drawn within the size you specified and you should increase the size of the barcode.
|
|
Actually, you do not have to do it yourself because our barcodes controls can place FNC1 where it
needs to be. Suppose you need to encode the following UCC/EAN128 barcode:
(02)08000607997453(10)LB246(15)070831(37)72
To do it, just attribute the following string to the BarText property:
<AI02>08000607997453<AI10>LB246<AI15>070831<AI37>72
You will get the following barcode as a result:
The FNC1 character is an invisible character, but it is really encoded in the barcode
(unlike parentheses, which are displayed but not encoded in the barcode).
As you can see from the image above, the FNC1 character is inserted not after each AI (Application Identifier),
but only after those AI that have a variable length. In this barcode only two AI have variable length: 10 and 37.
FNC1 is not inserted after AI-37 only because 37 is the last AI and there is no need to encode FNC1 at the end
of a barcode. FNC1 are also encoded at the beginning of any UCC/EAN128 barcode (it is a feature of a UCC/EAN128
bar code).
That is, our barcode control places FNC1 where it is needed, but if you want to insert FNC1 somewhere
else, you can use the string "<FCN1>". For instance:
<AI02>08000607997453<AI10>LB246<AI15>070831<AI37>72<FNC1>
This will result in additional FNC1 inserted at the end of the barcode.
See also:
UCC128 & EAN128 Barcode FAQ & Tutorial
|
|
As it is explained here, our barcode controls can detect variable-length AI, so
you do not have to add any special characters.
|
|
The thing is that a Code128C barcode can encode only an even number of numerals.
You must have specified an odd number of them so our barcode control added this leading zero.
So, use only even numbers of numerals or use another type of Code128, e.g. Auto or Code128B.
|
|
|