Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 May 2001 00:48:55 -0700
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        "Mike Meyer" <mwm@mired.org>, "Micke Josefsson" <mj@isy.liu.se>
Cc:        <questions@FreeBSD.ORG>
Subject:   RE: Laserjet Tray selection?
Message-ID:  <005101c0df6e$fd87b5a0$1401a8c0@tedm.placo.com>
In-Reply-To: <15108.29002.131580.78949@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I think that what Mike is trying to say is that if you were
to go to the HP website and call up a document titled
"HP LaserJet printers - PCL Commands, Basic Page Formatting, and Font
Selection"

you would look though this and see under the
Paper Source, length, and size section that the
escape code for selecting A4 paper is

Ec&l26A

Then, if you were to go to my book, or failing access to
a copy of it, go to
http://www.freebsd.org/doc/en_US.ISO_8859-1/books/corp-net-guide/index.html

and click on 8.7.4 Filters, then if you scrolled down a bit
you would see a printcap filter in a section saying:

"Here is an example of a filter that triggers the printers automatic
LF-to-CR/LF converter (this option is only useful on HP LaserJets that
support this command):

    #!/bin/sh
    # Simply copies stdin to stdout.  Ignores all filter
    # arguments.
    # Tells printer to treat LF as CR+LF.  Writes a form feed
    # character after printing job.

    printf "\033&k2G" && cat && printf "\f" && exit 0

    exit 2

You might then proceed to replace the \033&k2G  with the \033&l26A and
install the
filter per the instructions in the rest of the chapter (which I strongly
suggest you
read) and if your Laserjet is smart enough to know that it has A4 paper
installed in
a tray, that you just might find it work the way you want.

Keep in mind, though, that only some HP Laserjets can detect what type of
paper
they have, and also they do this by sensing the tray used.  For example, in
a
HP LaserJet 4+, if your tray is a Letter tray, you cannot stuff A4 paper in
there,
the printer will still think that it's Letter sized paper.  You must
purchase the
A4 tay for that.  For example, in the HP5SI, the trays have some plastic
barriers that
need to be rearrainged and a twisty knob that needs to be changed to select
A4.

Like Mike says, there's other useful codes in that HP document, for example
you can change the font size t be very small, turn on or off duplexing,
change portrait or landscape, and
so forth.  You can combine codes to have multiple things happen at once.

Also, of course, this only works in PCL mode, if you transmit a Postscript
job then
these filters won't do anything (or could cause problems).  For example,
printing
from Netscape running under X windows, you get Postscript code from that
application.
This is only going to be useful for text jobs sent to the printer.

Ted Mittelstaedt                      tedm@toybox.placo.com
Author of:          The FreeBSD Corporate Networker's Guide
Book website:         http://www.freebsd-corp-net-guide.com


>-----Original Message-----
>From: owner-freebsd-questions@FreeBSD.ORG
>[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Mike Meyer
>Sent: Thursday, May 17, 2001 5:48 PM
>To: Micke Josefsson
>Cc: questions@FreeBSD.ORG
>Subject: Re: Laserjet Tray selection?
>
>
>Micke Josefsson <mj@isy.liu.se> types:
>> Is there any way I can tell my HP Laserjet printer to use the
>tray for A3 paper
>> size instead of the normal A4?
>
>Yes, there is. Exactly how you do it depends on a number of things you
>haven't mentioned, like which laserjet you have, and what application
>- if any - is generating the output. To found out what you can set,
>find the support search engine on the hp web site, and look for things
>like "paper tray", "duplexer" and other paper path options. All such
>options for a similar set of printers are usually documented on one
>page. Figuring out how to get your application to generate the
>appropriate commands is up to you.
>
>	<mike
>--
>Mike Meyer <mwm@mired.org>
>http://www.mired.org/home/mwm/
>Independent WWW/Perforce/FreeBSD/Unix consultant, email for more
>information.
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005101c0df6e$fd87b5a0$1401a8c0>