Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax for pcl on solaris using vi editor

Status
Not open for further replies.

ttroxell

Technical User
Nov 21, 2002
24
US
Hi,

Trying to write pcl code on solaris using vi editor:

This is my current preload to call a printer tray. It always prints to default tray 4 on hp9000 printer.

^[%-12345X@PJL
@PJL ENTER LANGUAGE = PCL
^[&l1H
^[%-12345X

Second preload file for postscript output to specify tray and postscript output:

^[%-12345X@PJL COMMENT PCL Job
@PJL ENTER LANGUAGE = PCL
^[E . . . . PCL Job . . . . ^[E
@PCL SET MEDIATYPE = CARDSTOCK
@PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-ADOBE. . . . postscript job data. . . .
^[%-12345X

This ignors tray mediatype and prints both ascii report and a postscript file to default tray 4 on hp9000: I need them to go to specific trays.

Any help would be greatly appreaciated.
Thanks,
-T

 
try cahnging

^[%-12345X@PJL COMMENT PCL Job
@PJL ENTER LANGUAGE = PCL
^[E . . . . PCL Job . . . . ^[E
@PCL SET MEDIATYPE = CARDSTOCK
@PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-ADOBE. . . . postscript job data. . . .
^[%-12345X

to

^[%-12345X@PJL COMMENT PCL Job
@PJL ENTER LANGUAGE = PCL
^[E . . . . PCL Job . . . . ^[E
^[E%-12345X@PJL
@PCL SET MEDIATYPE = CARDSTOCK
@PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-ADOBE. . . . postscript job data. . . .
^[%-12345X

you have to tell the printer you are going back to PJL.

Good luck,
 
I made the change you suggested, but the file is still printing from tray4. Also, I get two pages before the printout.
Page one
. . . . PCL . . . .
Page two
with the following wrapping around the page
%-12345X@PJL
@PCL SET MEDIATYPE = CARDSTOCK
@PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-A

Page three
The postscript file prints from tray 4 not tray 3, where cardstock is loaded.

The printer is set with tray 2 = color, tray3 = cardstock, tray4 = plain.

I've retyped the command several times checking for type-os. I understand that I need a <CR> and <LF> at the end of the lines. Can you confirm?

Also, have you ever used these commands in unix scripts? I currently have setup filter scripts on solaris, which I entered pcl commands to call trays. These scripts work great for ascii reports, but when I print postscript reports the tray calls are ignored.

Thanks,
T
 
I made a error in my last post.
^[%-12345X@PJL COMMENT PCL Job
@PJL ENTER LANGUAGE = PCL
^[E . . . . PCL Job . . . . ^[E
^[E%-12345X@PJL
@PCL SET MEDIATYPE = CARDSTOCK
@PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-ADOBE. . . . postscript job data. . . .
^[%-12345X

should have been

^[%-12345X@PJL COMMENT PCL Job
@PJL ENTER LANGUAGE = PCL
^[E . . . . PCL Job . . . . ^[E
^[%-12345X@PJL
@PCL SET MEDIATYPE = CARDSTOCK
@PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-ADOBE. . . . postscript job data. . . .
^[%-12345X

Sorry. The ^[E is PCL reset. I wanted to add the enter PJL.

Yes, the end of every PJL command must end with <CR><LF>.
Yes, I use UNIX everyday and vi is my favorate editor and broune is my shell. I have a solaris printer interface script in which I do the same thing but I use PJL with PCL printing and not to much PostScript. I have the HP manuals and what you are doing should work as long as the setpagedevice library in the PS file is not overriding your settings. If it is a generic PS file, you should be fine.

Sorry again for the misleading first post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top