- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- 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
Forums
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
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. :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 05:44 AM
тАО07-01-2010 05:44 AM
Re: PCL Code in UNIX
>
> /033&l4H
I can't see what's in your "Pcl File".
man od
od -c
You did notice that "\033" and "/033" are
different, right?
I can't see exactly what you did with your
"Pcl File". As usual, showing actual
commands with their actual output can be
more helpful than vague descriptions and
interpretations.
> the printer not understand the pcl code.
I also know nothing about your printer.
> I do all, but i have no success. :(
"all"? Really? Then I guess that there's no
reason to continue trying.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 06:01 AM
тАО07-01-2010 06:01 AM
Re: PCL Code in UNIX
I meant \ 033 but it does not work. The printer prints just the PCL file. But does not interpret the code. Our printer is a HP Laserjet 4650 and is a network printer. I did it like in the example of Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 06:25 AM
тАО07-01-2010 06:25 AM
Re: PCL Code in UNIX
Which part of this was not clear?:
--------
I can't see what's in your "Pcl File".
man od
od -c
[...]
I can't see exactly what you did with your
"Pcl File". As usual, showing actual
commands with their actual output can be
more helpful than vague descriptions and
interpretations.
--------
> [...] HP Laserjet 4650 [...]
Ok. So the specs say that it can do "HP PCL
6, HP PCL 5c (Web download), HP postscript
level 3 emulation, native PDF printing,
[...]". If you're sending it PostScript,
then trying to throw in some PCL may not be
the best way to get the desired result. But
I don't know what you're actually sending it.
For the record, I was looking at these
printer specs:
http://h10010.www1.hp.com/wwpc/us/en/sm/WF06a/18972-236251-236268-15077-f58-375773.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 03:27 PM
тАО07-01-2010 03:27 PM
Re: PCL Code in UNIX
More and more printers from HP are being designed without ASCII capability. PCL1 through PCL4 are plain ASCII with extensions in the form of escape sequences. PCL5 (no suffix like 5c or 5e) is also OK, but PCL6 and beyond are proprietary codes that require a special driver -- mostly for current Windows only.
So back to the original question, what does the command: uname -a return?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 10:38 PM
тАО07-01-2010 10:38 PM
Re: PCL Code in UNIX
Linux ***** 2.6.5-7.312-bigsmp #1 SMP Fri Jun 6 13:44:33 UTC 2008 i686 i686 i386 GNU/Linux
I print without a print server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2010 04:01 AM
тАО07-02-2010 04:01 AM
Re: PCL Code in UNIX
> Linux
That would have helped a lot at the beginning. This is not the Linux forum - it is for HP-UX. That's why all the references to the lp command and printer scripts for JetDirect printers.
You'll need the CUPS system installed and configured for your printer. Check this page:
http://www.cups.org
and specifically:
http://www.cups.org/documentation.php/options.html
You'll need a PPD file for your 4650. Then you can use the -o options. Use the lpoptions command to see what is available for this printer.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2010 01:49 AM
тАО07-05-2010 01:49 AM
Re: PCL Code in UNIX
But now its work with the Option command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2010 03:36 PM
тАО07-05-2010 03:36 PM
Re: PCL Code in UNIX
http://forums13.itrc.hp.com/service/forums/helptips.do?#33
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2010 10:26 PM
тАО07-05-2010 10:26 PM