Archive for March, 2009

background image

Recently a customer asked us a question -

I have an emergency task. I have a spreadsheet with all product codes (tens of thousands of them). I need to print barcodes for them. I do not have an advanced IT system for this task. I want to print them one by one in Avery label papers. Do you have software doing that?

Small companies often have needs to print barcodes.  But not many of them have dedicated IT systems for the purpose, or in-house programmers that can come up with a solution at any time. Some examples -

  • You want to add a barcode into the invoices, so that you can find the invoice quickly. Your current software that prints invoices, Quickbooks, does not have the capability.
  • You run a retail store and occasionally you bought some items with no UPC barcode on the box. You want to print UPC barcodes and stick them on the boxes by youself.
  • You want to stick barcodes with special serial number encoded. In this way, you can check if the item returned by your customer was indeed sold from your store.

The first option is to use barcode fonts. A typical solution is to add a column in the spreadsheet that holds the barcode strings, and use Word Mail Merge to get the barcodes into the label paper (which is a Word document0. It does not require advanced programming knowledge. Unfortunately, many companies do not use VBA at all nowadays, and it seems to become a formidable task for many people.

Fortunately, Monterey Barcode Creator has a “batch printing” feature.  You do not need any programming knowledge at all to print barcodes into label papers with this program.

Let’s assume that you have a speadsheet that lists all yor product codes in one column. You want to print sticks with barcodes on it, and each stick corresponds to one product code.  You will then print them to Avery Label Paper 3111 on a laser printer. After stickers are printed, you stick them one by one on the item box.

CSV File

First of all, Monterey Barcode Creator can’t read Excel file directly. You will have to export to a .csv file.  CSV is the abbreviation of Comma Separated Value, a format used to exchange data between software.  Each line is a record, and column values are separate by commas.  The below line is an example:

1003434323214, 0-20-ABC-2004, Product Item One

You can generate a .csv file by choosing “Save As” and specify .csv as the format.

As you can see from the example record, a line contain multiple columns. Columns are numbered from 1. Record your column number, you will need it soon.

You can also use Copy/Paste to paste the whole column to Notepad, and save it into a text file. This file can be thought as a special type of .CSV, as each record has only one column.

Adjusting Barcode Properties

Now start Monterey Barcode Creator.  The images created by Barcode Creator can contain three parts - barcode, human readable text and a text comment. We do not need comment here so we uncheck “comment” box. Change the barcode type to “Code128″. You might want to change other properties, such as BarHeight and NarrowBarWidth.  There are quite a number of properties that you can change. If you are interested, read the product manaul at http://mdn.morovia.com/manuals/mbc3/shared.properties_methods.php.

Remember that all barcodes will have the same property set (except the barcode and human readable text).

After you are satisfied with the barcode size, you can now print them out. From File Menu, choose Print.

Batch Printing in Barcode Creator

Print Dialog in Monterey Barcode Creator 3

Print Dialog in Monterey Barcode Creator 3

First, make sure that “Use Label Settings” is checked. If it is not checked, you will not see the bottom portion of the dialog. Use “Label Products” and “Product Number” to select the label paper you print on.  The program has most paper listed, but if you can not find the one you have, you can enter it into the database by selecting “New Label…”.  After you are done with the label paper selection, Click on Print Batch.

print-batch-datafile-setup

Batch Setup (Data File Mode)

Monterey Barcode Creator supports two batch modes - Number Sequence and Data File. Number Sequence mode allows you to specify a sequence. For our work, we will use Data File mode. Click on the Data File to switch, and right side of the dialog will change accordingly. You will supply two parameters:

  1. File Path. This is the path of your CSV or Text file. You can use the small “” button to navigate to the file, or type it by yourself.
  2. Column. The cardinal of the column that the data is from.  If  you pasted the data to a text file, you only have one column and it cardinal is 1.

Click OK to dismiss the setup dialog, and click OK on the Print Dialog to print out. If you have hundreds of thounds of records to print, it may take quite some time.

The data file we used for this article can be downloaded here. And the print result is here.

Creating Barcode Strings Using PHP

If you are creating barcode using barcode fonts, you should already know that you can not just type your number and format with a font. Extra characters such as start/stop characters, and often times checksum characters are required to be present in the barcode.  Some formats such as Code 39 and Code25, are easy. But formats like Code 128 are quite difficult. To easy the difficulty creating barcode strings, Morovia provides source code, Windows DLLs and COM classes that you can integrate in your applications.

For an overview on these utilities, visit http://www.morovia.com/font/support/font-tool.asp.

Many people asked the question - do you have an example with PHP? It turns out that it is not difficult to do it in PHP at all. The following code creates a Code128 barcode string (which becomes a Code128 barcode after being formatted with Morovia Code128 font):

<?php
$encoder = new COM("cruflMorovia.Barcode");

$result = $encoder->Code128Ex(”PN-NUMBER-13334432″);

echo $result;
?>

Note that the Prog ID of the encoder COM object is cruflMorovia.Barcode. You can write code for other barcode types. For example, for EAN-128 barcodes, just replace Code128Ex with EAN128Ex.

GS1 has published a new coupon format to be used in North America, called DataBar Coupon. This coupon code can encode. The Application Identifier (AI) for this code is 8110, and the value can be from 25 to 39 digits long.

You can use Morovia DataBar Fontware to create such a coupon. You can create the code in drawing programs such as Adobe Illustrator, or Word Processing programs such as Microsoft Word. Adobe Illustrator users might want to read this article for a tip on adjusting line heights.

  1. The coupon code requires the company prefix and offer code to be printed on top of the barcode. Started with a text box and enter this information on the top.
    word-textbox
  2. Open Morovia DataBar Font Encoder GUI.
  3. Choose DataBar Expanded Stacked in the Barcode Type box, and enter the coupon code in the Data to Be Encoded box. Note that you must include both AI and data, and AI must be enclosed with parentheses. Make sure that the Symbols Per Row is set to 6.

    DataBar Encoder GUI

    DataBar Encoder GUI

  4. Press Make Barcode button and the barcode will appear below.
  5. Press Copy to Clipboard to transfer the barcode into clipboard.
  6. In Microsoft Word, press Paste to Paste the barcode into the text box. Right click on the barcode and choose Ignore Once to disable spell checking.
    word-databar-coupon-barcode
  7. Now you created the coupon code. According to GS1, before January 2010 you should also include the UPC-A coupon symbol. After that date the UPC-A coupon is no longer necessary.