[Asterisk-Users] viewing fax tiffs?
Steve Edwards
asterisk.org at sedwards.com
Thu Sep 23 15:47:57 MST 2004
I had troubles with tiff2ps as well.
I use the following script:
#
# Filename: aster-fax.sh
#
# Version: 000
#
# Edit date: 08-Jun-2004
#
# Facility: Asterisk
#
# Abstract: Convert a received fax to PDF and email.
#
# Environment: Unix, sh
#
# Author: Steven L. Edwards
#
# Modified by
#
# 000 08-Jun-2004 SLE Create.
#
# call with:
# $1 = filename
# $2 = email address
# $3 = calleridnum
# $4 = calleridname
#
# save some arguments
BASENAME=$(basename "$1" .tiff)
FROM="$3 $4"
FULLNAME="$1"
PATH=/bin:/usr/bin:/usr/sbin
TO="$2"
#
# convert the TIFF into single page TIFF's
# (tiff2ps's "-a" doesn't seem to work for me.)
convert $FULLNAME $BASENAME-%02d.tiff
#
# output the MIME headers, convert the TIFF files to PS to PDF, MIME
# encode it and mail it.
(
echo "MIME-Version: 1.0"
echo "Content-ID: <"`date`">"
echo "Content-Transfer-Encoding: base64"
echo "Content-Type: application/pdf; name=\"$BASENAME.pdf\""
echo "Subject: Fax from $FROM"
tiff2ps -2 -a -e -h 11 -w 8.5 $BASENAME-[0-9][0-9].tiff\
| ps2pdf -\
| mimencode -b
) | sendmail $TO
#
# (end of aster-fax.sh)
I invoke it in extensions.conf as:
exten = h,1,system(/usr/local/bin/aster-fax.sh ${FAXFILE} \
example at example.com "${CALLERIDNUM} ${CALLERIDNAME}")
(all on 1 line, of course)
On Thu, 23 Sep 2004, Matthew Asham wrote:
> Hello,
>
> I have spandsp setup to accept incoming faxes and receiving tif files
> via Email.
>
> Using tiff2pdf, or tiff2ps -a2 or even tiffsplit, the last page of the
> fax is cut off and the quality of the text looks "squished".
>
> I "figure" it's a tiff parsing thing, as opposed to a problem with my
> spandsp installation (heh).
>
> Has anyone experienced the same thing, or can anyone recommend a
> "proper" way to convert fax'd tiffs to another format or even a
> multi-page tiff viewer for Linux?
>
> Thanks
>
> Matthew
>
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline pagesteve at sedwards.com Fax: +1-760-731-3000
More information about the asterisk-users
mailing list