HylaFAX The world's most advanced open source fax server

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

[hylafax-users] Legal documents



This probably isn't a hylafax-specific issue. Most likely it's a conversion issue, but I think my best bet for a solution is here.

Incoming faxes which are legal-sized documents are truncated. To try and identify the cause of the problem, I changed US-Letter in paper-config to the same values as legal and it still truncated the legal document, which makes me think there is a problem with tiff2ps or maybe even ps2pdf. I'm including my script so you can see what I'm doing. I post the resulting pdf to a web server running on the same machine so it can be read by users with the appropriate permissions.


############################################################## # Title: upload.sh # Purpose: Convert incoming faxes to pdf then upload fax & # logfile to localhost for additional processing and archival # # By John Davis ##############################################################

## get the fax queue ID out of the second parameter
FAXQUEUE=`grep "ANSWER: FAX CONNECTION DEVICE" $2 | gawk 'BEGIN { FS = "\047" } {print $2}' | gawk 'BEGIN { FS = "/dev/" } {print $2}'`


#echo $FAXQUEUE

# echo $ i >log.txt
tiff2ps -a $1 -O $1.ps
echo "after $1 conversion to ps $1.ps" >>log.txt

# convert to pdf
ps2pdf $1.ps $1.pdf
#echo "after $1 conversion to pdf $1.pdf" >>log.txt

# remove the tif extension
FILE=`echo $1.pdf | awk 'BEGIN { FS = "." } { print $1 }'`
EXT=`echo $1.pdf | awk 'BEGIN { FS = "." } { print $3 }'`


FAX=$FILE.$EXT



mv $1.pdf $FAX


curl http://localhost/faxes/incoming.php -F "faxfilename=@/var/spool/hylafax/uploadq/$FAX" -F "faxfilename1=$FAX" -F "faxqueue=$FAXQUEUE"

#echo "uploaded $FAX" >>log.txt

# clean up
##rm -f /var/spool/hylafax/uploadq/$1*
##rm -f /var/spool/hylafax/uploadq/$2*




Thanks for the assistance -John Davis

____________________ 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