Klaus Malorny wrote:
I have a small problem. I need to prepare some SVG files for the use with Apache's FOP. Inkscape seems to be the perfect tool for this, so I installed the latest version 0.45. However, I discovered that FOP measures a pixel as a 1/72 inch, while Inkscape measures a pixel as a 1/90 inch. Then I found out that there are default templates of various sizes, and one of them is "default_mm", which actually announces the image size in the <svg> element in absolute units. Unfortunately, whenever I resize the document size, Inkscape falls back into pixel mode when saving the file. What am I doing wrong? Is it an intended behaviour or is it a bug? I found a workaround, namely scaling the image by 72/90, however, I would prefer a clean solution.
Absolute sizes in svg is a huge can of worms. HUGE! First problem is that svg paths can only be specified in a mythical "user unit" aka "px". Secondly the SVG spec calls for the svg application to determine the pixel per inch ratio from the ppi of the display device. Deep down in the depths of the code Inkscape makes a hard assumption that the ratio is 90 pixels per inch. I believe this behavior is actually exemplified in the spec. Most postscript descendant apps make the 1pt == 1pixel asumption or 72pixels per inch. So there is the rub. Just imagine what might happen if you mix absolute units and "user units" in one document and the user agent determines ppi from the display device.
So I believe the current short answer is that you will need to scale your SVG to 80%. I'd guess this should be easy to script by wrapping the whole drawing in a <g transform="scale(.8,.8)" /> or something similar.
Aaron Spike