Skip to content

Instantly share code, notes, and snippets.

@brenopolanski
Created December 26, 2017 13:29
Show Gist options
  • Select an option

  • Save brenopolanski/46cd370d634a1709aa8a58e55cfc9a03 to your computer and use it in GitHub Desktop.

Select an option

Save brenopolanski/46cd370d634a1709aa8a58e55cfc9a03 to your computer and use it in GitHub Desktop.
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

magosi commented May 18, 2019

Copy link
Copy Markdown

thanks

@RawrBear

Copy link
Copy Markdown

Thank you, man!

@BoQsc

BoQsc commented Aug 30, 2019

Copy link
Copy Markdown

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
Copy Markdown

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

willjw3 commented Dec 22, 2019

Copy link
Copy Markdown

Cheers!

@diegobh

diegobh commented Jan 29, 2020

Copy link
Copy Markdown

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
Copy Markdown

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

@skvggor

skvggor commented Nov 27, 2020

Copy link
Copy Markdown

thanks!

@MohanSaiTeki

Copy link
Copy Markdown

This is really beauty 🎉🎊

@riansyahrobi8

Copy link
Copy Markdown

Thankss! very helpful ...

@justinthareja

Copy link
Copy Markdown

Thanks!!

@karmicdice

Copy link
Copy Markdown
  1. Select object
  2. Ctl Shift - R
  3. Save

@microrony

Copy link
Copy Markdown

Thanks

@xakod

xakod commented May 5, 2021

Copy link
Copy Markdown

With this method u cannot save real vector image

@gabogut239

Copy link
Copy Markdown

@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

BoQsc commented May 20, 2021

Copy link
Copy Markdown

@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

lucaslgr commented Jun 4, 2021

Copy link
Copy Markdown

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

@thecashewtrader

Copy link
Copy Markdown

AAA TYSM

@elspecal

elspecal commented Aug 8, 2021

Copy link
Copy Markdown

@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

NicolasNarvaez commented May 27, 2022

Copy link
Copy Markdown

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.

@dfrios

dfrios commented Mar 6, 2024

Copy link
Copy Markdown

Thanks bro!
It's the best answer I've found.

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