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

Affinity Designer SVG export with reliable scale


Recommended Posts

I am trying to export SVG files from Affinity Designer and bring them into a range of programs for generating tabs / notches and then outputting for laser cutting. 

 

In Adobe Illustrator it is very simple - you set the document units to mm, design something with specific dimensions, and export your SVG. What comes out will be interpreted by other software, and by the laser cutter at the exact dimensions. 

 

With Affinity Designer, I've spent hours troubleshooting and digging through the forums and no matter what I do dimensions seem to vary depending on the DPI and all sorts of other options, and even slices of objects with the same height will export at different dimensions. It makes it practically impossible to predict what size your object will be. (as an aside, I thought DPI was completely irrelevant to vector - why is it even an option in a vector format?!)

 

So is reliable scale something Affinity Designer just can't do? How are people delivering documents for print if they don't know how the printer will interpret the dimensions of their final files? 

 

I dumped Creative Cloud, bought the Affinity hoping to replace AI and now am faced with going back to Creative Cloud and getting stung with higher fees as a result of leaving. For my line of work this seems like really simple stuff... 

 

 

Link to comment
Share on other sites

Hi @angusware I once had the same size problems but it was with PNG files, so what I did was simple, I used the export option in the file menu not the export persons. 

The export option seems to preserve the correct size. 

Even though now I have no problem with my export persona, I prefer to deliver using the export option for output like PDF, PNG and some specific jpeg. 

Try and see if it helps 

Never be the Same Again !
---
Dell Optiplex 5090 SFF
Intel Core i5-10500T @2.30GHz with 12GiB 2666MHz DDR4
Intel UHD Graphics 630 for 10th Generation
M.2 2280, 512 GB, PCIe NVMe Gen3 x4, Class 40 SSD

Windows 11 Pro x64 22H2 + LibreOffice 7.5.3

Link to comment
Share on other sites

I don't know the answer to why they ask for the dpi when exporting a svg, but when choosing eps or pdf it tells me in breaks "Nothing will be rasterised" right next to the dpi-input-field. Would any other format also work for you? Good luck, really hope you can stay out away from the dark Cloud.

Link to comment
Share on other sites

Some relevant links and information that may help others understand and troubleshoot.

https://www.w3.org/TR/SVG/coords.html

https://www.w3.org/TR/SVG2/coords.html

SVG settings on File > Export...

For PDF, SVG and EPS file formats:

  • Rasterize—select an option for rasterizing design elements which are unsupported by the file format. Select from the pop-up menu:
    • Nothing—no elements within the design are rasterized on export, therefore unsupported elements are not included in the exported file.
    • Everything—all elements within the design are rasterized for a resulting exported file which perfectly matches your original design.
    • Unsupported properties—only unsupported elements are rasterized in the exported file.
  • Downsample images—select whether to downsample raster images within the design.
  • Above—if this set DPI is exceeded by raster design elements, those elements will be rasterized down to this set DPI. This option is dependent on the Downsample images option being active.
  • Use document resolution—ensures the export is the same DPI as the current project's setting.
  • Use DPI—overrides the current project's resolution setting for the export. The exported image's DPI is set using the adjacent input box
  • Allow JPEG compression—when selected, rasterized design elements will be compressed to decrease exported file size. If this option is off, rasterized design elements will be exported as uncompressed.

For SVG file format:

  • Export text as curves—when selected, the text in the resulting file will be drawn as curves (therefore displaying precisely as intended, even if viewed on a device without the used fonts installed). However, this option will increase file size, and text won't be editable as text or available to "text to speech" in other apps. If this option is off, text will be exported as text and the viewing device will need the used fonts installed for it to be viewed correctly.
  • Longer text spans—when selected, text is placed relative to previous lines of text (therefore producing smaller file sizes and simpler file structures). If this option is off, text is placed with absolute coordinates.
  • Use hex colours—when selected, colours in the exported file are expressed as RGB Hex values (therefore reducing file size but less human-readable). If this option is off, colours are exported as standard RGB values.
  • Flatten transforms—when selected, transformed objects are 'fixed' in the exported file. This allows for the file to be viewed more accurately across applications. If this option is off, objects remain dynamically transformed to allow for more flexible editing.
  • Use tile patterns—when selected, rasterized areas may be converted to a vector shape with a filled bitmap to give smoother, sharper edges. However, this might not be supported by some apps. If this option is off, objects will exist as singular elements within the exported file.
  • Set viewBox—when selected, the exported file includes coordinates and dimensions which define the view box of the image. If this option is off, no view box data is included in the exported file. The export area is used to define the view box.
  • Add line breaks—when selected, the code in the exported file will be optimized for human viewing and reading. If this option is off, the image will be exported with code on a single line which will make the file size significantly smaller.

For SVG and EPS file formats:

  • (Use) Relative coordinates—when selected, objects in the exported file have relative positions for maximum editability. If this option is off, object positions are fixed to create a file which is optimized for viewing.

 

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

19 hours ago, hannah said:

I don't know the answer to why they ask for the dpi when exporting a svg ...

Probably because svg supports embedded bitmap elements as well as vectors, shapes, etc.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Thanks for all the suggestions. I am still investigating this. 

Unfortunately going through the export menu rather than persona doesn't change things. For example, I am unable to get anything to work with this web app, which I use all the time with Illustrator and Inkscape files:  

https://clementzheng.github.io/joinery/

The app imports the file with pixels, rather than mm as the units. I think the problem is that, regardless of the document units, Affinity Designer exports SVG with pixels as the units. 

On 5/23/2018 at 9:48 AM, R C-R said:

Probably because svg supports embedded bitmap elements as well as vectors, shapes, etc.

Regarding DPI - the DPI used when exporting changes the scale this web app interprets the SVG at, meaning that the DPI is affecting non-raster objects within an SVG. 

The same issues apply with every piece of vector-based laser cutting software I have thrown Affinity designer-exported files at. Again, AI, Inkscape etc. files handle this just fine. 

Is this a bug? A missing feature? I have never encountered these issues with other vector illustration software before, and it seems other users have had trouble too:

https://forum.affinity.serif.com/index.php?/topic/46934-preserve-document-units-in-svg-export/

Link to comment
Share on other sites

I have found a workaround, of sorts: 

1. Set up the document units to pixels, and use pixel measurements in place of millimetres, e.g. if desired size is 100mm, make object 100px. 

2. Export the document using the export option in the file menu, select 'SVG (for web)'. Click 'More' for extra options. 

3.  Deselect 'Set viewBox'  and select 'Add line breaks'. Export the file. 

4. Open the SVG file in a text/code editor and locate this line: 

<svg width="100px" height="100px" version="1.1"

5. Change the 'px' units to 'mm'. Save the document. 

6. Open the modified document in your desired software. 

This works with the software I have tested it with. 

Link to comment
Share on other sites

  • 10 months later...

the workaround works, but why do we need so many workarounds in AD?

DXF, Warp, SVGs that import... all of these work great and have for years in inkscape. The more I use AD the more I want to use something else. This is not what we were sold. BTW warp and DXF were on the "roadmap" for over four years - that's ridiculous.

Link to comment
Share on other sites

  • 1 month later...
On ‎5‎/‎22‎/‎2018 at 4:10 AM, Uncle Mez said:

Hi @angusware I once had the same size problems but it was with PNG files, so what I did was simple, I used the export option in the file menu not the export persons. 

The export option seems to preserve the correct size. 

Even though now I have no problem with my export persona, I prefer to deliver using the export option for output like PDF, PNG and some specific jpeg. 

Try and see if it helps 

As well as you guys have problems with PNG and SVG formats I have the same issue with PDF (probably with the exporting as a whole) and even not using Export persona doesn!t help at all unfortunately.

 

Now I'm putting my hand up that I am another one with the same problem and would like to ask AFFINITY GUYS  to help us. I don't want any workarounds.

I just don't understand why is this happening, doesn't make sense to me. I want to understand it, if it can't be simply solved

Thank you! =]

Link to comment
Share on other sites

  • 1 month later...

I'm new to Affinity Designer. Like many I'm sure, we are looking to escape the Adobe tyranny. However, our work flow is important and the more seamless a transition the better. However, like all of you here, exporting to SVG file format to import into a 3rd party CNC program (or other) is wrought with difficulties. Vector designs went seamlessly using Illustrator but not with AD - anything I did via AD ended up importing really, really small. I did not want to have to rescale in my CNC software as I took painstaking efforts to make sure I did that in AD (or AI). Alas, a big thank you to @angusware for his solution. Albeit I found a few minor mods that seemed to work just fine too. So below are my slightly amended instructions in hopes it saves someone else max. time trying different permutations to try and figure this out. Btw - it is July 17, 2019 and I'm brand new to the Affinity ecosystem, so this problem clearly continues to this day as I see many on this thread were posting over the last year or two. Hopefully the folks at Serif will rectify this in coming releases.

