×
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

PCL Command Preamble to change tray followed by RAW PostScript

PCL Command Preamble to change tray followed by RAW PostScript

PCL Command Preamble to change tray followed by RAW PostScript

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

RE: PCL Command Preamble to change tray followed by RAW PostScript

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

RE: PCL Command Preamble to change tray followed by RAW PostScript

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.

RE: PCL Command Preamble to change tray followed by RAW PostScript

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

RE: PCL Command Preamble to change tray followed by RAW PostScript

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

RE: PCL Command Preamble to change tray followed by RAW PostScript

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).

RE: PCL Command Preamble to change tray followed by RAW PostScript

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:

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl04568

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.

RE: PCL Command Preamble to change tray followed by RAW PostScript

(OP)
Thanks for all your input.  I have resolved the issue.

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

Kevin

RE: PCL Command Preamble to change tray followed by RAW PostScript

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

RE: PCL Command Preamble to change tray followed by RAW PostScript

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

RE: PCL Command Preamble to change tray followed by RAW PostScript

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?.

RE: PCL Command Preamble to change tray followed by RAW PostScript

(OP)
DansDad definetly long term.
Probably 2 to 2 1/2 years away.   Even then only new printers would probably support.

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