Hylafax Mailing List Archives

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

Re: [hylafax-users] Single Page Confirmation from bin/notify



Got a work around.  Made a drop-in script instead of ps2pdf to do the
work in bin/notify:
---

#!/bin/sh
# $Id: ps2pdfwr,v 1.6.2.1 2002/01/22 21:34:04 jackiem Exp $
# Convert PostScript to PDF without specifying CompatibilityLevel.
OPTIONS="-dSAFER"
while true
do
	case "$1" in
	-?*) OPTIONS="$OPTIONS $1" ;;
	*)  break ;;
	esac
	shift
done

if [ $# -lt 1 -o $# -gt 2 ]; then
	echo "Usage: `basename $0` [options...] (input.[e]ps|-) [output.pdf|-]" 1>&2
	exit 1
fi

infile="$1";
#Here's the newline
/usr/bin/psselect -p1 "${infile}" 1stpage.ps;
infile="1stpage.ps";
#end newline
if [ $# -eq 1 ]
then
	case "${infile}" in
	  -)		outfile=- ;;
	  *.eps)	base=`basename "${infile}" .eps`; outfile="${base}.pdf" ;;
	  *.ps)		base=`basename "${infile}" .ps`; outfile="${base}.pdf" ;;
	  *)		base=`basename "${infile}"`; outfile="${base}.pdf" ;;
	esac
else
	outfile="$2"
fi

# We have to include the options twice because -I only takes effect if it
# appears before other options.
exec /usr/bin/gs $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
"-sOutputFile=$outfile" $OPTIONS -c .setpdfwrite -f "$infile"
rm 1stpage.ps
---

...then changed the PS2PDF variable in bin/notify to look for this script.

Thanks all.

-Robert

On 10/25/05, Robert McIntosh <mcintoshrt@xxxxxxxxx> wrote:
> Hi,
>
> Hylafax sends a confirmation to me on success/failure for all fax jobs
> with pdf attachment of the entire faxed document.  I'm trying to
> modify the bin/notify script to attach only the first page of the
> faxed document as a pdf.
>
> I'll continue to dig around but if someone has already tackled this or
> has pointers, please drop me a line.
>
> Thanks,
> Robert
>


--
mcintoshrt@xxxxxxxxx
rupreckt1553 (AIM)

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



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services