Inkscape: SVG to PDF removes groups

I've made a SVG generator using SVG.js, which creates over 100 Path elements, all of them placed in 6 different groups. The resulting SVG file opened with Adobe Illustrator shows the groups ok.

However, I'm using Inkscape in command-line (required for automation process) to convert the SVG file to PDF.

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

The PDF file is generated with all its Path elements on the same level, without any kind of groups/layers, which is mandatory for my project.

Is there a way Inkscape does not ungroup the elements?

Attached an image of the final result (left side, SVG file - right side, the converted PDF)

Image: SVG and PDF layers

Example 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/95754.html

上一篇: 基于时间轴的iPhone / iPad上的动画

下一篇: Inkscape:SVG到PDF删除组