I want to be able to edit my objects through code. But it seems that Inkscape, for some strange reason, thinks that all properties in svg's XML are in mm. I've set Grid Units to px, I checked if Display Units is px. If I go to XML Editor and try to change, let's say, height or style (stroke-width, for example), Inkscape thinks this value is in mm, even if I type px after a number. I'm newbie with this software, am I missing something?


1 Answer 1


You can.

Option a) (new file):

File > New from Template > default px

Option b) (existing file):

File > Document properties:

  1. Set Display units to px
  2. Set Scale to 1

Note: this option will change the size and location of all elements in your drawing, you will need to resize afterwards.

Note: Objects that are in groups that are resized (i.e. have a transform attribute for the group) will still not have their size indicated in px in the xml, you would need to ungroup, or remove the transform (using an extension downloadable from the Inkscape website, for example).

  • 1
    Thank you, that did the trick. I wasn't aware of what's this Scale option doing. I changed default.svg template accordingly, and now it works as I need it to.
    – splinefx
    Dec 14, 2018 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.