×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

syntax for pcl on solaris using vi editor

syntax for pcl on solaris using vi editor

syntax for pcl on solaris using vi editor

(OP)
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

RE: syntax for pcl on solaris using vi editor

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,

RE: syntax for pcl on solaris using vi editor

(OP)
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

RE: syntax for pcl on solaris using vi editor

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close