[gs-devel] Tips for making ps2pdf available (under windows)
Ray Johnston
Ray.Johnston at Artifex.com
Mon Apr 6 11:50:18 PDT 2009
Hi Izzy,
The free Microsoft Visual Studio Express C++ can be used to build gs
using: nmake -f psi/msvc32.mak
in a command prompt (assuming that when you installed VS you had it
add the environment variables -- otherwise you might need to run
vsvars32.bat first).
When Ghostscript is installed from the 'gs864w32.exe' it does not add
the path to your PATH environment variable, nor does it add the 'lib'
path.
By default, the install will put 8.64 in "C:\Program Files\gs\gs8.64"
and some subdirectories and will put a 'shortcut' in "Programs" in
the "Ghostscript" group. You can examine the shortcut for gs8.64 to
see exactly where your version was installed. From a command prompt,
you can run Ghostscript using the method from the 'Target' of the
shortcut, which on my installation is:
"C:\Program Files\gs\gs8.64\bin\gswin32.exe" "-IC:\Program
Files\gs\gs8.64\lib;C:\Program Files\gs\fonts"
To use ps2pdf.bat or other lib scripts from a command prompt, right-
click on "My Computer", then click "Properties", then click the
"Advanced" tab and click on the "Environment Variables" near the
bottom and add the following to your 'Path' System variables:
;C:\Program Files\gs\gs8.64\bin;C:\Program Files\gs\gs8.64\lib
by selecting that variable and clicking on "Edit".
An alternate method that only adds these to the path for a single command
prompt is to execute (from the command prompt, before running ps2pdf):
set PATH="C:/Program Files/gs/gs8.64/bin";"C:/Program
Files/gs/gs8.64/lib";"%PATH%"
then typing:
gswin32c -h
should show you that everything is accessible, and typing:
ps2pdf
should say:
Usage: ps2pdf input.ps [output.pdf]
or: ps2pdf [options...] input.[e]ps output.pdf
Best Regards,
Ray Johnston
------------------------------------------------------------------------
Izzy wrote:
> I have a very large number of eps files that I would like to convert to pdf.
> It strikes me that ps2pdf in ghostscript is the most flexible route.
> However, I note from the documentation that I need will only be able to use
> this batch file under windows if I build the application myself, ensuring
> that I include ps2pdf in the makefile.
>
> I don't currently have a compiler on my machine. I've had a peruse through
> the documentation on make, and it strikes me that, whatever compiler I use,
> there are potentially lots of pitfalls. No option looks even slightly
> simple. I'm not really sure if I want to start the course of action as I'm
> not convinced I will end up with something that will work. First, please can
> I ask some questions?
>
> 1) When I try to run the ps2pdf batch file (from an installation using
> precompiled installer gs864w32.exe), the error I get is "'gswin32c' is not
> recognized as an internal or external command, operable program or batch
> file." Is this the error I should expect to get if ps2eps is not made
> available when the application is built?
>
> 2) Has anyone managed to build ghostscript on windows without any problems?
> What compiler did you use?
>
> I would just rather only undertake debugging and troubleshooting as a
> leisure pursuit if I can be confident that I will have something usable at
> the end.
>
> Many thanks in advance for any hints.
>
> Izzy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ghostscript.com/pipermail/gs-devel/attachments/20090406/a3b7f0e6/attachment.htm
More information about the gs-devel
mailing list