1

I'm trying to print a pdf file with the following command: gsprint.exe doc.pdf

It writes this error:

Current allocation mode is local
Last OS error: Permission denied
GPL Ghostscript 9.50: Unrecoverable error, exit code 1

enter image description here

xralf
  • 64
  • 2
  • 4
  • 18
  • 1
    Ghostscript is saying: "Could not open the file". Something is wrong with your path specification or with the file permissions. – harrymc Mar 02 '20 at 14:12
  • I'm in a directory C:\Program Files\Ghostgum\gsview and the command is gsprint.exe "C:\Users\xralf\Desktop\doc.pdf". When I add -printer "Microsoft Print to PDF" the result is the same. – xralf Mar 03 '20 at 12:09
  • Try to `cd` to one of your folders, then use the command `C:\Program Files\Ghostgum\gsview\gsprint.exe "C:\Users\xralf\Desktop\doc.pdf"`. If this fails, try to redo it in a Command Prompt (cmd) that is Run as Administrator. – harrymc Mar 03 '20 at 13:34
  • @harrymc I found out that ghostview won't open arbitrary document. I need registration number. But on their web pages is written "No more registration numbers available". – xralf Mar 03 '20 at 13:36

1 Answers1

1

I think that you are using the old Ghostview, which is no longer under development.

You need to use Ghostscript, which you can download from this page. Choose the version under "GNU Affero General Public License" that matches your computer.

If you are looking for gsprint, it is not part of Ghostscript, but is part of GSView (which uses Ghostscript).

The GSView release can be downloaded from this page.

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • I downloaded it there. The 64bit version for windows. – xralf Mar 03 '20 at 15:51
  • But there wasn't gsprint.exe command, so I downloaded and installed ghostview from [here](http://www.ghostgum.com.au/software/gsview.htm) – xralf Mar 03 '20 at 15:53
  • Here is a link to 6 [version](http://pages.cs.wisc.edu/~ghost/) but it is unavailable. – xralf Mar 03 '20 at 15:54
  • This version is an antique. You may print directly from Ghostscript, or use the latest gsprint, which I added above. – harrymc Mar 03 '20 at 16:13
  • I tried the version you suggested and still cannot use gsprint.exe, because of that error. The same error when I open a document in gsview64.exe [this](https://pasteboard.co/IXwUjN7.png) error – xralf Mar 04 '20 at 12:14
  • 1
    I tried it myself and had the same error. `gsview64.exe` works, but `gsprint.exe` simply does not work, so I suggest printing from Ghostscript. This command worked for me: `"C:\Program Files (x86)\gs\gs9.23\bin\gswin32c.exe" -sDEVICE=mswinpr2 -dBATCH -dNOPAUSE -sOutputFile="%printer%printer-name" "C:\path\file.pdf"`. Modify it for your setup. – harrymc Mar 04 '20 at 13:59
  • I'm adding link to [here](https://superuser.com/questions/906575/ghostscript-print-to-network-printer-in-silent-mode) – xralf Mar 04 '20 at 15:20