vectorpea icon indicating copy to clipboard operation
vectorpea copied to clipboard

Exported SVG doesn't match original size

Open Mario662629 opened this issue 8 months ago • 6 comments

For some SVG files, when I fit to artwork bounds, it shows properly at first. However, when exported and then re-opened back in Vectorpea, the exported file has a few tiny gaps on two of the sides.

To see the bug in action (try this with each file):

  • Save any of the SVG image files attached below to your device, then open them in Vectorpea.
  • Below each image, there is a list of sides that the empty space appeared on for that image. Zoom in on those edges of the files in Vectorpea, and compare them to the other edges, the sides listed have empty space while the others have the image touch the edge of the artboard.
  • Select Object > Fit to Artwork Bounds; the edges of the artboard should touch the edges of the image.
  • Without editing the image any further, export it as SVG, then open the newly-exported SVG in Vectorpea; the gaps come back on the same sides mentioned for that image.

Image Has gaps on the bottom and right sides, leaving the image in the top-left.

Image Has gaps on the bottom and right sides, leaving the image in the top-left.

Image Has gaps on the top and right sides, leaving the image in the bottom-left.

Image Has gaps on the bottom and right sides, leaving the image in the top-left.

Mario662629 avatar Apr 17 '25 17:04 Mario662629

I think I have fixed it, could you try it again?

photopea avatar Apr 19 '25 02:04 photopea

Looks like it's partially fixed; the image below creates tiny empty gaps, but they appear either on the top and bottom, or on the left and right. And, the gaps aren't as large.

Image

Mario662629 avatar Apr 19 '25 03:04 Mario662629

When you open that SVG file in Vectorpea or in Adobe Illustrator, there are gaps on the right and the bottom side, that is a correct behaviour. The content of your SVG is a bit smaller than the size of your SVG.

photopea avatar Apr 19 '25 03:04 photopea

Oh, and by the way, the reason of this issue is because of the fact that I can't find the official diagrams for the Ontario road signs, unlike the U.S. MUTCD signs; I could only find the sign design pattern files (e.g. https://www.library.mto.gov.on.ca/SydneyPLUS/Sydney/Portal/default.aspx?component=AAAAIY&record=01770351-8895-4f48-a8b5-62a03145ae1c). On Wikimedia Commons (https://commons.wikimedia.org/wiki/Ontario_road_signs), some of the diagrams were not updated in 2019 or 2020 (as seen in the file history).

From there, I was putting the PDFs in Vectorpea and exporting the signs, but there was some size disparity, and some of them had the gaps created on different sides. In this example, the selected boxes in the two design sheets below were the parts that exported after grouping the layers, deleting everything else, and cropping the artboard; the first one was 232x232, the second one was 233x232.

Image Image

Mario662629 avatar Apr 19 '25 20:04 Mario662629

Oh, and additionally, one more thing. When exporting an SVG and changing the size (using the Width and Height boxes in the export GUI), the image still gets exported at the original size (rather than scaling it)...

Mario662629 avatar Apr 19 '25 21:04 Mario662629

I have fixed the last problem that you mentioned.

If you have a different problem, please, describe the steps to see that problem.

photopea avatar Apr 20 '25 08:04 photopea