×
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

Change Tray in PCL and print PDF afterwards in same job

Change Tray in PCL and print PDF afterwards in same job

Change Tray in PCL and print PDF afterwards in same job

(OP)
Hello,
I wanna send PCL data to a printer before printing a pdf in raw form.
If i try to run the following code it will pick the right tray but the pdf wont be printed correct.

ESC%-12345X
@PJL ENTER LANGUAGE = PCL
[Setting the correct tray]
@PJL ENTER LANGUAGE = PDF
[Printing the PDF]
ESC%-12345X

I am aware that i cant change the language during the print job.
I dont know what else to do since the printer does not support a statement for choosing trays like "@PJL SET MEDIASOURCE = TRAY2".

RE: Change Tray in PCL and print PDF afterwards in same job

Pat,

I'm surprised that if the printer accepts PJL commands at all, that it won't also accept tray commands. Those are pretty fundamental.

For most HP models:

<Esc>%-12345X@PJL JOB
@PJL SET MEDIASOURCE=TRAY2
@PJL ENTER LANGUAGE=PDF

Which brand and model of printer are you using? If not HP, perhaps it contains a proprietary method of selection, but that method should be discernible. For example, Kyocera uses @PJL SET KINTRAYSELECT=INTRAY2.

I believe Lexmark has their own variation as well.

RE: Change Tray in PCL and print PDF afterwards in same job

(OP)
First of all: Thanks for your reply. I almost forgot that i made this Thread
To clear things up:
I found out that the printer does NOT accept PJL commands. Canon support confirmed that. So there is no way for this particular printer to select the tray in PJL.
This means that you can only select the tray via PCL and you can not change the language back to PDF.
Printer: Canon i-sensys lbp325x

Edit: I thought at first that the Printer supports PJL because it understood PCL after i "changed" the language with the SET LANGUAGE COMMAND.
But it automatically chooses the Language of the first command it understands and sets the language for the whole printjob.

RE: Change Tray in PCL and print PDF afterwards in same job

Pat,

I downloaded and took a look at the PPD (PostScript Printer Description) file for your Canon LPD 325x to see what the PostScript command was for selecting Tray 2.

While I realize that PDF is NOT PostScript, it is at least derived from PostScript. Thus, it might be worth a try to see whether sending the PostScript tray select command just prior to sending the PDF will accomplish what you seek.

I'll grant this may not work, but it costs nothing but a small amount of time, so here it is:


CODE -->

%!PS-Adobe-2.0
currentpagedevice /InputAttributes get 2 get null ne
 {<</InputAttributes <</Priority [2]>> >>
 systemdict /setpagedevice get exec} if
 <</MediaType (ANY) /Policies <</MediaType 2>> >> systemdict /setpagedevice get exec 

Send that bit of PostScript code, then immediately send your pdf. Note that the tray is specified by "Priority". The "MediaType" seems generic and is used the the selection routines for ALL the trays.

Good luck.

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