edemaine / cocreate

Cocreate Shared Whiteboard/Drawing
MIT License
209 stars 27 forks source link

Exported SVG not opening in other programs #106

Closed jaysonl closed 3 years ago

jaysonl commented 3 years ago

When we used the export to SVG function on Cocreate this morning, the resulting file failed to load properly. This was across at least three different devices including Inkscape and Chrome on Windows 10 and the standard Ubuntu image viewer. Inkscape failed to load, chrome displayed a blank document, and the Ubuntu pdf viewer gave an error saying it was not a correctly formatted svg.

edemaine commented 3 years ago

Can you email me a link? (I wouldn't post it publicly here.) I use export to SVG roughly every day, and it loads fine on Chrome/Coauthor (but I don't test Inkscape as often), so maybe it's something specific to your drawing.

edemaine commented 3 years ago

You emailed Github, not me... I've deleted the comment but you should be careful in the future.

edemaine commented 3 years ago

There was a rectangle object at coordinates -577065.5, -378730.09375, which caused the bounding box to be huge relative to the drawing. The drawing still looked fine to me on Chrome; it's just that the content was about 1% of the rendered area. I deleted the stray object, and now the bounding box is much happier. (You could have also selected just the objects you care for, and export those.) It loaded fine for me before and after Chrome (and probably did for you -- it just looked blank to you).

I also had no trouble loading the file in Inscape 1.0. Are you using 0.92?

jaysonl commented 3 years ago

I wonder what put an object out there. It might be nice to be able to easily tell what the bounding box is in cocreate.

I am using Inkscape 0.92.3 I'll look into updating. Sounds like this was an issue with our use, not cocreate.

edemaine commented 3 years ago

I just tested in Inkscape 0.92.4, and it worked fine (though took several seconds to load). It is a big SVG file, though (6.2MB), so maybe an out-of-memory issue?

edemaine commented 3 years ago

Opened #108 regarding discovering the bounding box -- feel free to post there if you have ideas.