incoming fax images to PDF ?
"Orlando M. Amador" (oamador@amador.org)
Wed, 24 Nov 1999 23:37:38 -0400
This is a multi-part message in MIME format.
------=_NextPart_000_0003_01BF36D4.E57E75A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
You could use g32pbm and pnmtops to convert the G3 files to postscript.
Then use ps2pdf to convert the postscript output to PDF. g32pbm is included
with mgetty, pnmtops is part of the pbm toolkit, and ps2pdf of Aladdin
Ghostscript.
Here is the new_fax script I use. Hope this helps.
Saludos,
Orlando
Orlando M. Amador
oamador@amador.org
-----Original Message-----
From: Singsing Wong [mailto:singsingwong@hotmail.com]
Sent: Tuesday, November 23, 1999 10:03 PM
To: mgetty@muc.de
Subject: incoming fax images to PDF ?
Hi,
Is there any tools or utilities that can convert the
incoming fax images in G3 into one single PDF file as that
would save the trouble of finding a TIF viewer in particular
for M$ machines.
TIA.
Regards
singsing
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
------=_NextPart_000_0003_01BF36D4.E57E75A0
Content-Type: text/plain;
name="new_fax.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="new_fax.txt"
#!/bin/sh
#
# new_fax script for mgetty
#
# Orlando M. Amador -- 06-23-99
#
#
# Configure this address=20
#
FROM_ADDRESS=3Dfaxserver
SENDTO=3Dfaxadmin
#
# This variables should not change, unlse tou use a different tmp =
directory.
#
TMPTEXT=3D/tmp/new_fax.$$.txt
TMPPS=3D/tmp/new_fax.$$.ps
PSINFILE=3D/tmp/new_fax-ps-in.$$.ps
PDFOUTFILE=3D/tmp/new_fax-pdf-out.$$.pdf
RESULT=3D$1 ; shift
ID=3D$1 ; shift
PAGES=3D$1 ; shift
PATH=3D$PATH:/usr/local/bin
`fax_res=3D`basename $1 | cut -c2`
if [ "$fax_res" =3D 'n' ]
then
parameters=3D"-s"
else
parameters=3D
fi
#
# Prepare a PDF file of the Fax message and attach it to the message.
#
index=3D1
for i in "$@"
do
pagenumber=3D`echo $index | awk '{ printf "%04d", $1 }'`
g32pbm $parameters $i | pnmtops > $TMPPS.$pagenumber.ps
index=3D`expr $index + 1`
done
cat $TMPPS.*.ps > $PSINFILE
ps2pdf $PSINFILE $PDFOUTFILE
{
echo
echo
echo The attached fax was received by the fax server.
echo Current time: `date`
echo Number of pages: $PAGES
echo Fax Status: $RESULT
echo
echo
echo
} > $TMPTEXT
metasend -b -f $TMPTEXT -m text/plain -D "Text Message" \
-n -f $PDFOUTFILE -m application/pdf -D "Fax Message.pdf" \
-s "Received Fax from \"$ID\"" -t ${SENDTO} -F $FROM_ADDRESS -S =
4000000
sleep 10
/bin/rm $TMPTEXT $PDFOUTFILE $TMPPS.* $PSINFILE
#
# EOS
#
------=_NextPart_000_0003_01BF36D4.E57E75A0--