Here is one example of a program to setup HP laser printers without using
the control panel
(handy for printers without a control panel, like the HP Laser1200).
* HPLJ.DEFAULT
* Setup HP LaserJet Defaults using PJL
* KILO MAR 2003
*
* PJL - Printer Job Language
* Used to change control panel settings on HP LaserJet Printer (4 and
above)
* Note - Not all PJL commands are supported on all printers
* See "Printer Job Language Reference Manual", part of "Technical
Reference Manual" bundle
* Note - HP LaserJet 4L, 5L, 6L and 1100 will reset to factory
defaults if
* they are manually reset or unplugged
*
* UEL - Universal Exit Language
* Used to enter and exit PJL on a HP Laser Printer
*
EQU ESC TO CHAR(27); * Escape Character
*
PJL.CMD = '@PJL'; * PJL Command
*
PJL.TYPE = ' DEFAULT'; * PJL Type
*
* * DEFAULT - Changes Default settings permanently
* * SET - Change Default settings only for current job
*
UEL.CMD = ESC : '%-12345X'; * UEL Command (Universal Exit Language)
*
PRINTER ON; * Send to printer
*
PRINT UEL.CMD : PJL.CMD; * Enter PJL with a UEL Command
*
PRINT PJL.CMD : PJL.TYPE : ' ORIENTATION=LANDSCAPE'; * Set Orientation
*
PRINT PJL.CMD : PJL.TYPE : ' FORMLINES=60'; * Set Page Length
*
PRINT PJL.CMD : PJL.TYPE : ' LPARM : PCL PITCH=14.00'; * Set Pitch 14 cpi
*
PRINT UEL.CMD; * Exit PJL with a UEL Command
*
* Note:
*
* All PJL jobs must begin and end with a Universal Exit Language (UEL)
command "Ec%-12345X".
* This command exits the current printer language and returns control to
PJL.
*
* The Universal Exit Language ( UEL ) command at the beginning of the job
must be
* immediately followed by the PJL command prefix "@PJL".
* The "@PJL" may be the prefix of another PJL command. Or, if the command is
ended with the "@PJL"
* then it must be followed by a linefeed character. A carriage return is
optional.
* No other characters, including control characters, are allowed between the
UEL command and the @PJL prefix
*
* The UEL command at the job end must not be followed by anything (except
the first character of the next job).
*
* Line Termination--a line feed character is required to terminate all PJL
commands except the UEL command.
* A carriage return can precede the terminating line feed, however the
carriage return is optional and is ignored.
*
* No blank command lines are allowed.
*
END
jackkengle (AT) comcast (DOT) net wrote:
Quote:
I'm looking for the same. Can do in other versions of Unix / SCO but
can not figure out the -o option that makes this happen. |