Is it possible to export something to SVG without exporting the page/canvas itself?
I'm used to exporting images to .png and .jpg where I select what I want to export and export it. The result is that the exported image only contains what I selected.
However, when I do this and export to SVG the result is always the entire drawing including whatever page/canvas it was on and it contains all other objects on the canvas.
I did not find any hints in the export options dialog. I could of course manually resize the page to whatever objects I want to export which is a bit tedious. My current workaround is to open the SVG in Inkscape and go to Document Properties > Page tab > Custom size > Resize page to drawing or selection. If there is no built-in option in Xara I can just continue to use that workaround instead.
I'm using XDP X9 if that matters.
17 October 2019, 11:40 AM
Acorn
Re: Exporting to SVG without exporting the page?
SVG Object exports have only just been fixed in version 16.
Acorn
17 October 2019, 11:43 AM
Chris M
Re: Exporting to SVG without exporting the page?
The option to just export a single object to SVG wasn't introduced until v16.1 or .2, I forget which. X9 won't do it I'm sorry to tell you.
17 October 2019, 12:40 PM
handrawn
Re: Exporting to SVG without exporting the page?
copy paste it to a new blank xar document - export it is what I do
17 October 2019, 12:53 PM
The Alien
Re: Exporting to SVG without exporting the page?
Thanks for the answers. I'll just continue using the workaround.
17 October 2019, 01:00 PM
mwenz
Re: Exporting to SVG without exporting the page?
Quote:
Originally Posted by handrawn
copy paste it to a new blank xar document - export it is what I do
Blank Photo document is what I use...for many types of exports. No page size and so it always uses objects' bounds.
17 October 2019, 01:12 PM
Acorn
Re: Exporting to SVG without exporting the page?
Quote:
Originally Posted by mwenz
Blank Photo document is what I use...for many types of exports. No page size and so it always uses objects' bounds.
Never thought of that.
Great idea as I now have two uses for the Blank Photo template: import of images, export of SVG.
Acorn
17 October 2019, 01:47 PM
handrawn
Re: Exporting to SVG without exporting the page?
yes blank photo if page size is an issue ;)
18 October 2019, 12:08 AM
Egg Bramhill
1 Attachment(s)
Re: Exporting to SVG without exporting the page?
Blank document doesn't work as far as I know, the page size is also included.
Mike's paste into a blank photo is a great suggestion.
However I really like the v16 Export Selected Objects Only. A big improvement. I can just select the required objects on a working document and export easy-peasy.
18 October 2019, 05:21 AM
handrawn
Re: Exporting to SVG without exporting the page?
sorry egg but I'm not with you there - the issue as I understand it is to export a vector svg by selection without selecting everything else automatically as well
if I select the vector object[s] I wish to export, press ctrl+c, ctrl+n, ctrl+v, shift+ctrl+e, and export svg I get the selected object[s] only
I don't use blank photo because it is not my default template, and so it would slow the process down unecessarily [for me]
page size does not come into it if it is a vector, it just imports into illustrator/inkscape as object[s]
this is with designer pro 15.1 which does not have the options that are new in ver 16 that I grant would be quicker still
having checked it out I can't see that paste into blank photo document gives any advantage in this instance
18 October 2019, 02:31 PM
The Alien
Re: Exporting to SVG without exporting the page?
Quote:
Originally Posted by mwenz
Blank Photo document is what I use...for many types of exports. No page size and so it always uses objects' bounds.
Nice, thank you for this solution.
18 October 2019, 02:37 PM
handrawn
Re: Exporting to SVG without exporting the page?
it works [with ver 15.1] if you want a page size to be applied to all the vector objects - but it still exports all the vector objects and not just the selected one[s] - so I am now confused [nothing new]
19 October 2019, 01:58 AM
Egg Bramhill
Re: Exporting to SVG without exporting the page?
Quote:
Page size does not come into it if it is a vector, it just imports into illustrator/inkscape as object[s]
Unfortunately not so HD. It imports all the vector objects plus the page background:
19 October 2019, 08:15 AM
The Alien
Re: Exporting to SVG without exporting the page?
Quote:
Originally Posted by handrawn
it works [with ver 15.1] if you want a page size to be applied to all the vector objects - but it still exports all the vector objects and not just the selected one[s] - so I am now confused [nothing new]
It requires pasting the selected objects into a new blank photo document, yes, but at least it decreases the number of steps I must take (resizing the page either manually or through Inkscape) to get the result I want.
19 October 2019, 11:23 AM
handrawn
Re: Exporting to SVG without exporting the page?
@alien - I see that, thanks, one less point of confusion :)
@egg - I think you have taken my comment out of context up to a point - it depends what you mean by page size I suppose
what it does is bring multiple objects into inkscape/illustrator as a spread [defined a bit confusingly on the inkscape status bar as a group, it cannot be ungrouped it has to be dealt with as a spread] - this spread is defined by the extent of the objects and so is not actually related to the page size of either document in my terms
the objects can be removed from the spread in both inkscape and illustrator and so become available as seperate objects
I don't do websites - to me a page size is what you get in, say, affinity pagemaker ;)
on that basis I will admit that copy paste out to a new document in ver 15.1 may only be useful for single objects....
20 October 2019, 04:45 AM
Egg Bramhill
Re: Exporting to SVG without exporting the page?
Quote:
I think you have taken my comment out of context up to a point - it depends what you mean by page size I suppose
No I haven't HD. I can see that you as a non user of Xara for website creations see no issue. However for use in website creations the fact that Xara's svg export contained the page size has serious implications and great limitations of their usefulness.
If for example you use placeholder text to import an svg into a webpage thus:
My context was different to that of yours and alien's it would seem, but with respect, if people who build websites think they have a monopoly on the terminology, and that it should always be assumed the subject is web based unless stated otherwise, they are wrong
And if the subject is web based it should be in the web design forum and not in the general graphics forum and then I might have realised there was more to it... but thank you for the explanation ;)
I am well known for not building websites, but I do use svg/pdf a lot for transferring vector between programs for animation, there is no page size at all in animation that is done with camera view[s]
20 October 2019, 12:24 PM
handrawn
1 Attachment(s)
Re: Exporting to SVG without exporting the page?
following on from your video
if I export the shapes, including the [purple] A4 background, from xara 15.1 as svg and import into inkscape set to A7 size, it does not reset the page/artboard size:
for all I know this is because my xara document is a print document, not a web document [which I don't, obviously, use]
what it does is export all the shapes as a spread that spans the maximum dimensions of all the included shapes
which is how I read alien's:
Quote:
when I do this and export to SVG the result is always the entire drawing including whatever page/canvas it was on and it contains all other objects on the canvas
bearing in mind it exports everything whether on the canvas/page or not in my case
cross purposes :D
I learnt a few things [learned if you must]
21 October 2019, 12:35 AM
Egg Bramhill
Re: Exporting to SVG without exporting the page?
All very interesting HD ;)
However if you export your A4 portrait regardless of the page size it's imported into it CAN contain a second Page background vector. Not just a website issue but one I believe could impact on print documents. Not that I'm sure how an svg is handled in a print document as it just consists of vector paths.
Here's my observations:
21 October 2019, 07:19 AM
handrawn
2 Attachment(s)
Re: Exporting to SVG without exporting the page?
I see that egg, thanks
the export is taking something else into accouint re the page background - for example in my case [print document] - the export comes in correct if the page has no shadow, but wrong if it does:
so I can only surmise that something else in your [web] document settings is affecting the output...?
[I tried changing my document type but it made no difference, but it's probably more subtle than just that]
might even be affected by the version of inkscape - mine is 0.92.4 64bit
but FTR I get same in illustrator CS2
21 October 2019, 04:08 PM
Egg Bramhill
Re: Exporting to SVG without exporting the page?
Yes HD, but fortunately this is no longer an issue with "Export selected Objects Only".
21 October 2019, 04:35 PM
handrawn
Re: Exporting to SVG without exporting the page?
I am pleased to see it has been fixed in ver 16 - fortunately it is not an issue for me [in ver 15.1] as we have said, nor do I see it as an issue if you are only interested in the the vector rather than a notional web page