Barcode Labels

Hi all, I believe this might have been answered and I have to tell you I lost my touch with Xojo after a brief stint in 2014. However I am back with Xojo now.

I need to build a small app where it will read from a txt file all product information, then create barcode labels and output to a pdf file which can be printed

Can you please help me with a few basics

  1. how to read a flat text file
  2. how to create a barcode - EAN 13
  3. how to put it on a A4 like page with multiple labels (8 on a page)

It might be silly question, but I need to start with some guidance. Is MBS plugin the one to be used for barcode?

Thanks for your help

  1. Example code in the LR: TextInputStream,

  2. Use an EAN 13 font

  3. Create your Barcodes in a Canvas and print that canvas in an A4 page ?

1 Like

Emile has answered your question. I wanted to add that I’ve just finished a project using the Einhugur Barcode Plugin and I’ve been very pleased with that.

Great thanks Emile and Tanner.

I will start with this and let you know. I’ll try to upload a file if that’s possible (as in user option to select text file) and then read it.

Appreciate it.

The way to load the text data is the same, but there can be differences in displaying the read data: in Listbox, in TextField(s) / TextArea(s), etc.

Also, if the number of products is small, very small, using text file(s) can be a usable way of dealing, but if the number of products is higher, you better use a data base.

Using a data base to deal with product properties allows you to have better control on the data (think inventory, product prices, etc.).

Feel free to ask advices here.

You can download MBS Plugin and play with the barcode examples.

Be aware that using/creating barcodes in your app can have license issues. If you create them with Apples CIFilters, it’s no problem though.

Just… in general? Or were you using a specific library?

That’s too vague a statement. I know that if you’re generating UPC/EAN codes for commercial use you need a GS1 registration (big $$$) and a UPC Code Block (more big $$$), regardless of Apple’s CIFilters. What other licensing issues are there that you’re aware of?

Also, wouldn’t the library author have already licensed their middleware to generate the barcodes to begin with?

Curious minds want to know…

The library just creates the barcode and doesn’t care about such licensing.

If you want to put EAN barcodes on your items, of course you need to register for a free EAN number.

MBS Barcode plugin uses zint library under BSD-license license.

Thanks for the info @Christian Schmitz . I saw UPC barcodes for sale on eBay for $15 for 1000, so maybe not as expensive as I thought. Luckily I only need to read codes. Generating them seems like wading into a quagmire.

Still hoping @Christoph De Vocht responds.

What if your app creates internal barcodes for stock keeping (think library books). Would that need a license?

We’ve touched on 2 different areas here.

  1. Printing a barcode
  2. Registering a new UPC number with a central authority

In the first, if you use a third party library to create the physical dot-pattern that represents a scannable representation, then you may or may not need to license the use of that library depending on the requirements dictated by the party that created the library. The license fees can vary greatly. On the other hand, if you create your own library based on the publicly published specifications, you don’t have to license anything.

If you use a barcode font, you will have to purchase a license to use it. If you distribute that font along with your software, you will have to pay additional license fees.

Modern technology and laser printers have made it fairly easy to roll your own.

To make up the numbers, no. To use a third pary library to physically print them, probably. To implement your own method of printing them, no.

Some time ago I asked Apple about CIFilter to create barcodes and licenses fees.
I was told that when you create barcodes with the CIFilter, all licenses are covered. I use this for creating QR codes.

If you have MBS plugins, you can very easily create barcodes with the CIFilter.

Thanks for the enlightenment everyone :slight_smile:

So my take is that - font and/or UPC registration aside - we should not be concerned about licensing when generating barcodes using CIFilter, MBS, or Einhugur (Bjorn’s licenses are on the product page).

Thanks for the clarification. My requirement is to print Barcode labels for stock purchased and not generate new numbers. I’ll be testing the MBS plugin.

[quote=401597:@Tanner Lee]Thanks for the enlightenment everyone :slight_smile:

So my take is that - font and/or UPC registration aside - we should not be concerned about licensing when generating barcodes using CIFilter, MBS, or Einhugur (Bjorn’s licenses are on the product page).[/quote]

I don’t think the Einhugur uses the CIFilter to create barcodes. Infact, I am pretty sure they do not.

The MBS also has a separate barcodegenerator class which is not using CIFilters either.

So make sure you are using the CIFilters.

Tanner can use either CIFilter or the other classes!?

MBS Xojo Plugins have classes for CIFilter:

I use the MBS plugin and it works well…