User Tools

Site Tools


scratchpad:barcode_font

How to print actual scannable barcodes with the staff client

Step 1) Download and install a barcode font

In this case I tried a freeware (free as in beer) font from BarcodesInc, Code 39 (AKA Code 3 of 9). The file is named free3of9.zip, and if you unzip it you should see

FRE3OF9X.TTF
FREE3OF9.TTF
FREE3OF9.TXT

To install in Windows XP (other Windows should be similar), go to Start -> Control Panel ( optional, -> Switch to Classic View) -> Fonts. This should open a window titled Fonts.

picture of winxp fonts window

From the File menu in the Fonts window, choose Install New Font. Navigate using the Folders: and Drives: sections of the dialog to find your unzipped folder containing the FREE3OF9 font.

picture of winxp fonts dialog

In my case, this was c:\Documents and Settings\phasefx\My Documents\Downloads\free3of9\

Once you find it and see the two fonts listed in the List of fonts: section, choose Select All and then OK. The fonts should now be installed and you may close the Fonts window.

Update: In Windows 7, I was able to simply right-click on a font file after unzipping them and select Install from the context menu.

Step 2) Test the font

Now load up Wordpad (for example, by choosing Start -> Run -> typing wordpad and pressing enter). In Wordpad, select Format -> Font, and in the Font dialog select "Free 3 of 9 Extended" and increase the font size before choosing OK.

picture of wordpad font dialog

Now, in the Wordpad document, enter an asterisk (*), type a barcode, then follow with another asterisk. Print this page and try to scan it. Assuming this works, on to the Evergreen staff client we go.

picture of barcode font example in wordpad

Step 3) Open the Receipt Template Editor in the Evergreen staff client

In EG 2.1, this would be under Admin -> Workstation Administration -> Receipt Template Editor. It should default to the item_status template, and the Line Item box should contain something like this:

<li>%title%<br/>
Barcode: %barcode%

We want to put <span style='font-size: 25pt; font-family: "Free 3 of 9 Extended"'>* in front of %barcode%, and *</span> after it, like so:

<li>%title%<br/>
Barcode: <span style='font-size: 25pt; font-family: "Free 3 of 9 Extended"'>*%barcode%*</span>

Update: Recently on a Windows 7 system, I had to use "Free 3 of 9" instead of "Free 3 of 9 Extended".

Select Save Locally to make the change.

picture of evergreen staff client receipt template editor

Then go to Circulation -> Show Item Status by Barcode (F5), scan some barcodes, and select Print to try it out. And that's all there is to it. You may need to tweak the font-size in the template to make the barcode more easily scannable.

scratchpad/barcode_font.txt · Last modified: 2014/03/20 05:05 by phasefx

© 2008-2017 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a member of Software Freedom Conservancy.