Reputation: 1276
I have an unrecoverable error, exit code 1
showing up when I try to convert my .ps files to pdf. It worked just about a half hour ago and now it wont. The file is there!
Error: /undefinedfilename in (10132012a.ps)
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 9.04: Unrecoverable error, exit code 1
Here is my command:
ps2pdf 10132012a.ps 10132012b.pdf
The ps file was created using latex
.
I am running Ubuntu 11.10.
Upvotes: 2
Views: 9033
Reputation: 111
I just found a brilliant way to get this /undefinedfilename
error. It took me about 15 minutes to figure it out.
First I did this.
user@host> dvips test1
This is dvips(k) 5.98 Copyright 2009 Radical Eye Software (www.radicaleye.com)
' TeX output 2015.08.04:2315' -> test1.ps
</usr/lib/texmf/dvips/base/tex.pro></usr/lib/texmf/dvips/base/texps.pro>.
</usr/share/texmf/fonts/type1/public/amsfonts/cm/cmr10.pfb>[-1] [-2] [1] [2]
And then I did this.
user@host> ps2pdf text1.ps
Error: /undefinedfilename in (text1.ps)
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:1172/3371(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
Then it finally hit me. It was a spelling error in the file name. So the command line argument for ps2pdf
was a non-existent file.
In my opinion, a better error message would be Cannot find file test1.ps
, instead of Error: /undefinedfilename in (text1.ps)
.
Upvotes: 1
Reputation: 491
You might try running Ghostscript directly, rather than using the script:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -o 10132012b.pdf 10132012a.ps
or even:
gs -sDEVICE=pdfwrite -o 10132012b.pdf - < 10132012a.ps
The "convenience" scripts (ps2pdf, pdf2ps, etc) use options which might get in the way (although they really shouldn't).
Upvotes: 4
Reputation: 72312
The error means that ps2pdf
could not find the file 10132012a.ps
.
latex
does not create ps files: it creates dvi files which can be converted to ps with dvips
.
Perhaps you forgot to run dvips
?
Upvotes: 0