HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] faxrcvd script to convert incoming faxes to jpg
Greg Herlein:
>I just finished making a HylaFax script to convert incoming faxes
>to jpeg files,
Well. JPEG is certainly not the format of choice for black-and-white
graphics. Depending on your compression factor you will observe lots
of artifacts caused by JPEG's lossful compression. Further, Formats
like PNG (or, if you want to pay royalties to Unisys, also GIF) usually
result in slightly smaller image files for this type of image.
>the jpg to the recipients via the FaxDisptch file. This is a
>modification of the standard faxrcvd file
You can in fact do without, making re-installation of the hylafax
package not lose your modifications. The trick is to redefine the
FAX2PS environment which is being used by $SPOOL/etc/faxrcvd. Look at
this similar thing, converting received faxes to PostScript (requires
ghostscript and metamail) in addition to TIFF:
+++++++++ $SPOOL/etc/FaxDispatch +++++++++++++++++++++++++++++++++++++++++++++++
# hack alert: modify bin/faxrcvd behaviour: output both PostScript and TIFF
FAX2PS=". $SPOOL/etc/FaxDispatch.local"
# send anything to hmo; may change later
case "$SENDER" in
*) SENDTO=whom_ever_you_like;;
esac
--------- $SPOOL/etc/FaxDispatch -----------------------------------------------
+++++++++ $SPOOL/etc/FaxDispatch.local +++++++++++++++++++++++++++++++++++++++++
#!/bin/sh -x
# first output PostScript, then MIME boundary, then TIFF
# scale PostScript to A4 paper
$TIFFBIN/fax2ps -S -H11.6929 -W8.26772 $1
echo ""
echo "--$MIMEBOUNDARY"
echo "Content-Type: application/fax"
echo "Content-Description: FAX document"
echo "Content-Transfer-Encoding: base64"
echo "Content-Disposition: inline; filename=\"`basename $1`\""
echo ""
$BIN/mmencode $1
--------- $SPOOL/etc/FaxDispatch.local -----------------------------------------
Note $SPOOL/etc/FaxDispatch.local must be chmod +x.
Helge
____________________ HylaFAX(tm) Users Mailing List _______________________
To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null