john-bradshaw Posted November 15, 2019 Share Posted November 15, 2019 I cannot import the attached SVG properly (it is missing the H at the bottom). However this can be opened fine in Inkscape: Or in my web browser: borohydride2.svg borohydride2.svg Quote Link to comment Share on other sites More sharing options...
Hangman Posted November 16, 2019 Share Posted November 16, 2019 Hi John, Welcome to the forum... The missing 'H' is actually there but for some reason, the SVG file contains a clipping path matching the 81 x 84 pt/px document size for each of the text elements in the file and each clipping path is offset by a seemingly arbitrary amount, with the exception of the right hand 'H' where he clipping path appears at X = 0, Y = 0. The bottom 'H', it is hidden because the 'H' character is sitting outside its clipping path which is why you can't see it on opening the file. If you uncheck or delete the clipping paths associated with the text elements in the file the missing 'H' will reappear. I don't really understand why the clipping paths are a) a part of the file or b) offset from the main document origin as they are, I can only assume this is down to the software which was used to generate the SVG file but I also don't understand why opening the file in Inkscape doesn't present the same issue, maybe someone from the Affinity Team can shed some light on this? Quote Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2 Affinity Designer Beta 2.5.0 (2402) | Affinity Photo Beta 2.5.0 (2402) | Affinity Publisher Beta 2.5.0 (2402) Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8 MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse Link to comment Share on other sites More sharing options...
john-bradshaw Posted November 17, 2019 Author Share Posted November 17, 2019 Hi Hangman, Thanks for looking into this and explaining why it's happening! From the information in your answer I was able to find that other people have had clipping problems with the software I was using to generate the SVG, MarvinSketch. Weird though that in my particular case I don't experience the same problem in Inkscape (or in Firefox). Quote Link to comment Share on other sites More sharing options...
Hangman Posted November 17, 2019 Share Posted November 17, 2019 Hi John, I'm not that familiar with MarvinSketch, but looking at a few other SVG files generated using it, it seems to add clipping paths to any 'live' text elements but for some reason, these clipping paths are wildly offset in the x, y axes which causes issues when opening them in AD. I don't think AD is at fault because looking at the XML created for the SVG files the clipping paths are incorrectly positioned so possibly something ChemAxon need to look into. I suspect it is the text causing the issues in MarvinSketch, it looks as though in the sample you linked to the same issue does exist in Inkscape, it all depends where the clipping paths fall on the exported SVG, though it's odd that you are seeing different results between Inkscape and AD with your file, hopefully, someone from the Affinity team can take a look and shed some light on this. Out of interest, if you outline the text elements in your file, the 'H's and the 'B' and then export as an SVG, do you get the same issues when opening in AD. AD has an option to outline text on export which means there is no need to physically outline the text in the file itself (which is very useful). I'm not sure if MarvinSketch has a similar option when exporting to SVG but if so and if it overcomes the clipping issue it may be an option? A couple of additional thoughts, a) can you simply copy and paste the graphic created in MarvinSketch straight into AD maintaining the vector format and/or b) can you try exporting in PDF format from MarvinSketch and then opening in AD to see whether you get better results? john-bradshaw and Sean P 1 1 Quote Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2 Affinity Designer Beta 2.5.0 (2402) | Affinity Photo Beta 2.5.0 (2402) | Affinity Publisher Beta 2.5.0 (2402) Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8 MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse Link to comment Share on other sites More sharing options...
Staff Sean P Posted November 18, 2019 Staff Share Posted November 18, 2019 Hi john-bradshaw, Welcome to the Affinity Forums! There a few known issues with not displaying the ClipPath correctly so I've passed your file on to development to see if there is anything we can do to improve the behaviour. john-bradshaw 1 Quote Link to comment Share on other sites More sharing options...
john-bradshaw Posted November 20, 2019 Author Share Posted November 20, 2019 Hi Hangman, On 11/17/2019 at 6:56 PM, Hangman said: Out of interest, if you outline the text elements in your file, the 'H's and the 'B' and then export as an SVG, do you get the same issues when opening in AD. AD has an option to outline text on export which means there is no need to physically outline the text in the file itself (which is very useful). I'm not sure if MarvinSketch has a similar option when exporting to SVG but if so and if it overcomes the clipping issue it may be an option? Thanks for this suggestion! Unfortunately, I do not think that MarvinSketch has a similar option. On 11/17/2019 at 6:56 PM, Hangman said: A couple of additional thoughts, a) can you simply copy and paste the graphic created in MarvinSketch straight into AD maintaining the vector format and/or b) can you try exporting in PDF format from MarvinSketch and then opening in AD to see whether you get better results? a) Annoyingly MarvinSketch you can only copy as a raster image. b) Thanks for this suggestion! Yes if I export as a PDF and then import this works okay, and seems like a great work around. I can try looking into the clipping issue and see if anyone at ChemAxon knows why this is happening. Thanks again for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.