Reputation: 11
I'm a novice when it comes to these things, so please, be gentle. I'm trying to us Ghostscript, but I cant even launch a command. I'm trying to run this little bit of code that someone posted.
gswin32c.exe ^
-o c:/path/to/output.pdf ^
-sDEVICE=pdfwrite ^
-dPDFSettings=/Screen ^
[...more desired parameters (optional)...] ^
/path/to/first.ps ^
/path/to/second.ps ^
/path/to/third.pdf
I've made sure my file paths are correct, but I can't even figure out how to drop down a command line. I have tried launching Ghostscript and the code from command prompt, but Ghostscript gives me an error saying " undefined in -o". Any help would be greatly appreciated.
Upvotes: 1
Views: 1751
Reputation: 31139
First thing you should do is reduce the complexity of your command line. From the command shell try:
gswin32c
Do you get a bunch of GS copyright messages and a 'GS>' prompt ? If you do then type 'quit' then press return and you should be back to the command shell. This means Ghostscript is installed, in your path and working. (Since you got an error message I suspect this will be fine)
After that, try something like:
gswin32c -o out.pdf -sDEVICE=pdfwrite
When you get the 'GS' prompt type 'showpage' and press return. At the next prompt type 'quit' and return.
That should create a PDF file in the current directory called out.pdf with a single blank page.
After that you can build up your command line bit by bit. Note that there is no switch called PDFSettings, its actually called PDFSETTINGS, the command line switches are case-sensitive. I would also firmly recommend that you don't use it. That switch sets a load of parameters (documented in ps2pdf.htm) many of which are probably irrelevant to you and some of which have results you don't want. Work out what you do want and set the parameters individually.
Upvotes: 1