【问题标题】:SVG not opening with inkscape command line but opens with guiSVG 不使用 inkscape 命令行打开,但使用 gui 打开
【发布时间】:2018-10-23 22:09:27
【问题描述】:

我对 inkscape 很陌生,我想使用命令行界面和以下命令(与 SVG 位于同一目录中)处理一批 SVG:

$ inkscape -D -z NMY.svg

但是,当我尝试使用 CLI 加载 SVG 时,我收到以下警告:

** (inkscape-bin:8875): WARNING **: Can't open file: NMY.svg (doesn't exist)

** (inkscape-bin:8875): WARNING **: Can't open file: NMY.svg (doesn't exist)

** (inkscape-bin:8875): WARNING **: Specified document NMY.svg cannot be opened (does not exist or not a valid SVG file)

但是,从 GUI 打开相同的 SVG 可以正确显示图像。

这是有问题的标头 SVG,以防出现问题:

<?xml version='1.0' encoding='iso-8859-1'?>
<svg version='1.1' baseProfile='full'
          xmlns:svg='http://www.w3.org/2000/svg'
                  xmlns:rdkit='http://www.rdkit.org/xml'
                  xmlns:xlink='http://www.w3.org/1999/xlink'
              xml:space='preserve'
width='250px' height='150px' >

我在 MacOS 10.14 上使用 inkscape Inkscape 0.92.2 5c3e80d, 2017-08-06

谢谢!

【问题讨论】:

    标签: svg command-line inkscape


    【解决方案1】:

    发现问题,我必须指定文件的绝对路径。

    【讨论】:

    • 非常感谢。
    • 为了完整起见,如果您要导出 (-e) 路径也必须是绝对路径。
    猜你喜欢
    • 2018-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-26
    • 1970-01-01
    相关资源
    最近更新 更多