-
Notifications
You must be signed in to change notification settings - Fork 193
SVG export creating a box with incorrect dimensions #538
Comments
From dgasa...@gmail.com on February 08, 2013 13:09:41 Correction: It appears the "rect6" object is something created by Inkscape, using the dimensions set on the object. So now it appears the height is causing the problem. If I edit the height attribute before opening in Inkspace, then everything works as expected. |
From dgasa...@gmail.com on February 08, 2013 13:25:26 More corrections (eventually I'll get it right :). In the original exported SVG, the problem is a object: So, please ignore the XML I pasted earlier. In addition, I see know that the original has a different width and height, which doesn't seem to be related to canvas size: <svg xmlns=" http://www.w3.org/2000/svg " width="744.09448819" height="1052.3622047" |
From jay.ga...@DataMgmtSvcs.com on May 25, 2014 13:52:50 The size of the created SVG document appears to be coming directly from usr/share/pencil/content/pencil/exporter/Pencil2SVG.xslt, where it is hard coded as: So, either there is no code which is modifying these defaults to the correct dimensions for the document, or it is not working correctly. |
In the SVG export file, the first element is: These dimensions are wrong. Adapting these two values fixes the problem. This is a severe bug, also for me. This patch solves it:
|
See this pull request: |
[#538] solve bug fixed size in svg export
#718 is merged. I did some quick googling so I don't know if it's feasible for us but I saw that SVG has a Do you think we could use that? |
Hmm, I was thinking that initially, too. But then I read at IMHO we should export multiple pages as separate SVG files, and not combined in one file. Even using the inkscape layers is a bad solution, since they are not meant to be layers probably - the semantics differs. |
From dgasa...@gmail.com on February 08, 2013 15:09:47
What steps will reproduce the problem? 1. Create a drawing that is not square
2. Export to SVG
What is the expected output?
An SVG with dimensions matching the drawing. So, if I load the SVG into inkscape, and tell it to fit the page to the content, then I get a page that fits what was in the original drawing.
What do you see instead?
An SVG that seems to use the width of the drawing as the height. So when I do the above procedure in InkScape, the page ends up with a bunch of white space at the bottom (because my drawing is wider that it is tall). This seems to manifest in two places in the SVG file. What version of the product are you using? On what operating system? Version 2.0.3 on Windows XP Please provide any additional information below. My source .ep file has
[...]16241304[...]
The exported .svg has
<svg
[...]
width="1624"
height="1624"
[...]
The "rect6" object in particular is what's causing the problem for Inkscape. If I edit the height of rect6 to 1304 (the height from .ep), Inkscape behaves as I expected.
Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=538
The text was updated successfully, but these errors were encountered: