Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Default unit millimeters when opening SVG files not pixels?

Community Beginner ,
Oct 26, 2023 Oct 26, 2023

Hello,

default unit is now millimeters when I open a SVG files. I am pretty sure it used to be pixels which makes more sense to me. Or was this information earlier saved within the file but not anymore/Illustrator not reading it?

 

macOS Sonoma 14.0

Illustrator 28.0

TOPICS
Bug
692
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Oct 27, 2023 Oct 27, 2023

There is no unit saved when you export an SVG. 

The last opened/created file or the last set unit in the Preferences is used when opening an SVG.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 27, 2023 Oct 27, 2023

My general unit is millimeters. But it doesn't matter what the last set unit is. If I open a SVG file and change the unit to pixels, close the file and open it again, it's again in millimeters. I'm pretty the behavior is now different in AI. I've worked with lots of SVG files in past all the time but after the latest update I started noticing this unit thingy.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2023 Oct 27, 2023

"If I open a SVG file and change the unit to pixels, close the file and open it again, it's again in millimeters."

Do you save the SVG or do you change the unit in Preferences?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 27, 2023 Oct 27, 2023

I figured it out. So making a new document actually changes the General unit (in Preferences). If I make a Print document it's in mm and Web is in pixels. Though now I'm a bit confused why would you have Units in the _Document_ Setup for svg files if it's actually just a unit for that session of editing, not for the _document_ itself. Changing the unit via Preferences is also a pain in the ass.

 

And now I actually realized my Print documents in New Document window are in Points even if the Preferences says General unit is millimeters or pixels (or anything else). Frustrating...

 

But many thanks for your help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2023 Oct 27, 2023

Good to hear I could help.

Yes the Preferences setting is not very useful since it will change with every document you open or create that has a units setting.

Changing the unit for an open document can be easily done by right (alt) clicking in the ruler.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2023 Nov 07, 2023

O_O Whaaaat... right clicking the ruler?! THANK YOU!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023

Thank, it is indeed vert simple.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 02, 2025 Apr 02, 2025

Just picking this back up in 2025 for anyone else frustrated with this. It was undoubidly the case that when saving an AI file as an SVG the width and height of that SVG would be set in pixels regardess of the units of measurement used in the document, at some point in the last couple of years that changed, the units used in the document were matched in the SVG.

 

This is troublesome as a lot of third party apps only recognise pixels. For example I use SVG files for a CNC router and the firmware crashes if you use anything but pixels. Until today I have typically saved the SVG, opened it in TextEdit and then manually changed the width and height of the SVG to match the pixel values used in viewBox. 

As mentioned above, a helpful and quick solution to this is to right-click on the document rulers change the units to pixels and then export the SVG. Once saved, revert the rulers back to the working units. 

However, this feels hacky, I can't help but feel there should be an option within the SVG Options dialogue to "match the document units"  if left unchecked the SVG will use pixels. 

macOS Sequoia 15.4
Illustrator 29.4

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 02, 2025 Apr 02, 2025
LATEST

Hello @hesken,

I understand that this functionality is important to you. Would you mind creating a UserVoice for this feature request (https://adobe.ly/3YeAf2N) and adding your comments there? Doing this will help us prioritize this request, and you will be notified of any updates.

 

Feel free to reach out if you have more questions or need assistance. We'd be happy to help.

 

Anubhav

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines