Inkscape Export
Aug 10 2009
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
.