Working with Barcodes in LibreOffice/OpenOffice.org

Neither LibreOffice or Apache OpenOffice.org installs with the ability to print barcodes. However, if you need barcodes, you have at least three ways to add them to either office suite.

The first — and least elegant — method is to use one of the many dedicated shareware, freeware, or free-licensed applications for printing barcodes and labels.

For instance, if you are using the GNOME desktop environment in GNU/Linux, you can install gLabels, which is included in most major distributions. In gLabels, you can go to Objects -> Create -> BarCode to create a barcode in the style and size of your choice. Although gLabels saves to its own format, you can go to the View menu to turn off Grid and Markup and have a clear background for the barcode, then take a screenshot with a tool like GIMP and save to any graphic format you choose. You can then insert the barcode into LibreOffice or OpenOffice.org, just as you would any other picture.

glabels

More directly, you can install a barcode font on your system. A barcode font is a dingbat font, like the ones you can get with special symbols or pictures in place of letters or numbers. Usually, a barcode font will be specified as a Code 39 or Code 128 font, depending on what and how it displays. In either case, when you type a letter or number, what displays or prints is a barcode element.

With a quick Internet search, you can find a number of time-limited demo or free downloads of barcode fonts, usually in Code 39 format, although the more modern Code 128 format is starting to become available. You can also, of course, buy one or more barcode fonts, although, being a specialty item, that can be expensive if you are on a limited budget.

Once a barcode font is installed on your system, all you need to do is select it as a font from within LibreOffice/OpenOffice.org, adjusting size, color, and other chacteristics as you choose. Depending on the format and your needs, you may want to create your barcodes within Draw, or using the text drawing tool, since you might have to enter the numbers separately directly below the barcode.

(There is also an extension in the Apache OpenOffice.org repository called Code 128 Barcode Extension that comes with its own font, and is supposed to generate barcodes within the Calc spreadsheet. However, it seems in need of an update, since it fails to work)

A better alternative is to install the Barcode extension by downloading it and adding to your office suite by selecting Tools -> Extension Manager and navigating to the file. The next time you restart, the Insert Menu of Draw has a Barcode item.

The Barcode extension allows you to select the type and size for a barcode, but is designed with the assumption that you already know the format of the type you are using. For instance, the only way that you know that an ISBN-13 barcode has twelve digits is if you enter less or more digits and an error message appears. Fortunately, you can quickly brush up on the different formats in Wikipedia, which describes barcode formats in some detail.

The extension creates barcodes as an object that can be resized and reformatted to suit. It can also be copied and pasted to any other LibreOffice/OpenOffice.org application.

Printing the Finished Barcode

No matter how you create barcodes, the chances are that you will want to print them as labels so that you can create multiple copies. To do so, follow these steps:

  1. Select File -> New -> Labels.
  2. Select the manufacturer and type of label. Most manufacturers, including Worldlabel.com, have labels of the appropriate size for barcodes, although the type may not appear in LibreOffice / OpenOffice.org’s label dialog window — you will probably have to take to the Internet to find the one you want.
  3. Format the labels as desired. When you are done, click the New Document button on the Options tab.
  4. Copy and paste the barcode on to the first label on the page. Note that you cannot copy and paste the barcode in the label dialog window; this is the first chance you get, regardless of how you produce the barcode.
  5. When the barcode is arranged on the label to your liking, click the Synchronize Labels button to reproduce the first label on all the other labels on the page.
  6. Print as many copies of the page as you need.

No matter how you create barcodes in LibreOffice or OpenOffice.org, currently they are a bit of a creative hack.  For more information on barcodes and labels. However, once you familiarize yourself with the method that works best for you, you can work with barcodes in either office suite — you just need a bit of patience as you experiment for the first time.

BY BRUCE BYFIELD

3 thoughts on “Working with Barcodes in LibreOffice/OpenOffice.org

  1. Heidi

    Is there a way that you can add a barcode creator to libre office, as you do it with for example the add-in stroke scribe to ms office word and excel

Leave a Reply

Your email address will not be published. Required fields are marked *