[bug-pcl] Re: bug-pcl post from koenig@science-computing.de
requires approval
Stefan Kemper
stefan at artifex.com
Thu Dec 2 11:22:47 PST 2004
Hi Harald,
Thanks for the patch, sorry but I mistakenly deleted your message as
spam, attached below.
Best Regards,
Stefan Kemper
Artifex Software Inc.
> On Thu, 2004-12-02 at 05:12 -0800, bug-pcl-owner at ghostscript.com
> wrote:
> > Hi,
> >
> > trying to convert a PCL file with paper size A4 to PDF using
> >
> > pcl2pdf "-J at PJL SET PAPER=A4" file.pcl file.pdf
> >
> > fails with error message
> >
> > Unable to open SET for reading.
> >
> > because of wrong quoting in the script pcl2pdfwr. using the following
> > patch fixes both the problem with spaces in options and in file names:
> >
> >
> > -------------------------------------------------------------------------------
> > --- ghostpcl_1.40/tools/pcl2pdfwr~ 2004-02-16 21:48:06.000000000 +0100
> > +++ ghostpcl_1.40/tools/pcl2pdfwr 2004-12-02 14:12:40.000000000 +0100
> > @@ -6,31 +6,31 @@
> > while true
> > do
> > case "$1" in
> > - -?*) OPTIONS="$OPTIONS $1" ;;
> > + -?*) OPTIONS="$OPTIONS \"$1\"" ;;
> > *) break ;;
> > esac
> > shift
> > done
> >
> > if [ $# -lt 1 -o $# -gt 2 ]; then
> > - echo "Usage: `basename $0` [options...] (input.pcl|-) [output.pdf|-]" 1>&2
> > + echo "Usage: `basename "$0"` [options...] (input.pcl|-) [output.pdf|-]" 1>&2
> > exit 1
> > fi
> >
> > -infile=$1;
> > +infile="$1";
> >
> > if [ $# -eq 1 ]
> > then
> > case "${infile}" in
> > -) outfile=- ;;
> > - *.pcl) base=`basename ${infile} .pcl`; outfile=${base}.pdf ;;
> > - *.pxl) base=`basename ${infile} .pxl`; outfile=${base}.pdf ;;
> > - *) base=`basename ${infile}`; outfile=${base}.pdf ;;
> > + *.pcl) base=`basename "${infile}" .pcl`; outfile="${base}.pdf" ;;
> > + *.pxl) base=`basename "${infile}" .pxl`; outfile="${base}.pdf" ;;
> > + *) base=`basename "${infile}"`; outfile="${base}.pdf" ;;
> > esac
> > else
> > - outfile=$2
> > + outfile="$2"
> > fi
> >
> > # We have to include the options twice because -I only takes effect if it
> > # appears before other options.
> > -exec pcl6 $OPTIONS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile $OPTIONS $infile
> > +eval exec pcl6 "$OPTIONS" -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="$outfile" "$OPTIONS" "$infile"
> > -------------------------------------------------------------------------------
> >
> >
> > Harald Koenig
> email message attachment
> On Thu, 2004-12-02 at 05:12 -0800, bug-pcl-owner at ghostscript.com
> wrote:
> > If you reply to this message, keeping the Subject: header intact,
> > Mailman will discard the held message. Do this if the message is
> > spam. If you reply to this message and include an Approved: header
> > with the list password in it, the message will be approved for posting
> > to the list. The Approved: header can also appear in the first line
> > of the body of the reply.
More information about the bug-pcl
mailing list