LinuXelite
Programmer
Hi!
I need to print a document with 135 cols instead of 80 cols (now it prints on 80 cols).
What do I need to configure? I use a basic, generic serial printer.
Here the script I have to modify.
To print with 132 cols to I need to change the code (015)?
Do I need to change the term? ansi? vt100?
Im not familiar with Unix printer.
Thank you for your help. I marked helpfuls tips ;o)
usage="USAGE: $0 [files]"
tmpname="/tmp/tr$$"
devout="/dev/tty"
case $TERM in
ansi)
pxon="\033[5i"
pxoff="\033[4i"
;;
esac
if [ $# -ne 0 ]
then
if [ $1 = "-nf" ]
then
ff=""
shift
else
ff="\f\c"
fi
fi
#
# Impression du rapport
#
if [ $# -ne 0 ]
then
echo "\c" > ${tmpname}
while [ $# -ne 0 ]
do
cat $1 >> ${tmpname}
echo "${ff}" >> ${tmpname}
shift
done
else
cat > ${tmpname}
fi
sleep 1
echo "${pxon}\c" > ${devout}
cat ${tmpname} > ${devout}
echo "${pxoff}\c" > ${devout}
rm ${tmpname}
I need to print a document with 135 cols instead of 80 cols (now it prints on 80 cols).
What do I need to configure? I use a basic, generic serial printer.
Here the script I have to modify.
To print with 132 cols to I need to change the code (015)?
Do I need to change the term? ansi? vt100?
Im not familiar with Unix printer.
Thank you for your help. I marked helpfuls tips ;o)
usage="USAGE: $0 [files]"
tmpname="/tmp/tr$$"
devout="/dev/tty"
case $TERM in
ansi)
pxon="\033[5i"
pxoff="\033[4i"
;;
esac
if [ $# -ne 0 ]
then
if [ $1 = "-nf" ]
then
ff=""
shift
else
ff="\f\c"
fi
fi
#
# Impression du rapport
#
if [ $# -ne 0 ]
then
echo "\c" > ${tmpname}
while [ $# -ne 0 ]
do
cat $1 >> ${tmpname}
echo "${ff}" >> ${tmpname}
shift
done
else
cat > ${tmpname}
fi
sleep 1
echo "${pxon}\c" > ${devout}
cat ${tmpname} > ${devout}
echo "${pxoff}\c" > ${devout}
rm ${tmpname}