Link to home
Start Free TrialLog in
Avatar of colinasad
colinasadFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Why do my EAN13 barcodes in an Access Report not print properly on a Zebra S4M barcode printer.

I an using MA Access 2007 to print barcode labels with a Zebra S4M barcode printer.
In an Access Report I have a text box control which I populate with a valid 13 digit EAN13 string.
I have tried a couple of EAN-13 fonts and although they all produce what look like valid barcodes, they are not being read by our barcode scanners.

Is there anything else I should be doing with my data?
With Code39 barcodes that I print I need to add an asterix ("*") as the "stop" and "start" characters at the start and end of the text to be barcoded. These print and are read OK.

My Zebra printer supplier has sent me an EAN-13 font that he says works OK for him. Again, I get what looks like a goos barcode, but it is just not readable.

Many thanks.
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 colinasad

ASKER

Thanks for the prompt response, DansDadUK.
OK, it looks like the EAN fonts I have been using don't do all the conversions you are suggesting.
I had naievely been assuming that all I needed to do was supply a valid 13-digit string (including an accurate checksum digit). I have seen a "readme" text file that came with one of the fonts that I tried, describing things like "guard" characters but I had again assumed that was merely an explanation of what the font was doing for me.

Are you saying that I need to produce an algorithm to convert a simple 12-digit string (missing its checksum digit),
into the type of text string you describe, which no longer actually contains the 12-digit string initially presented?

Are there no fonts out there that will simply accept a 12 or 13 digit string and do the rest for me?
This tutorial steps you through implementing VBA, to automatically generate the barcode:
http://www.idautomation.com/fonts/tools/vba/#Access
The referenced tutorial is telling you what IDAutomation-supplied function to use with the appropriate IDAutomation-supplied font.

Other suppliers almost certainly have equivalents.

Purchasing and using one of these is obviously going to be easier (albeit not necessarily cheaper) than 'rolling your own' algorithm to match whatever font you have.

... and of course you'd have to check that the font format in question is supported by your printer!

As to the question "Are there no fonts out there that will simply accept a 12 or 13 digit string and do the rest for me?"

Some LaserJet printers will accept (third-party) font DIMMs which have some in-built intelligence to allow the generation of different types of barcode, given just an input string,

I have no knowledge of Zebra printers, so don't know if these offer an equivalent (I doubt it).

... and in any case, you'd then be limited to using the printer with the added DIMM module.
Thanks for all the information.
This is all a bit disheartening, though.
After years of successfully producing all sorts of barcodes using the DataMax programming language with an old DOS application, I really thought generating barcodes with a modern barcode printer (Zebra S4M) and a (relatively) modern development environment (MS Access 2007) would be a walk in the park. I had just assumed that supplying a text control with a valid string of numbers and selecting an appropriate barcode font, would be all that was needed.
I'll pursue some of the above suggestions and see how I get on.
As I pointed out, I have no knowledge of Zebra printers.

If it is a 'barcode printer', then it is quite possible that it MAY include some intelligence .

You'd need to find some sort of User Guide, or Programming Guide, for the model in question to answer that question (and then of how to select the correct font, assuming it to be printer-resident).
DansDadUK :

Your initial post makes reference to notes that you have about how a data string

123456789012

had to be transformed to the text:

b"23E5GH!STKLMS#

Do your notes have a step-by-step explanation on how that transformation happens?

I think the "readme" file I mentioned describes a similar process, but it is fairly impenetrable. Below (inside <>) is a small part. I have attached the full file if you would like a look at it.
<
The physical structure of the EAN-13 is as follows:

    Left hand guard bars, encoded 101
    Second flag character, encoded as in the following tables
    First five data characters, encoded as in the following tables
    Center guard pattern, encoded 01010
    Last five data characters, encoded as right hand characters
    Check character, encoded as a right hand character
    Right hand guard bars, encoded 101
>

The "tables" referred to include what I assume to be binary strings, but I'm not really clear on what you are actually expected to do with them. Perhaps your notes would shed som light on that

I wonder if I should really just be reverting back to the "Zebra Programming Language" and creating my output with that, rather than using a normal Access Report.
readmeean.txt
... according to the brochure for the Zebra S4M, it supports various barcode symbologies:

• Linear: Code 11, Code 39, Code 93, Code 128
subsets A/B/C and UCC case C codes, UPC-A,
UPC-E, EAN-8, EAN-13, UPC and EAN 2 or 5 digit
extensions, Plessy, Postnet, Standard 2-of-5,
Industrial 2-of-5, Interleaved 2-of-5, Logmars, MSI,
Codabar, Planet Code, GS1 DataBar (RSS)
• 2-Dimensional: Aztec, Codablock, PDF417, Code
4, Data Matrix, GS1 Databar (RSS), MaxiCode, QR
Code, MicroPDF417, TLC 39

and uses either EPL or ZPL printer languages (both proprietary to Zebra).

