Re: [Inkscape-user] Export SVG: Size doesnt match original file
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.
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.
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 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.
----
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
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.
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:
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 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.
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
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 _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
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.
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:
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.
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 _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Tobias Schulz wrote:
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
---- 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
1) no difference. I tried this yesterday already... yes, i am running windows 7 and didnt change the dpi.
2) mhm... with and without your units.xml the zoom / mm adjustment ist 100....
i tried your steps... but.... something is wrong here..... now, i have 3 svg-files.... they are all wrong.... AHHHHH!
but, i think i have a workaround:
- i convert ai to png using 72 DPI (instead default 90) i loaded the png to illustrator, both files have the same size in cm / inch.
- i convert ai to svg (still wrong size) and enclose the svg with a scaled box to recalculate 90 (why 90 and not 96???) to 72 dpi .... <g transform="scale(0.800317481315)"><image overflow="visible" width="151.19" height="61.606499" xlink:href="file:///C:/workspace/ritter/homepage/html/media/Penbuilder/uploads/2010/01/22/358/RitterPen-klein_2820_1.svg"></image></g> .....
not really a solution, but only the result counts :)
i am not sure why you got other results... iam confused :)
tobias
Am 22.01.2010 11:05, schrieb Linda A. Walsh:
Tobias Schulz wrote:
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
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
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
Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
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
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:
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
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 _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
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.
oh yeah, you are rigth. that isnt so "quick and dirty".
Am 22.01.2010 22:16, schrieb Jon Cruz:
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.
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
Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
sorry, i am not at work. its 11pm localtime :) i try it on monday morning.
tobias
Am 22.01.2010 22:28, schrieb Jon Cruz:
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.
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
Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
participants (5)
-
Alvin Penner
-
Jon Cruz
-
Linda A. Walsh
-
Shawn H Corey
-
Tobias Schulz