Jump to content
Mindflow

Preserve document units in SVG export

Recommended Posts

When drawing elements to be cut on a laser cutter, setting up a document in mm is very helpful. Unfortunately, the common interchange file format for this kind of device is SVG. While the file format supports measurements in defined units, Designer converts to pixels during the export, which means that after import, the dimensions have to be recalculated.

Therefore, it would be great to have the option to preserve the units from the document during export, such that a 50x150mm rectangle is exported just as such.

 

Share this post


Link to post
Share on other sites

Yes please!

 

I've run into this exact problem. Right now Affinity Designer can export with pixel dimensions (when "set viewBox" is unchecked) or with height="100%" width="100%" (when "set viewBox" is enabled). I'd like to have a third option, to set the height and width using the actual dimensions of the artboard, in either mm or inches. (Ideally one could choose the unit in the SVG export options, but just using the document units would also be acceptable.)

 

Otherwise one has to play the "guess what dpi setting the software on the other end uses" game, which is never fun. (And even worse is when you need to open your SVG in multiple programs, which all assume different default dpi settings.)

Share this post


Link to post
Share on other sites

Same here. Please give us the possiblity to export in physical sizes with changeable DPI settings in the export panel too. Or at least convert the values that we put in mm to px. Now if we introduce a value that's not px, ignores it completely. Thanks!


Branding, Identity Design, UI/UX Design.    |    https://whitex.design

Share this post


Link to post
Share on other sites

Can we please get this in 1.7? When using AD to generate designs for a laser cutter (or any other CNC machine) it saves a ton of time and frustration if the SVG has real units. There's nothing worse than wasting a $20 piece of wood (and who knows how much time) because I didn't notice that the SVG was scaled wrong.

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

It seems that you can copy and paste SVG without loosing dimensional accuracy so you can copy your design and paste into Illustrator etc. But dimensional accuracy upon export would be best.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | 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.