I would imagine that the driver or the printer will perform the transformation you require - you probably just have to add some EPL/ZPL code somewhere (I've no idea where or how you could do this from within Access).

First port of call would be any available User Guide manual - it may tell you exactly how to perform what you want.
Your last post arrived just after I'd composed my last response, so I missed your question.

It'll take some time to dig out my notes, and they'll probably not match the font you have.

... and in addition:

- I assume that your (shareware) font is a TrueType font for use within Windows.

- It may only work with the Zebra printer if the Zebra printer driver is able to dynamically generate and download a suitable (EPL/ZPL-encapsulated) format font to the printer; I've no idea if this is supported.

- Of course, it may be the case that the Zebra driver just rasterises the complete label, and just sends a dot image to the printer - but I doubt that this is the case, given the specification in the printer brochure.
Thanks, DansDadUK.

The EAN-13 True Type font and accompanying Readme text file were sent to me by the supplier of the Zebra printer, so I would hope they would work with the S4M printer.

So far I have just been using the Zebra drivers supplied with the printer. I know that there is a company called Seagull who also supply barcode printer drivers. Although it might be a hassle uninstalling and re-installing drivers (the printer is networked), it might be worth a try.

Thanks for your continued time on this.
I had a (brief) peek at oine of the Zebra-supplied EPL Programming Guide manuals.

From this, it seems that it is relatively easy to generate a number of different types of barcode (including EAN-13) on the printer, by using simple paramater-driven EPL commands.

- and without you having to know anything about the transform mechanisms; if you think EAN-13 is complicated, don't go anywhere near 2-D barcodes like QR Code or Data Matrix !

But using EPL/ZPL probably wouldn't  help if you want to use Access, especially if you want to display the barcode on screen as well as use it on the printer.
Perhaps Zebra offers some 'design' tool/application to help in this respect?
>> The EAN-13 True Type font and accompanying Readme text file were sent to me by the supplier of
>> the Zebra printer, so I would hope they would work with the S4M printer.

Few (if any) printers understand TrueType fonts natively; the font has to be converted/encapsulated within a language that the printer understands - and in many cases the only solution (because many printers do not support downloaded fonts in any format) is to send a rasterised image of the barcode (or the complete page) to the printer as a graphic image.
... any idea what your Zebra printer driver does in this respect?

... and of course this would depend on you doing the relevant transform to create a Windows display of the barcode in the first place, using that TrueType font!
>>  I really thought generating barcodes with a modern barcode printer (Zebra S4M) and a (relatively)
>>  modern development environment (MS Access 2007) would be a walk in the park. I had just
>> assumed that supplying a text control with a valid string of numbers and selecting an appropriate
>> barcode font, would be all that was needed.

It may very well be the case that there is an available 'control' (free or not) to generate a barcode graphic image, given an input string and some parametric infomation about size, etc.

If the Zebra driver supports the rendering of such images as an EPL/ZPL graphic (i.e. without using the printer-firnware-resident fonts/transforms), then that may be a solution to wanting to display AND print such barcodes easily.

But I don't know if any such control is available, nor if the Zebra driver handles source document graphic images.
... and the print quality is likely to be reduced, since the resolution of the displayed graphic is likely to be much less than the resolution of any native printer generated font image. (although this matters less with 'regular' images such as barcodes).
Attached are brief notes on encoding EAN-13 barcodes.

The notes are in a .RTF (WordPad) document, but disguised here with an addiitonal .TXT extension (E-E forum will not accept .RTF extension).
EAN13-notes.rtf.txt
Many thanks for your continued help, DansDadUK.
With your notes and others I have found I am trying to make sense of the "encoding" procedure that seems to be required to convert a string of digits into a string of characters that will result in a scannable barcode.
I'll let you know how I get on.
I really did not expect printing EAN13 barcodes with a Zebra barcode printer costing more than GBP 800 would be so difficult.
Regards. Colin.
>> I really did not expect printing EAN13 barcodes with a Zebra barcode printer costing more than
>> GBP 800 would be so difficult.

If you just want to PRINT the barcode, use the EPL/ZPL langauge - then (as far as I can make out from the Zebra manuals) you don't have to know anything at all about the transformation, because the printer firmware contains a (proprietary format) EAN-13 font AND an appropriate transform function.

But if you want to ALSO show a screen display of the barcode (within Access or anything else), you need something equivalent to what the printer does.
At the very least, this will require a transform (to encode the EAN-13 symbol from your input data) and then display it (EITHER using a font appropriate to the transform, OR via a ratsr image genereated by the transform).

... and then you have to ensure that your printer output is the same (WYSIWYG) as the screen display.
How and whether this is possible depends on the printer driver you are using,
I think that it is unlikely that the Zebra printer will accept a font download (and, unless the driver does it, you'd have to know how to convert your TrueType font to the (proprietary Zebra format if it did!).

... so does the driver just send a raster image of the displayed barcode? or what?

From your comment that:
>> I have tried a couple of EAN-13 fonts and although they all produce what look like valid barcodes,
>> they are not being read by our barcode scanners.
it seems (unless I've misunderstood what you are doing) that the driver is doing one or the other of the above.

Perhaps you could find out a bit more of what the driver is doing by printing a small sample, but selecting the 'print to file' option (available with most Windows printer drivers).
Then examine the resultant .PRN file - you say that you are familair with EPL/ZPL, so you should probably be able to work out what it was sending to the printer.
I am closing this question, even though I have not yet git a working solution to my problem.
The first response did effectively answer my question though; printing barcodes from an Access Report with a specialist Zebra barcode printer is not as straightforward as I had hoped it would be. It looks like you have to buy in fonts with specially written encoding functions to make these fonts work.
I think I am going to have to revert back to using the printer programming languages rather than Access Reports.