Fingerprint - Code 128 Special Characters To Make Them Shorter
When I am finished with my label I print it in file and replace the printed data with fields, which my script replaces with actual data. Then It sends the edited file directly to printer.
The text fields are no problem but some Code 128 barcodes are longer than in preview in BarTender.
For example when is Code 128 BW000205 printed to file I see that in the file it looks like BW«C000205.
The «C character makes the code shorter and my scanning device reads it without problem. But when I send it raw without the special character the code is 10% longer which makes problem because the label I use are quite small.
Of course I could just edit my script to add the «C character before every 000, but I like to make the script universal for every Code 128 shortening.
I failed to find any guides or algorithm how this shortening works.
Any help is appreciated, thanks.
-
Permanently deleted user
★ BarTender Hero ★
Code 128 is a fairly complex barcode relative to other linear symbologies. It has several "code sets", A, B, and C, each of which contain different characters. This is greatly simplified but to give you an idea, Codeset B contains all uppercase and lowercase letters, and numbers. Codeset A contains uppercase letters, numbers and control characters (like CR, LF, TAB, and so on). Codeset C contains nothing but numbers, but it encodes them as "pairs" so for example "35" is encoded as a single barcode character, and thus it makes numeric data denser.
BarTender can always generate optimized encoding automatically based on the data. (In general we start in B and then switch to A when needed for a control character, or switch to C when we find a bunch of numbers.) Many printers can do this automatically too, however some printers expect the application to generate those code set switching characters.
I don't recommend you execute the script to change the file after BarTender has printed, if you can do it another way (like with VB script, or making it come from an input file). But if your particular situation requires this, then you will have to do what you have discovered which is insert the switching characters yourself. However, be warned that this is not as simple as it seems. The syntax differs for every printer language so if you're using printers other than Fingerprint it would need to be changed. Moreover, if you switch to code C, you can only do so for an even number of digits, if you had 5 digits for example, you must stay in B for the first one, or switch back to B for the last one. While it is feasible it isn't that simple unless you know the barcode symbology front and back and are quite comfortable with encoding algorithms. If you do want to tackle it, I recommend you purchase the ISO/IEC 15417 specification which documents how it all works. (We have copies of all of these barcode specifications but they're copyrighted so you'd need to buy your own copy from ISO, we can't share it.)
However, I think Fingerprint ought to be able to do this automatically. In your print file look at the barcode command (I think it is BARSET you're looking for). It will have a parameter that says something like "CODE128B". If you see that, try getting rid of the "B" in your program that's modifying the file, and just make it say "CODE128". Then I think the printer may figure all that out automatically for you.
0 -
Deleting B worked, if there is just "CODE128", printer decides for itself.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare