10

I have a .net windows form application that uses ghostscript. Only on 1 machine do i get an error message. On all others (100s) it works find. This is in a Citrix environment.

The error is "AFPL Ghostscript 8.53: Can't find initialization file gs_init.ps"

I have checked and the file does exist.

ForceBru
  • 43,482
  • 10
  • 63
  • 98

2 Answers2

26

I've had a similar problem when compiling a latex file on OSx (pdflatex *.tex). The problem arose because of gs installed by MacTeX. The command pdflatex was using the command gs installed by MacTex and not the one installed by brew. I fixed the problem by running the following command brew link --overwrite ghostscript

antonjs
  • 14,060
  • 14
  • 65
  • 91
1

I've had a similar problem when calling the GS dll from a Delphi application; I solved it by setting the environment variable.

From the documentation: Ghostscript tries directories in this order:

  1. The current directory (unless disabled by the -P- switch);
  2. The directories specified by -I switches in the command line, if any;
  3. The directories specified by the GS_LIB environment variable, if any.
Gogowitsch
  • 1,181
  • 1
  • 11
  • 32