Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exporting as an SVG in Adobe Illustrator canvas size issues [closed]

I'm having real trouble with saving a simple SVG in Adobe Illustrator.

Illustrator keeps imposing its own canvas size on the export.

This is what I'm doing...

1) Draw an art board around the image

enter image description here

2) File > Save As

3) Change type to SVG

When I view the result, Illustrator has seemed to have resized the canvas arbitrarilyenter image description here

How can I control this so I can get my own size?

like image 446
SparrwHawk Avatar asked Jun 21 '12 15:06

SparrwHawk


People also ask

How do I change SVG size in Illustrator?

Set your Illustrator Artboard to the dimensions you wish to have, these can be found in the top right when you have an Artboard selected. You'll want to select/highlight your Logo and crop the artboard to fit exactly. To do this, use the menu and select: Object > Artboards > Fit to selected art.

How do I Export as high quality SVG from Illustrator?

To save your artwork artwork as SVG, choose File > Export > SVG (svg). Check Use Artboards if you'd like to export the contents of your artboards as individual SVG files.

Why is Illustrator exporting the wrong size?

This is caused when the artboard is on decimal pixel value on X and Y, and when the size of the artboard is decimal as well Make sure that your artboards are located on integer values on the X and Y axis and has integer Width and Height. Try to rearrange them putting a integer value between them!


3 Answers

Your problem is that your SVG is being saved with the Artboard, which is set to the default document size.

Try using "Object > Artboards > Fit to Artwork Bounds" before you save.

like image 164
Nicholas Credli Avatar answered Oct 05 '22 05:10

Nicholas Credli


The Mac Finder (which I'm assuming you're using to view your SVGs) tends to ignore SVG boundaries. Shouldn't matter in production, although it's a bit annoying when you're viewing them in a folder.

Open your SVG file in a text editor, paying special attention to the opening tag. Make sure the cartesian coordinates in the "viewbox" attribute matches what you have in mind.

In-depth explanation of what the code means: http://commons.oreilly.com/wiki/index.php/SVG_Essentials/Coordinates

like image 31
aljabear Avatar answered Oct 05 '22 05:10

aljabear


Illustrator has an issue with artboards, ie "viewBox" in the .svg format. Try this: first adjust your artboard/canvas for your graphic in Illustrator, then save the file in .ai format.

Now from the .ai format you can save the file as .svg and your artboard will be as you adjusted it. Next time you open the .svg in Illustrator, the artboard will be messed up again, so you will have to work from the .ai file and just use the .svg on the web.

That means each time you need to adjust an .svg, you need to first save it in .ai-format, adjust the artboard, save it as .ai and then save it as .svg.

If you have a contact address to the people at Adobe, let them know...

like image 39
Tdude Avatar answered Oct 05 '22 04:10

Tdude