Problem with export_fig - eps2pdf

I keep receiving the following error code when trying to use export_fig for .eps images. I have the latest copy of export_fig, Ghostscript, Xpdfreader/tools (pdftops), and I don't think I'm making any syntactical errors since I can save a .png without error.
Ghostscript error: perhaps C:\Users\-\AppData\Local\Temp\tp0529ef87_f6a2_44f2_bcb9_a061dc5608cf.pdf is open by another application
or maybe you have another gs executable in your system's path
Ghostscript options: -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile="C:\Users\-\AppData\Local\Temp\tp0529ef87_f6a2_44f2_bcb9_a061dc5608cf.pdf" -dEPSCrop -sFONTPATH="C:\Windows\Fonts" -f "C:\Users\-\AppData\Local\Temp\tp9407d70e_bf3a_43bd_b0f1_b3d1844f732e.eps"
export_fig error. Please ensure:
that you are using the latest version of export_fig
and that you have Ghostscript installed
and that you have pdftops installed
and that you do not have multiple versions of export_fig installed by mistake
and that you did not made a mistake in the expected input arguments
If the problem persists, then please report a new issue.
Error using eps2pdf (line 164)
Error: /syntaxerror in -file-
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push 2015 1 3 %oparray_pop 2014 1 3 %oparray_pop --nostringval-- 1998 1 3
%oparray_pop 1884 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push
Dictionary stack:
--dict:996/1684(ro)(G)-- --dict:0/20(G)-- --dict:123/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 7908
GPL Ghostscript 9.22: Unrecoverable error, exit code 1
Error in export_fig (line 674)
eps2pdf(tmp_nam, pdf_nam_tmp, 1, options.append, options.colourspace==2, options.quality, options.gs_options);
Error in Data_V1 (line 1288)
export_fig TEST -transparent -eps
I know it's a bit of a long shot, but I would appreciate any suggestions.

回答 (1 件)

Jan
Jan 2017 年 10 月 21 日

1 投票

Start with checking the error message:
C:\Users\-\AppData\Loca\Temp\tp0529ef87_f6a2_44f2_bcb9_a061dc5608cf.pdf
Is this really a "-" in the user name? Does the file exist? Is it opened by another process?
or maybe you have another gs executable in your system's path
Please check this also.
p = strsplit(getenv('PATH'), pathsep);
Are there several GhostScripts installed?

2 件のコメント

Joppy
Joppy 2017 年 10 月 22 日
編集済み: Joppy 2017 年 10 月 22 日
Thanks a lot for the response Jan.
There is no "-", the file does exist (it's a blank pdf), it isn't open by another process. At least not that I know of.
Sorry I'm not sure what that command is telling me exactly (number of gs executables?), but it returns this:
'C:\Windows\system32'
'C:\Windows'
'C:\Windows\System32\Wbem'
'C:\Windows\System32\WindowsPowerShell\v1.0\'
'D:\MATLAB\bin'
'D:\Downloads\Putty\'
'C:\Users\username\AppData\Local\Microsoft\WindowsApps'
'D:\Downloads\TeXstudio\New folder\miktex\bin\x64\'
I have uninstalled/reinstalled gs several times, but have made sure to completely remove it before reinstall. I'm beginning to think it has something to do with miktex..?
Jan
Jan 2017 年 10 月 23 日
You can check this without uninstalling MiKTeX: Only remove its folder from the PATH (of Windows, not of Matlab) temporarily and try it again.
The message "Last OS error: No such file or directory" looks important.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

タグ

質問済み:

2017 年 10 月 21 日

コメント済み:

Jan
2017 年 10 月 23 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by