Importing a SVG

Previous topic - Next topic

cmskog

Hello fellow Scribus users !

I would like to import a SVG logo image(from Inkscape) into a Scribus document.

Doing this I encountered some weird things.

My document is a standard A4 document(with unit 'mm').
My SVG image is 181,10 x 168,30 px.

If I enable preview in the import window(File->Import->Get Vector File), Scribus decides that these 181,10 x 168,30 pixels
should be mapped to 21104.10 x 29823 pt.
I would expect the measurement to be in mm's given the unit of document....

But, anyway...
The preview is completely transparent, as is the (huge)frame after importing.
Any ideas why ?


I am on the trunk of the devel scribus give or take some days(scribus-trunk on "PPA for Scribus friends").

Regards,
Carl Michael Skog

utnik

hello carl michael

how do you try to import the logo? – and is it really a vector file?

Quote from: cmskog on September 21, 2012, 04:53:05 PMMy SVG image is 181,10 x 168,30 px.

...there is no fixed resolution in vector files – where did you find this pixel values?

Quote...Scribus decides that these 181,10 x 168,30 pixels should be mapped to 21104.10 x 29823 pt.

usually i work with the stable branch (scribus 1.4.1) without this preview. but i just tryed in 1.5 (some two or three months old) and the values given in the preview look normal (could be the actual size on the work space when i created the artwork...)

i don't think, that you created this logo on a virtual sheet of ten meters – so there is something weird...
as it's a vector file (if it really is), you can scale it down – try with 1%, then the logo should be something around 10 cm long...

QuoteI would expect the measurement to be in mm's given the unit of document....

in my 1.5.0 version it comes in mm – don't know, which adjustment is responsible for this...

did you try the same in a 'stable' scribus version as well? with what results?
if nothing appears after scaling down, you can upload the .sla and .svn files (if you're allowed to) – i'll take a look at them...

utnik

cmskog

Quote from: utnik on September 22, 2012, 10:00:16 AM
hello carl michael

Hello, utnik !

Quote from: utnik on September 22, 2012, 10:00:16 AM
how do you try to import the logo? – and is it really a vector file?

By using the File->Import->Get vector file menu.
Yes, it is(the Inkscape SVG is attached).

Quote from: utnik on September 22, 2012, 10:00:16 AM
...there is no fixed resolution in vector files – where did you find this pixel values?

File->Document properties in Inkscape.

Quote from: utnik on September 22, 2012, 10:00:16 AM
usually i work with the stable branch (scribus 1.4.1) without this preview. but i just tryed in 1.5 (some two or three months old) and the values given in the preview look normal (could be the actual size on the work space when i created the artwork...)

i don't think, that you created this logo on a virtual sheet of ten meters – so there is something weird...
as it's a vector file (if it really is), you can scale it down – try with 1%, then the logo should be something around 10 cm long...

Yep, I scaled down.
But the image frame is still empty after this...

Quote from: utnik on September 22, 2012, 10:00:16 AM
in my 1.5.0 version it comes in mm – don't know, which adjustment is responsible for this...

Maybe a regression in my bleeding edge version ?

Quote from: utnik on September 22, 2012, 10:00:16 AM
did you try the same in a 'stable' scribus version as well? with what results?
if nothing appears after scaling down, you can upload the .sla and .svn files (if you're allowed to) – i'll take a look at them...

Nope, I haven't.
If I remember right, you can not use a 1.4.x version after converting the file to the 1.5.x file type.
The files are attached.

Quote from: utnik on September 22, 2012, 10:00:16 AM
utnik

[attachment deleted by admin]

utnik

hello carl michael

it's not a scribus problem.
there is something wrong with your .svg file. i'm not able to import it – but i copied the whole artwork and pasted it in a new inkscape file. this file can be imported without any problem. (i tried standard.svg and inkscape.svg – both versions work...)

did you change something direct inside the xml tree? – there is a broken title tag (this wont be the problem, but there may be other broken parts...)

utnik


[attachment deleted by admin]

cmskog

Quote from: utnik on September 22, 2012, 08:52:15 PM
hello carl michael

Hi again, utnik !

Quote from: utnik on September 22, 2012, 08:52:15 PM
it's not a scribus problem.
there is something wrong with your .svg file. i'm not able to import it – but i copied the whole artwork and pasted it in a new inkscape file. this file can be imported without any problem. (i tried standard.svg and inkscape.svg – both versions work...)

Very interesting !

Quote from: utnik on September 22, 2012, 08:52:15 PM
did you change something direct inside the xml tree? – there is a broken title tag (this wont be the problem, but there may be other broken parts...)

No.
The figure was converted in Inkscape from an .odg file, which in turn was created from an Office Graphics file, though...
If that might have introduced the broken stuff...

Quote from: utnik on September 22, 2012, 08:52:15 PM
utnik

Anyway, HUGE thanks for clearing up what was the problem !

Regards,
Carl Michael Skog

neilsands

I don't know it this will help, but I abandoned Inkscape in favour of Scribus precisely because the SVG files that Inkscape produced couldn't be used anywhere else (I was trying to make them work in Sibelius, by the way). A quick test is to drag the SVG into a Google Chrome window. If Google Chrome can't show them the way you want them to be, nothing else will either.

Meho R.

Quote from: cmskog on September 21, 2012, 04:53:05 PM

The preview is completely transparent, as is the (huge)frame after importing.
Any ideas why ?


1. Zoom out in Inkscape until you get to the zoom of 1% (which is a minimum zoom allowed)
2. Use Ctrl+A to select all objects in the drawing. You see that huge transparent object? That is the source of your import problem. Not Inkscape's nor Scribus's fault, just an object which gets imported properly (huge frame) as well as other elements of the file (zoom in in Scribus after importing the file and you'll find your logo too). If you do as utnik did and copy only those object on the page and paste them into a new Inkscape document, your problem should be solved.

Quote from: neilsands on September 26, 2012, 05:14:53 PM
I don't know it this will help, but I abandoned Inkscape in favour of Scribus precisely because the SVG files that Inkscape produced couldn't be used anywhere else (I was trying to make them work in Sibelius, by the way). A quick test is to drag the SVG into a Google Chrome window. If Google Chrome can't show them the way you want them to be, nothing else will either.

Or maybe you just had been doing it wrong. I've been using Inkscape produced SVG's and PDF's in preparation of printed material for years, never encountered any serious issues. But you should be aware of limitations of SVG file format and act accordingly. If you expect that an artwork, in which, e.g., filters and various effects are used heavily, gets exported perfectly in SVG format, then you are definitely doing it wrong.

Your confidence in Google Chrome is ... interesting ;)