>>>>> "asterisk" == asterisk <[EMAIL PROTECTED]> writes:
asterisk> The problem is in the tiff2ps, not in the ps2pdf. I
asterisk> found that if I remove the -h and -w parameter
asterisk> everything is OK
My computer has a tiff2pdf command (from the libtiff-tools Debian
package), so I can do everything in one command:
--- /usr/local/sbin/mailfax ---
#!/bin/sh -e
FAXFILE="$1"
RECIPIENT="$2"
FAXSENDER="$3"
REMOTESTATIONID="$4"
FAXPAGES="$5"
FAXRESOLUTION="$6"
if [ ! -f "$FAXFILE" ]
then
echo "Fax $FAXFILE not found" >&2
exit 1
fi
tiff2pdf -pA4 "$FAXFILE" |
mime-construct --to "$RECIPIENT" --subject "Fax from $FAXSENDER" \
--attachment fax.pdf --type application/pdf --file -
--- cut ---
I am not sure of the -pA4 option, but I don't know enough about FAX
standards to change it - it might be better to set the resolution with
-r depending on the FAXRESOLUTION parameter. I did a web search on the
resolution for the different modes, and got numerous different answers
for the same thing :-(.
Oh, and this is called with:
[fax]
exten => s,1,Macro(faxreceive)
exten => h,1,system(/usr/local/sbin/mailfax "${FAXFILE}" "${EMAILADDR}"
"${CALLERIDNUM}" "${REMOTESTATIONID}" "${FAXPAGES}" "${FAXRESOLUTION}")
[macro-faxreceive]
exten => s,1,SetVar(FAXFILE=/var/spool/asterisk-fax/${UNIQUEID}.tif)
exten => s,2,SetVar([EMAIL PROTECTED])
exten => s,3,rxfax(${FAXFILE})
--
Brian May <[EMAIL PROTECTED]>
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users