Jump to content

Recommended Posts

Posted (edited)

Hi guys

Tried to search in the Forum, but didn't really find a solution to this. Sometimes the Designer or Photo can't open SVG files all the other apps can... I cant figure out what the problem is... I attached a sample file or here is the code:

 

<svg xmlns="http://www.w3.org/2000/svg" width="undefined" height="undefined" viewBox="0 0 8 8">
    <path fill="currentColor" d="M5 1L2 7h1l3-6H5zM1 2L0 4l1 2h1L1 4l1-2H1zm5 0l1 2l-1 2h1l1-2l-1-2H6z"/>
</svg>

 

What could be the issue here?

Best regards

 

code.svg

Edited by phillencolin
Posted

Hi @phillencolin and welcome to the forums,

It's because the width and height are undefined... If you change both to say 1024 and Save your file should open in both Designer and Photo (see attached file)...

<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 8 8">
    <path fill="currentColor" d="M5 1L2 7h1l3-6H5zM1 2L0 4l1 2h1L1 4l1-2H1zm5 0l1 2l-1 2h1l1-2l-1-2H6z"/>
</svg>

code.svg

Affinity Designer 2.6.3 | Affinity Photo 2.6.3 | Affinity Publisher 2.6.3
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Posted

Perfect, glad normal service has been resumed... :)

Affinity Designer 2.6.3 | Affinity Photo 2.6.3 | Affinity Publisher 2.6.3
MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

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.