Printing Bar Codes

Hi everyone, I need to print EAN128 Bar Codes. The data to print are, for example, “18/02189”, or “403.141201”, or “026017/05000/0044000”.
My little knowledge of Bar Codes tells me that EAN can contain only numeric digit, so I am in trouble.
Does anyone help me?
Thank you in advance.
Nedi Freguglia

https://forum.xojo.com/45649-convert-number-to-barcode-code-128

Grab the code from there and the font from the site I reference.

You can encode all those examples.

1 Like

Code 128 suports all characters you need

https://www.keyence.com/ss/products/auto_id/barcode_lecture/basic/code128/

Try here

https://barcode.tec-it.com/en/Code128?data=026017%2F05000%2F0044000

Thank you, Julian: I have copied your code (the second version in the thread) and I’ll try it as soon as possible.
A question for Jos Maria: Code128 and EAN128 are the same? I have seen the example in the website you linked, and I have noticed that the bar code generated is exactly the same I have to print!! Great!!

Now I have the last question: how can I print it? (I have to try Julian’s code, that probably answers my question).

Ciao Nedi, utilizza il code 39
Code 39 (o Code 3 of 9) un codice a barre che permette di rappresentare 43 caratteri, ovvero le lettere maiuscole (26 lettere da A a Z), i caratteri numerici (da 0 a 9) e alcuni caratteri speciali (-, ., $, /, +, %, e lo spazio) e un carattere speciale ( ‘*’ ) usato come delimitatore di inizio e fine. Ogni carattere costituito da 9 elementi: 5 barre e 4 spazi. Il nome trae origine dal fatto che ciascun carattere composto da 9 barre verticali di cui 3 sono larghe (simbolo binario 1) mentre le restanti 6 sono strette (simbolo binario 0).

Dovrebbe andare bene per te. basta un FONT e devi iniziare il codice con ‘’ e terminarlo con '’ esempio CODE/39
qui trovi il font, altrimenti ne trovi in giro una marea, ricordati di stamparlo almeno con 24 punti .

MBS Barcode Plugin does EAN 128 as well as 80 other types.

https://www.monkeybreadsoftware.de/xojo/plugin-barcode.shtml

[quote=408147:@Nedi Freguglia]
A question for José Maria: Code128 and EAN128 are the same? I have seen the example in the website you linked, and I have noticed that the bar code generated is exactly the same I have to print!! Great!![/quote]

As I understand, Code128 is a way to encode symbols in bars and EAN128 is an implementation of that codes, so i think must work (even the format of the full code is not the same)

https://support.gs1nz.org/hc/en-us/articles/204695474-What-is-Code-128-Is-it-the-same-as-the-other-barcodes-with-128-in-their-names-

Code 128 (specification of symbols) https://en.wikipedia.org/wiki/Code_128

EAN128 (AKA GS1-128) implementation based in Code 128 https://en.wikipedia.org/wiki/GS1-128

Thank you, Jos Maria, I think Code128 is ok for my purpose.

Some questions for Christian:
I downloaded your plugin, the example code and the PDF guide: every EAN barcode need numeric digits; I think I have to use BarcodeGeneratorMBS.BarcodeCode128, which seems to be the right one.
I tried to read the guide, but 295 pages are too many in so little time!! I have been able to avoid the printing of the clear code beneath the bar code (BarcodeGeneratorMBS.ShowText = False) , but I don’t know how to set height and width of the barcode itself.
Last question: do I need to renew the license every year?

Thank you to all.

Well, if you leave width and height at zero, it will be auto sized.

The EAN string must be formatted correctly like this:

“[00]993262210000005384”

You can renew the license every year or stay with old license and old plugins.

Christian, I am rewriting an application from IBM AS400 to Xojo, and I have to print EAN128 Bar Codes. How is it possible to print a string like “026017/05000/0044000” as EAN128 bar code?

EAN128 define structure formats to represent some kind of data using Code128, see: Code 128 - Wikipedia http://www.makebarcode.com/specs/uccean128.html

So 026017/05000/0044000 as not defined as a format in the standard, maybe Code128, but no EAN128 as it defines Application Identifiers (AI) and data as: (xx)data(yy)data…

First EAN 128 is not that easy.
And we support several variants from Code128, GS1-128 and EAN128.
Of course you must define the data corrector first.

e.g. for test app this works fine:

test "EAN128", BarcodeGeneratorMBS.BarcodeEan128, "[10]ABC123[11]040104"

Excuse me, Christian, but what do you mean? As you can see, I am not an expert of Bar Codes……

Well, EAN 128 has a certain structure, so you need to prepare data correctly.
“026017/05000/0044000” doesn’t look like the structure we have here for some samples.

[quote=408366:@Christian Schmitz]Well, EAN 128 has a certain structure, so you need to prepare data correctly.
“026017/05000/0044000” doesn’t look like the structure we have here for some samples.[/quote]

MBS with Code128 generates the barcode for that data with your example “generate”, EAN128 tiggers an error (for that data). I think there are some confusion with EAN128 and Code128 in the info Nedi has. EAN128 does not support that format.

Nedi, test Code128 with MBS and check if the output is the same you have now with the AS/400…

Thanks, Jos. I printed with MBS three Code128 bar codes and I sent them to the customer. They are not the same that come out from AS400. Next Tuesday I’ll be to this customer office and then I’ll try to discover what kind of bar code they have, because I am quite sure they are not EAN128.

We support 80 types with a lot of options, so I hope you can find the right parameters…

All right: thanks to this website https://www.onlinebarcodereader.com/ I found out that
a) the bar code is not EAN128, but CODE128
b) the data are not “18/02189” but “18|02189|”

Using these information the bar codes printed with MBS plugin are OK.

Thanks to all of you!!

Excellent:-)

Hi Christian, I want to buy your Barcode plugin license: would you mind explain to me, in a few words, what I have to do?
I am quite new to Xojo, and it’s the first time I buy a third party plugin, so I don’t want to make any mistake!
Thank you.