-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Printers
- LaserJet Printing
- Printing barcode by PCL command and being recognized by the ...

Create an account on the HP Community to personalize your profile and ask a question
10-03-2017 12:42 AM
We are trying to print a barcode using PCL command directly to the HP printer M604. The problem is that the barcode reader is not recognizing the barcode; though, when we print the same text from Microsoft word using font 30F9 (which is attached) the barcode reader is reading the text directly.
The PCL command we are using to print *1234* is: (0Y(s1p15v0s0b0T*1234*
Please we need your assistance in order to know if there is something wrong in the PCL command and why the barcode is not recognizing the text.
Thank you,
10-03-2017 04:33 AM - edited 10-03-2017 04:39 AM
Your PCL snippet:
<Esc>(0Y Primary Font: Symbol Set (0Y = Barcode: 3 of 9) <Esc>(s1p Primary Font: Spacing: Proportional 15v Primary Font: Height (15 points) 0s Primary Font: Style (Upright, solid) 0b Primary Font: Stroke Weight: Medium 0T Primary Font: Typeface (0 = Line Printer) Data *1234*
is a font selection sequence, followed by the data to be rendered with the selected font.
If the attributes of the selection sequence are not matched by a font in the printer's memory, a "closest match' algorithm is invoked - but the result may be somewhat unexpected, depending oin what fonts are available in the device.
Bear in mind that most LaserJet printers do not have any printer-resident bar-code fonts.
You can check what fonts are available by printing a "PCL Typeface List" (invoke this via the appropriate front panel menu item, or the Embedded Web Server equivalent).
If a required font is not available as a printer-resident font, one can be made available by downloading a printer-format soft font to the device before it is selected - the defined formats are:
- 0 - bitmap (deprecated since LaserJet 4) - fixed size.
- 20 - resolution-specified bitmap - fixed size.
- 10 - Intellifont Bound Scalable - difficult to produce (little documentation) ; little used these days.
- 11 - Intellifont Unbound Scalable - difficult to produce (little documentation) ; little used these days.
- 15 - Encapsulated TrueType Scalable - printer format equivalent of TrueType/OpenType display font; often referred to as PCLETTO format.
- 16 - Universal - large character-set equivalent of format 15 font.
Of course, you have to create (or purchase) such a soft font before you can download it.
>> ... when we print the same text from Microsoft word using font 30F9 (which is attached) the barcode reader is reading the text directly ...
If I understand you correctly, you say that if you print a Word document which includes some text which is associated with a (Code 39) bar-code display font, the bar-code is printed as expected.
This is almost certainly because Word (in conjunction with the printer driver) dynamically constructs and downloads a soft font equivalent (probably using an obfuscated format 15) of the source font to the printer.
10-05-2017 02:34 AM
Thank you for your reply.
I just need more clarification on some of the mentioned points:
1. You said, "Bear in mind that most LaserJet printers do not have any printer-resident bar-code fonts." .
==> This is true the printer did not have in its internal scalable and bitmapped fonts the barcode. However, an update which we installed from HP website installed different barcodes including the one that i was trying to choose on the printer's Disk resident font . Attached is the Printer's PCL font List to show the barcodes.
The Firmware details are found below:
- Bundle version: 3.8.0.2
- Firmware Revision: 2308214_000908
2. You said, "You can check what fonts are available by printing a "PCL Typeface List".
==> I could not find PCL Typeface list is it the same as the PCL font list which I provided to you?
Noting that when I print a barcode using PCL command. The text is being printed as barcode but the barcode reader is not recognizing the text
Thank you,
10-05-2017 06:13 AM - edited 10-05-2017 09:39 AM
The terms "PCL Typeface List" and "PCL Font List" can be considered to be referring to the same thing.
Some modern LaserJet devices do indeed (courtesy of a firmware upgrade) include a few selected bar-code fonts.
It is my understanding that these fonts are semi-intelligent; for the BC3of9 font:
- Start and Stop codes are inserted automatically (so if you include them in your data, you'll get odd results).
- An (optional) modulo-43 checksum character is not inserted.
About 18 months ago, I had access to a LaserJet Enterprise M553 printer (with the firmware upgrade) which is of a similar vintage to your M604 device.
I created a small test print job (BC3of9_x01.prn) to demonstrate the capabilities - this is provided (together with an analysis) in the attached .zip file.
The simple test print job shows the same two relatively simple data strings printed using each of the available variants; here is a scan of the output:
Looking at a pair of the encoded bar-codes in more detail:
which appears to confirm that the start and stop codes are inserted automatically.