01-20-2011 01:06 PM
These are the different pcl codes I have tried, but they don't print out a full barcode:
CHAR(27) + '(0Y' + CHAR(27) + '(s1p12v0s0b32772T*ABCDE123*' + '(3@'
CHAR(27) + '(0Y' + CHAR(27) + '(s0p8.1h12v0s0boT' + CHAR(27) + '*25531X*' + '(3@'
CHAR(27) + '(0Y' + CHAR(27) + '(s0p8.1h12v0s0boT*12345*'+ '(3@'
CHAR(27) + '(0Y' + CHAR(27) + '(s0p4.69h12.0v0b0T*12345*' + CHAR(27) + '(3@'
The 32772T is the one from the font listing off the printer.
I have also found this code that almost works.
Except, it does not print out the numbers 7,8,9 or the uppercase letters H-Z. But, it does print lowercase letters.
CHAR(27) + '(25531X*' + @v_vchEquipmentId + '*' + CHAR(27) + '(3@'
Could someone please help me figure out why it is not working, or point me in the right direction for some help?
01-20-2011 01:33 PM
Welcome to the HP ITRC OpenVMS forum.
Having done this type of thing in the past, I would have to sit down with the manual, and with precise samples of the output.
I also recommend starting with a far simpler problem, namely using a tool such as Kermit to write directly to the printer. Also, since presumably the printer is connected to a serial port, a full listing (SHOW TERMINAL/FULL) of the relevant device would be helpful.
These problems can be subtle, but in the end they are always explicable.
- Bob Gezelter,
01-21-2011 06:13 AM
01-21-2011 12:18 PM
I've never set up this specific printer, but have dealt with many other brands/models, so this is general PCL information.
You seem to be confusing the FONT, SYMBOL SET and TYPEFACE commands, and there are some typos in the examples.
(assuming the leading Escape and single commands)
Use Fixed Spacing: (s0P
In all but the very last command, you are sending Symbol Set ID= 0Y as (0Y and this is fairly common, but you'd need to know what's in your printer.
In the first command you list, you're using Proportional spacing (s1P and sending the Font ID in the Typeface command (b#T where # should be the Typeface rather than Font, if that's what you want to do. The Font command is (#X where # is the Font ID.
In the second and third, you send a lower case o in the Typeface command as (boT and it should probably be a zero (b0T and I don't know what
The fourth example is very close to what I use for an HP PCL printer. It uses the common Bar Code Typeface and Symbol set so maybe the wrong font is active.
Without having your printer to play with, that's about all I can give you.
01-21-2011 12:49 PM
Haven't looked at what's in this old Freeware submission in detail in a while, but it looks to do 39 for you:
Other options and languages:
Here's a php pdf generator that can do barcode
There's a cute php demo for a UPC barcode here:
All of the above languages are available on VMS.
Or toss the data over to a Windows or Mac or Linux box, and print the document and the barcode from there.
I'd expect commercial solutions for generating barcodes exist for OpenVMS, as well. Check the HP AllianceONE (formerly DSPP) product listings.
01-21-2011 01:19 PM
That one works pretty well. If you can print Postscript, I encourage you to take a look at using it. Seems like a very easy way forward.
01-22-2011 03:59 PM - last edited on 11-10-2011 08:15 AM by Kevin_Paul
Angi, you don't really say if you're trying to print from a system running OpenVMS. And you haven't said what type printer.
With Google I found the following URL:
and the person responding seems to be doing what you're after, at least printing using PCL to a printer on OpenVMS.
The "traditional" way to handle printers is to use a queue and symbiont to send the data to the printer which might be either connected to a serial device (of several different types), a parallel interface or USB (if your unknown system HAS USB for that matter). The code you've posted looks like it's "plain ascii" PCL commands and that might work best if you copied it using the COPY command to the printer or possibly programmaticly by opening the serial port and writing directly to the printer. There are many alternate solutions so it makes sense (to me) to try and find someone else who has done something similar and pick their brain. There are also software vendors who have solved this and other printing "problems" on OpenVMS for non-native printers. One of these, I think, is Northlake.
There's also this ITRC thread:
01-22-2011 04:08 PM - last edited on 11-10-2011 08:15 AM by Kevin_Paul
There are also other threads in ITRC that seem pertinent, one of them: