* HP Laserjet 4si Setup
@ 1995-05-09 4:00 C. Broome
1995-05-09 4:00 ` Mark Palmer
0 siblings, 1 reply; 2+ messages in thread
From: C. Broome @ 1995-05-09 4:00 UTC (permalink / raw)
Good morning folks ...
Can anyone help us setup an HP Laserjet 4si under Digital UNIX V3.0? We want
to be able to select which tray to use and we also want to print in landscape
mode without compressing the type size. This apparently can be specified from
the command line, but we would like this specified in the queue definition.
Are there any VMS converts out there who can tell us what the equivalent of
device control libraries would be under OSF/1?
Any help is most appreciated.
/Cbroome
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: HP Laserjet 4si Setup
1995-05-09 4:00 HP Laserjet 4si Setup C. Broome
@ 1995-05-09 4:00 ` Mark Palmer
0 siblings, 0 replies; 2+ messages in thread
From: Mark Palmer @ 1995-05-09 4:00 UTC (permalink / raw)
To: CBroome
"C. Broome" <CBroome@msvu1.msvu.ca> wrote:
>Good morning folks ...
>
>Can anyone help us setup an HP Laserjet 4si under Digital UNIX V3.0? We want
>to be able to select which tray to use and we also want to print in landscape
>mode without compressing the type size. This apparently can be specified from
>the command line, but we would like this specified in the queue definition.
Well, here's a solution that we use. It does not involve changing the
queue definition but it requires that perl be installed. It takes advantage
of escape sequences that can be passed to the 4si.
---------------------------------
#!/usr/local/bin/perl
require "getopts.pl";
%FontArray=( "DEFAULT", "\x1b(8U\x1b(s0p16.67h 8.5v0s0b0T",
"LINE_PRINTER", "\x1b(8U\x1b(s0p16.67h 8.5v0s0b0T",
"LINE_PRINT_B", "\x1b(8U\x1b(s0p16.67h 8.5v0s3b0T",
"LINE_PRINT_I", "\x1b(8U\x1b(s0p16.67h 8.5v1s0b0T",
"LINE_PRINT_BI", "\x1b(8U\x1b(s0p16.67h 8.5v1s3b0T",
"LP2", "\x1b(8U\x1b(s0p16.67h6.0v0s0b4099T",
"COURIER10", "\x1b(8U\x1b(s0p10h0s0b4099T",
"COURIER10_B", "\x1b(8U\x1b(s0p10h0s3b4099T",
"COURIER10_I", "\x1b(8U\x1b(s0p10h1s0b4099T",
"COURIER10_BI", "\x1b(8U\x1b(s0p10h1s3b4099T",
"COURIER12", "\x1b(8U\x1b(s0p10h0s0b4099T",
"COURIER12_B", "\x1b(8U\x1b(s0p10h0s3b4099T",
"COURIER12_I", "\x1b(8U\x1b(s0p10h1s0b4099T",
"COURIER12_BI","\x1b(8U\x1b(s0p10h1s3b4099T",
"CODE128", "\x1b(2Y\x1b(s0p 8.34h12.0v0s0b0T",
"TIMES", "\x1b(8U\x1b(s1p36v0s0b4101T",
"OMEGA", "\x1b(8U\x1b(s1p36v0s0b4113T",
"HELV", "\x1b(8U\x1b(s1p36v0s0b4148T",
"LABEL","\x1b(8U\x1b(s0p 8.34h12.0v0s3b4099T",
"PORT","\x1b&l0O",
"LTRAY","\x1b&l4H",
"UTRAY","\x1b&l1H",
"DOUBS","\x1b&l1S",
"LAND","\x1b&l1O" );
#
# Set all the possible options
#
&Getopts('hH12nlpud:f:N:');
#
# print the help options that are available.
#
if ($opt_h) {
print("Usage: lpwide -NhH12nlpu -ddest -ffont\n\n");
print("Options: -h help\n");
print(" -H List font names available\n");
print(" -N# number of copies\n");
print(" -1 Tray Number 1 (Upper)\n");
print(" -2 Tray Number 2 (Lower)\n");
print(" -n Normal (Non-wide) font\n");
print(" -l Landscape page orientatio\n");
print(" -p Portrait page orientation\n");
print(" -u Double side printing\n");
print(" -ddest Print to printer dest\n");
print(" -ffont Print using another font\n");
exit(0);
}
if ($opt_H) {
print("Available Fonts are:");
foreach $key (sort(keys %FontArray)) {
print($key, "\n"," ");
}
print("\n");
exit(0);
}
#
# Set the default printer.
#
$lpdest="";
if ($opt_d) {
$lpdest="-d$opt_d";
}
#
# Send all the output to the printer
#
open(STDOUT, "|lp $lpdest");
#
# -p for portrait mode
#
if ($opt_p) {
print("$FontArray{'PORT'}");
}
#
# -l for landscape mode
#
if ($opt_l) {
print("$FontArray{'LAND'}");
}
#
# -N# x number of copies
#
if ($opt_N) {
print "\x1b&l","$opt_N","X";
}
#
# -1 for upper tray
#
if ($opt_1) {
print("$FontArray{'UTRAY'}");
}
#
# -2 for lower tray
#
if ($opt_2) {
print("$FontArray{'LTRAY'}");
}
#
# -u to print on both sides of the page
#
if ($opt_u) {
print("$FontArray{'DOUBS'}");
}
if ($opt_n) {
$Default="COURIER10";
}
else {
$Default="DEFAULT";
}
#
# -f font
# i.e. to get courier 10 font bold, use:
# lpwide -f COURIER10_B <filename>
#
if ($opt_f) {
print("$FontArray{$opt_f}");
}
else {
print "$FontArray{$Default}";
}
#
# Now cat our files out
#
print "\x1b&k2G";
while (<>) {
print;
}
#
# Close it up.
#
close(STDOUT);
-- Mark Palmer
mailto:palmer@mfa.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1995-05-09 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-05-09 4:00 HP Laserjet 4si Setup C. Broome
1995-05-09 4:00 ` Mark Palmer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox