- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Need help using PCL to print barcode
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2011 01:06 PM
тАО01-20-2011 01:06 PM
Need help using PCL to print barcode
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?
- Tags:
- pcl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2011 01:33 PM
тАО01-20-2011 01:33 PM
Re: Need help using PCL to print barcode
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2011 06:13 AM
тАО01-21-2011 06:13 AM
Re: Need help using PCL to print barcode
The gnu barcode program will create postscript barcodes and it builds easily on VMS (using gnv -its pretty simple you could probably easily build it without GNV too).
http://www.gnu.org/software/barcode
Brad McCusker
Software Concepts International
www.sciinc.com
Software Concepts International
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2011 12:18 PM
тАО01-21-2011 12:18 PM
Re: Need help using PCL to print barcode
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2011 12:49 PM - last edited on тАО04-04-2017 12:41 AM by Parvez_Admin
тАО01-21-2011 12:49 PM - last edited on тАО04-04-2017 12:41 AM by Parvez_Admin
Re: Need help using PCL to print barcode
It can be cheaper to use an existing library and tools, even if you have to port it over to VMS.
Haven't looked at what's in this old Freeware submission in detail in a while, but it looks to do 39 for you:
http://decuslib.com/freeware/freewarev60/barcode/
Other options and languages:
Lua:
[expired broken link removed on <4/4/2017> by Mod]
Python:
http://freshmeat.net/projects/barcodes-for-python
http://pypi.python.org/pypi/elaphe/
https://pypi.python.org/pypi?%3Aaction=search&term=pyBarcode&submit=search
php:
http://www.sid6581.net/cs/php-scripts/barcode/
http://pear.php.net/package/Image_Barcode/
Here's a php pdf generator that can do barcode
http://www.fpdf.org/
There's a cute php demo for a UPC barcode here:
http://php.net/manual/en/ref.image.php
Perl:
http://cpansearch.perl.org/src/KWITKNR/GD-Barcode-1.15/Barcode/
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.
www.hp.com/go/dspp
- Tags:
- AllianceONE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2011 01:19 PM
тАО01-21-2011 01:19 PM
Re: Need help using PCL to print barcode
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.
Software Concepts International
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2011 03:59 PM - last edited on тАО11-10-2011 08:15 AM by Kevin_Paul
тАО01-22-2011 03:59 PM - last edited on тАО11-10-2011 08:15 AM by Kevin_Paul
Re: Need help using PCL to print barcode
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:
http://www.computing.net/answers/openvms/pcl-specific-print-tray-commands-and-vms/583.html
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:
http://h30499.www3.hp.com/t5/General/OPENVMS-PCL-PRINTING-TO-HPLASERJET-4200/m-p/3311280#M2827
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2011 04:08 PM - last edited on тАО11-10-2011 08:15 AM by Kevin_Paul
тАО01-22-2011 04:08 PM - last edited on тАО11-10-2011 08:15 AM by Kevin_Paul
Re: Need help using PCL to print barcode
There are also other threads in ITRC that seem pertinent, one of them:
http://h30499.www3.hp.com/t5/System-Management/HP-LJ4200TN-PCL-for-barcode-on-off/m-p/3818587#M12729
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2013 07:24 PM
тАО12-10-2013 07:24 PM
Re: Need help using PCL to print barcode
thank you. i am sort of looking for such device to print differnet tyoes of barcode I will give it a try. can i have a try version.