From: Aaron W. Hsu on
I sometimes find it convenient to take a text document and print it to
my printer with something like

$ lpr my_file.txt

Where my printer is a CUPS based K5400 Officejet Pro. I'm running
Slackware64 13.0.

This works quite well, in general, but there is on annoying problem
that persists. The margins on the K5400 are a bit large at the top and
bottom of the page. I can account for this when printing postscript
files, which is how most documents are printed (such as enscript
or a2ps or DVI), but if I just want to send a plain text document out,
what can I do to make sure that the plain text is not cut off at the
bottom and top of the page?

Aaron W. Hsu
--
A professor is one who talks in someone else's sleep.
From: Aaron W. Hsu on
Aaron W. Hsu <arcfide(a)sacrideo.us> writes:

>This works quite well, in general, but there is on annoying problem
>that persists. The margins on the K5400 are a bit large at the top and
>bottom of the page. I can account for this when printing postscript
>files, which is how most documents are printed (such as enscript
>or a2ps or DVI), but if I just want to send a plain text document out,
>what can I do to make sure that the plain text is not cut off at the
>bottom and top of the page?

To answer my own question, cups has an lpoptions command that comes
in really handy for setting the /etc/cups/lpoptions file and setting some
specific text only features of CUPS printing. Here's what I have in
my lpoptions file now:

Default K5400 prettyprint=true page-top=72 page-left=72 \
page-right=72 page-bottom=72 cpi=13

This prints text files with a header that prints the job name, date,
and page number, has margins of about one inch on all sides, and
prints about 84 columns worth of text on each line.

Aaron W. Hsu
--
A professor is one who talks in someone else's sleep.