Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find initialization file gs_init.ps

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.

like image 409
Mick Messerschmidt Avatar asked Sep 28 '12 01:09

Mick Messerschmidt


2 Answers

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

like image 110
antonjs Avatar answered Nov 10 '22 17:11

antonjs


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.
like image 45
Gogowitsch Avatar answered Nov 10 '22 17:11

Gogowitsch