Created attachment 6859 [details] The ps file Hi there, when I hope to convert a ps file, which produced by LaTeX with beamer class, to a pdf file, a error appeared: E:\>"d:\Program Files\gs\gs9.00\bin\gswin32c.exe" -q -dSAFER -dNOPAUSE -dBATCH - sDEVICE=pdfwrite -dUseCIEColor=true -dPDFSETTINGS=/printer -sOutputFile=zz.pdf z z.ps Error: /invalidfileaccess in --file-- Operand stack: --nostringval-- --nostringval-- (digclock.swf) (r) Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa lse 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_ pop 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval- - %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringv al-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1160/1684(ro)(G)-- --dict:0/20(G)-- --dict:79/200(L)-- --dict:10 6/300(L)-- --dict:36/200(L)-- Current allocation mode is local Last OS error: No such file or directory Current file position is 37829 GPL Ghostscript 9.00: Unrecoverable error, exit code 1 I tested the same ps file with ghostscript 8.71, no error occurred. Regards, Jinsong
Created attachment 6860 [details] the embedded swf file
This is undoubtedly nothing to do with the PDF writer. I suspect that using the display device would give the same error. You are using an unqualified path to the file, which means its using the current working directory. There were changes made to the way this works in 9.0 in order to address security concerns. From gs/doc/Use./htm: -dSAFER Disables the deletefile and renamefile operators, and the ability to open piped commands (%pipe%cmd) at all. Only %stdout and %stderr can be opened for writing. Disables reading of files other than %stdin, those given as a command line argument, or those contained on one of the paths given by LIBPATH and FONTPATH and specified by the system params /FontResourceDir and /GenericResourceDir. Since the file you are opening is not %stdin, is not given on the command line, and is not one of the paths specified by system params, SAFER mode disallows opening the file. Try not using -dSAFER. Of course if this should not be the problem, please reopen the issue.
The command ps2pdf was probably used for ps to pdf conversion. It automatically sets -dSAFER. To override this, option -dNOSAFER should be set: ps2pdf -dNOSAFER zz.ps