Inkscape Forum Inkscape > Export SVG: Size doesnt match original file

Posted by Tobias Schulz (Guest)
on 15.01.2010 11:54
(Received via mailing list)
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for 
Conference
attendees to learn about information security's most important issues 
through
interactions with peers, luminaries and emerging and established 
companies.
http://p.sf.net/sfu/rsaconf-dev2dev
Posted by Alvin Penner (Guest)
on 16.01.2010 17:11
(Received via mailing list)
The size difference between the two files is confirmed. The bounding 
boxes
for the two .svg files are given below.
Illustrator - width="194.284px" height="75.238px"
Inkscape -    width="242.855" height="94.04725"

The ratio of the sizes is exactly 1.25 which equals 90/72, which equals 
the
size ratio of a point to a pixel. It looks as though Inkscape has 
probably
assumed that the original dimensions were given in points, and has 
probably
converted them to pixels by multiplying by 90/72, which is a reasonable
thing to do. (However, I know nothing about Illustrator, so I don't know 
if
the native units in Illustrator are points or not.)

--
View this message in context: 
http://old.nabble.com/Export-SVG%3A-Size-doesnt-match-original-file-tp27175427p27191042.html
Sent from the Inkscape - User mailing list archive at Nabble.com.
Posted by Alvin Penner (Guest)
on 17.01.2010 12:44
(Received via mailing list)
I think so, unless someone else has a better idea. If it's any 
consolation
the scale factor is predictable, you would need to make your original
drawing 80% of its current size. Unless Illustrator allows you to change 
the
screen units. Inkscape assumes that the default resolution is 90 dpi.

--
View this message in context: 
http://old.nabble.com/Export-SVG%3A-Size-doesnt-match-original-file-tp27175427p27192660.html
Sent from the Inkscape - User mailing list archive at Nabble.com.
Posted by Shawn H Corey (Guest)
on 17.01.2010 13:10
(Received via mailing list)
Alvin Penner wrote:
> I think so, unless someone else has a better idea. If it's any consolation
> the scale factor is predictable, you would need to make your original
> drawing 80% of its current size. Unless Illustrator allows you to change the
> screen units. Inkscape assumes that the default resolution is 90 dpi.
> 

File -> Inkscape Preferences...

Has a tab:  Import/Export
where you can set the default export resolution.  I don't know if this
will help.


--
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.
Posted by Linda A. Walsh (Guest)
on 20.01.2010 22:06
(Received via mailing list)
Alvin Penner wrote:
> I think so, unless someone else has a better idea. If it's any consolation
> the scale factor is predictable, you would need to make your original
> drawing 80% of its current size. Unless Illustrator allows you to change the
> screen units. Inkscape assumes that the default resolution is 90 dpi.
----
> the native units in Illustrator are points or not.
----

    I believe you are confusing 90 with 96.  96 pixels / inch is the
reference standard given in CSS3
(http://www.w3.org/TR/css3-values/#reference), *though*, it's a
'relative' value that is listed as being defined by an angle of vision,
96 is the most common value associated with pixels (happening to be 1.5
* the size of an ADOBE (and web standard) 'point', which is defined as a
as a physical unit in HTML as 1/72nd of an inch.

    The value of of dots/inch in a photo or Illustrator diagram is
settable on a per-image basis.  It's initial value will come from the
value set in any template you choose (usually 72dpi).

    The default dpi in inkscape is set in its preferences under
import/export. There you can set the default dpi you wish to use.  That
the product ships with a default of 90 would seem to be a bug as it
doesn't correspond to any standard that I know of (72 or 96 or 100 would
have made more sense, with 100 being from the nearest fixed-font size
under the X-window system as well as being metric-like and easily
subdivided).


    Hopefully if you set your Import/Export value to 72 or 96 (72 seems
like such low resolution -- it's a very old standard, suitable for type
sizing, but not pixels/inch.  Remember, print is anything from 150-300
dpi.  72 or 96 would look pretty bad in print.  Without Truetype,
opentype or similar font-smoothing technology, 96dpi doesn't look very
good on the screen, either.



Linda
Posted by Alvin Penner (Guest)
on 21.01.2010 01:56
(Received via mailing list)
just for future reference, the Inkscape definitions of the size of 
various
physical units are given in the file 'units.xml'. This file includes
definitions of a pixel and a point. On a Windows machine, this file is
located at:
C:\Program Files\Inkscape\share\ui\units.xml.

--
View this message in context: 
http://old.nabble.com/Export-SVG%3A-Size-doesnt-match-original-file-tp27175427p27250964.html
Sent from the Inkscape - User mailing list archive at Nabble.com.
Posted by Tobias Schulz (Guest)
on 21.01.2010 08:45
(Received via mailing list)
Hi Linda,

thank you. unfortunately the dpi export/import value is ignored during
the export.... i tried this already.

so, the problem is that illustrator is using the wrong dpi in his 
AI-Files?

Tobias

Am 20.01.2010 22:05, schrieb Linda A. Walsh:
>> for the two .svg files are given below.
> ----
> settable on a per-image basis.  It's initial value will come from the
>
>
>
>    

--
**** ACHTUNG! Ab dem 01.09.2009 neue Adresse! ****

Tobias Schulz>>>  In der Kirchtanne 27>>>  64297 Darmstadt-Eberstadt
PropperDX@gmx.net>>>  http://www.propperdx.de
Posted by Linda A. Walsh (Guest)
on 22.01.2010 02:13
(Received via mailing list)
Tobias Schulz wrote:
> Hi Linda,
> 
> thank you. unfortunately the dpi export/import value is ignored during 
> the export.... i tried this already.
----
  Hmm....That sounds...unique.  But what are you trying to
export -- svg.  I don't think 'dpi' has a meaning until you are 
rendering
on something so for 'svg' -> 'svg', no dpi is needed.

But you need to have the 'dpi' in inkscape set to the same 'dpi' that's
associated with his document in AI.
> 
> so, the problem is that illustrator is using the wrong dpi in his AI-Files?

That sounds like it.., but I don't see a place to set that except for
raster rendering (which seems to have 72/150/300 as options).

You might want to make sure that their inkscape is using the same value 
as their OS's value for their display.  I.e. set inkscape's default to 
whatever
their OS is using for screen size.

Best would be to make sure the OS value is 'correct' for their display,
(take their screen resolution divided by measured inches of their 
display.
Using a ruler is the best way).  Horizontal SHOULD equal vertical so
you should only have 1 value for your display's dpi.
Posted by Tobias Schulz (Guest)
on 22.01.2010 09:16
(Received via mailing list)
hi Linda,

based on your information that illustrator uses 72dpi, i did some tests.

if i export my AI-Files to PNG using 72 DPI (command line option -d 72)
everything is perfect.
but, i need a svg file. I am not able to export the svg file with a
dpi-setting. sure, dpi have no meaning... So... i am ... without
imagination.

i tried to set every dpi-value i found in preferences to 72 DPI. i tried
to set width/height values during export via command-line.

So, is my last chance to enclose image with a scale-matrix?

thanks a lot, i appreciate your help!

tobias

Am 22.01.2010 01:12, schrieb Linda A. Walsh:
> on something so for 'svg' ->  'svg', no dpi is needed.
> their OS is using for screen size.
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Inkscape-user mailing list
> Inkscape-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/inkscape-user
>
>    

--
**** ACHTUNG! Ab dem 01.09.2009 neue Adresse! ****

Tobias Schulz>>>  In der Kirchtanne 27>>>  64297 Darmstadt-Eberstadt
PropperDX@gmx.net>>>  http://www.propperdx.de
Posted by Linda A. Walsh (Guest)
on 22.01.2010 11:42
(Received via mailing list)
Tobias Schulz wrote:
> i tried to set every dpi-value i found in preferences to 72 DPI. i tried 
> to set width/height values during export via command-line.
> 
> So, is my last chance to enclose image with a scale-matrix?
> 
> thanks a lot, i appreciate your help!
> 
> tobias
----
  No...Try this:

  1) (this step may be optional, if you want to experiment,
go straight to 2 else...) in C:\Program Files (x86)\Inkscape\share\ui,
rename file units.xml to units.xml.save and copy the attached version
in it's place.

  It will set inkscape's dpi to 96 which = the default level
of your OS, (from your email headers, you appear to be running
windows 7, yes?)  _assuming_ you haven't adjusted Window's
default dpi value (under Control Panel->Display).


  2) In Inkscape, under File->Inkscape Preferences->Interface
Use a ruler and set the "Zoom correction factor" so that whatever you
use for measuring, say 100 'mm', is measured out to be exactly 100mm.
(The value on my screen was 104.17, but this was using my corrected
file attached, which may change the value...don't know).


Using the above steps, I created 3 objects square cube sphere with 1"
diameters.  Saved them as .svg.  Read the file in to AI and they
measured as 1" -- same size in both applications.  Hopefully this
will work for you too?  :-)

(It's been a learning experience for me as well!)

Linda
Posted by Tobias Schulz (Guest)
on 22.01.2010 15:11
(Received via mailing list)
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for 
Conference
attendees to learn about information security's most important issues 
through
interactions with peers, luminaries and emerging and established 
companies.
http://p.sf.net/sfu/rsaconf-dev2dev
Posted by Linda A. Walsh (Guest)
on 22.01.2010 16:41
(Received via mailing list)
Tobias Schulz wrote:
> not really a solution, but only the result counts :)
> 
> i am not sure why you got other results... iam confused :)
---
  There is one other variable.  Your screen size.

  My screen size is very close to 96 dpi, so I may have gotten
lucky.  What is your screen's resolution, and what is it's width/height
(in cm or inches).  It is perplexing why it should work on my setup and
why is doesn't work on yours.  Another (unlikely) possibility might
be version differences in Illustrator.

  Sorry we couldn't figure this out more easily...*sigh*
-l
Posted by Tobias Schulz (Guest)
on 22.01.2010 22:04
(Received via mailing list)
Hi Linda,

here at home i have

1920x1080 EIZO EV2333W 23" widescreen
1280x1024 NEC. 19"

At work almost the same (22" +  19").

But i think this have nothing to do with the screen-size. I also
converting images in the background with inkscape on our
root-webserver... and our customer uses a mac-system ( i dont know which
kind...)

I think the problem is either Illustrator (because it uses 72 instead
90/96) or inkscape with illustartor files (because it asumes 90/96 and
not 72).

have a nice weekeend!



Am 22.01.2010 16:40, schrieb Linda A. Walsh:
> lucky.  What is your screen's resolution, and what is it's width/height
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Inkscape-user mailing list
> Inkscape-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/inkscape-user
>
>    

--
**** ACHTUNG! Ab dem 01.09.2009 neue Adresse! ****

Tobias Schulz>>>  In der Kirchtanne 27>>>  64297 Darmstadt-Eberstadt
PropperDX@gmx.net>>>  http://www.propperdx.de
Posted by Jon Cruz (Guest)
on 22.01.2010 22:17
(Received via mailing list)
On Jan 23, 2010, at 2:42 AM, Tobias Schulz wrote:

> 
> not really a solution, but only the result counts :)
> 
> i am not sure why you got other results... iam confused :)

A more reliable approach might be to specify a viewbox

http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute
<svg width="3in" height="4in" version="1.1"
     viewBox="0 0 216 288" preserveAspectRatio="none"
     xmlns="http://www.w3.org/2000/svg">
or

<svg width="3in" height="4in" version="1.1"
     viewBox="0 0 270 360" preserveAspectRatio="none"
     xmlns="http://www.w3.org/2000/svg">

Where the width and height of the viewBox (its last two parameters) are 
the inches size multiplied by either 72 or 90.
Posted by Tobias Schulz (Guest)
on 22.01.2010 22:26
(Received via mailing list)
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for 
Conference
attendees to learn about information security's most important issues 
through
interactions with peers, luminaries and emerging and established 
companies.
http://p.sf.net/sfu/rsaconf-dev2dev
Posted by Jon Cruz (Guest)
on 22.01.2010 22:28
(Received via mailing list)
On Jan 23, 2010, at 10:25 AM, Tobias Schulz wrote:

> oh yeah, you are rigth. that isnt so "quick and dirty".
> 

Did adding the viewBox work for your situation? It would be handy to 
know.
Posted by Tobias Schulz (Guest)
on 22.01.2010 22:50
(Received via mailing list)
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for 
Conference
attendees to learn about information security's most important issues 
through
interactions with peers, luminaries and emerging and established 
companies.
http://p.sf.net/sfu/rsaconf-dev2dev