如何将 .eps 转换为 .pdf 内部数学(也许使用 GhostScript?)?
安装后幽灵脚本 http://www.ghostscript.com/download/gsdnld.html并设置适当的环境变量(对于 Windows,您should http://www.ghostscript.com/doc/9.10/Use.htm#MS_Windows add gs\bin
and gs\lib
to the PATH
, where gs
是顶级 Ghostscript 目录)您可以使用Jens Nöckel 方法 https://mathematica.stackexchange.com/a/9047/280将 .eps 转换为 .pdf(所有字形都将被概述):
gsEPS2PDF[epsPath_String, pdfPath_String] :=
Run["gswin64c.exe -sDEVICE=pdfwrite -dNOCACHE -sOutputFile=\"" <>
pdfPath <> "\" -q -dbatch -dNOPAUSE \"" <> epsPath <> "\" -c quit"]
Here gswin64c.exe
是 64 位 Windows 系统的 GhostScript 可执行文件的名称,对于 Linux 将其替换为gs
.
另一种方法基于Kurt Pfeifle 代码 https://stackoverflow.com/a/4234150/590388(没有字体轮廓):
gsEPS2PDFEmbedFonts[epsPath_String, pdfOutputPath_String] :=
Run["gswin64c.exe -sFONTPATH=c:/windows/fonts -o \"" <>
pdfOutputPath <>
"\" -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress \"" <> epsPath <>
"\""]
Here c:/windows/fonts
是字体所在的目录。也可以看看here https://stackoverflow.com/a/3461186/590388有关 GhostScript 命令行参数的信息。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)