Inkscape:SVG到PDF删除组

我使用SVG.js创建了一个SVG生成器,它创建了100多个Path元素,它们都放置在6个不同的组中。 用Adobe Illustrator打开的结果SVG文件显示组合正常。

但是,我在命令行中使用Inkscape(自动化进程需要)将SVG文件转换为PDF。

 inkscape --file=input.svg --export-area-drawing --without-gui --export-pdf=output.pdf

生成的PDF文件的所有Path元素都在同一级别上,没有任何种类的组/图层,这对我的项目是强制性的。

Inkscape不会取消组合元素吗?

附上最终结果的图像(左侧,SVG文件 - 右侧,转换后的PDF)

图像:SVG和PDF图层

SVG示例:

<svg width="100%" height="100%" viewBox="0 0 95 50" xmlns="http://www.w3.org/2000/svg">
<g stroke="green" fill="white" stroke-width="5">
    <circle cx="25" cy="25" r="15" />
    <circle cx="40" cy="25" r="15" />
    <circle cx="55" cy="25" r="15" />
    <circle cx="70" cy="25" r="15" />
</g>
<g stroke="red" fill="white" stroke-width="5">
    <circle cx="25" cy="25" r="15" />
    <circle cx="40" cy="25" r="15" />
    <circle cx="55" cy="25" r="15" />
    <circle cx="70" cy="25" r="15" />
</g>

链接地址: http://www.djcxy.com/p/95753.html

上一篇: Inkscape: SVG to PDF removes groups

下一篇: Chrome not rendering SVG referenced via <img> tag