home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
wvhtm064.zip
/
wv
/
wvPDF
< prev
next >
Wrap
Text File
|
2000-10-19
|
725b
|
42 lines
#!/bin/sh
# argument checking
if [ ${#} -ne "2" ]; then
echo "Usage: ${0} <word document> <pdf output file>"
exit 1
fi
which wvPS >/dev/null 2>&1
if [ ${?} -ne "0" ]; then
echo "Could not find required program 'wvPS'"
exit 1
fi
which distill >/dev/null 2>&1
if [ ${?} -ne "0" ]; then
echo "Could not find required program 'distill'"
exit 1
fi
# intermediate file
PS_FILE="${2}.ps"
wvPS "${1}" "${PS_FILE}" >/dev/null 2>&1
if [ ${?} -ne "0" ]; then
echo "Could not convert into PS"
exit 1
fi
# Here we should add pstopdf -- MV
distill "${PS_FILE}" >/dev/null 2>&1
if [ ${?} -ne "0" ]; then
echo "Could not convert into PDF"
exit 1
fi
#clean up
rm -f "${PS_FILE}" "${PS_FILE}.log"
mv "${PS_FILE}.pdf" "${2}"