1. Select “New Document” from the pull down menu.

2. Set up the document units to pixels to use pixel measurements in place of millimetres,

3. When creating your vector object, and by way of example, if desired size is 100mm square, make the object 100 pixels square (ie. 1:1 ratio).

4. Save the document in AD’s native file format for future use or edits.

5. Export the document using the export option in the file menu.

6. Select 'SVG (for web)'. Click 'More' for extra options. 

7.  Deselect 'Set viewBox'  and select 'Add line breaks' (I also tried unselecting 'Add line breaks' and it also worked, in other words, didn't seem to impact either way).

8. Export the file.

9. Import into your 3rd party CNC/laser cutting program

NOTE: I excluded the code/text editing instructions angusware referenced in his workaround, this apparently was not required at my end. And I'm thankful for this. Maybe the absence of having to do this was suited to the 3rd party CNC software I'm running? Who knows, however, if you get away with having to do it, great . . . . it's one less step!

Cheers!

Link to comment
Share on other sites

Well let's give as a hint that SVG is an editable textual format and thus can be altered, modified and changed with plain text editors. So you can always inspect the generated SVG code and if needed apply some size/scaling changes. In order to get some insights about SVG and it's scaling handling the following is a good read ...

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

  • 9 months later...

Figured I'd chime in here and on some other threads I've been to recently, hopefully if anyone is searching for what I was, they will end up here.  I was having issues taking my vector designs from Affinity Designer in SVG into a program called Sheetcam for operating my cnc plasma.  I could not get the scale to remain where I wanted it.  As much as Inkscape got me started in vector design, I didn't want to have to run my designs through just to make a DXF (which still didn't import perfectly anyway) so I tried using pixels, mm, changing the DPI, but it wasn't working.  In the end, I just did some math to see what the factor was that Sheetcam was changing my designs by.  Obviously I had to make sure the units were the same in each program on export and import as well. My 10 inch square imported at roughly 10.6667.  So I just divided what it should be, by what it was. and came up with .9375.  Sheet cam gives you an option at every import to select the scale to import in.  So Instead of picking 1:1 I make it 1:.9375 and it's perfect.  

I'd like to understand why this works the way it does, whether DPI affects this or not, but I'm content to be able to use my drawings in inches and with the scaling trick.

 

 

Link to comment
Share on other sites

  • 9 months later...

I cannot believe this is still an issue... after so many years. Gosh. I just went back to Adobe as Affinity is the most frustrating experience ever. So many workarounds, so many bugs. Even in the 90`s Adobe had already more intuitive and better functioning software than Affinity has today 🤦🏻‍♂️ 

Link to comment
Share on other sites

18 hours ago, MortalWombat said:

I cannot believe this is still an issue... after so many years. Gosh. I just went back to Adobe as Affinity is the most frustrating experience ever. So many workarounds, so many bugs. Even in the 90`s Adobe had already more intuitive and better functioning software than Affinity has today 🤦🏻‍♂️ 

I found a method, I think maybe earlier in this thread, that has settings for exporting the SVG in a way the machines will like. But yeah, Affinity is a disappointment in this regard. Not unlike MS Excel and it's insistence that it knows my data better than I do and changes my values into dates and whatever else it feels. People have been screaming about this for decades now and MS just refuses to do something as simple as add a checkbox that says "Leave my damn data alone"!

Screen Shot 2021-02-10 at 8.38.11 AM.png

Link to comment
Share on other sites

On 2/11/2021 at 12:47 AM, dgd said:

I found a method, I think maybe earlier in this thread, that has settings for exporting the SVG in a way the machines will like. But yeah, Affinity is a disappointment in this regard. Not unlike MS Excel and it's insistence that it knows my data better than I do and changes my values into dates and whatever else it feels. People have been screaming about this for decades now and MS just refuses to do something as simple as add a checkbox that says "Leave my damn data alone"!

Thanks for posting this, it worked for me.

Link to comment
Share on other sites

  • 1 month later...

