Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] RE : RE : RE : RE : RE : SambaFax problemscanningFax-Nr
Many thanks for your help. As i told you earlier I got it run after
fixing the file with FIXPS and then to PS2ASCII. I would like to know if
what client you use for sending and recieveing fax. My side the client
is a third party software and when i print using this software to the
sambafax printer, its not able to get the number from this file.
IMO, i think the file is embedded with graphic, but sambafax need it to
be text right? I was thinking what clients can be used for hylafax to
make use of Sambafax functionality? Is there a possibility that I can
print the fax as PDF document to a spooling directory and tell hylafax
or sambafax to get the fax number from this document and send this
document as fax?
I got Sambafax working but I'm still not able to use it from my client
application :( Any suggessions?
Regards,
Shafeer.
On Wed, 2003-05-21 at 09:47, Xware wrote:
> Whell, honest I don't know what else to tell you.
> Here follows my sambafax scrip that works perfectly well with LPR and
> portability optimized postscript on a HP4 PS driver. I use it everyday
> for a long time.
> Hope this helps.
>
> --
> Phil.
>
> ----SNIP--------
> #!/bin/sh
> #
> # Faxing with HylaFax through a faxprinter
> #
> # This script is heavily depending (just about copied) from the work of:
> # -------------------------------------------------
> # Faxfilter für MS-Windows und lpd und mgetty-paket
> # Author : Wundrig Roland
> # -------------------------------------------------
> # The intellectual (c) remains with Roland Wundrig
> # This rev created by ignace.suy@purpel3.nl, september 2000
> # Developed and tested using Hylafax 4.1beta2 On SuSE 6.4.
> #
>
> # constants
> SENDMAIL="/usr/sbin/sendmail"
>
> # make up a temporary file
> FAXFILE=/tmp/sambafax.$$
>
> # retrieve the username and hostname from the paramaters
> while :
> do
> case "$1" in
> -n) Username="$2"
> shift ; shift
> ;;
> -h) Hostname="$2"
> shift ; shift
> ;;
> -*) shift
> ;;
> *) break
> esac
> done
>
> # if the samba user is anonymous then send mails to the postmaster
> if [ "$Username" = "nobody" ];
> then
> MailTo="faxmaster"
> else
> MailTo=${Username}
> fi
>
> # now dump the to-be faxed data (PostScript format) to the temp file
> cat >${FAXFILE}
>
> # retrieve the faxnumber from the printfile
> FAXNUM=`ps2ascii ${FAXFILE} | awk '{ IGNORECASE=1 } /FAX-Nr ?: ?[0-9-]*/
> \
> { $0=$0 "xxx"; \
> gsub(/-/,""); \
> anfang=match($0,/ ?: ?/); \
> anfang=anfang+match(substr($0,anfang),/[0-9]/)-1; \
> ende=match(substr($0,anfang),/[^0-9]/)-1; \
> printf ("%s",substr($0,anfang,ende)) \
> }' `
>
> # if faxnumber is found fax the tempfile
> # we do not check the validity of the faxnumber, let sendfax do this...
> if [ "${FAXNUM}" = "" ] ; then
> (echo "To: ${MailTo}"
> echo "From: Le gestionnaire de telecopie CubiX <fax>"
> echo "Subject: Echec de l'envoi d'une telecpie"
> echo ""
>
> echo "Numero inutilisable dans votre fax du :"
> echo `date`
> echo ""
> echo "La syntaxe du numero doit etre la suivante:"
> echo "Fax-Nr : ddd-ddddddd"
> echo "Aucun espace ni caractere a l'exception du tiret n'est
> autorise"
> echo "dans le numero."
> echo ""
> echo "Merci de corriger et de recommencer."
> ) | 2>&1 $SENDMAIL -ffax -oi ${MailTo}
> else
> sendfax -D -n -f ${MailTo} -d ${FAXNUM} ${FAXFILE}
> fi
>
> # remove the temp file
> rm -f ${FAXFILE}
>
> # end of script ######################################################
____________________ 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@hylafax.org < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*