Search code examples
svgadobe-illustrator

Creating Illustrator top layers in SVG


When I load my layered SVG files into Illustrator all the layers works just as they should but they are always positioned under a new layer; "Layer 1" that I did not specify.

How do I create a SVG where my top layers end up as the top layer in Illustrator as well?


Solution

    1. Create a file in Illustrator that has an organization like you want.
    2. Save the SVG from Illustrator as "a.svg".
    3. Re-open the SVG file in Illustrator.
      Hey, all my layers got regrouped under Layer 1!
    4. Fix the organization.
    5. Save the SVG from Illustrator with the "Preserve Illustrator Editing Capabilities" option checked as "b.svg".
    6. Re-open the SVG file in Illustrator.
      Yay, the Layers were preserved!
    7. Diff a.svg and b.svg to see what extra metadata Illustrator is saving.
    8. Mimic this data in your own file.
      Cry when you realize that the solution is an enormous proprietary blob (the <i:pgf> element).
    9. Give up and decide it doesn't really matter all that much.