Hi, I was also struggling to find a method for this and got pretty frustrated. (My goal was to import my svg into fusion 360 with exact measurements). The simplest way that seemed to work for me: my document setup was in mm but I changed the DPI in document settings to 72 DPI. That way the exported svg kept its size. After reimporting it to AD it was exactly the same measurements as the one I created the export from. Hope it helps to some of you too.

Link to comment
Share on other sites

  • 3 weeks later...

I use SVG designs to create cut files for home hobby cutting machines such as Cricut or Silhouette Cameo. If I'm using text in my designs, I have to convert the text to curves, ungroup the letters, and then Add them in the Geometry panel. This is especially important with script fonts as they overlap. As well, all objects have to be curves in the design before exporting them for cutting.

I'm attaching a screenshot of my SVG export window that works just fine for my purposes. 

I sought out this forum again this morning since I decided I wanted to create rhinestone designs which make it imperative that the design maintain the size through the export process. So far my test documents have worked to within ~0.01 of an inch when exported using this preset. Fingers crossed it will work when I figure out how to create my rhinestone designs in Affinity Designer. I've only been using AD for a couple of months after years in Inkscape.

785339881_ScreenShot2021-04-11at12_38_43PM.png.474749a3bc9300f8b8d161453de3f85b.png

Link to comment
Share on other sites

  • 4 months later...

For anyone wanting the secret recipe for files that can be used with Tinkercad...

  • Use the standard export option
  • Exported "Selected only" for each part
  • Set your millimetre measurements as pixels. e.g a 100 mm design should be set as 100 pixels (no file manipulation required after export)
  • Uncheck all options except converting text to curves
  • Convert all objects to curves
  • "Thick" lines will export as a border, with the thickness ignored. This can be deceptive and your parts will be smaller in Tinkercad, by half the width of the line. I set my borders to 0 pixels

That very short list took me 3 or 4 hours to figure out :(

 

keywords: SVG, Tinkercad, 3D Print, Creality Ender

Regards,

Steve Vink

Serif customer since 1994

Affinity Photo, Photoplus, DrawPlus, PagePlus, MoviePlus, WebPlus, PanoramaPlus, 3DPlus, CraftArtist

Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...
On 12/5/2022 at 11:33 AM, jango_fx said:

in v2 still the same issue...

workaround for now: export with 2540 DPI. seems to scale at least halfway reliable by 100. you still get minor rounding issues due to floating point accuracy, of course... but to a 0.1mm precision it seems fine

This has been driving me up the wall for years. I figured it'd be fixed by v2, but I keep telling myself it's still better than paying a subscription fee.

Link to comment
Share on other sites

  • 2 weeks later...

Bump on this, trying to export SVG to use in Tinkercad and the sizing is WAY off. 

A 51mm wide selected shape in Affinity, export selected only (one single vector shape, filled gray, no outlines). Imports into TC at 88.709 mm wide, also opens in AI at the same scale. A sizing factor of 1.7393921569 (so random it almost seems like RNG), and i cant figure out a proper scale factor. 

Oddly enough if you copy paste your vectors into illustrator directly from AFD, they paste in at actual size. So you can just save out your SVGs from AI, which is fine if you have access to Abobe like I do through work. I'm guessing inkscape would work too, but I haven't tested it.

Shouldn't need the middleman, though. 

Saving out to EPS also saves proper vector sizes. 

 

Art director by day, illustrator by night: Check Out My Shutterstock Gallery

Link to comment
Share on other sites

1 hour ago, TonyO said:

Bump on this, trying to export SVG to use in Tinkercad and the sizing is WAY off. 

A 51mm wide selected shape in Affinity, export selected only (one single vector shape, filled gray, no outlines). Imports into TC at 88.709 mm wide, also opens in AI at the same scale. A sizing factor of 1.7393921569 (so random it almost seems like RNG), and i cant figure out a proper scale factor.

- The Affinity created document DPI is (...probably the default 72 DPI and not 96 dpi as most other apps use)?
- What does that TinkerCAD expect here in order to show up drawings as 1:1 size wise?

Further SVG export options do often matter (at least from Affinity exports), especially then set/used SVG view box settings (width/height not as 100%) etc. - Another point might be, that both apps only do support a limited subset of SVG commands and thus can't handle (parse/interpret) everything the SVG 1.1 spec offers!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

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.