Why do my SVG images render with very low resolution?

Answered by: Jürgen Schnurr and Steve Cuzner Last Updated: 2006-09-16

=Question by N.N.=

We have a problem when I print XML files with SVG images (I use the print composer option with a FOSI file). The SVG images have a bad quality (the resolution is low). I have tried to modify the parameter "defaultprintdpi" but there is no change.

=Jürgen Schnurr answers=

We have the same problem with our SVG images produced by Adobe Illustrator. As far as I can see the problem is invoked by the following:

Adobe Illustrator or Isodraw saves the SVG images with dimensions (lengths) without unit. Adobe Illustrator interprets these dimensions as "points". Arbortext Editor interprets these unitless dimensions as user units or pixels. And because of this it is not possible to increase the quality of the picture by increasing the parameter "defaultprintdpi". The amout of pixels is constant, the pictures gets just smaller.

If I insert the unit pt in the height and width dimensions of the svg element, all is fine.

As far as I understand, the section 7.10 of the SVG 1.1 recommendation the behaviour of Arbortext Editor is correct:

Coordinate Systems, Transformations and Units - SVG 1.1 - 20030114

7.10 Units All coordinates and lengths in SVG can be specified with or without a unit identifier. When a coordinate or length value is a number without a unit identifier (e.g., "25"), then the given coordinate or length is assumed to be in user units (i.e., a value in the current user coordinate system). For example: Text size is 50 user units Alternatively, a coordinate or length value can be expressed as a number following by a unit identifier (e.g., "25cm" or "15em"). The list of unit identifiers in SVG matches the list of unit identifiers in CSS: em, ex, px, pt, pc, cm, mm, in and percentages. The following describes how the various unit identifiers are processed:

But I fear to be correct helps not much, if standard tools have a different interpretation.

Is there any possibilty to change the interpretion of unitless dimensions in Arbortext Editor?

Is anyone aware of a SVG-Tool which inserts units in the height and width dimensions of the svg element?

(Editors note by Karl Johan Kleist added later: I have found that both Corel Draw and Corel Designer specify the dimensions of the graphic as suggested by the recommendation and expected by Arbortext Editor.)

=Steve Cuzner adds=

You can also use Inkscape, which is an opensource tool. I've had good luck working with it and it does save dimensions according to the specification.