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] Filename Problem



Hi,

in bin/faxrcvd at a certain point you should
see something like this:

         echo ""
         echo "--$MIMEBOUNDARY"
         if [ "$FILETYPE" = "tif" ]; then
             echo "Content-Type: image/tiff;
name=\"$FILENAME.tif\""
             echo "Content-Description: FAX document"
             echo "Content-Transfer-Encoding: $ENCODING"
             echo "Content-Disposition: attachment;
filename=\"$FILENAME.tif\""
             echo ""
             encode $FILE;
         elif [ "$FILETYPE" = "pdf" ]; then
             echo "Content-Type: application/pdf;
name=\"$FILENAME.pdf\""
             echo "Content-Description: FAX document"
             echo "Content-Transfer-Encoding: $ENCODING"
             echo "Content-Disposition: attachment;
filename=\"$FILENAME.pdf\""
             echo ""
             $TIFF2PDF -o $FILE.pdf $FILE
             encode $FILE.pdf
             $RM -f $FILE.pdf 2>$ERRORSTO
         else #  default as Postscript
             echo "Content-Type: application/postscript;
name=\"$FILENAME.ps\""
             echo "Content-Description: FAX document"
             echo "Content-Transfer-Encoding: 7bit"
             echo "Content-Disposition: attachment;
filename=\"$FILENAME.ps\""
             echo ""
             $FAX2PS $FILE 2>$ERRORSTO
         fi

(Depending on your Hylafax version, the code
could be different from the one above)

Try to put something like this before this piece
of code:

FILENAME="$(echo $FILENAME | sed 's/0*//')"

This command will strip all zeroes in front of 
your number, returning the part of the string
you're interested in.

Hope this helps.

Cheers,
  Angelo

----- Original Message -----
Da : "Dan Riehl" <dan.riehl@xxxxxxxxxxxxxxxxxx>
A : <hylafax-users@xxxxxxxxxxx>
Oggetto : [hylafax-users] Filename Problem
Data : Thu, 4 Sep 2008 15:46:28 -0500

> Is there a way to change the seed filename that HylaFax
> uses in the file creation process.
> I am using the fax to email portion heavily with the
> conversion to PDF. I get the email with the attachment.  I
> can view them fine on a workstation.
> 
> However, my mobile users receive them on their mobile
> device (cellphone) and cannot open them.  If I shorten the
> name up, they can.  If I could just chop some of the zeros
> out I would be fine.  Fax000000101.pdf is just waay too
> long.
> 
> 
> -Dan
> 
> 
> ____________________ 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@xxxxxxxxx*
> 


____________________ 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@xxxxxxxxx*




Project hosted by iFAX Solutions