I'm using the "lpr" command to print to a network printer but the file contains long lines of text between line breaks so the lines bleed off the page and do not get printed. So how can I get all the text printed?
Depends on the printer whether there is a landscape and whether your printer definitions have a matching capability.
You could possibly set the printer to linewrap long lines but that will screw up your paging through the spooler.
Ed Fair
Give the wrong symptoms, get the wrong solutions.
I used provide '-o something' to 'lp' based on the printer model/capabilties.... I think the model(s) used to be defined under '/usr/lib/lp/model' [Solaris]....
That's been ages ago - don't quite remember all the details.
prints a file, with an 8 space left margin with lines folded to fit on a page
#
old=`pwd`
for i in $*
do
if [ ! -d $i ]; then
fold -w 72 $i > /var/tmp/`basename $i`
cd /var/tmp
pr -l60 -o8 `basename $i` | lp
rm /var/tmp/`basename $i`
cd $old
fi
done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.