Display units in document properties not respected for converted old files

Bug #1671691 reported by Jared Henley on 2017-03-10
This bug affects 13 people
Affects Status Importance Assigned to Milestone

Bug Description

In Inkscape 0.92 and 0.92.1, when opening an old (pre 0.91) Inkscape SVG, changing the "Display units" in the document properties window has no effect - it reverts back to "px" and the rulers are not changed.

Using Archlinux kept up-to-date with full system upgrades (pacman -Syu).

Robert Loos (r-loos) wrote :

This is the same as #1671059

Bill (donaldsonws) wrote :

Problem occurred after upgrading from .91 to 0.92.1r1573. When loading old (0.91) files rulers now stuck in units of px. When I change properties to inch it changes back to px on file save. SVG file shows units of inches. New drawings are OK.
O/S is windows 10 64bit Anniversary

Tom Peterson (tompete) wrote :

Regarding old Inkscape documents (pre 0.92) that cannot properly set display units:

-Adding this line to the 'svg id' node (root node) in the XML editor fixes the issue for me:
viewBox="0 0 279.4 215.90001"

In other words, the viewBox attribute is missing in documents that are converted from pre-092 to current/0.92. I'm not certain how flexible those viewBox values are, but either leaving blank or setting all to ZERO did not work. I've had to use the values pasted above for it to work.

e.g. (see last line)
   inkscape:version="0.92.1 r15371"
   viewBox="0 0 279.4 215.90001">

Tom Peterson (tompete) wrote :

tl;dr - If you select the 'viewBox' option when opening a pre-0.92 drawing then the issue of inability to adjust display units does not present itself.

After implementing the solution I mentioned above on several drawings, I realized it has the side effect of enlarging your drawing A LOT! It turns out the issue of display units is caused when choosing the "Scale Elements" option of converting old <0.92 drawings to new 0.92 format. If you instead select the 'viewBox' option then the issue of inability to adjust display units does not present itself.

Martin Spacek (mspacek) wrote :

I have the same issue in 0.92 on Xubuntu 16.04

Changed in inkscape:
status: New → Confirmed
Rick Uhlenkott (rduhlenkott) wrote :

The 'viewbox' option is not available in the 92.2 dialog. Win 7, X64.

Hachmann (marenhachmann) wrote :


- Open File > Document properties
- Open the 'viewbox' section in the first tab
- Trigger the creation of a viewbox by adding 1 (or any other number) to one of the values, hit Enter
- Fix it to its correct value by subtracting 1 (or any other number) from the value you modified previously, hit Enter.
- Change the unit in the top right corner ('Display units')
- Save
- Close and open document

Hachmann (marenhachmann) wrote :

Also happens for documents created with inches as unit.

The user said they used the 'first' option in the 90-to-96-dpi conversion dialog (no image, no description, can't tell which one that is).

Also happens with Inkscape 0.92.x as of c477208, 2018-01-28.

Charles Cecil (clcecil) wrote :

I was requested to add this attachment to the bug report. This dialog box appears when opening an older Inkscape .svg file in Inkscape 0.92.2. Regarding my issue, I selected the default option which reads "This file contains artwork for screen display. (Choose if unsure.)".

John (john-jcoppens) wrote :

I seem to have the same problem, and it is quite annoying. I currently have 0.92.4 installed:

Opening old drawings don't allow me to 1) change the Document units (they revert back to pixels on closing the dialog) but 2) Page size Units can be changed and remain in effect.

I noticed that those old drawing XML files do not mention either 'Units' or 'Size' (case ignored).

EXCEPT it contains a node 'sodipodi:namedview' with inkscape:document-units="mm" which is then silently ignored, it seems.

After _many_ years of using Inkscape/Sodipodi, I feel unsure if I can rely on it anymore, with the 90 -> 96 change, and snags like the inability to change units.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers