Difference between revisions of "Automatically print incoming faxes"
AidanVanDyk (talk | contribs) m |
|||
| (7 intermediate revisions by 4 users not shown) | |||
| Line 3: | Line 3: | ||
/usr/bin/tiff2ps -a $FILE | lpr | /usr/bin/tiff2ps -a $FILE | lpr | ||
| − | into your | + | into your $SPOOL/etc/FaxDispatch script, assuming that your printer is PostScript compatible. |
| Line 28: | Line 28: | ||
If we use fax2ps, it would be complicated to handle the printouts of | If we use fax2ps, it would be complicated to handle the printouts of | ||
different paper sizes. | different paper sizes. | ||
| + | |||
| + | |||
| + | '''For more than one printer:''' | ||
| + | |||
| + | If you have some departments or users with their own faxnumbers and want print out the incoming fax messages near by, you can make this changes in $SPOOL/etc/FaxDispatch: | ||
| + | |||
| + | <pre> | ||
| + | ## and/or by device | ||
| + | case "$DEVICE" in | ||
| + | ttyIAX0) | ||
| + | SENDTO=name@your-domain.com # all faxes received on ttyIAX0 | ||
| + | PRINTER=hplj1320 # Print document with printer= | ||
| + | ;; | ||
| + | esac | ||
| + | </pre> | ||
| + | |||
| + | And do this changes in bin/faxrcvd at line 199 for HylaFAX Version 4.3.1: | ||
| + | |||
| + | <pre> | ||
| + | if [ -n "$SENDTO" ]; then | ||
| + | # Create the document to attache | ||
| + | if [ -z "$MSG" ]; then | ||
| + | MailWithFAX success | ||
| + | else | ||
| + | MailWithFAX error | ||
| + | fi | ||
| + | # If $PRINTER not empty, then print $FILE with $PRINTER | ||
| + | if [ -n "$PRINTER" ]; then | ||
| + | $FAX2PS $FILE | lpr -P$PRINTER | ||
| + | fi | ||
| + | else | ||
| + | # If $PRINTER not empty, then print $FILE with $PRINTER | ||
| + | if [ -n "$PRINTER" ]; then | ||
| + | $FAX2PS $FILE | lpr -P$PRINTER | ||
| + | fi | ||
| + | fi | ||
| + | </pre> | ||
| + | |||
| + | From Dietmar Simons (http://www.simons-it-service.de) | ||
Latest revision as of 14:05, 16 October 2007
To automatically print incoming faxes to lpr, insert a line of code similar to
/usr/bin/tiff2ps -a $FILE | lpr
into your $SPOOL/etc/FaxDispatch script, assuming that your printer is PostScript compatible.
Dieter Kluenter dkluenter@gmx.de has added at line 112 of faxrcvd these lines for his printing:
if [ -n "$SENDTO" ]; then
echo ""
echo "The facsimile was automatically dispatched to: $SENDTO."
else
$TIFFBIN/fax2ps $1 | lpr -Plp
fi
Michael mwu@mail2.tercel.com.tw states:
Our printing environment is specific, a shared HP LJ1100 (A4 only). To be able to print out various types of paper sizes, we use the following code for printing (0.95 * A4 size):
/usr/bin/tiff2ps -a -h 11.1082 -w 7.8543 $FILE | /usr/bin/lpr
If we use fax2ps, it would be complicated to handle the printouts of different paper sizes.
For more than one printer:
If you have some departments or users with their own faxnumbers and want print out the incoming fax messages near by, you can make this changes in $SPOOL/etc/FaxDispatch:
## and/or by device
case "$DEVICE" in
ttyIAX0)
SENDTO=name@your-domain.com # all faxes received on ttyIAX0
PRINTER=hplj1320 # Print document with printer=
;;
esac
And do this changes in bin/faxrcvd at line 199 for HylaFAX Version 4.3.1:
if [ -n "$SENDTO" ]; then
# Create the document to attache
if [ -z "$MSG" ]; then
MailWithFAX success
else
MailWithFAX error
fi
# If $PRINTER not empty, then print $FILE with $PRINTER
if [ -n "$PRINTER" ]; then
$FAX2PS $FILE | lpr -P$PRINTER
fi
else
# If $PRINTER not empty, then print $FILE with $PRINTER
if [ -n "$PRINTER" ]; then
$FAX2PS $FILE | lpr -P$PRINTER
fi
fi
From Dietmar Simons (http://www.simons-it-service.de)
HylaFAX 