Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exporting an object as svg from inkscape
  1. Select the object(s) to export
  2. Open the document properties window (Ctrl+Shift+D)
  3. Select "Resize page to drawing or selection"
  4. File > Save As Copy...
  5. Select Optimized SVG as the format if you want to use it on the web
@magosi
Copy link

magosi commented May 18, 2019

thanks

@RawrBear
Copy link

RawrBear commented Jul 14, 2019

Thank you, man!

@BoQsc
Copy link

BoQsc commented Aug 30, 2019

Warning
All it changes is the part of the page that will be shown.
By using this method you will include all the other objects that are on the page.

If you really care about the size of SVG file, you might consider to search for another method for exporting specific object out of page.

@JohnCC330
Copy link

JohnCC330 commented Oct 4, 2019

This is a somewhat old thread, still, this might be of interest. In Inkscape 0.92, the above recipe works but there's a problem:

  • On the exported SVG, GIMP reports that it doesn't contain a size, and proposes to import it into a 500x500 pixel area, which doesn't respect the expoerted aspect ratio. Strangely, GIMP's preview image does have the correct aspect, and the SVG does include a width and size.
  • The size and width from the exported SVG does not seem to include line widths, so the rendered image is cropped.

@willjw3
Copy link

willjw3 commented Dec 22, 2019

Cheers!

@Joseppi83
Copy link

Joseppi83 commented Dec 25, 2019

Hmmm. I followed this with the vector image I created in Inkscape. I looked at the difference between the png and the svg I exported, and the png file looked significantly better than the svg.

Any idea why a png would look better than an svg, even though it was created with Inkscape in svg format?

@diegobh
Copy link

diegobh commented Jan 29, 2020

it gives me ine data:image/png;base64 link urli.
How could i export and get the path d=
Please?

Thank you!!!!

@MattNemeth
Copy link

MattNemeth commented Oct 16, 2020

Was trying to use inkscape svg on my web page. Gave me quite the headache. Wish I found this sooner. Thanks

@marcker
Copy link

marcker commented Nov 27, 2020

thanks!

@MohanSai1997
Copy link

MohanSai1997 commented Dec 21, 2020

This is really beauty 🎉🎊

@riansyahrobi8
Copy link

riansyahrobi8 commented Jan 3, 2021

Thankss! very helpful ...

@justinthareja
Copy link

justinthareja commented Feb 18, 2021

Thanks!!

@karmicdice
Copy link

karmicdice commented Apr 22, 2021

  1. Select object
  2. Ctl Shift - R
  3. Save

@microrony
Copy link

microrony commented May 4, 2021

Thanks

@Jihadist
Copy link

Jihadist commented May 5, 2021

With this method u cannot save real vector image

@gabogut239
Copy link

gabogut239 commented May 19, 2021

@BoQsc Thanks for pointing that out. I also noticed it because the resulting file had the same size as the source file.

I'm looking for a method for saving a selection into a different SVG file without saving the other objects. I would really appreciate if anyone could tell me how to accomplish this.

@BoQsc
Copy link

BoQsc commented May 20, 2021

@BoQsc Thanks for pointing that out. I also noticed it because the resulting file had the same size as the source file.

I'm looking for a method for saving a selection into a different SVG file without saving the other objects. I would really appreciate if anyone could tell me how to accomplish this.

In 2019

There was an effort to make Save as Copy dialog window to have Export selected objects only checkbox.
https://gitlab.com/inkscape/inkscape/-/merge_requests/867

Something went wrong, as these changes no longer are included in the latest master branch, therefore the latest Inkscape program.
I suspect, recently, the author of the source code simply rewritten all functionality of the Inkscape Save Dialog and lazily forgot about the need to re-add and rethink the idea of Exporting selected objects to .svg file.

So we don't have it anymore, even if we had it for some small period of time as the above merge-request suggests.

@lucaslgr
Copy link

lucaslgr commented Jun 4, 2021

this step "Select "Resize page to drawing or selection" saves me after 1 hour looking for a solution. Thanks !

@thecashewtrader
Copy link

thecashewtrader commented Jul 12, 2021

AAA TYSM

@elspecal
Copy link

elspecal commented Aug 8, 2021

@BoQsc Thanks for pointing that out. I also noticed it because the resulting file had the same size as the source file.
I'm looking for a method for saving a selection into a different SVG file without saving the other objects. I would really appreciate if anyone could tell me how to accomplish this.

In 2019

There was an effort to make Save as Copy dialog window to have Export selected objects only checkbox.
https://gitlab.com/inkscape/inkscape/-/merge_requests/867

Something went wrong, as these changes no longer are included in the latest master branch, therefore the latest Inkscape program.
I suspect, recently, the author of the source code simply rewritten all functionality of the Inkscape Save Dialog and lazily forgot about the need to re-add and rethink the idea of Exporting selected objects to .svg file.

So we don't have it anymore, even if we had it for some small period of time as the above merge-request suggests.

I mean, I just copy-pasted the selection to a new document and went from there. Works perfectly. So the steps are:

  1. Select object.
  2. Copy object (Ctrl-C).
  3. Create a new document (Ctrl-N).
  4. Paste object (Ctrl-V).
  5. Resize page to selection (Ctrl-Shift-R).
  6. Save (Ctrl-S), select the Optimized SVG format and customize the setting or leave as is and click OK.

@NicolasNarvaez
Copy link

NicolasNarvaez commented May 27, 2022

Just Ctrl+Shift+E : it will open the export tool, with tabs for "document", "page", "selection" and "personalized" scopes, no need for obscure tricks this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment