【问题标题】:Inkscape command line: Need to convert SVG to eps without filter rasterisationInkscape 命令行:需要在没有过滤器光栅化的情况下将 SVG 转换为 eps
【发布时间】:2015-07-26 09:13:55
【问题描述】:

我需要将 SVG 转换为 EPS,并且目前使用 inkscape 来执行此操作。

要使用 Inkscape GUI 版本转换 SVG,我只需打开 svg,然后“另存为”“logo.eps”,取消选择“光栅化滤镜效果”选项。

但是,我想使用命令行自动执行此过程。 使用

inkscape logo.svg -E logo.eps

有效,但不禁用过滤器光栅化。我已经做了一些研究,但无法弄清楚如何做到这一点,谁能给我正确的命令?谢谢

【问题讨论】:

    标签: svg eps inkscape


    【解决方案1】:

    我必须用来解决这个问题的命令是

    inkscape in.svg -E out.eps --export-ignore-filters --export-ps-level=3
    

    in.svg 是你的图像,out.eps 是输出的 eps。

    编辑

    正如 Vladimir 在 cmets 中所建议的,较新版本的inkscape 没有-E 选项,因此需要将其替换为-o

    【讨论】:

    • 对任何努力实现上述工作的人的附注:In 和 Out 都需要绝对路径 (pwd)。
    • 在 Mac OS 上,我必须运行这个:/Applications/Inkscape.app/Contents/Resources/bin/inkscape ~/Downloads/logo.svg -E ~/Downloads/logo-out.eps --export-ignore-filters --export-ps-level=3
    • 酷,这甚至保留了输入 SVG 文件中的文本!
    • Inkscape v.1.0.2 给出“未知选项 -E”错误。我已将“-E”替换为“-o”(输出),现在可以了。
    • 对于 Inkscape 1.0.2 (e86c870879, 2021-01-15),我使用:inkscape file.svg --export-type=eps file.eps --export-ignore-filters --export-ps-level=3;否则我得到Unknown option -E
    【解决方案2】:

    游戏有点晚了,但谷歌把我带到了这里

    在需要帐户的网站上找到了此解决方案的一部分。这使您可以转换文件夹中的所有文件

    for file in *.svg; do inkscape "$file" -E "${file%svg}eps" --export-ignore-filters --export-ps-level=3; done
    

    【讨论】:

      猜你喜欢
      • 2022-11-11
      • 1970-01-01
      • 1970-01-01
      • 2015-10-27
      • 1970-01-01
      • 1970-01-01
      • 2016-04-16
      • 2019-12-02
      • 1970-01-01
      相关资源
      最近更新 更多