Re: dia svg export: how do adjust size?

Sameer Sahasrabuddhe pisze:
On 10/2/07, Zhang Weiwu <zhangweiwu realss com> wrote:
After made a graph in dia 0.96.1, I export it to svg by "File -> Export
-> change extension name to .svg and click save".

When you changed the extension name to ".svg", did you also select the
option that says "Determine file type By Extension"?

Result file cannot be opened in firefox Error:
        This XML file does not appear to have any style information
associated with it. The document tree is shown below.

If you are running Linux, you can check the actual type of the file
using the "file" command.

The above actually means that dia doesn't give the xmlns for svg which makes it not usable at least for Firefox. The header for SVG should look like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
width="..." height="...">

BTW. A viewBox should also be there so the bug with font scaling could be more easily fixed.

And one more thing I'm not sure if this was reported, because I cannot search for "SVG" in bugzilla... Dia exports SVG with such font-size that some readers cannot render and so most texts are much bigger then in the original. You can test this by exporting Dia picture to SVG and view it in Firefox (before you do, you will need to add xmlns as mentioned above). The solution would be to simply multiple all dimensions by 100 and add a correct viewBox.

Oh and while I'm at it :)... Dia could export SVG so that shapes would be grouped in a format like:
<!-- name of the shape -->
   ...shape/object elements...
This would make the SVG code really pretty :). It could be even better if some static parts would be put in defs and then used with xlink features, but that would probably be much more complicated.

Best regards,

PS: I could try to help fix SVG export if someone would point to the code that does this.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]