- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: PCL Code in UNIX
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
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
тАО06-29-2010 12:12 AM
тАО06-29-2010 12:12 AM
PCL Code in UNIX
i have a Problem with the PCL Code. I don't understand, how i use the PCL code in Unix.
I would to change the tray2 to tray1, with the PCL code. I use for this ^[&l4H and ^[&l1H.
In unix i try: echo ^[&l4H
Can anyone help me please?????
THX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2010 04:04 AM
тАО06-29-2010 04:04 AM
Re: PCL Code in UNIX
You should put the PCL codes into two files, and use the cat command
cat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2010 04:41 AM
тАО06-29-2010 04:41 AM
Re: PCL Code in UNIX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2010 05:26 AM
тАО06-29-2010 05:26 AM
Re: PCL Code in UNIX
following thread discuses about the using PCL with lp command in UNIX:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1276536871023+28353475&threadId=127230
Regards,
Bhadresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2010 06:37 AM
тАО06-29-2010 06:37 AM
Re: PCL Code in UNIX
Are you running HP-UX or Linux? HP-UX uses the SysV print spooler and the command is lp, not lpr.
PCL is just a series of special codes that are inserted in front (or sometimes in the middle) of the print job. NOTE: the code ^[ usually refers to the escape (ESC) character so it must be represented correctly. There are a couple of ways to do this, but this is the most portable:
echo "\027&l4H"
For use with HP-UX or Linux, you can do this (ASSUMING you are using a POSIX shell such as ksh):
( echo "\027&l4H" ; cat
This will insert the appropriate codes in front of the file to be printed.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2010 10:45 PM
тАО06-29-2010 10:45 PM
Re: PCL Code in UNIX
But since you use lpr, why not try something like a '-o tray2' option for the lpr command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2010 01:47 AM
тАО06-30-2010 01:47 AM
Re: PCL Code in UNIX
cat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2010 07:08 AM
тАО06-30-2010 07:08 AM
Re: PCL Code in UNIX
Or you can do it like this without vi:
echo "\033&l4H" > tray2.pcl
Now you can use cat:
cat tray2.pcl file-to-print | lpr -Pprinter_name
Note: lpr is not lp. On HP-UX, lpr is a wrapper for lp that emulates lpr. However, -otray2 is not valid for the lpr wrapper and won't work on HP-UX if you do not access the HP printer directly with HPPI software.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2010 10:03 PM
тАО06-30-2010 10:03 PM
Re: PCL Code in UNIX
Or you can do it like this without vi:
echo "\033&l4H" > tray2.pcl
Now you can use cat:
cat tray2.pcl file-to-print | lpr -Pprinter_name
This not work.
cat:tray2.pcl: No such file or directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 01:09 AM
тАО07-01-2010 01:09 AM
Re: PCL Code in UNIX
/033&l4H
the printer not understand the pcl code.
I do all, but i have no success. :(