Printing PCL5e Barcodes

StoneCutter3
StoneCutter3 used Ask the Experts™
on
I am trying to print barcodes on a Canon iR3245.

I believe the barcodes are part of the printer kit installed on this printer.

The barcode would be a six digit number (ex. 123456).

Could I get the exact PCL commands?

Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Printing barcodes on most laser printers is not straightforward (see thread http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Reports/Q_26235623.html for an example).

It may be that the Canon has extra (proprietary) intelligence built-in to perform the necessary data transformations & checksum calculations needed with most barcodes; this may require you to supply non-standard (proprietary) PCL escape sequences.

If so, the User Guide (or Programming Guide) manual may tell you how (I've no knowledge of Canon devices myself).
Chris BRetired

Commented:
The simple method is to install the barcode font on your pc. What type of barcode do you wish to use?

Chris B

Author

Commented:
To DansDadUK:
Your example dealt with a Zebra printer.  This is very different from PCL.  I don't believe this is specific to the Canon and if it was I wasn't able to find any Canon programming manuals.

To burrcm:
I believe the barcode type is "Code 39 (USD-3 & 3 of 9).  We are running a Windows domain on a Windows 2008 Server.  I'm hoping I don't have to download anything as the specifications on the Canon state that the barcode fonts should be in the printer.  That being said, I have not been able to print a font list from the Canon that includes any barcodes.  I have the vendor that sold us the printer checking to see if the barcode fonts are indeed in the printer.  But regardless of that I am looking for the specific PCL command that should produce a barcode.  Let me know what you can do.  Thanks.
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

>>  I am looking for the specific PCL command that should produce a barcode

Standard PCL does NOT provide any such commands.

What the PCL standard allows is for you to use the standard font selection sequence mechanism to select a font on the printer (one that is either permanently resident (in ROM or add-on SIMM/DIMM/etc.), or one that is less permanent (i.e. has been downloaded (in PCL format)).

Merely selecting a font does NOT usually imply any sort of data transformation (as is usually necessary with barcodes).
But some printers DO have embedded fonts with associated firmware - and this firmware DOES do the necessary transforms for you - but these are proprietary solutions, unique to each manufacturer (of either printer, or add-on hardware component).

Having said all that, the Code 39 barcode is a very simple barcode, and (at least for Standard, rather than Extended Code 39), the necessary transform is very simple: add Start and Stop characters (these are produced by selecting the "*" character in most (all?) Code 39 fonts; if you also want an (optional) Checksum character, you'd have to calculate it yourself if any (proprietary) firrmware does not provide this feature.

The comment from burrcm is probably alluding to the mechansim available with many applications (e.g. MS Word) and a suitable printer driver:
- you install a suitable TrueType (or OpenType) font on your Windows system;
- you use that font within the application;
- the application print function interfaces with the driver, and causes the latter to dynamically generate and download a PCL-encapsulated (albeit obfuscated) version of the TrueType font within the print stream sent to the printer.
Chris BRetired

Commented:
A full free code 39 which will permit the b/code to be used in any application (regardless of printer).

http://www.bizfonts.com/free/

Chris B
>> ... regardless of printer

Provided that you are using a printer driver which will generate the appropriate target printer sequences (including any encapsulated font download).

But the wording ("Could I get the exact PCL commands?") in the originator's post implied perhaps that he/she is not using a standard printer driver (i.e. his/her application may be directly generating the print stream, so would need to emulate how these standard drivers generate the required print data).

Regardless of whether or not a suitable printer driver is in use, this will only work (without additional add-on functions) for a very simple barcode symbology (like Code 39 Standard) which only requires the addition of Start and Stop characters.

But for anything more complicated (like Code 128, or EAN-013, or DataMatrix), the application would have to include (perhaps via an add-on library) the intelligence to perform the required data transformation.
This is required for Windows application display purposes, as well as eventual print output (I forgot to mention this point when I outlined how Word, etc. interfaced with the printer driver to generate the output print stream).

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial