Author Topic: Importing a SVG  (Read 7615 times)

cmskog

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Importing a SVG
« on: September 21, 2012, 05:53:05 pm »
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

  • Hero Member
  • *****
  • Posts: 1306
  • Karma: 14
Re: Importing a SVG
« Reply #1 on: September 22, 2012, 11:00:16 am »
hello carl michael

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

My 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…

Quote
I 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

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Re: Importing a SVG
« Reply #2 on: September 22, 2012, 08:01:50 pm »
hello carl michael

Hello, utnik !

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).

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

File->Document properties in Inkscape.

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...

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 ?

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.

utnik

utnik

  • Hero Member
  • *****
  • Posts: 1306
  • Karma: 14
Re: Importing a SVG
« Reply #3 on: September 22, 2012, 09:52:15 pm »
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

cmskog

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Re: Importing a SVG
« Reply #4 on: September 22, 2012, 11:31:20 pm »
hello carl michael

Hi again, utnik !

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 !

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...

utnik

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

Regards,
Carl Michael Skog

neilsands

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
  • Scribus User
Re: Importing a SVG
« Reply #5 on: September 26, 2012, 06: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.

Meho R.

  • Full Member
  • ***
  • Posts: 198
  • Karma: 0
Re: Importing a SVG
« Reply #6 on: October 05, 2012, 10:11:47 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.

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 ;)

 

palmate