Created attachment 10217 [details] ps2pdf fails on this file 64-bit gentoo, gs 9.10 compiled with http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.10.ebuild?view=markup $ ps2pdf part1-bad.ps Error: /undefined in . Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1900 1 3 %oparray_pop 1899 1 3 %oparray_pop 1883 1 3 %oparray_pop 1771 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1175/1684(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)-- Current allocation mode is local Last OS error: No such file or directory Current file position is 149747 GPL Ghostscript 9.10: Unrecoverable error, exit code 1
The file has a bogus last line. Delete that and all is OK. GS reports the error info with: Current file position is 149747 and a hex dump shows the last line is .<cr><cr><lf> 000248E0: 77 6E 7B 65 6E 64 2D 68 6F 6F 6B 7D 69 66 0D 0D |wn{end-hook}if..| 000248F0: 0A 2E 0D 0D 0A |.....