Inkscape notes

Just some personal notes, or a cheatsheet, on using Inkscape.

Note for other people: I usually use Inkscape and Emacs in conjunction, and I’ve made my own (as-of-yet undocumented) library called jmm-inkscape.el for using them together. It basically relies on D-Bus communication, though Inkscape’s D-Bus interface recently was updated. Some of the org.gtk.Actions for Inkscape are located in src/actions/. Like here’s an example of actions defined in actions-selection.cpp.

Command line


Exporting a PNG

Here’s how you’d export a PNG with a white background and a width of 500px.

inkscape yourfile.svg --export-type=png --export-width=500 --export-background=white

It’ll make a file named yourfile.png by default.


Here’s how you’d export an SVG to a PDF:

inkscape --export-type=pdf --export-filename=output.pdf input.svg

Note the --export-type=pdf isn’t actually necessary, but I think it ensures that the export-filename has the right extension.


Editing defs or markers

Editing markers or symbols (which are in the <defs> section) can be slightly annoying. One tip is to replace a def’d ID with a <use> element pointing to some group (e.g. <g>), which you can then edit. You may also be able to have the <use> point to an external SVG.

(TODO: Show an example of this.)


Some issues I’ve run into with Inkscape: