Link to home
Start Free TrialLog in
Avatar of IainOnline
IainOnlineFlag for Hong Kong

asked on

Embedding a "tab" in a three of nine extended barcode

How can I embbed a "tab" character in a three of nine extended barcode in Excel? I an using a three of nine extended true type barcode to generate the barcodes which are working okay but I really need to get a tab command in the middle of the barcode e.g.

USERNAME<TAB>PASSWORD

Currently I am using the following in Excel with the three of nine barcode selected.

="*USERNAME*"
="*PASSWORD*"

This produces two barcodes, one for username and one for the password. I have tried the following but without success.

="*USERNAME%KPASSWORD*".

Do you know how I can produce the <tab> in the middle?
I have attached the barcode file. You need to rename to .TTF and install in windows fonts
FRE3OF9X.TXT
Avatar of DansDadUK
DansDadUK
Flag of United Kingdom of Great Britain and Northern Ireland image

After a cursory examination, I don't think that your font contains a glyph which has the appropriate bar-space combination.

If you had an ordinary non-extended font, you could make up all of the extra ASCII characters using combinations of the glyphs for A-Z, preceded by the glyph for %, $, /, or +, as appropriate; but the symbols for some other non-extended characters (like $) have then also to be treated as composites (so $ is represented by the character pair /D) - see the Code 39 Wiki entry http://en.wikipedia.org/wiki/Code_39 for details.

But your font, being an extended font, already has most of the extra symbols as double-width, and this also applies to the symbol mapped to codepoint 0x24 for the dollar - so you couldn't use this as the first in a pair to try to represent horizontal tab (as $I).

The appropriate non-extended symbol for $ IS present in the font, as glyph 43, but it is not mapped, so it is not accessible.
Avatar of IainOnline

ASKER

Okay so you are saying that I can't use $K? Many web sites seem to indicate you can create the tab in the code three of nine? It might be that there is some other way? I have seen ~ mentioned for example?
In the extended Code 39 repertoire, $K maps to Vertical Tab ($I is Horizontal tab).

But in your font, the symbol associated with $ (at codepoint 0x24) is a double width character which is the equivalent of the pair of characters /D in non-extended mode.

Given the limited examination I've done of the font, I can't see how you'd construct the required symbol from ANY of the available single- or double-width characters in that font.
i.e. your font does not appear to include a complete extended Code 39 repertoire.
If you use the 'standard' FRE3of9 font (instead of the extended 'FRE3of9X' one), I think that you should be able to obtain a horizontal tab barcode symbol, using the character pair $I (and the vertical tab using $K).

The downside to using this font is that you can only 'directly' use the digits, upper-case alphabetics, and the full-stop and hyphen characters; for all other characters, you have to construct a character pair in order to obtain the required symbol, as per the table in the Wiki entry.

For example, to obtain the symbol for lower-case 's', you'd have to select +S (i.e. the plus-sign, followed by upper-case 'S').

And for the Start / Stop character (asterisk (*) in non-extended mode), you'd have to select the character-pair /J.
So I should be able to generate a tab using the 3 of 9 non extended set? Can you tell me the characters to use / sequence?
I have found a barcode I used to use for this which does work. Does this help you get to the answer?
Tab.jpg
>> So I should be able to generate a tab using the 3 of 9 non extended set?
Yes

>> Can you tell me the characters to use / sequence?
It depends on the font; it doesn't appear to be possible using your 'FRE3of9X' font, but (as I said in my comment on 2008-09-03), using the 'FRE3of9' font you can use $I for horizontal tab, or $K for vertical tab.
But you'd also have to transform other characters, which you wouldn't have had to do with the 'FRE3of9X' font.
The WIKI article tells you what replacement characters are required.

>> I have found a barcode I used to use for this which does work. Does this help you get to the answer?
No, because it tells me nothing about what characters and mappings are present in the font.
I have attached the non extended ttf file. Can you tell me the string to use? i.e

*USERNAME%KPASSWORD*

Thanks for your help.


FREE3OF9.TXT
ASKER CERTIFIED SOLUTION
Avatar of DansDadUK
DansDadUK
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jware09
jware09

DansDadUK,

Could you tell me which font file you're using for the barcode w/ text? We're trying to do something similar to what IainOnline is doing and would prefer to have the text below the barcode.
jware09

The font is one that I created (using the High-Logic FontCreator application) for use within the company I work for, and for customers of our applications.

For that reason, I can't provide it to others, sorry.

If you have a standard Code 39 font, it's relatively straightforward (albeit somewhat tedious) to modify each glyph to include the human readable text.

Note that if this font is used for 'extended-Code39' barcodes, the human readable text will show the individual characters of each character pair used to produce the barcode (e.g. it will show '+K', which a scanner in extended mode will (hopefully) interpet as 'k').
So if you wanted human readable text with the extended set, you'd really need a font which mapped all of the 128 possible ASCII characters to individual glyphs; when it comes to control code characters this can be somewhat problematic.

If you don't have a suitable font with human readable text, then you just have to repeat your input string (complete with any 'transforms' of characters outside of the standard 43-character Code39 repertoire) below the barcode, using a suitable text font (Courier New, Arial, OCR-B, etc.) and adjust the size until the 'characters' align.

I trust that this is clearer than mud!

Chris
It is but a lot more work than I'd like to do. Your idea of just stacking the fonts is a much better idea for what we need to do.
Thanks I'll give this a try tomorrow. The maddening thing is that I once did this and had it working for our last deployment but I've lost the original Excel document ! I'm using this on a symbol LS2208 and a RF3090 HHT.

If this doesn't work do I consider using code128 or some other symboly? I have over a hundred users so I need something I can cut and paste the usernames and passwords into just prior to go live. Happily that is 7 weeks away.
Hello DansDadUK,

I scanned the barcodes you provided into notepad but but the <tab> character isn't recognised. I have used a LS2208 with the default settings from Symbol.

The output into notepad is a follows:-
USERNAME$KPASSWORD
USERNAME$KPASSWORD
Unless I have a fundamental misunderstanding of the extended-Code39 mechanism (which is possible, as I've only ever used the standard repertoire), I think that the fact that the barcodes scanned as:

USERNAME$KPASSWORD

indicates that your scanner is expecting only a standard Code-39 barcode, and is interpreting it as such.

Therefore you need to configure your scanner to interpret barcodes as Extended-Code39 ones; I've no idea if the LS2208 supports this.
... and another point:

I don't think that NotePad 'understands' the Vertical Tab control code:
 - if you have a file which already contains such a character, NotePad will probably just show it a as a 'rectangle'.
 - if you attempt to include such a character via 'Alt' + (NumPad) 0011, nothing will happen.

WordPad understands a bit more:
 - if you have a file which already contains such a character, WordPad will react to it, and tab downwards.
 - if you attempt to include such a character via 'Alt' + (NumPad) 0011, nothing will happen.

Word understands it better:
 - if you have a file which already contains such a character, Word will react to it, and tab downwards.
 - if you attempt to include such a character via 'Alt' + (NumPad) 0011, you'll get a downward tab.

All of the above three applications understand and react to the Horizontal Tab character ('Tab' key, or 'Alt' + (NumPad) 0009).
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial