Personal tools
HylaFAX The world's most advanced open source fax server

Difference between revisions of "Automatically print incoming faxes"

m (Reverted edits by Azmodan (Talk); changed back to last version by Paul)
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 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-services.de)

Revision as of 12:58, 5 March 2007

To automatically print incoming faxes to lpr, insert a line of code similar to

/usr/bin/tiff2ps -a $FILE | lpr

into your faxrcvd 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 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-services.de)



Powered by MediaWiki
Attribution-ShareAlike 2.5

Project hosted by iFAX Solutions