Inkscape.org
Beginners' Questions Controlling units in 1.1 - why does setting page display to mm not stick?
  1. #1
    agdavey agdavey @agdavey

    Why does inkscape give us the option [in Document properties] of changing display units of an existing svg [which has page size of A1, i.e. 594x841mm] if they keep reverting to px? How can I get it to stick to my selected display units of mm?

    Likewise, in e.g. Transform, the selection of mm in place of px seems impossible to save. It keeps reverting to px after every "apply".

    How can I get mm to stick?

  2. #2
    Pacer Pacer @pacer🏁
    *

    @agdavey

    I think I may understand your issue. Could you please elaborate on the exact steps you have taken and the expected outcome, and I'll see if I can help?

    Are you referring to a single document or are you looking to change the units for a template (permanently)? Just to clarify.

    Also, what version of Inkscape are you using?

  3. #3
    agdavey agdavey @agdavey

    v1.1 on w10 pro

    The immediate problem is that while I have a default template [A4] that [as expected] provides mm for both display units & page size, one of the charts I am editing [which has a metric, A1, page size], cannot be set in inkscape to reliably display units as mm--it constantly reverts to px. This is despite the fact, after it has been saved from inkscape, the svg when opened in a txt editor has both inkscape:document-units="mm" and units="mm" in the namedview section. The original svg as generated from gramps [genealogy package] does not include any namedview section at all, but the basic svg code appears to be valid, and I can successfully reformat the text, strokes & fills and when all adjustments are complete ultimately save to pdf.

    But I driven totally nuts while doing so because it will not give me the units I want in inkscape while I make the necessary adjustments.

    I am nevertheless wondering if there is some problem with the svg of my input chart. I have just run a test with a new svg [i.e. my default A4 template], importing the existing gramps-generated A1 svg into it, and resizing the page to fit the A1 content, and the mm page display of my default template appears to stick. [And the units that appear in the transform move option remain mm.]

    But when I was opening the svg chart directly, inkscape certainly wasn't telling me there was any problem rendering the code ...

    If anyone can tell me how to override some hidden setting inside a [possibly malformed] svg that prevents user-selectable display units from sticking I would like to hear about it! [And until I understand the problem I can't file a bug report for the relevant output module of gramps.]

     

     

  4. #4
    Tyler Durden Tyler Durden @TylerDurden

    Please share an example svg file directly from the genealogy program for evaluation.

  5. #5
    agdavey agdavey @agdavey

    Here is an extremely simple example of raw output with almost no data in it, but gives you the same syntax as charts with thousands of objects ...

    Descendtree 38781
  6. #6
    Aero Aero @Aero◻️

    I inserted a viewBox in your file. I think of Display units in Document Properties as Ruler units.

     

    Descendtree 38781 Viewbox
  7. #7
    agdavey agdavey @agdavey

    Do I take it that the general principle here is that the output script in gramps should be inserting a viewBox element in the svg tag after the width & height declarations, with four px values representing the corners separated by spaces: "0 0 width_in_px_at_96DPI height_in_px_at 96DPI" ?

    I do not remember the behaviour I have been having on this being an issue when I was on inkscape 0.9? Is this a consequence of the changes to 1.1? Of does it represent evolution of the SVG standard since the gramps script may have been written?
     

  8. #8
    Tyler Durden Tyler Durden @TylerDurden
    *
    agdavey

    Is this a consequence of the changes to 1.1? Of does it represent evolution of the SVG standard since the gramps script may have been written?

    A bit of everything.  I'm not sure Inkscape included a viewbox declaration before the change to 96 ppi, which was due to the update to the SVG standard. That was at v.92.2.

    More here: https://www.w3.org/TR/SVG/coords.html

    And here: https://wiki.inkscape.org/wiki/index.php/Units_In_Inkscape

  9. #9
    Aero Aero @Aero◻️
    TylerDurden

    I'm not sure Inkscape included a viewbox declaration before the change to 96 ppi, which was due to the update to the SVG standard.

    It did, in 0.91.1.

    Copy of default templates for 0.91.1 (90 dpi) and current 1.1 (25.4 dpi) attached.
     

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Controlling units in 1.1 - why does setting page display to mm not stick?