Barcode Width

jakke

New Member
Hello,

When i am generating barcodes using xprint i need to know start and end position for displaying, point is i dont know how many characters the value off the barcode will be...
is there some function which will give me the width of the resulting barcode? (approximatly) Because now when i receive a value off 1 char or 16 chars, it will be streched over the same width which gives not a very nice result when it concerns 1 char...

Thx...
 
I think the width of the barcode depends hugely on the barcode standard you are using. I've used Code128, which seems to be one of the most popular as it encodes numbers and letters, and each barcode character is the same width (made up of 3 bars and 3 spaces with a total width of 11, ie 'a' = 121124; 'b' = 121421; 'c' = 141122). So if one barcode character at 10 pixels width looks good, then 10 barcode characters at 100 pixels should look the same. Some Code128 implementations however use a start, stop and check character, so 1 ASCII character is actually translated into 4 barcode characters and 10 ASCII to 13 barcode.

This is of course only relevant if your using Code128....
 
Back
Top