#!/bin/sh
# mgetty newfax script package Copyright (c) 1998 Tycho Softworks.
# $Id: newfax2hplj 1.1 Mon, 22 Jun 1998 06:22:52 -0400 dyfet $

for fax in $* ; do
	res=`basename $fax | sed 's/.\(.\).*/\1/'`

	if test "$res" = "n" ; then
		stretch="-s"
	else
		stretch=""
	fi

	g3topbm $stretch $fax \
	| pnmscale -xsize 2479 \
	| pgmtopbm -fs \
	| pbmtolj -resolution 300
	echo ""
done

exit 0

