Jump to content
You must now use your email address to sign in [click for more info] ×

Cannot import SVG properly


Recommended Posts

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?

clipping_path.jpg.3daa13512fccd40d1e6399bf6699666c.jpg

 

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

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).

 

Link to comment
Share on other sites

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?

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

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!

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.