I've been wrestling with this for an hour or so and thought I'd share
my experiences. I'm running Ghostscript 8.00 on Windows XP. I'm trying
to convert a .ps file to a .pdf. Ghostscript includes some handy batch
files so I tried to use ps2pdf.bat. It works fine from the command
Now in perl I try a :
$cmd = "C:\\gs\\gs8.00\\lib\\ps2pdf c:\\rpt.ps c:\\rpt.pdf";
I copied the un escaped command from the console window. It gives and
error that ps2pdfxx can't be found though if I manually type the same
command it works fine.
So the problem is this : it runs just fine from the console but not
programmatically. I figured something wasn't making it to the
environment of the executed command so :
I next check all environmental variables and made sure GSC and GS were
set. I also added c:\gs\gs8.00\lib and \bin to the system path. No
Next I tried outputting a batch file in perl and then calling the batch
file. No improvement.
I checked deja and found that once upon a time there were line ending
bugs in some of these batches so I fixed mine. No improvement.
Next. Used brain. It seemed to me though like one batch wanted to be
run from \lib while the other sub batches that it then calls wanted to
be run from \bin.
Answer? I copied all files from \lib to \bin and it worked as it should
both from the command line and programatically.
I'm posted in case others happen upon this problem.
||6/9/2005 11:50:29 PM