SUMMARY: Re: landscape print on LN03

From: Sedlak, Cynthia (SEDLAK@tawc1.eglin.af.mil)
Date: Thu Jan 28 1993 - 04:40:34 CST


hey sun-gurus.....

most of u are prob thinking i'm an ungrateful slug for not summarizing
what i found out about my LN03 printing landscape, but due to hardware
probs on the standalone sys, it was quite some time before i could even
try the suggestions. then, *this* sys went down, and, well, it's just
been one thing after another...

----------------------------

my prob was:

>i have a standalone Sun 4/370 running SunOS 4.1.1, with no additional
>print software (i.e. newsprint, etc.; is not an option at this time to
>get such software either). i'm doing my darnedest to set up a DEC LN03Plus
>laser printer for landscape mode. it seems to work okay as far as portrait
>goes, but i'm at a loss as to how to rotate the print. i've checked the
>LN03 manual, and found the escape sequence to use, but can't quite figure
>out how to get that sequence to be recognized. i've also read as much as
>i can find about /etc/printcap, in third-party documentation as well as
>the illustrious sun documentation. my printcap is pretty basic -- just
>set the baud rate to match the printer's. specific questions are:
>
>1. is there a pre-built filter out there that i can utilize?
>2. exactly how would i use it if i had it?
>3. is there any documentation anywhere that goes indepth into filters?
>
>any assistance, clues, words of encouragement, etc. would be greatly
>appreciated......
>
>cindy
>(CaS)
>
>************************************************************
>* CYNTHIA A. SEDLAK sedlak@awc1.eglin.af.mil *
>* *
>* USAFAWC/SCAI comm (904) 882-4100 *
>* 203 W D AVE SUITE 306 DSN 872-4100 *
>* EGLIN AFB, FL 32542-6867 *
>************************************************************
>
--------------------
it really wasn't so horrible after all; just a learning curve, :-)
i ended up creating another entry in my /etc/printcap, calling this
printer "land", but pointing to the same physical device. for my :if
filter, i used a shell file (ln03_land) that contained the escape
sequences (note plural; at first, i naively thought it would only take
one escape sequence) identified in the ln03 manual. i'm including my
file (ESC characters have been converted to caret left bracket ( ^[ ) for
printability); adjust appropriately to fit ur requirements....

------
#!/bin/sh
echo -n '^[c'
echo -n '^[[11h'
echo -n '^[[7 I'
echo -n '^[[?21 J'
echo -n '^[[15m'
echo -n '^[[?29I'
echo -n '^[[9w'
echo -n '^[[34;21 G'
echo -n '^[[4g'
echo -n '^[[296;471;646;821;996;1171;1346;1521;1696v'
echo -n '^[[1961;2136;2311v'
echo -n '^[[175;3150s'
echo -n '^[[70;2370r'
cat -
ret=$?
echo -n '^[[!p'
exit $ret
-------------------
** here's what each of the above lines do:
resets printer's operating features to initial values
selects a spacing unit
select size unit - pixel, 300/inch
page format select - Wide North American letter
selects font - Courier 6.7 point, 13.6 pitch
select pitch
select horizontal pitch - 15 pitch
spacing pitch increment
tab clear - all vertical
sets vertical tabs
sets vertical tabs
left and right margins - pixel
top and bottom margins - pixel
..send it to the printer..
...
resets printer's operating features to initial values (performs same
    function as above, just a different way of doing it)
-------------------------------

thanks to the following for their responses...

<stuart@bfsun1.eglin.af.mil> stuart shapiro
<mgh@bihobl2.bih.harvard.edu> michael harrington
<etnibsd!vsh@uunet.UU.NET> steve harris
<mharris@jpmorgan.com> michael harris
<andataco!andataco.com!louis@UCSD.EDU> louis brune
<ted@usasoc.soc.mil> ted nolan

special thanks to stuart shapiro for noting to press cntrl-v in vi to
get escape character to print --- that prob would have kept me confused
for quite a while! %-\

-CaS
************************************************************
* CINDY SEDLAK sedlak@awc1.eglin.af.mil *
* *
* USAFAWC/SCAI comm (904) 882-4100 *
* 203 W D AVE SUITE 306 DSN 872-4100 *
* EGLIN AFB, FL 32542-6867 *
************************************************************



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:26 CDT