Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] Sending png files in notifications



I've adapted my faxrcvd file to send a png image of the first page of a fax with my pdf email. This allows the recipiant to preview the fax before they decide to open the the pdf document, we get a lot of junk faxes which we don't want to open. Why just the first page? Well if it is a mutlipage fax you could attach a png file for each page but then to print it you would need to open each png file seperately and print them, annoying if you have a 20 page fax. Or you could join all the images together so that you have a long image but this causes problems if you want to print again. In my experience the best format for printing multipage documents (on windows clients) as is, is pdf. Therefore I include the fist page as a png image, which is displayed in Mozilla and attach the pdf file which can be opened and printed if required.

For those that are interested, here's the modifications.

You need the ImageMagick package installed, then replace the line

$RM -f $FILE.ps $FILE.pdf 2>/dev/null

with the following code

echo ""
echo "--$MIMEBOUNDARY"
echo "Content-Type: image/png; name=\"$FILE.png\""
echo "Content-Description: FAX document"
echo "Content-Transfer-Encoding: $ENCODING"
echo "Content-Disposition: attachment; filename=\"$FILE.png\""
echo ""
convert $FILE.ps $FILE.png
if test -f $FILE.png.0
then
   mv $FILE.png.0 $FILE.png
   $RM -f $FILE.png.*
fi
$MIMENCODE $FILE.png 2>/dev/null
$RM -f $FILE.ps $FILE.pdf $FILE.png 2>/dev/null


____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxxxxx*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services