In the drawing below I have e.g., a rectangle.
In the GUI, Inkscape says the rectangle is at Y position 0, but in the XML for that element it says 873. Why is that and how do I get the "real" number?
Background: When exporting the image (scripted), I want to add 10 pixels border on all four sides. I thought I could just look for the largest / smallest coordinates in XML and add the 10 pixels for border, but I end up exporting an all white background instead of the image. Working with the XML comes natural here because I get other (meta) information from that.
I can query the image origin with
inkscape -X and
inkscape -Y and the image dimensions with
inkscape -H and
inkscape -W. That also gets me the numbers from the GUI. Exporting with these values works. However, that requires forking a new Inkscape process 4 times per image, and hence slows the whole export down. (Lots of images on old hardware.)
This is Inkscape 0.91 on Linux, in case that matters.