views:

328

answers:

2

I installed ghostscript and updated the appropriate path variables ... however, I'm getting an error when I try to execute this command:

C:\PROGRA~1\gs\gs8.64\lib>pdf2ps mydocument.pdf mydocument.ps
Access is denied.
Unable to open command line file _.at

Is this the right command? did I miss some configuration or path setting? Otherwise, is there a sane method of doing this conversion?

Thanks!

+1  A: 

Access is denied suggest something to do with access to paths etc. I'd suggest rechecking the folder permission (although I'm sure you've done that). Also, you might want to try running the gswin32c.exe instead of the pdf2ps to see if you still get the error, you might get something a little more specific.

gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=mydocument.ps mydocument.pdf
Douglas Anderson
+1  A: 

Using pdf2ps runs a batch file, really named pdf2ps.bat or pdf2ps.cmd. You can easily look up and understand its "source code". If you do, you'll see it tries to write some of its commandline options into a temporary file named _.at, in order to overcome the 128 character limit for DOS/cmd commandline length that exist on some Win/DOS platforms.

Since you are invoking pdf2ps from the %programs% directory where Ghostscript is installed, you don't seem to be using an account that is permitted to write stuff in there. :-)

pipitas