Wolfram mathematica 如何在Mathematica中将.eps文件转换为.pdf?

Wolfram mathematica 如何在Mathematica中将.eps文件转换为.pdf?,wolfram-mathematica,ghostscript,Wolfram Mathematica,Ghostscript,如何在Mathematica内部将.eps转换为.pdf(可能使用GhostScript?)在安装和设置适当的环境变量(对于Windows,您将gs\bin和gs\lib添加到路径中,其中gs是顶级GhostScript目录),您可以使用它将.eps转换为.pdf(将概述所有图示符): 此处c:/windows/fonts是字体所在的目录。有关GhostScript命令行参数的信息,请参见。在大多数情况下,.eps文件的导入与文件一样返回$Failed。 gr = Import["file.ep

如何在Mathematica内部将.eps转换为.pdf(可能使用GhostScript?)

在安装和设置适当的环境变量(对于Windows,您将
gs\bin
gs\lib
添加到
路径中,其中
gs
是顶级GhostScript目录),您可以使用它将.eps转换为.pdf(将概述所有图示符):


此处
c:/windows/fonts
是字体所在的目录。有关GhostScript命令行参数的信息,请参见。

在大多数情况下,.eps文件的导入
与文件一样返回
$Failed
gr = Import["file.eps", "eps"]
Export["file.pdf", gr, "pdf"]
gsEPS2PDFEmbedFonts[epsPath_String, pdfOutputPath_String] := 
 Run["gswin64c.exe -sFONTPATH=c:/windows/fonts -o \"" <> 
   pdfOutputPath <> 
   "\" -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress \"" <> epsPath <> 
   "\""]
gr = Import["file.eps", "eps"]
Export["file.pdf", gr, "pdf"]