Following
Converting correctly pdf to ps and vice-versa
I used the following command to convert a postscript file to pdf:
gs -o output.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dHaveTrueTypes=true -dEmbedAllFonts=true -dSubsetFonts=false -c ".setpdfwrite <</NeverEmbed [ ]>> setdistillerparams" -f mu-calc.ps
but I got an error (I got the same error with ps2pdf):
GPL Ghostscript 9.06 (2012-08-08) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Error: /undefinedfilename in (mu-calc.ps) Operand stack:
Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push Dictionary stack: --dict:1167/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Last OS error: Permission denied GPL Ghostscript 9.06: Unrecoverable error, exit code 1
I tried various other options at
Ghostscript: "Unrecoverable error: undefinedfilename in setpagedevice"
but I always got the same error.
How can I make it work?