Inkscape extension for extracting and exporting elements from a drawing.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


larscwallin.inx.extractelements version 0.* extracts all selected SVG Elements to file and/or displayed as a string in the Inkscape GUI.

UPDATE 131008

  • Added optional JavaScript which enables you to add parameters to your url. These params lets you style your SVG elements on the fly. At the moment only hex color values are valid to keep things safe.


    Color the myelementid dark red


    If no id param is supplied the style rules are applied to the SVG root. Below the elements are colored dark red with a black stroke.


    UPDATE 130801

    • Made some fixes to the SVG output to make it cross browser friendly. Fixes include the addition of the "preserveAspectRatio" attribute to the SVG tag.
    • Base64 outputs sass variable list (will soon be optional of course).

    UPDATE 130513

    • Added a clean up option using the extension.

    UPDATE 130512

    • Moved code from Gist to proper Repo

    UPDATE 130510

    • Added option to keep the canvas size of the original drawing when exporting. (Previously each exported drawing was sized according to its elements bounding box)
    • Bug fixes

    UPDATE 130506

    • Added movePath method which moves all paths to 0,0 coordinates regardless of their original placement.
    • If no elements are selected, the extension now defaults to exporting any visible layers. Precondition for this is that layers have been hidden and then shown again at some point as Inkscape currently does not add meta data by default.

    UPDATE 130503

    • Added calculation of bounding box and width and height attributes for the resulting SVG doc.