Inkscape Export

It’s been a while since I’ve given a random Inkscape tip. This one is about exporting your designs for the web.

A great thing about mockups created in Inkscape is that you can actually use parts of the mockup for the final PNG export. What you need to do is to name objects or more likely groups of objects (and remember you can easily enter those groups). To do this you open up object properties window with
Ctrl+Shift+O and provide an id. The id needs to be unique in the document. Inkscape will use a randomly generated one if the name you provide exists already, so be careful.

When ready you select all the objects you want to export and in the export dialog (Ctrl+Shift+E) use the batch export the selected X selected objects checkbox. You will find the exported PNGs in the folder of the SVG with filenames based on the object ids.

If you have them on some background you don’t want exported, use the option below as well — hide all except selected. Note that Inkscape will only hide everything but the selection. If your selected objects are overlaid, you will still get fragments of them in the export. It doesn’t hide everything but the currently exported object, it hides everything but the selection.

Of course Inkscape is great in that you can do all this from the commandline: `inkscape -e foo.png --export-id=foo bar.svg`.

One Response to “Inkscape Export”

  1. matt harrison Says:

    A while back I created a slicing plugin [0] for inkscape. It allows one to create another layer and draw/label rectangles in it that you want exported. I’ve found it very useful and currently use it for creating graphics for presentations. Sadly, the inkscape folks didn’t like that it would clobber existing files and so it wasn’t accepted.

    0 – http://panela.blog-city.com/slicing_web_pages_with_inkscape_and_python.htm

Leave a Reply