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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PCL Command Preamble to change tray followed by RAW PostScript

Status
Not open for further replies.

Bevis

Programmer
May 27, 2005
6
CA
Hi All

I am trying to send PCL codes down to printer before sending RAW postscript data directly to the printer (not going through printer driver). The purpose of the PCL commands are to change the paper source before the RAW postscript prints.

The following actually changes the paper source but the postscript that follows actually comes out in garbled form.

Note: code is VB sample that allows me to change the paper source to drawer 4 on Canon imageRunner 3300
Chr(27) & "E" & Chr(27) & "&l20H"

If I do not include the initial escape sequence the postscript data prints correctly although the printers default tray is used instead of drawer 4 which is what I want.

Would anyone have any suggestions on what I go do differently to resolve this problem.

Much apreciated
Kevin
 
Use a Postscript command to change trays! You can't configure the printer in PCL and then jump to Postscript.

Perhaps you can set the tray selection in a PJL preamble.

DansDad?

Jim Asman
 
I would hazard a guess that the printer sees the 'job' starting with a PCL sequence, and 'auto-selects' the personality on that basis; the following PostScript statements are then just treated as data within the assumed PCL stream.

The only way you could stop this happening would be to prefix the PostScript with a Universal Exit Language statement ({esc}%-12345X), which tells the interpreter to switch to PJL, then use a @PJL ENTER LANGUAGE = POSTSCRIPT statement.

But in doing so, the UEL would reset the printer back to power-on defaults, which would effectively over-ride your PCL tray-switch!

So, as Jim says, set the required paper (media) source either within the PostScript stream, or prior to that in a PJL statement.
 
Thanks for feedback. I will be looking at both PostScript and PJL options.

Now if I just had a Canon manual. Called there support center and they indicated nothing of the sort was available. lol. At least the person I talked to...

Much appreciated
Kevin
 
I was curious about one thing. Does the PJL job have to wrap the raw postscript or would it look something like the following?

JOB START
CHANGE PAPER SOURCE
JOB END
SEND RAW POSTSCRIPT

Thanks again
Kevin

 
Bevis

I think that you would have exactly the same problem using a PJL 'job' before raw PostScript as with the original 'PCL settings' job in front of the PostScript, because the auto-personality selection would not work properly.

i.e. the data sent on the connection has to either start with recognisable PostScript (to cause automatic change to PostScript personality), or you must explicitly change to PostScript by using the PJL ENTER LANGUAGE=POSTSCRIPT statement (which implies use of UEL, which implies a reset to power-on default option settings).
 
Kevin

The following link provides a brief history of the PCL language, and links to the PCL Technical Reference manual, and also to other PCL5 & PJL manuals:


Most of this should be applicable to the Canon, although it won't include any Canon-proprietary PJL statements.

Note that some of the (PDF format) manuals are fairly hefty downloads.
 
Thanks for all your input. I have resolved the issue.

Basically I wrap the raw data from postscript file with valid PJL statements.

Kevin
 
That should work for you as long as the job needs all pages drawn from the same tray. If however, you need to change trays in the middle of the job, then you will have to do the switch within the Postscript stream.

Jim Asman
 
Personally I'm just looking forward to Metro from Microsoft to alleviate the nightmare that is PostScript, PDF and PCL. :)

Jim, fortunately everything prints from the same tray.
 
Kevin

Your comment about Metro assumes that Metro will be offered by printer manufacturers as a native Page Description Language (otherwise, the Metro document would still have to be translated into something that the printer understands); do you think this is likely in the short to medium term?.
 
DansDad definetly long term.
Probably 2 to 2 1/2 years away. Even then only new printers would probably support.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top